@mappedin/mappedin-js 6.3.0 → 6.4.0
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/THIRD_PARTY_LICENSES.txt +19 -96
- package/lib/esm/{GLTFExporter-ZVF3Y5DX.js → GLTFExporter-4HV63LGP.js} +1 -1
- package/lib/esm/{GLTFLoader-3QTALUTA.js → GLTFLoader-HV7RBR5X.js} +1 -1
- package/lib/esm/{chunk-66DYOCZO.js → chunk-62AZLR6O.js} +1 -1
- package/lib/esm/chunk-DXHWFRA5.js +1 -0
- package/lib/esm/chunk-GYYVZ4IB.js +1 -0
- package/lib/esm/{chunk-YB4VFXKF.js → chunk-URGM6RST.js} +1 -1
- package/lib/esm/index.d.ts +1001 -647
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-B32KFAD4.js → inspector-J33EC64M.js} +1 -1
- package/lib/esm/{internal-RK6SZERV.js → internal-44KLJOB5.js} +1 -1
- package/lib/esm/{text3d-DIUCQLOC.js → text3d-RWSGYTTK.js} +1 -1
- package/lib/esm/workers/collision-worker.csp.js +1 -1
- package/package.json +2 -3
- package/lib/esm/chunk-2DEFE4C2.js +0 -1
- package/lib/esm/chunk-Q56Y72HB.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as zE,$a as dv,$b as Ti,A as FE,Aa as zm,Ab as hv,B as yl,Ba as YE,Bb as MC,C as PE,Ca as XE,Cb as xu,D as OE,Db as yg,E as Xb,Ea as dg,Eb as gv,F as ya,Fa as pg,Fb as AC,G as ug,Ga as QE,Gb as FC,H as us,Ha as eC,Hb as nd,I as bl,Ia as tC,Ib as yv,J as kE,Ja as rC,Jb as bg,K as BE,Ka as nC,Kb as PC,L as _E,La as lv,Lb as bv,M as LE,Ma as oC,Mb as OC,N as Nm,Na as iC,Nb as kC,O as Kn,Oa as Qc,Ob as BC,P as RE,Pa as aC,Pb as _C,Q as Qb,Qa as sC,Qb as LC,R as ba,Ra as mg,Rb as RC,S as NE,Sa as cv,Sb as NC,T as bu,Ta as uC,Tb as va,U as lg,Ua as lC,Ub as jC,V as Jc,Va as Gm,Vb as nr,W as jm,Wa as ed,Wb as UC,X as jE,Xa as fg,Xb as vg,Y as ev,Ya as td,Yb as xa,Z as tv,Za as rd,Zb as zC,_ as UE,_a as cC,_b as xr,aa as GE,ac as Pr,ba as ls,bb as dC,c as z,ca as xk,cb as pC,d as Vr,da as rv,db as mC,e as iE,ea as $E,eb as hg,f as qb,fa as cs,fb as fC,g as ha,ga as VE,gb as hC,h as SE,ha as ZE,hb as gC,i as ag,ia as HE,ib as yC,j as DE,ja as nv,jb as bC,k as ga,ka as WE,kb as $m,l as TE,la as ov,lb as vl,m as gl,ma as vu,mb as vC,n as Lm,na as Mt,nb as fo,o as wE,oa as cg,ob as xC,p as Lo,pa as Um,pb as IC,q as Jb,qa as iv,qb as EC,r as Kc,ra as Ro,rb as pv,s as Bt,sa as av,sb as CC,t as sg,ta as sv,tb as mv,u as Ge,ua as uv,ub as fv,v as ss,va as qE,vb as gg,w as Rm,wa as Yc,wb as SC,x as Yb,xa as KE,xb as DC,y as ME,ya as Xc,yb as TC,z as AE,za as JE,zb as wC}from"./chunk-Q56Y72HB.js";import{a as No}from"./chunk-YB4VFXKF.js";import{$a as ig,B as Hh,D as Wh,Da as yE,E as hu,Ea as Hc,F as qh,Fa as bE,G as Kh,Ga as Wc,H as Jh,Ha as qc,I as Yh,Ia as Di,Ja as ng,K as lE,Ka as vE,L as ut,La as Bm,M as qe,Na as _m,Q as cE,R as dE,S as pE,T as Xh,U as be,V as Tr,W as mE,X as mo,Xa as og,Y as Zc,Z as hl,_ as vr,a as p,aa as Fr,ab as xE,b as y,ba as An,ca as Qh,d as Zh,da as Ze,e as fl,ea as Si,eb as IE,f as Pm,g as as,ga as gu,gb as fa,h as aE,ha as fE,i as Om,ia as Kb,ib as EE,ja as eg,ka as yu,kb as CE,r as sE,sa as ma,t as uE,ta as hE,ua as tg,va as rg,wa as gE,ya as km}from"./chunk-66DYOCZO.js";import{a as w,b as H,c as $h,d as tn,f as wt,g as fu,h as Vh,i as f,j as s,k as D,l as M,m as Q,n as oE,o as ne}from"./chunk-5W2UDR4H.js";var Hw=wt((Ox,kx)=>{p();(function(e,r){typeof Ox=="object"&&typeof kx<"u"?kx.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self,e.TinyQueue=r())})(Ox,function(){"use strict";var e=function(n,o){if(n===void 0&&(n=[]),o===void 0&&(o=r),this.data=n,this.length=this.data.length,this.compare=o,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)};e.prototype.push=function(n){this.data.push(n),this.length++,this._up(this.length-1)},e.prototype.pop=function(){if(this.length!==0){var n=this.data[0],o=this.data.pop();return this.length--,this.length>0&&(this.data[0]=o,this._down(0)),n}},e.prototype.peek=function(){return this.data[0]},e.prototype._up=function(n){for(var o=this,i=o.data,a=o.compare,l=i[n];n>0;){var u=n-1>>1,c=i[u];if(a(l,c)>=0)break;i[n]=c,n=u}i[n]=l},e.prototype._down=function(n){for(var o=this,i=o.data,a=o.compare,l=this.length>>1,u=i[n];n<l;){var c=(n<<1)+1,d=i[c],m=c+1;if(m<this.length&&a(i[m],d)<0&&(c=m,d=i[m]),a(d,u)>=0)break;i[n]=d,n=c}i[n]=u};function r(t,n){return t<n?-1:t>n?1:0}return e})});var qw=wt((Nxe,Bx)=>{"use strict";p();var o1=Hw();o1.default&&(o1=o1.default);Bx.exports=Ww;Bx.exports.default=Ww;function Ww(e,r,t){r=r||1;for(var n,o,i,a,l=0;l<e[0].length;l++){var u=e[0][l];(!l||u[0]<n)&&(n=u[0]),(!l||u[1]<o)&&(o=u[1]),(!l||u[0]>i)&&(i=u[0]),(!l||u[1]>a)&&(a=u[1])}var c=i-n,d=a-o,m=Math.min(c,d),h=m/2;if(m===0){var g=[n,o];return g.distance=0,g}for(var x=new o1(void 0,E$),E=n;E<i;E+=m)for(var v=o;v<a;v+=m)x.push(new ku(E+h,v+h,h,e));var I=S$(e),C=new ku(n+c/2,o+d/2,0,e);C.d>I.d&&(I=C);for(var S=x.length;x.length;){var T=x.pop();T.d>I.d&&(I=T,t&&console.log("found best %d after %d probes",Math.round(1e4*T.d)/1e4,S)),!(T.max-I.d<=r)&&(h=T.h/2,x.push(new ku(T.x-h,T.y-h,h,e)),x.push(new ku(T.x+h,T.y-h,h,e)),x.push(new ku(T.x-h,T.y+h,h,e)),x.push(new ku(T.x+h,T.y+h,h,e)),S+=4)}t&&(console.log("num probes: "+S),console.log("best distance: "+I.d));var A=[I.x,I.y];return A.distance=I.d,A}function E$(e,r){return r.max-e.max}function ku(e,r,t,n){this.x=e,this.y=r,this.h=t,this.d=C$(e,r,n),this.max=this.d+this.h*Math.SQRT2}function C$(e,r,t){for(var n=!1,o=1/0,i=0;i<t.length;i++)for(var a=t[i],l=0,u=a.length,c=u-1;l<u;c=l++){var d=a[l],m=a[c];d[1]>r!=m[1]>r&&e<(m[0]-d[0])*(r-d[1])/(m[1]-d[1])+d[0]&&(n=!n),o=Math.min(o,D$(e,r,d,m))}return o===0?0:(n?1:-1)*Math.sqrt(o)}function S$(e){for(var r=0,t=0,n=0,o=e[0],i=0,a=o.length,l=a-1;i<a;l=i++){var u=o[i],c=o[l],d=u[0]*c[1]-c[0]*u[1];t+=(u[0]+c[0])*d,n+=(u[1]+c[1])*d,r+=d*3}return r===0?new ku(o[0][0],o[0][1],0,e):new ku(t/r,n/r,0,e)}function D$(e,r,t,n){var o=t[0],i=t[1],a=n[0]-o,l=n[1]-i;if(a!==0||l!==0){var u=((e-o)*a+(r-i)*l)/(a*a+l*l);u>1?(o=n[0],i=n[1]):u>0&&(o+=a*u,i+=l*u)}return a=e-o,l=r-i,a*a+l*l}});var MM=wt((Yx,Xx)=>{p();(function(e,r){typeof Yx=="object"&&typeof Xx<"u"?Xx.exports=r():typeof define=="function"&&define.amd?define(r):(e=e||self).RBush=r()})(Yx,function(){"use strict";function e(v,I,C,S,T){(function A(F,P,O,_,G){for(;_>O;){if(_-O>600){var L=_-O+1,q=P-O+1,$=Math.log(L),K=.5*Math.exp(2*$/3),X=.5*Math.sqrt($*K*(L-K)/L)*(q-L/2<0?-1:1),V=Math.max(O,Math.floor(P-q*K/L+X)),Y=Math.min(_,Math.floor(P+(L-q)*K/L+X));A(F,P,V,Y,G)}var ee=F[P],oe=O,le=_;for(r(F,O,P),G(F[_],ee)>0&&r(F,O,_);oe<le;){for(r(F,oe,le),oe++,le--;G(F[oe],ee)<0;)oe++;for(;G(F[le],ee)>0;)le--}G(F[O],ee)===0?r(F,O,le):r(F,++le,_),le<=P&&(O=le+1),P<=le&&(_=le-1)}})(v,I,C||0,S||v.length-1,T||t)}function r(v,I,C){var S=v[I];v[I]=v[C],v[C]=S}function t(v,I){return v<I?-1:v>I?1:0}var n=function(v){v===void 0&&(v=9),this._maxEntries=Math.max(4,v),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(v,I,C){if(!C)return I.indexOf(v);for(var S=0;S<I.length;S++)if(C(v,I[S]))return S;return-1}function i(v,I){a(v,0,v.children.length,I,v)}function a(v,I,C,S,T){T||(T=x(null)),T.minX=1/0,T.minY=1/0,T.maxX=-1/0,T.maxY=-1/0;for(var A=I;A<C;A++){var F=v.children[A];l(T,v.leaf?S(F):F)}return T}function l(v,I){return v.minX=Math.min(v.minX,I.minX),v.minY=Math.min(v.minY,I.minY),v.maxX=Math.max(v.maxX,I.maxX),v.maxY=Math.max(v.maxY,I.maxY),v}function u(v,I){return v.minX-I.minX}function c(v,I){return v.minY-I.minY}function d(v){return(v.maxX-v.minX)*(v.maxY-v.minY)}function m(v){return v.maxX-v.minX+(v.maxY-v.minY)}function h(v,I){return v.minX<=I.minX&&v.minY<=I.minY&&I.maxX<=v.maxX&&I.maxY<=v.maxY}function g(v,I){return I.minX<=v.maxX&&I.minY<=v.maxY&&I.maxX>=v.minX&&I.maxY>=v.minY}function x(v){return{children:v,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function E(v,I,C,S,T){for(var A=[I,C];A.length;)if(!((C=A.pop())-(I=A.pop())<=S)){var F=I+Math.ceil((C-I)/S/2)*S;e(v,F,I,C,T),A.push(I,F,F,C)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(v){var I=this.data,C=[];if(!g(v,I))return C;for(var S=this.toBBox,T=[];I;){for(var A=0;A<I.children.length;A++){var F=I.children[A],P=I.leaf?S(F):F;g(v,P)&&(I.leaf?C.push(F):h(v,P)?this._all(F,C):T.push(F))}I=T.pop()}return C},n.prototype.collides=function(v){var I=this.data;if(!g(v,I))return!1;for(var C=[];I;){for(var S=0;S<I.children.length;S++){var T=I.children[S],A=I.leaf?this.toBBox(T):T;if(g(v,A)){if(I.leaf||h(v,A))return!0;C.push(T)}}I=C.pop()}return!1},n.prototype.load=function(v){if(!v||!v.length)return this;if(v.length<this._minEntries){for(var I=0;I<v.length;I++)this.insert(v[I]);return this}var C=this._build(v.slice(),0,v.length-1,0);if(this.data.children.length)if(this.data.height===C.height)this._splitRoot(this.data,C);else{if(this.data.height<C.height){var S=this.data;this.data=C,C=S}this._insert(C,this.data.height-C.height-1,!0)}else this.data=C;return this},n.prototype.insert=function(v){return v&&this._insert(v,this.data.height-1),this},n.prototype.clear=function(){return this.data=x([]),this},n.prototype.remove=function(v,I){if(!v)return this;for(var C,S,T,A=this.data,F=this.toBBox(v),P=[],O=[];A||P.length;){if(A||(A=P.pop(),S=P[P.length-1],C=O.pop(),T=!0),A.leaf){var _=o(v,A.children,I);if(_!==-1)return A.children.splice(_,1),P.push(A),this._condense(P),this}T||A.leaf||!h(A,F)?S?(C++,A=S.children[C],T=!1):A=null:(P.push(A),O.push(C),C=0,S=A,A=A.children[0])}return this},n.prototype.toBBox=function(v){return v},n.prototype.compareMinX=function(v,I){return v.minX-I.minX},n.prototype.compareMinY=function(v,I){return v.minY-I.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(v){return this.data=v,this},n.prototype._all=function(v,I){for(var C=[];v;)v.leaf?I.push.apply(I,v.children):C.push.apply(C,v.children),v=C.pop();return I},n.prototype._build=function(v,I,C,S){var T,A=C-I+1,F=this._maxEntries;if(A<=F)return i(T=x(v.slice(I,C+1)),this.toBBox),T;S||(S=Math.ceil(Math.log(A)/Math.log(F)),F=Math.ceil(A/Math.pow(F,S-1))),(T=x([])).leaf=!1,T.height=S;var P=Math.ceil(A/F),O=P*Math.ceil(Math.sqrt(F));E(v,I,C,O,this.compareMinX);for(var _=I;_<=C;_+=O){var G=Math.min(_+O-1,C);E(v,_,G,P,this.compareMinY);for(var L=_;L<=G;L+=P){var q=Math.min(L+P-1,G);T.children.push(this._build(v,L,q,S-1))}}return i(T,this.toBBox),T},n.prototype._chooseSubtree=function(v,I,C,S){for(;S.push(I),!I.leaf&&S.length-1!==C;){for(var T=1/0,A=1/0,F=void 0,P=0;P<I.children.length;P++){var O=I.children[P],_=d(O),G=(L=v,q=O,(Math.max(q.maxX,L.maxX)-Math.min(q.minX,L.minX))*(Math.max(q.maxY,L.maxY)-Math.min(q.minY,L.minY))-_);G<A?(A=G,T=_<T?_:T,F=O):G===A&&_<T&&(T=_,F=O)}I=F||I.children[0]}var L,q;return I},n.prototype._insert=function(v,I,C){var S=C?v:this.toBBox(v),T=[],A=this._chooseSubtree(S,this.data,I,T);for(A.children.push(v),l(A,S);I>=0&&T[I].children.length>this._maxEntries;)this._split(T,I),I--;this._adjustParentBBoxes(S,T,I)},n.prototype._split=function(v,I){var C=v[I],S=C.children.length,T=this._minEntries;this._chooseSplitAxis(C,T,S);var A=this._chooseSplitIndex(C,T,S),F=x(C.children.splice(A,C.children.length-A));F.height=C.height,F.leaf=C.leaf,i(C,this.toBBox),i(F,this.toBBox),I?v[I-1].children.push(F):this._splitRoot(C,F)},n.prototype._splitRoot=function(v,I){this.data=x([v,I]),this.data.height=v.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(v,I,C){for(var S,T,A,F,P,O,_,G=1/0,L=1/0,q=I;q<=C-I;q++){var $=a(v,0,q,this.toBBox),K=a(v,q,C,this.toBBox),X=(T=$,A=K,F=void 0,P=void 0,O=void 0,_=void 0,F=Math.max(T.minX,A.minX),P=Math.max(T.minY,A.minY),O=Math.min(T.maxX,A.maxX),_=Math.min(T.maxY,A.maxY),Math.max(0,O-F)*Math.max(0,_-P)),V=d($)+d(K);X<G?(G=X,S=q,L=V<L?V:L):X===G&&V<L&&(L=V,S=q)}return S||C-I},n.prototype._chooseSplitAxis=function(v,I,C){var S=v.leaf?this.compareMinX:u,T=v.leaf?this.compareMinY:c;this._allDistMargin(v,I,C,S)<this._allDistMargin(v,I,C,T)&&v.children.sort(S)},n.prototype._allDistMargin=function(v,I,C,S){v.children.sort(S);for(var T=this.toBBox,A=a(v,0,I,T),F=a(v,C-I,C,T),P=m(A)+m(F),O=I;O<C-I;O++){var _=v.children[O];l(A,v.leaf?T(_):_),P+=m(A)}for(var G=C-I-1;G>=I;G--){var L=v.children[G];l(F,v.leaf?T(L):L),P+=m(F)}return P},n.prototype._adjustParentBBoxes=function(v,I,C){for(var S=C;S>=0;S--)l(I[S],v)},n.prototype._condense=function(v){for(var I=v.length-1,C=void 0;I>=0;I--)v[I].children.length===0?I>0?(C=v[I-1].children).splice(C.indexOf(v[I]),1):this.clear():i(v[I],this.toBBox)},n})});var n2=wt(_e=>{"use strict";p();Object.defineProperty(_e,"__esModule",{value:!0});_e.earthRadius=63710088e-1;_e.factors={centimeters:_e.earthRadius*100,centimetres:_e.earthRadius*100,degrees:_e.earthRadius/111325,feet:_e.earthRadius*3.28084,inches:_e.earthRadius*39.37,kilometers:_e.earthRadius/1e3,kilometres:_e.earthRadius/1e3,meters:_e.earthRadius,metres:_e.earthRadius,miles:_e.earthRadius/1609.344,millimeters:_e.earthRadius*1e3,millimetres:_e.earthRadius*1e3,nauticalmiles:_e.earthRadius/1852,radians:1,yards:_e.earthRadius*1.0936};_e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/_e.earthRadius,yards:1.0936133};_e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Lu(e,r,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=r||{},n.geometry=e,n}_e.feature=Lu;function PV(e,r,t){switch(t===void 0&&(t={}),e){case"Point":return Qx(r).geometry;case"LineString":return t2(r).geometry;case"Polygon":return e2(r).geometry;case"MultiPoint":return FM(r).geometry;case"MultiLineString":return AM(r).geometry;case"MultiPolygon":return PM(r).geometry;default:throw new Error(e+" is invalid")}}_e.geometry=PV;function Qx(e,r,t){if(t===void 0&&(t={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d1(e[0])||!d1(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return Lu(n,r,t)}_e.point=Qx;function OV(e,r,t){return t===void 0&&(t={}),p1(e.map(function(n){return Qx(n,r)}),t)}_e.points=OV;function e2(e,r,t){t===void 0&&(t={});for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:e};return Lu(l,r,t)}_e.polygon=e2;function kV(e,r,t){return t===void 0&&(t={}),p1(e.map(function(n){return e2(n,r)}),t)}_e.polygons=kV;function t2(e,r,t){if(t===void 0&&(t={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return Lu(n,r,t)}_e.lineString=t2;function BV(e,r,t){return t===void 0&&(t={}),p1(e.map(function(n){return t2(n,r)}),t)}_e.lineStrings=BV;function p1(e,r){r===void 0&&(r={});var t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}_e.featureCollection=p1;function AM(e,r,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:e};return Lu(n,r,t)}_e.multiLineString=AM;function FM(e,r,t){t===void 0&&(t={});var n={type:"MultiPoint",coordinates:e};return Lu(n,r,t)}_e.multiPoint=FM;function PM(e,r,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:e};return Lu(n,r,t)}_e.multiPolygon=PM;function _V(e,r,t){t===void 0&&(t={});var n={type:"GeometryCollection",geometries:e};return Lu(n,r,t)}_e.geometryCollection=_V;function LV(e,r){if(r===void 0&&(r=0),r&&!(r>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,r||0);return Math.round(e*t)/t}_e.round=LV;function OM(e,r){r===void 0&&(r="kilometers");var t=_e.factors[r];if(!t)throw new Error(r+" units is invalid");return e*t}_e.radiansToLength=OM;function r2(e,r){r===void 0&&(r="kilometers");var t=_e.factors[r];if(!t)throw new Error(r+" units is invalid");return e/t}_e.lengthToRadians=r2;function RV(e,r){return kM(r2(e,r))}_e.lengthToDegrees=RV;function NV(e){var r=e%360;return r<0&&(r+=360),r}_e.bearingToAzimuth=NV;function kM(e){var r=e%(2*Math.PI);return r*180/Math.PI}_e.radiansToDegrees=kM;function jV(e){var r=e%360;return r*Math.PI/180}_e.degreesToRadians=jV;function UV(e,r,t){if(r===void 0&&(r="kilometers"),t===void 0&&(t="kilometers"),!(e>=0))throw new Error("length must be a positive number");return OM(r2(e,r),t)}_e.convertLength=UV;function zV(e,r,t){if(r===void 0&&(r="meters"),t===void 0&&(t="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=_e.areaFactors[r];if(!n)throw new Error("invalid original units");var o=_e.areaFactors[t];if(!o)throw new Error("invalid final units");return e/n*o}_e.convertArea=zV;function d1(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}_e.isNumber=d1;function GV(e){return!!e&&e.constructor===Object}_e.isObject=GV;function $V(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(r){if(!d1(r))throw new Error("bbox must only contain numbers")})}_e.validateBBox=$V;function VV(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}_e.validateId=VV});var i2=wt(_r=>{"use strict";p();Object.defineProperty(_r,"__esModule",{value:!0});var Dn=n2();function zf(e,r,t){if(e!==null)for(var n,o,i,a,l,u,c,d=0,m=0,h,g=e.type,x=g==="FeatureCollection",E=g==="Feature",v=x?e.features.length:1,I=0;I<v;I++){c=x?e.features[I].geometry:E?e.geometry:e,h=c?c.type==="GeometryCollection":!1,l=h?c.geometries.length:1;for(var C=0;C<l;C++){var S=0,T=0;if(a=h?c.geometries[C]:c,a!==null){u=a.coordinates;var A=a.type;switch(d=t&&(A==="Polygon"||A==="MultiPolygon")?1:0,A){case null:break;case"Point":if(r(u,m,I,S,T)===!1)return!1;m++,S++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(r(u[n],m,I,S,T)===!1)return!1;m++,A==="MultiPoint"&&S++}A==="LineString"&&S++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(o=0;o<u[n].length-d;o++){if(r(u[n][o],m,I,S,T)===!1)return!1;m++}A==="MultiLineString"&&S++,A==="Polygon"&&T++}A==="Polygon"&&S++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(T=0,o=0;o<u[n].length;o++){for(i=0;i<u[n][o].length-d;i++){if(r(u[n][o][i],m,I,S,T)===!1)return!1;m++}T++}S++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(zf(a.geometries[n],r,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ZV(e,r,t,n){var o=t;return zf(e,function(i,a,l,u,c){a===0&&t===void 0?o=i:o=r(o,i,a,l,u,c)},n),o}function BM(e,r){var t;switch(e.type){case"FeatureCollection":for(t=0;t<e.features.length&&r(e.features[t].properties,t)!==!1;t++);break;case"Feature":r(e.properties,0);break}}function HV(e,r,t){var n=t;return BM(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function _M(e,r){if(e.type==="Feature")r(e,0);else if(e.type==="FeatureCollection")for(var t=0;t<e.features.length&&r(e.features[t],t)!==!1;t++);}function WV(e,r,t){var n=t;return _M(e,function(o,i){i===0&&t===void 0?n=o:n=r(n,o,i)}),n}function qV(e){var r=[];return zf(e,function(t){r.push(t)}),r}function o2(e,r){var t,n,o,i,a,l,u,c,d,m,h=0,g=e.type==="FeatureCollection",x=e.type==="Feature",E=g?e.features.length:1;for(t=0;t<E;t++){for(l=g?e.features[t].geometry:x?e.geometry:e,c=g?e.features[t].properties:x?e.properties:{},d=g?e.features[t].bbox:x?e.bbox:void 0,m=g?e.features[t].id:x?e.id:void 0,u=l?l.type==="GeometryCollection":!1,a=u?l.geometries.length:1,o=0;o<a;o++){if(i=u?l.geometries[o]:l,i===null){if(r(null,h,c,d,m)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(r(i,h,c,d,m)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(r(i.geometries[n],h,c,d,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function KV(e,r,t){var n=t;return o2(e,function(o,i,a,l,u){i===0&&t===void 0?n=o:n=r(n,o,i,a,l,u)}),n}function m1(e,r){o2(e,function(t,n,o,i,a){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return r(Dn.feature(t,o,{bbox:i,id:a}),n,0)===!1?!1:void 0}var u;switch(l){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var d=t.coordinates[c],m={type:u,coordinates:d};if(r(Dn.feature(m,o),n,c)===!1)return!1}})}function JV(e,r,t){var n=t;return m1(e,function(o,i,a){i===0&&a===0&&t===void 0?n=o:n=r(n,o,i,a)}),n}function LM(e,r){m1(e,function(t,n,o){var i=0;if(t.geometry){var a=t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var l,u=0,c=0,d=0;if(zf(t,function(m,h,g,x,E){if(l===void 0||n>u||x>c||E>d){l=m,u=n,c=x,d=E,i=0;return}var v=Dn.lineString([l,m],t.properties);if(r(v,n,o,E,i)===!1)return!1;i++,l=m})===!1)return!1}}})}function YV(e,r,t){var n=t,o=!1;return LM(e,function(i,a,l,u,c){o===!1&&t===void 0?n=i:n=r(n,i,a,l,u,c),o=!0}),n}function RM(e,r){if(!e)throw new Error("geojson is required");m1(e,function(t,n,o){if(t.geometry!==null){var i=t.geometry.type,a=t.geometry.coordinates;switch(i){case"LineString":if(r(t,n,o,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<a.length;l++)if(r(Dn.lineString(a[l],t.properties),n,o,l)===!1)return!1;break}}})}function XV(e,r,t){var n=t;return RM(e,function(o,i,a,l){i===0&&t===void 0?n=o:n=r(n,o,i,a,l)}),n}function QV(e,r){if(r=r||{},!Dn.isObject(r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.segmentIndex||0,a=r.properties,l;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,l=e.features[t].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var u=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return i<0&&(i=u.length+i-1),Dn.lineString([u[i],u[i+1]],a,r);case"Polygon":return o<0&&(o=u.length+o),i<0&&(i=u[o].length+i-1),Dn.lineString([u[o][i],u[o][i+1]],a,r);case"MultiLineString":return n<0&&(n=u.length+n),i<0&&(i=u[n].length+i-1),Dn.lineString([u[n][i],u[n][i+1]],a,r);case"MultiPolygon":return n<0&&(n=u.length+n),o<0&&(o=u[n].length+o),i<0&&(i=u[n][o].length-i-1),Dn.lineString([u[n][o][i],u[n][o][i+1]],a,r)}throw new Error("geojson is invalid")}function eZ(e,r){if(r=r||{},!Dn.isObject(r))throw new Error("options is invalid");var t=r.featureIndex||0,n=r.multiFeatureIndex||0,o=r.geometryIndex||0,i=r.coordIndex||0,a=r.properties,l;switch(e.type){case"FeatureCollection":t<0&&(t=e.features.length+t),a=a||e.features[t].properties,l=e.features[t].geometry;break;case"Feature":a=a||e.properties,l=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=e;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var u=l.coordinates;switch(l.type){case"Point":return Dn.point(u,a,r);case"MultiPoint":return n<0&&(n=u.length+n),Dn.point(u[n],a,r);case"LineString":return i<0&&(i=u.length+i),Dn.point(u[i],a,r);case"Polygon":return o<0&&(o=u.length+o),i<0&&(i=u[o].length+i),Dn.point(u[o][i],a,r);case"MultiLineString":return n<0&&(n=u.length+n),i<0&&(i=u[n].length+i),Dn.point(u[n][i],a,r);case"MultiPolygon":return n<0&&(n=u.length+n),o<0&&(o=u[n].length+o),i<0&&(i=u[n][o].length-i),Dn.point(u[n][o][i],a,r)}throw new Error("geojson is invalid")}_r.coordAll=qV;_r.coordEach=zf;_r.coordReduce=ZV;_r.featureEach=_M;_r.featureReduce=WV;_r.findPoint=eZ;_r.findSegment=QV;_r.flattenEach=m1;_r.flattenReduce=JV;_r.geomEach=o2;_r.geomReduce=KV;_r.lineEach=RM;_r.lineReduce=XV;_r.propEach=BM;_r.propReduce=HV;_r.segmentEach=LM;_r.segmentReduce=YV});var NM=wt(s2=>{"use strict";p();Object.defineProperty(s2,"__esModule",{value:!0});var tZ=i2();function a2(e){var r=[1/0,1/0,-1/0,-1/0];return tZ.coordEach(e,function(t){r[0]>t[0]&&(r[0]=t[0]),r[1]>t[1]&&(r[1]=t[1]),r[2]<t[0]&&(r[2]=t[0]),r[3]<t[1]&&(r[3]=t[1])}),r}a2.default=a2;s2.default=a2});var $M=wt((x6e,u2)=>{p();var Ra=MM(),UM=n2(),zM=i2(),tp=NM().default,rZ=zM.featureEach,b6e=zM.coordEach,v6e=UM.polygon,jM=UM.featureCollection;function GM(e){var r=new Ra(e);return r.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:tp(t),Ra.prototype.insert.call(this,t)},r.load=function(t){var n=[];return Array.isArray(t)?t.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:tp(o),n.push(o)}):rZ(t,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:tp(o),n.push(o)}),Ra.prototype.load.call(this,n)},r.remove=function(t,n){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:tp(t),Ra.prototype.remove.call(this,t,n)},r.clear=function(){return Ra.prototype.clear.call(this)},r.search=function(t){var n=Ra.prototype.search.call(this,this.toBBox(t));return jM(n)},r.collides=function(t){return Ra.prototype.collides.call(this,this.toBBox(t))},r.all=function(){var t=Ra.prototype.all.call(this);return jM(t)},r.toJSON=function(){return Ra.prototype.toJSON.call(this)},r.fromJSON=function(t){return Ra.prototype.fromJSON.call(this,t)},r.toBBox=function(t){var n;if(t.bbox)n=t.bbox;else if(Array.isArray(t)&&t.length===4)n=t;else if(Array.isArray(t)&&t.length===6)n=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")n=tp(t);else if(t.type==="FeatureCollection")n=tp(t);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},r}u2.exports=GM;u2.exports.default=GM});var aa=wt(Bo=>{"use strict";p();Bo.__esModule=!0;Bo.extend=LP;Bo.indexOf=sq;Bo.escapeExpression=uq;Bo.isEmpty=lq;Bo.createFrame=cq;Bo.blockParams=dq;Bo.appendContextPath=pq;var nq={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},oq=/[&<>"'`=]/g,iq=/[&<>"'`=]/;function aq(e){return nq[e]}function LP(e){for(var r=1;r<arguments.length;r++)for(var t in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],t)&&(e[t]=arguments[r][t]);return e}var y6=Object.prototype.toString;Bo.toString=y6;var g6=function(r){return typeof r=="function"};g6(/x/)&&(Bo.isFunction=g6=function(e){return typeof e=="function"&&y6.call(e)==="[object Function]"});Bo.isFunction=g6;var RP=Array.isArray||function(e){return e&&typeof e=="object"?y6.call(e)==="[object Array]":!1};Bo.isArray=RP;function sq(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function uq(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return iq.test(e)?e.replace(oq,aq):e}function lq(e){return!e&&e!==0?!0:!!(RP(e)&&e.length===0)}function cq(e){var r=LP({},e);return r._parent=e,r}function dq(e,r){return e.path=r,e}function pq(e,r){return(e?e+".":"")+r}});var cl=wt((Eb,NP)=>{"use strict";p();Eb.__esModule=!0;var b6=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function v6(e,r){var t=r&&r.loc,n=void 0,o=void 0,i=void 0,a=void 0;t&&(n=t.start.line,o=t.end.line,i=t.start.column,a=t.end.column,e+=" - "+n+":"+i);for(var l=Error.prototype.constructor.call(this,e),u=0;u<b6.length;u++)this[b6[u]]=l[b6[u]];Error.captureStackTrace&&Error.captureStackTrace(this,v6);try{t&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch(c){}}v6.prototype=new Error;Eb.default=v6;NP.exports=Eb.default});var UP=wt((Cb,jP)=>{"use strict";p();Cb.__esModule=!0;var x6=aa();Cb.default=function(e){e.registerHelper("blockHelperMissing",function(r,t){var n=t.inverse,o=t.fn;if(r===!0)return o(this);if(r===!1||r==null)return n(this);if(x6.isArray(r))return r.length>0?(t.ids&&(t.ids=[t.name]),e.helpers.each(r,t)):n(this);if(t.data&&t.ids){var i=x6.createFrame(t.data);i.contextPath=x6.appendContextPath(t.data.contextPath,t.name),t={data:i}}return o(r,t)})};jP.exports=Cb.default});var GP=wt((Sb,zP)=>{"use strict";p();Sb.__esModule=!0;function mq(e){return e&&e.__esModule?e:{default:e}}var Ah=aa(),fq=cl(),hq=mq(fq);Sb.default=function(e){e.registerHelper("each",function(r,t){if(!t)throw new hq.default("Must pass iterator to #each");var n=t.fn,o=t.inverse,i=0,a="",l=void 0,u=void 0;t.data&&t.ids&&(u=Ah.appendContextPath(t.data.contextPath,t.ids[0])+"."),Ah.isFunction(r)&&(r=r.call(this)),t.data&&(l=Ah.createFrame(t.data));function c(x,E,v){l&&(l.key=x,l.index=E,l.first=E===0,l.last=!!v,u&&(l.contextPath=u+x)),a=a+n(r[x],{data:l,blockParams:Ah.blockParams([r[x],x],[u+x,null])})}if(r&&typeof r=="object")if(Ah.isArray(r))for(var d=r.length;i<d;i++)i in r&&c(i,i,i===r.length-1);else if(typeof Symbol=="function"&&r[Symbol.iterator]){for(var m=[],h=r[Symbol.iterator](),g=h.next();!g.done;g=h.next())m.push(g.value);r=m;for(var d=r.length;i<d;i++)c(i,i,i===r.length-1)}else(function(){var x=void 0;Object.keys(r).forEach(function(E){x!==void 0&&c(x,i-1),x=E,i++}),x!==void 0&&c(x,i-1,!0)})();return i===0&&(a=o(this)),a})};zP.exports=Sb.default});var VP=wt((Db,$P)=>{"use strict";p();Db.__esModule=!0;function gq(e){return e&&e.__esModule?e:{default:e}}var yq=cl(),bq=gq(yq);Db.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new bq.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};$P.exports=Db.default});var qP=wt((Tb,WP)=>{"use strict";p();Tb.__esModule=!0;function vq(e){return e&&e.__esModule?e:{default:e}}var ZP=aa(),xq=cl(),HP=vq(xq);Tb.default=function(e){e.registerHelper("if",function(r,t){if(arguments.length!=2)throw new HP.default("#if requires exactly one argument");return ZP.isFunction(r)&&(r=r.call(this)),!t.hash.includeZero&&!r||ZP.isEmpty(r)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(r,t){if(arguments.length!=2)throw new HP.default("#unless requires exactly one argument");return e.helpers.if.call(this,r,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};WP.exports=Tb.default});var JP=wt((wb,KP)=>{"use strict";p();wb.__esModule=!0;wb.default=function(e){e.registerHelper("log",function(){for(var r=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)r.push(arguments[n]);var o=1;t.hash.level!=null?o=t.hash.level:t.data&&t.data.level!=null&&(o=t.data.level),r[0]=o,e.log.apply(e,r)})};KP.exports=wb.default});var XP=wt((Mb,YP)=>{"use strict";p();Mb.__esModule=!0;Mb.default=function(e){e.registerHelper("lookup",function(r,t,n){return r&&n.lookupProperty(r,t)})};YP.exports=Mb.default});var eO=wt((Ab,QP)=>{"use strict";p();Ab.__esModule=!0;function Iq(e){return e&&e.__esModule?e:{default:e}}var Fh=aa(),Eq=cl(),Cq=Iq(Eq);Ab.default=function(e){e.registerHelper("with",function(r,t){if(arguments.length!=2)throw new Cq.default("#with requires exactly one argument");Fh.isFunction(r)&&(r=r.call(this));var n=t.fn;if(Fh.isEmpty(r))return t.inverse(this);var o=t.data;return t.data&&t.ids&&(o=Fh.createFrame(t.data),o.contextPath=Fh.appendContextPath(t.data.contextPath,t.ids[0])),n(r,{data:o,blockParams:Fh.blockParams([r],[o&&o.contextPath])})})};QP.exports=Ab.default});var I6=wt(Fb=>{"use strict";p();Fb.__esModule=!0;Fb.registerDefaultHelpers=Nq;Fb.moveHelperToHooks=jq;function Nc(e){return e&&e.__esModule?e:{default:e}}var Sq=UP(),Dq=Nc(Sq),Tq=GP(),wq=Nc(Tq),Mq=VP(),Aq=Nc(Mq),Fq=qP(),Pq=Nc(Fq),Oq=JP(),kq=Nc(Oq),Bq=XP(),_q=Nc(Bq),Lq=eO(),Rq=Nc(Lq);function Nq(e){Dq.default(e),wq.default(e),Aq.default(e),Pq.default(e),kq.default(e),_q.default(e),Rq.default(e)}function jq(e,r,t){e.helpers[r]&&(e.hooks[r]=e.helpers[r],t||delete e.helpers[r])}});var rO=wt((Pb,tO)=>{"use strict";p();Pb.__esModule=!0;var Uq=aa();Pb.default=function(e){e.registerDecorator("inline",function(r,t,n,o){var i=r;return t.partials||(t.partials={},i=function(a,l){var u=n.partials;n.partials=Uq.extend({},u,t.partials);var c=r(a,l);return n.partials=u,c}),t.partials[o.args[0]]=o.fn,i})};tO.exports=Pb.default});var nO=wt(E6=>{"use strict";p();E6.__esModule=!0;E6.registerDefaultDecorators=Vq;function zq(e){return e&&e.__esModule?e:{default:e}}var Gq=rO(),$q=zq(Gq);function Vq(e){$q.default(e)}});var C6=wt((Ob,oO)=>{"use strict";p();Ob.__esModule=!0;var Zq=aa(),Em={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(r){if(typeof r=="string"){var t=Zq.indexOf(Em.methodMap,r.toLowerCase());t>=0?r=t:r=parseInt(r,10)}return r},log:function(r){if(r=Em.lookupLevel(r),typeof console<"u"&&Em.lookupLevel(Em.level)<=r){var t=Em.methodMap[r];console[t]||(t="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[t].apply(console,o)}}};Ob.default=Em;oO.exports=Ob.default});var iO=wt(S6=>{"use strict";p();S6.__esModule=!0;S6.createNewLookupObject=Wq;var Hq=aa();function Wq(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return Hq.extend.apply(void 0,[Object.create(null)].concat(r))}});var D6=wt(Ph=>{"use strict";p();Ph.__esModule=!0;Ph.createProtoAccessControl=Yq;Ph.resultIsAllowed=Xq;Ph.resetLoggedProperties=eK;function qq(e){return e&&e.__esModule?e:{default:e}}var aO=iO(),Kq=C6(),Jq=qq(Kq),kb=Object.create(null);function Yq(e){var r=Object.create(null);r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1;var t=Object.create(null);return t.__proto__=!1,{properties:{whitelist:aO.createNewLookupObject(t,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:aO.createNewLookupObject(r,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function Xq(e,r,t){return sO(typeof e=="function"?r.methods:r.properties,t)}function sO(e,r){return e.whitelist[r]!==void 0?e.whitelist[r]===!0:e.defaultValue!==void 0?e.defaultValue:(Qq(r),!1)}function Qq(e){kb[e]!==!0&&(kb[e]=!0,Jq.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function eK(){Object.keys(kb).forEach(function(e){delete kb[e]})}});var A6=wt(es=>{"use strict";p();es.__esModule=!0;es.HandlebarsEnvironment=M6;function uO(e){return e&&e.__esModule?e:{default:e}}var jc=aa(),tK=cl(),T6=uO(tK),rK=I6(),nK=nO(),oK=C6(),Bb=uO(oK),iK=D6(),aK="4.7.8";es.VERSION=aK;var sK=8;es.COMPILER_REVISION=sK;var uK=7;es.LAST_COMPATIBLE_COMPILER_REVISION=uK;var lK={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};es.REVISION_CHANGES=lK;var w6="[object Object]";function M6(e,r,t){this.helpers=e||{},this.partials=r||{},this.decorators=t||{},rK.registerDefaultHelpers(this),nK.registerDefaultDecorators(this)}M6.prototype={constructor:M6,logger:Bb.default,log:Bb.default.log,registerHelper:function(r,t){if(jc.toString.call(r)===w6){if(t)throw new T6.default("Arg not supported with multiple helpers");jc.extend(this.helpers,r)}else this.helpers[r]=t},unregisterHelper:function(r){delete this.helpers[r]},registerPartial:function(r,t){if(jc.toString.call(r)===w6)jc.extend(this.partials,r);else{if(typeof t>"u")throw new T6.default('Attempting to register a partial called "'+r+'" as undefined');this.partials[r]=t}},unregisterPartial:function(r){delete this.partials[r]},registerDecorator:function(r,t){if(jc.toString.call(r)===w6){if(t)throw new T6.default("Arg not supported with multiple decorators");jc.extend(this.decorators,r)}else this.decorators[r]=t},unregisterDecorator:function(r){delete this.decorators[r]},resetLoggedPropertyAccesses:function(){iK.resetLoggedProperties()}};var cK=Bb.default.log;es.log=cK;es.createFrame=jc.createFrame;es.logger=Bb.default});var cO=wt((_b,lO)=>{"use strict";p();_b.__esModule=!0;function F6(e){this.string=e}F6.prototype.toString=F6.prototype.toHTML=function(){return""+this.string};_b.default=F6;lO.exports=_b.default});var dO=wt(P6=>{"use strict";p();P6.__esModule=!0;P6.wrapHelper=dK;function dK(e,r){if(typeof e!="function")return e;var t=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=r(o),e.apply(this,arguments)};return t}});var gO=wt(dl=>{"use strict";p();dl.__esModule=!0;dl.checkRevision=yK;dl.template=bK;dl.wrapProgram=Lb;dl.resolvePartial=vK;dl.invokePartial=xK;dl.noop=fO;function pK(e){return e&&e.__esModule?e:{default:e}}function mK(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}var fK=aa(),lu=mK(fK),hK=cl(),cu=pK(hK),du=A6(),pO=I6(),gK=dO(),mO=D6();function yK(e){var r=e&&e[0]||1,t=du.COMPILER_REVISION;if(!(r>=du.LAST_COMPATIBLE_COMPILER_REVISION&&r<=du.COMPILER_REVISION))if(r<du.LAST_COMPATIBLE_COMPILER_REVISION){var n=du.REVISION_CHANGES[t],o=du.REVISION_CHANGES[r];throw new cu.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new cu.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function bK(e,r){if(!r)throw new cu.default("No environment passed to template");if(!e||!e.main)throw new cu.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,r.VM.checkRevision(e.compiler);var t=e.compiler&&e.compiler[0]===7;function n(a,l,u){u.hash&&(l=lu.extend({},l,u.hash),u.ids&&(u.ids[0]=!0)),a=r.VM.resolvePartial.call(this,a,l,u);var c=lu.extend({},u,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),d=r.VM.invokePartial.call(this,a,l,c);if(d==null&&r.compile&&(u.partials[u.name]=r.compile(a,e.compilerOptions,r),d=u.partials[u.name](l,c)),d!=null){if(u.indent){for(var m=d.split("\n"),h=0,g=m.length;h<g&&!(!m[h]&&h+1===g);h++)m[h]=u.indent+m[h];d=m.join("\n")}return d}else throw new cu.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(l,u,c){if(!l||!(u in l))throw new cu.default('"'+u+'" not defined in '+l,{loc:c});return o.lookupProperty(l,u)},lookupProperty:function(l,u){var c=l[u];if(c==null||Object.prototype.hasOwnProperty.call(l,u)||mO.resultIsAllowed(c,o.protoAccessControl,u))return c},lookup:function(l,u){for(var c=l.length,d=0;d<c;d++){var m=l[d]&&o.lookupProperty(l[d],u);if(m!=null)return l[d][u]}},lambda:function(l,u){return typeof l=="function"?l.call(u):l},escapeExpression:lu.escapeExpression,invokePartial:n,fn:function(l){var u=e[l];return u.decorator=e[l+"_d"],u},programs:[],program:function(l,u,c,d,m){var h=this.programs[l],g=this.fn(l);return u||m||d||c?h=Lb(this,l,g,u,c,d,m):h||(h=this.programs[l]=Lb(this,l,g)),h},data:function(l,u){for(;l&&u--;)l=l._parent;return l},mergeIfNeeded:function(l,u){var c=l||u;return l&&u&&l!==u&&(c=lu.extend({},u,l)),c},nullContext:Object.seal({}),noop:r.VM.noop,compilerInfo:e.compiler};function i(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=l.data;i._setup(l),!l.partial&&e.useData&&(u=IK(a,u));var c=void 0,d=e.useBlockParams?[]:void 0;e.useDepths&&(l.depths?c=a!=l.depths[0]?[a].concat(l.depths):l.depths:c=[a]);function m(h){return""+e.main(o,h,o.helpers,o.partials,u,d,c)}return m=hO(e.main,m,o,l.depths||[],u,d),m(a,l)}return i.isTop=!0,i._setup=function(a){if(a.partial)o.protoAccessControl=a.protoAccessControl,o.helpers=a.helpers,o.partials=a.partials,o.decorators=a.decorators,o.hooks=a.hooks;else{var l=lu.extend({},r.helpers,a.helpers);EK(l,o),o.helpers=l,e.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,r.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=lu.extend({},r.decorators,a.decorators)),o.hooks={},o.protoAccessControl=mO.createProtoAccessControl(a);var u=a.allowCallsToHelperMissing||t;pO.moveHelperToHooks(o,"helperMissing",u),pO.moveHelperToHooks(o,"blockHelperMissing",u)}},i._child=function(a,l,u,c){if(e.useBlockParams&&!u)throw new cu.default("must pass block params");if(e.useDepths&&!c)throw new cu.default("must pass parent depths");return Lb(o,a,e[a],l,0,u,c)},i}function Lb(e,r,t,n,o,i,a){function l(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&u!=a[0]&&!(u===e.nullContext&&a[0]===null)&&(d=[u].concat(a)),t(e,u,e.helpers,e.partials,c.data||n,i&&[c.blockParams].concat(i),d)}return l=hO(t,l,e,a,n,i),l.program=r,l.depth=a?a.length:0,l.blockParams=o||0,l}function vK(e,r,t){return e?!e.call&&!t.name&&(t.name=e,e=t.partials[e]):t.name==="@partial-block"?e=t.data["partial-block"]:e=t.partials[t.name],e}function xK(e,r,t){var n=t.data&&t.data["partial-block"];t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var o=void 0;if(t.fn&&t.fn!==fO&&function(){t.data=du.createFrame(t.data);var i=t.fn;o=t.data["partial-block"]=function(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=du.createFrame(u.data),u.data["partial-block"]=n,i(l,u)},i.partials&&(t.partials=lu.extend({},t.partials,i.partials))}(),e===void 0&&o&&(e=o),e===void 0)throw new cu.default("The partial "+t.name+" could not be found");if(e instanceof Function)return e(r,t)}function fO(){return""}function IK(e,r){return(!r||!("root"in r))&&(r=r?du.createFrame(r):{},r.root=e),r}function hO(e,r,t,n,o,i){if(e.decorator){var a={};r=e.decorator(r,a,t,n&&n[0],o,i,n),lu.extend(r,a)}return r}function EK(e,r){Object.keys(e).forEach(function(t){var n=e[t];e[t]=CK(n,r)})}function CK(e,r){var t=r.lookupProperty;return gK.wrapHelper(e,function(n){return lu.extend({lookupProperty:t},n)})}});var bO=wt((Rb,yO)=>{"use strict";p();Rb.__esModule=!0;Rb.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var r=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=r),e}};yO.exports=Rb.default});var CO=wt((Nb,EO)=>{"use strict";p();Nb.__esModule=!0;function k6(e){return e&&e.__esModule?e:{default:e}}function B6(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}var SK=A6(),vO=B6(SK),DK=cO(),TK=k6(DK),wK=cl(),MK=k6(wK),AK=aa(),O6=B6(AK),FK=gO(),xO=B6(FK),PK=bO(),OK=k6(PK);function IO(){var e=new vO.HandlebarsEnvironment;return O6.extend(e,vO),e.SafeString=TK.default,e.Exception=MK.default,e.Utils=O6,e.escapeExpression=O6.escapeExpression,e.VM=xO,e.template=function(r){return xO.template(r,e)},e}var Oh=IO();Oh.create=IO;OK.default(Oh);Oh.default=Oh;Nb.default=Oh;EO.exports=Nb.default});var DO=wt((MUe,SO)=>{p();SO.exports=CO().default});p();p();p();p();p();p();var Vm=e=>e!=null;var Ik=function(){let r=globalThis.fetch;return{fetch(...t){if(!Vm(r))throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return r==null?void 0:r(...t)},setFetch(t){r=t}}}(),GC=Ik.fetch;var WC=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke","reactsdk"],$C=WC[0],qC="https://api-gateway.mappedin.com/track-analytics/a/",KC="deny-watchposition",JC="load-mapview",YC="load-mapdata",XC="change-language",QC="query-directions";var Ia,jo,ds,xv,xg,od=class{constructor(){D(this,ds);D(this,Ia,Object.freeze({}));D(this,jo);f(this,"oneTimeEventsSent",new Set);f(this,"sendGetDirectionsEvent",Jb((r,t,n)=>{let o={start:r,end:t,type:"location_to_location"};return n!==void 0&&(o.accessible=n),this.sendAnalyticEvent(QC,o)},2500));M(this,jo,Q(this,ds,xg).call(this,s(this,Ia)))}init(r){this.reset(),this.updateStateWithOptions(r)}reset(){M(this,Ia,{}),M(this,jo,Q(this,ds,xg).call(this,{})),this.oneTimeEventsSent.clear()}updateStateWithOptions(r){return M(this,Ia,Object.freeze(Object.assign({},s(this,Ia),r))),M(this,jo,Q(this,ds,xg).call(this,r)),Q(this,ds,xv).call(this,s(this,jo)),s(this,jo)}updateState(r){let t=w({},r);t.mapId&&(t.analyticsBaseUrl=vv(H(w({},s(this,jo)),{mapId:t.mapId}))),t.context&&(t.context=HC(t.context)),t.baseUri&&(t.analyticsBaseUrl=vv({baseUri:t.baseUri,mapId:s(this,jo).mapId})),Object.assign(s(this,jo),t),this.handleStateUpdate(r),Q(this,ds,xv).call(this,t)}handleStateUpdate(r){var t;(t=r.userPosition)!=null&&t.floorLevel?this.sendBlueDotEvents("found-floor"):r.userPosition&&this.sendBlueDotEvents("found-position")}get authReady(){let{key:r,secret:t,accessToken:n}=this.getState();return!!(r&&t)||!!n}getState(){return s(this,jo)}getContext(){return this.getState().context||s(this,Ia).context||$C}getSessionId(){return this.getState().sessionId||s(this,Ia).sessionId||ZC()}getDeviceId(){return this.getState().deviceId||s(this,Ia).deviceId||VC()}sendAnalyticEvent(r,t={}){let n=this.getState(),o=Ek(n.analyticsBaseUrl,r),i={"mi-context":this.getContext(),"mi-session":this.getSessionId(),"mi-device":this.getDeviceId()};if(n.logEvents&&z.log("Analytics.track",o,i),!n.sendEvents)return Promise.resolve();if(!this.authReady)return z.warn("Auth needs to be ready to send analytics.");let a=H(w({},t),{g:n.geolocationMode,sdk_version:n.version});return n.userPosition&&Object.assign(a,n.userPosition),i["Content-Type"]="application/json",n.accessToken?i.Authorization="Bearer ".concat(n.accessToken):n.noAuth||n.secret&&n.key&&(i["x-mappedin-key"]=btoa(n.key),i["x-mappedin-secret"]=btoa(n.secret)),GC(o,{method:"POST",mode:"cors",headers:i,body:JSON.stringify(a)})}capture(r,t){if(Sk.includes(r))return z.warn("".concat(r," event is sent internally.")),Promise.resolve();let n=Ck.includes(r)?r.slice(1):r;return this.sendAnalyticEvent(n,t)}sendGetMapDataEvent(r){return this.sendAnalyticEvent(YC,r)}sendChangeLanguageEvent(r){return this.sendAnalyticEvent(XC,r)}sendWatchPositionDenied(){return this.sendAnalyticEvent(KC)}sendMapViewLoadedEvent({firstRenderDuration:r,dimension:t,collisionWorkerDisabled:n,outdoorsWorkerDisabled:o}){return this.sendAnalyticEvent(JC,{type:"3d",firstRenderDuration:r,width:t.width,height:t.height,devicePixelRatio:globalThis.devicePixelRatio||1,collisionWorkerDisabled:n,outdoorsWorkerDisabled:o})}sendBlueDotEvents(r){if(!((r==="found-floor"||r==="found-position")&&this.oneTimeEventsSent.has(r)))return this.oneTimeEventsSent.add(r),this.sendAnalyticEvent(r)}};Ia=new WeakMap,jo=new WeakMap,ds=new WeakSet,xv=function(r){r.sessionId&&ss.getInstance().saveSessionData("id",r.sessionId),r.deviceId&&ss.getInstance().saveLocalData("deviceId",r.deviceId)},xg=function(r){var n,o,i,a;let t=(n=r.baseUri)!=null?n:qC;return{baseUri:t,analyticsBaseUrl:vv(H(w({},r),{baseUri:t})),version:((o=y==null?void 0:y.env)==null?void 0:o.npm_package_version)||"v6",deviceId:r.deviceId||VC(),accessToken:r.accessToken,mapId:r.mapId,sessionId:r.sessionId||ZC(),platformString:r.platformString||"",context:HC(r.context)||$C,geolocationMode:!1,sendEvents:(i=r.sendEvents)!=null?i:!0,logEvents:(a=r.logEvents)!=null?a:!1,noAuth:r.noAuth||!1,key:r.key,secret:r.secret}};function vv({mapId:e,baseUri:r=qC}){return"".concat(r).concat(e,"/")}function VC(){return ss.getInstance().loadLocalData("deviceId")}function ZC(){return ss.getInstance().loadSessionData("id")}function Ek(e,r){return e+r}function HC(e){return WC.find(r=>r===e)}var Ck=["$select-location","$select-category","$query-suggest","$query-search"],Sk=[JC,YC,QC,KC,XC],_J=new od,Uo,Zm=class{constructor(r){D(this,Uo);f(this,"capture");f(this,"updateState");M(this,Uo,r),this.capture=s(this,Uo).capture.bind(s(this,Uo)),this.updateState=s(this,Uo).updateState.bind(s(this,Uo))}getState(){let o=s(this,Uo).getState(),{sessionId:r,deviceId:t}=o;return tn(o,["sessionId","deviceId"])}getContext(){return s(this,Uo).getContext()}getSessionId(){return s(this,Uo).getSessionId()}getDeviceId(){return s(this,Uo).getDeviceId()}};Uo=new WeakMap;p();p();var Wm,qm,Km,Hm=class{constructor(r,t,{enabled:n=!1}={}){D(this,Wm);f(this,"searchInstance");D(this,qm);D(this,Km);f(this,"enabled",!1);M(this,Wm,r),M(this,qm,t),M(this,Km,()=>{var o;(o=this.searchInstance)==null||o.then(i=>i.populate())}),n&&this.enable()}async query(r,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return z.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(r,t)}catch(n){return z.error("Search.query failed due to",n),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(r,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return z.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(r,t)}catch(n){return z.error("Search.suggest failed due to",n),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-RK6SZERV.js").then(({InternalSearch:r})=>new r(s(this,Wm)))),s(this,qm).on("language-change",s(this,Km)),await this.searchInstance)}};Wm=new WeakMap,qm=new WeakMap,Km=new WeakMap;var eS=new WeakMap,xl,Jt,Iv=class{constructor(r,{search:t}={}){D(this,xl);D(this,Jt);f(this,"Analytics");f(this,"Search");f(this,"Query");f(this,"internal");f(this,"on",(r,t)=>{s(this,xl).on(r,t)});f(this,"off",(r,t)=>{s(this,xl).off(r,t)});f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>s(this,Jt).__LEGACY_GET_DIRECTIONS_SYNC(r,t,n));f(this,"getDirections",(r,t,n)=>s(this,Jt).getDirections(r,t,n));f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>s(this,Jt).__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n));f(this,"getDirectionsMultiDestination",(r,t,n)=>s(this,Jt).getDirectionsMultiDestination(r,t,n));M(this,xl,new Ge),M(this,Jt,r),eS.set(this,r),this.Analytics=new Zm(r.Analytics),this.Query=r.Query,this.internal=r,this.Search=new Hm(this,r,{enabled:t==null?void 0:t.enabled}),s(this,Jt).on("language-change",n=>{s(this,xl).publish("language-change",n)})}getEnv(){return s(this,Jt).getEnv()}getAccessToken(){var r;return(r=s(this,Jt).tokenManager)==null?void 0:r.getAccessToken().token}get mapName(){return s(this,Jt).mapName}get mapId(){var r;return(r=s(this,Jt).getMapDataOptions)==null?void 0:r.mapId}get mapCenter(){return s(this,Jt).mapCenter}get organizationId(){return s(this,Jt).organizationId}get outdoorViewToken(){return s(this,Jt).outdoorViewToken}getByType(r){return s(this,Jt).getByType(r)}getById(r,t){return s(this,Jt).getById(r,t)}getByExternalId(r,t){return s(this,Jt).getByExternalId(r,t)}getGeoJSON(r){return r.geoJSON}async changeLanguage(r){return s(this,Jt).changeLanguage(r)}get currentLanguage(){return s(this,Jt).currentLanguage}get naturalBearing(){var r;return(r=s(this,Jt).naturalBearing)!=null?r:0}getDistance(r,t){return s(this,Jt).getDistance(r,t)}toBinaryBundle({downloadLanguagePacks:r=!0}={}){return s(this,Jt).toBinaryBundle({downloadLanguagePacks:r})}toJSONBundle({downloadLanguagePacks:r=!0}={}){return s(this,Jt).toJSONBundle({downloadLanguagePacks:r})}};xl=new WeakMap,Jt=new WeakMap;var Jm=Iv;function Ym(e){let r=eS.get(e);if(!r)throw new Error("MapDataInternal not found");return r}p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();p();var Ig={accessible:"accessible",outdoors:"outdoors",public:"public"};p();p();p();p();p();p();var nt={};fu(nt,{HasPropertyKey:()=>Dk,IsArray:()=>bn,IsAsyncIterator:()=>Ev,IsBigInt:()=>Xm,IsBoolean:()=>Iu,IsDate:()=>Il,IsFunction:()=>Cv,IsIterator:()=>Sv,IsNull:()=>Dv,IsNumber:()=>wi,IsObject:()=>_t,IsRegExp:()=>Qm,IsString:()=>Zt,IsSymbol:()=>Tv,IsUint8Array:()=>ps,IsUndefined:()=>or});p();function Dk(e,r){return r in e}function Ev(e){return _t(e)&&!bn(e)&&!ps(e)&&Symbol.asyncIterator in e}function bn(e){return Array.isArray(e)}function Xm(e){return typeof e=="bigint"}function Iu(e){return typeof e=="boolean"}function Il(e){return e instanceof globalThis.Date}function Cv(e){return typeof e=="function"}function Sv(e){return _t(e)&&!bn(e)&&!ps(e)&&Symbol.iterator in e}function Dv(e){return e===null}function wi(e){return typeof e=="number"}function _t(e){return typeof e=="object"&&e!==null}function Qm(e){return e instanceof globalThis.RegExp}function Zt(e){return typeof e=="string"}function Tv(e){return typeof e=="symbol"}function ps(e){return e instanceof globalThis.Uint8Array}function or(e){return e===void 0}function Tk(e){return e.map(r=>Eg(r))}function wk(e){return new Date(e.getTime())}function Mk(e){return new Uint8Array(e)}function Ak(e){return new RegExp(e.source,e.flags)}function Fk(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=Eg(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=Eg(e[t]);return r}function Eg(e){return bn(e)?Tk(e):Il(e)?wk(e):ps(e)?Mk(e):Qm(e)?Ak(e):_t(e)?Fk(e):e}function Yt(e){return Eg(e)}function tS(e){return e.map(r=>ef(r))}function ef(e,r){return r===void 0?Yt(e):Yt(w(w({},r),e))}p();p();p();function Cg(e){return $e(e)&&Symbol.asyncIterator in e}function Sg(e){return $e(e)&&Symbol.iterator in e}function wv(e){return $e(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function Dg(e){return e instanceof Promise}function Fn(e){return e instanceof Date&&Number.isFinite(e.getTime())}function rS(e){return e instanceof globalThis.Map}function nS(e){return e instanceof globalThis.Set}function zo(e){return ArrayBuffer.isView(e)}function id(e){return e instanceof globalThis.Uint8Array}function Re(e,r){return r in e}function $e(e){return e!==null&&typeof e=="object"}function Ue(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}function ir(e){return e===void 0}function ms(e){return e===null}function Ea(e){return typeof e=="boolean"}function Te(e){return typeof e=="number"}function Tg(e){return Number.isInteger(e)}function rn(e){return typeof e=="bigint"}function ot(e){return typeof e=="string"}function Eu(e){return typeof e=="function"}function fs(e){return typeof e=="symbol"}function nn(e){return rn(e)||Ea(e)||ms(e)||Te(e)||ot(e)||fs(e)||ir(e)}var Tt;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function r(a,l){return e.ExactOptionalPropertyTypes?l in a:a[l]!==void 0}e.IsExactOptionalProperty=r;function t(a){let l=$e(a);return e.AllowArrayObject?l:l&&!Ue(a)}e.IsObjectLike=t;function n(a){return t(a)&&!(a instanceof Date)&&!(a instanceof Uint8Array)}e.IsRecordLike=n;function o(a){return e.AllowNaN?Te(a):Number.isFinite(a)}e.IsNumberLike=o;function i(a){let l=ir(a);return e.AllowNullVoid?l||a===null:l}e.IsVoidLike=i})(Tt||(Tt={}));p();function Pk(e){return globalThis.Object.freeze(e).map(r=>tf(r))}function Ok(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=tf(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=tf(e[t]);return globalThis.Object.freeze(r)}function tf(e){return bn(e)?Pk(e):Il(e)?e:ps(e)?e:Qm(e)?e:_t(e)?Ok(e):e}function te(e,r){let t=r!==void 0?w(w({},r),e):e;switch(Tt.InstanceMode){case"freeze":return tf(t);case"clone":return Yt(t);default:return t}}p();var Be=class extends Error{constructor(r){super(r)}};p();p();p();var Xt=Symbol.for("TypeBox.Transform"),hs=Symbol.for("TypeBox.Readonly"),Pn=Symbol.for("TypeBox.Optional"),Go=Symbol.for("TypeBox.Hint"),Z=Symbol.for("TypeBox.Kind");function oS(e){return _t(e)&&e[hs]==="Readonly"}function Ca(e){return _t(e)&&e[Pn]==="Optional"}function Mv(e){return lt(e,"Any")}function gs(e){return lt(e,"Array")}function rf(e){return lt(e,"AsyncIterator")}function Av(e){return lt(e,"BigInt")}function Fv(e){return lt(e,"Boolean")}function nf(e){return lt(e,"Constructor")}function kk(e){return lt(e,"Date")}function of(e){return lt(e,"Function")}function El(e){return lt(e,"Integer")}function Ir(e){return lt(e,"Intersect")}function af(e){return lt(e,"Iterator")}function lt(e,r){return _t(e)&&Z in e&&e[Z]===r}function ys(e){return lt(e,"Literal")}function ho(e){return lt(e,"MappedKey")}function Qt(e){return lt(e,"MappedResult")}function Cu(e){return lt(e,"Never")}function Bk(e){return lt(e,"Not")}function _k(e){return lt(e,"Null")}function Cl(e){return lt(e,"Number")}function Or(e){return lt(e,"Object")}function Sl(e){return lt(e,"Promise")}function Pv(e){return lt(e,"Record")}function Ov(e){return lt(e,"Ref")}function kv(e){return lt(e,"RegExp")}function sf(e){return lt(e,"String")}function Lk(e){return lt(e,"Symbol")}function go(e){return lt(e,"TemplateLiteral")}function Rk(e){return lt(e,"This")}function ad(e){return _t(e)&&Xt in e}function Mi(e){return lt(e,"Tuple")}function Nk(e){return lt(e,"Undefined")}function vt(e){return lt(e,"Union")}function jk(e){return lt(e,"Uint8Array")}function Uk(e){return lt(e,"Unknown")}function zk(e){return lt(e,"Unsafe")}function Gk(e){return lt(e,"Void")}function Su(e){return _t(e)&&Z in e&&Zt(e[Z])}function Ai(e){return Mv(e)||gs(e)||Fv(e)||Av(e)||rf(e)||nf(e)||kk(e)||of(e)||El(e)||Ir(e)||af(e)||ys(e)||ho(e)||Qt(e)||Cu(e)||Bk(e)||_k(e)||Cl(e)||Or(e)||Sl(e)||Pv(e)||Ov(e)||kv(e)||sf(e)||Lk(e)||go(e)||Rk(e)||Mi(e)||Nk(e)||vt(e)||jk(e)||Uk(e)||zk(e)||Gk(e)||Su(e)}var k={};fu(k,{IsAny:()=>uS,IsArray:()=>lS,IsAsyncIterator:()=>cS,IsBigInt:()=>dS,IsBoolean:()=>pS,IsConstructor:()=>mS,IsDate:()=>fS,IsFunction:()=>hS,IsInteger:()=>gS,IsIntersect:()=>yS,IsIterator:()=>bS,IsKind:()=>GS,IsKindOf:()=>at,IsLiteral:()=>lf,IsLiteralBoolean:()=>qk,IsLiteralNumber:()=>xS,IsLiteralString:()=>vS,IsLiteralValue:()=>IS,IsMappedKey:()=>ES,IsMappedResult:()=>CS,IsNever:()=>SS,IsNot:()=>DS,IsNull:()=>TS,IsNumber:()=>wS,IsObject:()=>MS,IsOptional:()=>Wk,IsPromise:()=>AS,IsProperties:()=>Rv,IsReadonly:()=>Hk,IsRecord:()=>FS,IsRecursive:()=>Kk,IsRef:()=>PS,IsRegExp:()=>OS,IsSchema:()=>it,IsString:()=>kS,IsSymbol:()=>BS,IsTemplateLiteral:()=>_S,IsThis:()=>LS,IsTransform:()=>Ht,IsTuple:()=>RS,IsUint8Array:()=>NS,IsUndefined:()=>sd,IsUnion:()=>Nv,IsUnionLiteral:()=>Jk,IsUnknown:()=>jS,IsUnsafe:()=>US,IsVoid:()=>zS,TypeGuardUnknownTypeError:()=>Bv});p();var Bv=class extends Be{},$k=["Any","Array","AsyncIterator","BigInt","Boolean","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function iS(e){try{return new RegExp(e),!0}catch(r){return!1}}function _v(e){if(!Zt(e))return!1;for(let r=0;r<e.length;r++){let t=e.charCodeAt(r);if(t>=7&&t<=13||t===27||t===127)return!1}return!0}function aS(e){return Lv(e)||it(e)}function uf(e){return or(e)||Xm(e)}function zt(e){return or(e)||wi(e)}function Lv(e){return or(e)||Iu(e)}function At(e){return or(e)||Zt(e)}function Vk(e){return or(e)||Zt(e)&&_v(e)&&iS(e)}function Zk(e){return or(e)||Zt(e)&&_v(e)}function sS(e){return or(e)||it(e)}function Hk(e){return _t(e)&&e[hs]==="Readonly"}function Wk(e){return _t(e)&&e[Pn]==="Optional"}function uS(e){return at(e,"Any")&&At(e.$id)}function lS(e){return at(e,"Array")&&e.type==="array"&&At(e.$id)&&it(e.items)&&zt(e.minItems)&&zt(e.maxItems)&&Lv(e.uniqueItems)&&sS(e.contains)&&zt(e.minContains)&&zt(e.maxContains)}function cS(e){return at(e,"AsyncIterator")&&e.type==="AsyncIterator"&&At(e.$id)&&it(e.items)}function dS(e){return at(e,"BigInt")&&e.type==="bigint"&&At(e.$id)&&uf(e.exclusiveMaximum)&&uf(e.exclusiveMinimum)&&uf(e.maximum)&&uf(e.minimum)&&uf(e.multipleOf)}function pS(e){return at(e,"Boolean")&&e.type==="boolean"&&At(e.$id)}function mS(e){return at(e,"Constructor")&&e.type==="Constructor"&&At(e.$id)&&bn(e.parameters)&&e.parameters.every(r=>it(r))&&it(e.returns)}function fS(e){return at(e,"Date")&&e.type==="Date"&&At(e.$id)&&zt(e.exclusiveMaximumTimestamp)&&zt(e.exclusiveMinimumTimestamp)&&zt(e.maximumTimestamp)&&zt(e.minimumTimestamp)&&zt(e.multipleOfTimestamp)}function hS(e){return at(e,"Function")&&e.type==="Function"&&At(e.$id)&&bn(e.parameters)&&e.parameters.every(r=>it(r))&&it(e.returns)}function gS(e){return at(e,"Integer")&&e.type==="integer"&&At(e.$id)&&zt(e.exclusiveMaximum)&&zt(e.exclusiveMinimum)&&zt(e.maximum)&&zt(e.minimum)&&zt(e.multipleOf)}function Rv(e){return _t(e)&&Object.entries(e).every(([r,t])=>_v(r)&&it(t))}function yS(e){return at(e,"Intersect")&&!(Zt(e.type)&&e.type!=="object")&&bn(e.allOf)&&e.allOf.every(r=>it(r)&&!Ht(r))&&At(e.type)&&(Lv(e.unevaluatedProperties)||sS(e.unevaluatedProperties))&&At(e.$id)}function bS(e){return at(e,"Iterator")&&e.type==="Iterator"&&At(e.$id)&&it(e.items)}function at(e,r){return _t(e)&&Z in e&&e[Z]===r}function vS(e){return lf(e)&&Zt(e.const)}function xS(e){return lf(e)&&wi(e.const)}function qk(e){return lf(e)&&Iu(e.const)}function lf(e){return at(e,"Literal")&&At(e.$id)&&IS(e.const)}function IS(e){return Iu(e)||wi(e)||Zt(e)}function ES(e){return at(e,"MappedKey")&&bn(e.keys)&&e.keys.every(r=>wi(r)||Zt(r))}function CS(e){return at(e,"MappedResult")&&Rv(e.properties)}function SS(e){return at(e,"Never")&&_t(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function DS(e){return at(e,"Not")&&it(e.not)}function TS(e){return at(e,"Null")&&e.type==="null"&&At(e.$id)}function wS(e){return at(e,"Number")&&e.type==="number"&&At(e.$id)&&zt(e.exclusiveMaximum)&&zt(e.exclusiveMinimum)&&zt(e.maximum)&&zt(e.minimum)&&zt(e.multipleOf)}function MS(e){return at(e,"Object")&&e.type==="object"&&At(e.$id)&&Rv(e.properties)&&aS(e.additionalProperties)&&zt(e.minProperties)&&zt(e.maxProperties)}function AS(e){return at(e,"Promise")&&e.type==="Promise"&&At(e.$id)&&it(e.item)}function FS(e){return at(e,"Record")&&e.type==="object"&&At(e.$id)&&aS(e.additionalProperties)&&_t(e.patternProperties)&&(r=>{let t=Object.getOwnPropertyNames(r.patternProperties);return t.length===1&&iS(t[0])&&_t(r.patternProperties)&&it(r.patternProperties[t[0]])})(e)}function Kk(e){return _t(e)&&Go in e&&e[Go]==="Recursive"}function PS(e){return at(e,"Ref")&&At(e.$id)&&Zt(e.$ref)}function OS(e){return at(e,"RegExp")&&At(e.$id)&&Zt(e.source)&&Zt(e.flags)&&zt(e.maxLength)&&zt(e.minLength)}function kS(e){return at(e,"String")&&e.type==="string"&&At(e.$id)&&zt(e.minLength)&&zt(e.maxLength)&&Vk(e.pattern)&&Zk(e.format)}function BS(e){return at(e,"Symbol")&&e.type==="symbol"&&At(e.$id)}function _S(e){return at(e,"TemplateLiteral")&&e.type==="string"&&Zt(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function LS(e){return at(e,"This")&&At(e.$id)&&Zt(e.$ref)}function Ht(e){return _t(e)&&Xt in e}function RS(e){return at(e,"Tuple")&&e.type==="array"&&At(e.$id)&&wi(e.minItems)&&wi(e.maxItems)&&e.minItems===e.maxItems&&(or(e.items)&&or(e.additionalItems)&&e.minItems===0||bn(e.items)&&e.items.every(r=>it(r)))}function sd(e){return at(e,"Undefined")&&e.type==="undefined"&&At(e.$id)}function Jk(e){return Nv(e)&&e.anyOf.every(r=>vS(r)||xS(r))}function Nv(e){return at(e,"Union")&&At(e.$id)&&_t(e)&&bn(e.anyOf)&&e.anyOf.every(r=>it(r))}function NS(e){return at(e,"Uint8Array")&&e.type==="Uint8Array"&&At(e.$id)&&zt(e.minByteLength)&&zt(e.maxByteLength)}function jS(e){return at(e,"Unknown")&&At(e.$id)}function US(e){return at(e,"Unsafe")}function zS(e){return at(e,"Void")&&e.type==="void"&&At(e.$id)}function GS(e){return _t(e)&&Z in e&&Zt(e[Z])&&!$k.includes(e[Z])}function it(e){return _t(e)&&(uS(e)||lS(e)||pS(e)||dS(e)||cS(e)||mS(e)||fS(e)||hS(e)||gS(e)||yS(e)||bS(e)||lf(e)||ES(e)||CS(e)||SS(e)||DS(e)||TS(e)||wS(e)||MS(e)||AS(e)||FS(e)||PS(e)||OS(e)||kS(e)||BS(e)||_S(e)||LS(e)||RS(e)||sd(e)||Nv(e)||NS(e)||jS(e)||US(e)||zS(e)||GS(e))}p();var jv="(true|false)",cf="(0|[1-9][0-9]*)",Uv="(.*)",Yk="(?!.*)",yX="^".concat(jv,"$"),bs="^".concat(cf,"$"),vs="^".concat(Uv,"$"),$S="^".concat(Yk,"$");p();var On={};fu(On,{Clear:()=>Qk,Delete:()=>e9,Entries:()=>Xk,Get:()=>n9,Has:()=>t9,Set:()=>r9});p();var ud=new Map;function Xk(){return new Map(ud)}function Qk(){return ud.clear()}function e9(e){return ud.delete(e)}function t9(e){return ud.has(e)}function r9(e,r){ud.set(e,r)}function n9(e){return ud.get(e)}var kr={};fu(kr,{Clear:()=>i9,Delete:()=>a9,Entries:()=>o9,Get:()=>l9,Has:()=>s9,Set:()=>u9});p();var ld=new Map;function o9(){return new Map(ld)}function i9(){return ld.clear()}function a9(e){return ld.delete(e)}function s9(e){return ld.has(e)}function u9(e,r){ld.set(e,r)}function l9(e){return ld.get(e)}p();function VS(e,r){return e.includes(r)}function ZS(e){return[...new Set(e)]}function c9(e,r){return e.filter(t=>r.includes(t))}function d9(e,r){return e.reduce((t,n)=>c9(t,n),r)}function HS(e){return e.length===1?e[0]:e.length>1?d9(e.slice(1),e[0]):[]}function WS(e){let r=[];for(let t of e)r.push(...t);return r}p();function Du(e){return te({[Z]:"Any"},e)}p();function wg(e,r){return te({[Z]:"Array",type:"array",items:e},r)}p();function Mg(e,r){return te({[Z]:"AsyncIterator",type:"AsyncIterator",items:e},r)}p();p();p();function p9(e,r){let o=e,{[r]:t}=o;return tn(o,[$h(r)])}function pr(e,r){return r.reduce((t,n)=>p9(t,n),e)}p();function Ft(e){return te({[Z]:"Never",not:{}},e)}p();p();function ct(e){return te({[Z]:"MappedResult",properties:e})}p();p();function Ag(e,r,t){return te({[Z]:"Constructor",type:"Constructor",parameters:e,returns:r},t)}p();function Tu(e,r,t){return te({[Z]:"Function",type:"Function",parameters:e,returns:r},t)}p();p();p();p();function df(e,r){return te({[Z]:"Union",anyOf:e},r)}function m9(e){return e.some(r=>Ca(r))}function qS(e){return e.map(r=>Ca(r)?f9(r):r)}function f9(e){return pr(e,[Pn])}function h9(e,r){return m9(e)?Jn(df(qS(e),r)):df(qS(e),r)}function Sa(e,r){return e.length===0?Ft(r):e.length===1?te(e[0],r):h9(e,r)}p();function Pt(e,r){return e.length===0?Ft(r):e.length===1?te(e[0],r):df(e,r)}p();p();p();var Fg=class extends Be{};function g9(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function zv(e,r,t){return e[r]===t&&e.charCodeAt(r-1)!==92}function xs(e,r){return zv(e,r,"(")}function pf(e,r){return zv(e,r,")")}function KS(e,r){return zv(e,r,"|")}function y9(e){if(!(xs(e,0)&&pf(e,e.length-1)))return!1;let r=0;for(let t=0;t<e.length;t++)if(xs(e,t)&&(r+=1),pf(e,t)&&(r-=1),r===0&&t!==e.length-1)return!1;return!0}function b9(e){return e.slice(1,e.length-1)}function v9(e){let r=0;for(let t=0;t<e.length;t++)if(xs(e,t)&&(r+=1),pf(e,t)&&(r-=1),KS(e,t)&&r===0)return!0;return!1}function x9(e){for(let r=0;r<e.length;r++)if(xs(e,r))return!0;return!1}function I9(e){let[r,t]=[0,0],n=[];for(let i=0;i<e.length;i++)if(xs(e,i)&&(r+=1),pf(e,i)&&(r-=1),KS(e,i)&&r===0){let a=e.slice(t,i);a.length>0&&n.push(cd(a)),t=i+1}let o=e.slice(t);return o.length>0&&n.push(cd(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}function E9(e){function r(o,i){if(!xs(o,i))throw new Fg("TemplateLiteralParser: Index must point to open parens");let a=0;for(let l=i;l<o.length;l++)if(xs(o,l)&&(a+=1),pf(o,l)&&(a-=1),a===0)return[i,l];throw new Fg("TemplateLiteralParser: Unclosed group parens in expression")}function t(o,i){for(let a=i;a<o.length;a++)if(xs(o,a))return[i,a];return[i,o.length]}let n=[];for(let o=0;o<e.length;o++)if(xs(e,o)){let[i,a]=r(e,o),l=e.slice(i,a+1);n.push(cd(l)),o=a}else{let[i,a]=t(e,o),l=e.slice(i,a);l.length>0&&n.push(cd(l)),o=a-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}function cd(e){return y9(e)?cd(b9(e)):v9(e)?I9(e):x9(e)?E9(e):{type:"const",const:g9(e)}}function dd(e){return cd(e.slice(1,e.length-1))}var Gv=class extends Be{};function C9(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function S9(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function D9(e){return e.type==="const"&&e.const===".*"}function Dl(e){return C9(e)||D9(e)?!1:S9(e)?!0:e.type==="and"?e.expr.every(r=>Dl(r)):e.type==="or"?e.expr.every(r=>Dl(r)):e.type==="const"?!0:(()=>{throw new Gv("Unknown expression type")})()}function Pg(e){let r=dd(e.pattern);return Dl(r)}p();var $v=class extends Be{};function*JS(e){if(e.length===1)return yield*ne(e[0]);for(let r of e[0])for(let t of JS(e.slice(1)))yield"".concat(r).concat(t)}function*T9(e){return yield*ne(JS(e.expr.map(r=>[...mf(r)])))}function*w9(e){for(let r of e.expr)yield*ne(mf(r))}function*M9(e){return yield e.const}function*mf(e){return e.type==="and"?yield*ne(T9(e)):e.type==="or"?yield*ne(w9(e)):e.type==="const"?yield*ne(M9(e)):(()=>{throw new $v("Unknown expression")})()}function pd(e){let r=dd(e.pattern);return Dl(r)?[...mf(r)]:[]}p();p();function It(e,r){return te({[Z]:"Literal",const:e,type:typeof e},r)}p();function Og(e){return te({[Z]:"Boolean",type:"boolean"},e)}p();function md(e){return te({[Z]:"BigInt",type:"bigint"},e)}p();function Da(e){return te({[Z]:"Number",type:"number"},e)}p();function $o(e){return te({[Z]:"String",type:"string"},e)}function*A9(e){let r=e.trim().replace(/"|'/g,"");return r==="boolean"?yield Og():r==="number"?yield Da():r==="bigint"?yield md():r==="string"?yield $o():yield(()=>{let t=r.split("|").map(n=>It(n.trim()));return t.length===0?Ft():t.length===1?t[0]:Sa(t)})()}function*F9(e){if(e[1]!=="{"){let r=It("$"),t=Vv(e.slice(1));return yield*ne([r,...t])}for(let r=2;r<e.length;r++)if(e[r]==="}"){let t=A9(e.slice(2,r)),n=Vv(e.slice(r+1));return yield*ne([...t,...n])}yield It(e)}function*Vv(e){for(let r=0;r<e.length;r++)if(e[r]==="$"){let t=It(e.slice(0,r)),n=F9(e.slice(r));return yield*ne([t,...n])}yield It(e)}function YS(e){return[...Vv(e)]}p();var Zv=class extends Be{};function P9(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function XS(e,r){return go(e)?e.pattern.slice(1,e.pattern.length-1):vt(e)?"(".concat(e.anyOf.map(t=>XS(t,r)).join("|"),")"):Cl(e)?"".concat(r).concat(cf):El(e)?"".concat(r).concat(cf):Av(e)?"".concat(r).concat(cf):sf(e)?"".concat(r).concat(Uv):ys(e)?"".concat(r).concat(P9(e.const.toString())):Fv(e)?"".concat(r).concat(jv):(()=>{throw new Zv("Unexpected Kind '".concat(e[Z],"'"))})()}function Hv(e){return"^".concat(e.map(r=>XS(r,"")).join(""),"$")}p();function Tl(e){let t=pd(e).map(n=>It(n));return Sa(t)}p();function kg(e,r){let t=Zt(e)?Hv(YS(e)):Hv(e);return te({[Z]:"TemplateLiteral",type:"string",pattern:t},r)}function O9(e){return pd(e).map(t=>t.toString())}function k9(e){let r=[];for(let t of e)r.push(...Yn(t));return r}function B9(e){return[e.toString()]}function Yn(e){return[...new Set(go(e)?O9(e):vt(e)?k9(e.anyOf):ys(e)?B9(e.const):Cl(e)?["[number]"]:El(e)?["[number]"]:[])]}p();function _9(e,r,t){let n={};for(let o of Object.getOwnPropertyNames(r))n[o]=fd(e,Yn(r[o]),t);return n}function L9(e,r,t){return _9(e,r.properties,t)}function QS(e,r,t){let n=L9(e,r,t);return ct(n)}function tD(e,r){return e.map(t=>rD(t,r))}function R9(e){return e.filter(r=>!Cu(r))}function N9(e,r){return Bg(R9(tD(e,r)))}function j9(e){return e.some(r=>Cu(r))?[]:e}function U9(e,r){return Sa(j9(tD(e,r)))}function z9(e,r){return r in e?e[r]:r==="[number]"?Sa(e):Ft()}function G9(e,r){return r==="[number]"?e:Ft()}function $9(e,r){return r in e?e[r]:Ft()}function rD(e,r){var t;return Ir(e)?N9(e.allOf,r):vt(e)?U9(e.anyOf,r):Mi(e)?z9((t=e.items)!=null?t:[],r):gs(e)?G9(e.items,r):Or(e)?$9(e.properties,r):Ft()}function ff(e,r){return r.map(t=>rD(e,t))}function eD(e,r){return Sa(ff(e,r))}function fd(e,r,t){return Qt(r)?QS(e,r,t):ho(r)?nD(e,r,t):te(Ai(r)?eD(e,Yn(r)):eD(e,r),t)}function V9(e,r,t){return{[r]:fd(e,[r],Yt(t))}}function Z9(e,r,t){return r.reduce((n,o)=>w(w({},n),V9(e,o,t)),{})}function H9(e,r,t){return Z9(e,r.keys,t)}function nD(e,r,t){let n=H9(e,r,t);return ct(n)}p();function _g(e,r){return te({[Z]:"Iterator",type:"Iterator",items:e},r)}p();function W9(e){let r=[];for(let t in e)Ca(e[t])||r.push(t);return r}function q9(e,r){let t=W9(e),n=t.length>0?{[Z]:"Object",type:"object",properties:e,required:t}:{[Z]:"Object",type:"object",properties:e};return te(n,r)}var Lt=q9;p();function Lg(e,r){return te({[Z]:"Promise",type:"Promise",item:e},r)}p();p();function K9(e){return te(pr(e,[hs]))}function J9(e){return te(H(w({},e),{[hs]:"Readonly"}))}function Y9(e,r){return r===!1?K9(e):J9(e)}function Vo(e,r){let t=r!=null?r:!0;return Qt(e)?oD(e,t):Y9(e,t)}function X9(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Vo(e[n],r);return t}function Q9(e,r){return X9(e.properties,r)}function oD(e,r){let t=Q9(e,r);return ct(t)}p();function Ta(e,r){return te(e.length>0?{[Z]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[Z]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},r)}function iD(e,r){return e in r?Zo(e,r[e]):ct(r)}function eB(e){return{[e]:It(e)}}function tB(e){let r={};for(let t of e)r[t]=It(t);return r}function rB(e,r){return VS(r,e)?eB(e):tB(r)}function nB(e,r){let t=rB(e,r);return iD(e,t)}function hf(e,r){return r.map(t=>Zo(e,t))}function oB(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(r))t[n]=Zo(e,r[n]);return t}function Zo(e,r){var n;let t=w({},r);return Ca(r)?Jn(Zo(e,pr(r,[Pn]))):oS(r)?Vo(Zo(e,pr(r,[hs]))):Qt(r)?iD(e,r.properties):ho(r)?nB(e,r.keys):nf(r)?Ag(hf(e,r.parameters),Zo(e,r.returns),t):of(r)?Tu(hf(e,r.parameters),Zo(e,r.returns),t):rf(r)?Mg(Zo(e,r.items),t):af(r)?_g(Zo(e,r.items),t):Ir(r)?Xn(hf(e,r.allOf),t):vt(r)?Pt(hf(e,r.anyOf),t):Mi(r)?Ta(hf(e,(n=r.items)!=null?n:[]),t):Or(r)?Lt(oB(e,r.properties),t):gs(r)?wg(Zo(e,r.items),t):Sl(r)?Lg(Zo(e,r.item),t):r}function iB(e,r){let t={};for(let n of e)t[n]=Zo(n,r);return t}function aD(e,r,t){let n=Ai(e)?Yn(e):e,o=r({[Z]:"MappedKey",keys:n}),i=iB(n,o);return Lt(i,t)}p();function aB(e){return te(pr(e,[Pn]))}function sB(e){return te(H(w({},e),{[Pn]:"Optional"}))}function uB(e,r){return r===!1?aB(e):sB(e)}function Jn(e,r){let t=r!=null?r:!0;return Qt(e)?sD(e,t):uB(e,t)}function lB(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Jn(e[n],r);return t}function cB(e,r){return lB(e.properties,r)}function sD(e,r){let t=cB(e,r);return ct(t)}p();function gf(e,r={}){let t=e.every(o=>Or(o)),n=Ai(r.unevaluatedProperties)?{unevaluatedProperties:r.unevaluatedProperties}:{};return te(r.unevaluatedProperties===!1||Ai(r.unevaluatedProperties)||t?H(w({},n),{[Z]:"Intersect",type:"object",allOf:e}):H(w({},n),{[Z]:"Intersect",allOf:e}),r)}function dB(e){return e.every(r=>Ca(r))}function pB(e){return pr(e,[Pn])}function uD(e){return e.map(r=>Ca(r)?pB(r):r)}function mB(e,r){return dB(e)?Jn(gf(uD(e),r)):gf(uD(e),r)}function Bg(e,r={}){if(e.length===0)return Ft(r);if(e.length===1)return te(e[0],r);if(e.some(t=>ad(t)))throw new Error("Cannot intersect transform types");return mB(e,r)}p();function Xn(e,r){if(e.length===0)return Ft(r);if(e.length===1)return te(e[0],r);if(e.some(t=>ad(t)))throw new Error("Cannot intersect transform types");return gf(e,r)}function lD(e){return e.map(r=>Wv(r))}function fB(e){return Xn(lD(e))}function hB(e){return Pt(lD(e))}function gB(e){return Wv(e)}function Wv(e){return Ir(e)?fB(e.allOf):vt(e)?hB(e.anyOf):Sl(e)?gB(e.item):e}function cD(e,r){return te(Wv(e),r)}p();p();p();p();function dD(e){let r=[];for(let t of e)r.push(Zr(t));return r}function yB(e){let r=dD(e);return WS(r)}function bB(e){let r=dD(e);return HS(r)}function vB(e){return e.map((r,t)=>t.toString())}function xB(e){return["[number]"]}function IB(e){return globalThis.Object.getOwnPropertyNames(e)}function EB(e){return qv?globalThis.Object.getOwnPropertyNames(e).map(t=>t[0]==="^"&&t[t.length-1]==="$"?t.slice(1,t.length-1):t):[]}function Zr(e){var r;return Ir(e)?yB(e.allOf):vt(e)?bB(e.anyOf):Mi(e)?vB((r=e.items)!=null?r:[]):gs(e)?xB(e.items):Or(e)?IB(e.properties):Pv(e)?EB(e.patternProperties):[]}var qv=!1;function Is(e){qv=!0;let r=Zr(e);qv=!1;let t=r.map(n=>"(".concat(n,")"));return"^(".concat(t.join("|"),")$")}function CB(e){return e.map(r=>r==="[number]"?Da():It(r))}function Rg(e,r){if(Qt(e))return pD(e,r);{let t=Zr(e),n=CB(t),o=Sa(n);return te(o,r)}}function SB(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Rg(e[n],Yt(r));return t}function DB(e,r){return SB(e.properties,r)}function pD(e,r){let t=DB(e,r);return ct(t)}p();function wu(e){let r=Zr(e),t=ff(e,r);return r.map((n,o)=>[r[o],t[o]])}function TB(e){let r=[];for(let t of e)r.push(...Zr(t));return ZS(r)}function wB(e){return e.filter(r=>!Cu(r))}function MB(e,r){let t=[];for(let n of e)t.push(...ff(n,[r]));return wB(t)}function AB(e,r){let t={};for(let n of r)t[n]=Bg(MB(e,n));return t}function mD(e,r){let t=TB(e),n=AB(e,t);return Lt(n,r)}p();p();function Ng(e){return te({[Z]:"Date",type:"Date"},e)}p();function jg(e){return te({[Z]:"Null",type:"null"},e)}p();function Ug(e){return te({[Z]:"Symbol",type:"symbol"},e)}p();function zg(e){return te({[Z]:"Undefined",type:"undefined"},e)}p();function Gg(e){return te({[Z]:"Uint8Array",type:"Uint8Array"},e)}p();function Es(e){return te({[Z]:"Unknown"},e)}function FB(e){return e.map(r=>Kv(r,!1))}function PB(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Vo(Kv(e[t],!1));return r}function $g(e,r){return r===!0?e:Vo(e)}function Kv(e,r){return Ev(e)?$g(Du(),r):Sv(e)?$g(Du(),r):bn(e)?Vo(Ta(FB(e))):ps(e)?Gg():Il(e)?Ng():_t(e)?$g(Lt(PB(e)),r):Cv(e)?$g(Tu([],Es()),r):or(e)?zg():Dv(e)?jg():Tv(e)?Ug():Xm(e)?md():wi(e)?It(e):Iu(e)?It(e):Zt(e)?It(e):Lt({})}function fD(e,r){return te(Kv(e,!0),r)}p();function hD(e,r){return Ta(e.parameters,r)}p();function yf(e,r){return e.map(t=>Fi(t,r))}function OB(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Fi(e[n],r);return t}function kB(e,r){return e.parameters=yf(e.parameters,r),e.returns=Fi(e.returns,r),e}function BB(e,r){return e.parameters=yf(e.parameters,r),e.returns=Fi(e.returns,r),e}function _B(e,r){return e.allOf=yf(e.allOf,r),e}function LB(e,r){return e.anyOf=yf(e.anyOf,r),e}function RB(e,r){return or(e.items)||(e.items=yf(e.items,r)),e}function NB(e,r){return e.items=Fi(e.items,r),e}function jB(e,r){return e.properties=OB(e.properties,r),e}function UB(e,r){return e.item=Fi(e.item,r),e}function zB(e,r){return e.items=Fi(e.items,r),e}function GB(e,r){return e.items=Fi(e.items,r),e}function $B(e,r){let t=r.find(o=>o.$id===e.$ref);if(t===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=pr(t,["$id"]);return Fi(n,r)}function VB(e,r){return nf(e)?kB(e,r):of(e)?BB(e,r):Ir(e)?_B(e,r):vt(e)?LB(e,r):Mi(e)?RB(e,r):gs(e)?NB(e,r):Or(e)?jB(e,r):Sl(e)?UB(e,r):rf(e)?zB(e,r):af(e)?GB(e,r):Ov(e)?$B(e,r):e}function Fi(e,r){return VB(ef(e),tS(r))}p();function gD(e,r){if(or(e))throw new Error("Enum undefined or empty");let t=globalThis.Object.getOwnPropertyNames(e).filter(i=>isNaN(i)).map(i=>e[i]),o=[...new Set(t)].map(i=>It(i));return Pt(o,H(w({},r),{[Go]:"Enum"}))}p();p();p();var Yv=class extends Be{},J;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(J||(J={}));function Ho(e){return e===J.False?e:J.True}function hd(e){throw new Yv(e)}function wr(e){return k.IsNever(e)||k.IsIntersect(e)||k.IsUnion(e)||k.IsUnknown(e)||k.IsAny(e)}function Mr(e,r){return k.IsNever(r)?CD(e,r):k.IsIntersect(r)?Vg(e,r):k.IsUnion(r)?t3(e,r):k.IsUnknown(r)?wD(e,r):k.IsAny(r)?e3(e,r):hd("StructuralRight")}function e3(e,r){return J.True}function ZB(e,r){return k.IsIntersect(r)?Vg(e,r):k.IsUnion(r)&&r.anyOf.some(t=>k.IsAny(t)||k.IsUnknown(t))?J.True:k.IsUnion(r)?J.Union:k.IsUnknown(r)||k.IsAny(r)?J.True:J.Union}function HB(e,r){return k.IsUnknown(e)?J.False:k.IsAny(e)?J.Union:k.IsNever(e)?J.True:J.False}function WB(e,r){return k.IsObject(r)&&Zg(r)?J.True:wr(r)?Mr(e,r):k.IsArray(r)?Ho(Ot(e.items,r.items)):J.False}function qB(e,r){return wr(r)?Mr(e,r):k.IsAsyncIterator(r)?Ho(Ot(e.items,r.items)):J.False}function KB(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsBigInt(r)?J.True:J.False}function ID(e,r){return k.IsLiteralBoolean(e)||k.IsBoolean(e)?J.True:J.False}function JB(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsBoolean(r)?J.True:J.False}function YB(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsConstructor(r)?e.parameters.length>r.parameters.length?J.False:e.parameters.every((t,n)=>Ho(Ot(r.parameters[n],t))===J.True)?Ho(Ot(e.returns,r.returns)):J.False:J.False}function XB(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsDate(r)?J.True:J.False}function QB(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsFunction(r)?e.parameters.length>r.parameters.length?J.False:e.parameters.every((t,n)=>Ho(Ot(r.parameters[n],t))===J.True)?Ho(Ot(e.returns,r.returns)):J.False:J.False}function ED(e,r){return k.IsLiteral(e)&&nt.IsNumber(e.const)||k.IsNumber(e)||k.IsInteger(e)?J.True:J.False}function e_(e,r){return k.IsInteger(r)||k.IsNumber(r)?J.True:wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):J.False}function Vg(e,r){return r.allOf.every(t=>Ot(e,t)===J.True)?J.True:J.False}function t_(e,r){return e.allOf.some(t=>Ot(t,r)===J.True)?J.True:J.False}function r_(e,r){return wr(r)?Mr(e,r):k.IsIterator(r)?Ho(Ot(e.items,r.items)):J.False}function n_(e,r){return k.IsLiteral(r)&&r.const===e.const?J.True:wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsString(r)?TD(e,r):k.IsNumber(r)?SD(e,r):k.IsInteger(r)?ED(e,r):k.IsBoolean(r)?ID(e,r):J.False}function CD(e,r){return J.False}function o_(e,r){return J.True}function yD(e){let[r,t]=[e,0];for(;k.IsNot(r);)r=r.not,t+=1;return t%2===0?r:Es()}function i_(e,r){return k.IsNot(e)?Ot(yD(e),r):k.IsNot(r)?Ot(e,yD(r)):hd("Invalid fallthrough for Not")}function a_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsNull(r)?J.True:J.False}function SD(e,r){return k.IsLiteralNumber(e)||k.IsNumber(e)||k.IsInteger(e)?J.True:J.False}function s_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsInteger(r)||k.IsNumber(r)?J.True:J.False}function Qn(e,r){return Object.getOwnPropertyNames(e.properties).length===r}function bD(e){return Zg(e)}function vD(e){return Qn(e,0)||Qn(e,1)&&"description"in e.properties&&k.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(k.IsString(e.properties.description.anyOf[0])&&k.IsUndefined(e.properties.description.anyOf[1])||k.IsString(e.properties.description.anyOf[1])&&k.IsUndefined(e.properties.description.anyOf[0]))}function Jv(e){return Qn(e,0)}function xD(e){return Qn(e,0)}function u_(e){return Qn(e,0)}function l_(e){return Qn(e,0)}function c_(e){return Zg(e)}function d_(e){let r=Da();return Qn(e,0)||Qn(e,1)&&"length"in e.properties&&Ho(Ot(e.properties.length,r))===J.True}function p_(e){return Qn(e,0)}function Zg(e){let r=Da();return Qn(e,0)||Qn(e,1)&&"length"in e.properties&&Ho(Ot(e.properties.length,r))===J.True}function m_(e){let r=Tu([Du()],Du());return Qn(e,0)||Qn(e,1)&&"then"in e.properties&&Ho(Ot(e.properties.then,r))===J.True}function DD(e,r){return Ot(e,r)===J.False||k.IsOptional(e)&&!k.IsOptional(r)?J.False:J.True}function vn(e,r){return k.IsUnknown(e)?J.False:k.IsAny(e)?J.Union:k.IsNever(e)||k.IsLiteralString(e)&&bD(r)||k.IsLiteralNumber(e)&&Jv(r)||k.IsLiteralBoolean(e)&&xD(r)||k.IsSymbol(e)&&vD(r)||k.IsBigInt(e)&&u_(r)||k.IsString(e)&&bD(r)||k.IsSymbol(e)&&vD(r)||k.IsNumber(e)&&Jv(r)||k.IsInteger(e)&&Jv(r)||k.IsBoolean(e)&&xD(r)||k.IsUint8Array(e)&&c_(r)||k.IsDate(e)&&l_(r)||k.IsConstructor(e)&&p_(r)||k.IsFunction(e)&&d_(r)?J.True:k.IsRecord(e)&&k.IsString(Xv(e))?r[Go]==="Record"?J.True:J.False:k.IsRecord(e)&&k.IsNumber(Xv(e))?Qn(r,0)?J.True:J.False:J.False}function f_(e,r){return wr(r)?Mr(e,r):k.IsRecord(r)?Wo(e,r):k.IsObject(r)?(()=>{for(let t of Object.getOwnPropertyNames(r.properties)){if(!(t in e.properties)&&!k.IsOptional(r.properties[t]))return J.False;if(k.IsOptional(r.properties[t]))return J.True;if(DD(e.properties[t],r.properties[t])===J.False)return J.False}return J.True})():J.False}function h_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)&&m_(r)?J.True:k.IsPromise(r)?Ho(Ot(e.item,r.item)):J.False}function Xv(e){return bs in e.patternProperties?Da():vs in e.patternProperties?$o():hd("Unknown record key pattern")}function Qv(e){return bs in e.patternProperties?e.patternProperties[bs]:vs in e.patternProperties?e.patternProperties[vs]:hd("Unable to get record value schema")}function Wo(e,r){let[t,n]=[Xv(r),Qv(r)];return k.IsLiteralString(e)&&k.IsNumber(t)&&Ho(Ot(e,n))===J.True?J.True:k.IsUint8Array(e)&&k.IsNumber(t)||k.IsString(e)&&k.IsNumber(t)||k.IsArray(e)&&k.IsNumber(t)?Ot(e,n):k.IsObject(e)?(()=>{for(let o of Object.getOwnPropertyNames(e.properties))if(DD(n,e.properties[o])===J.False)return J.False;return J.True})():J.False}function g_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Ot(Qv(e),Qv(r)):J.False}function y_(e,r){let t=k.IsRegExp(e)?$o():e,n=k.IsRegExp(r)?$o():r;return Ot(t,n)}function TD(e,r){return k.IsLiteral(e)&&nt.IsString(e.const)||k.IsString(e)?J.True:J.False}function b_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsString(r)?J.True:J.False}function v_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsSymbol(r)?J.True:J.False}function x_(e,r){return k.IsTemplateLiteral(e)?Ot(Tl(e),r):k.IsTemplateLiteral(r)?Ot(e,Tl(r)):hd("Invalid fallthrough for TemplateLiteral")}function I_(e,r){return k.IsArray(r)&&e.items!==void 0&&e.items.every(t=>Ot(t,r.items)===J.True)}function E_(e,r){return k.IsNever(e)?J.True:k.IsUnknown(e)?J.False:k.IsAny(e)?J.Union:J.False}function C_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)&&Zg(r)||k.IsArray(r)&&I_(e,r)?J.True:k.IsTuple(r)?nt.IsUndefined(e.items)&&!nt.IsUndefined(r.items)||!nt.IsUndefined(e.items)&&nt.IsUndefined(r.items)?J.False:nt.IsUndefined(e.items)&&!nt.IsUndefined(r.items)||e.items.every((t,n)=>Ot(t,r.items[n])===J.True)?J.True:J.False:J.False}function S_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsUint8Array(r)?J.True:J.False}function D_(e,r){return wr(r)?Mr(e,r):k.IsObject(r)?vn(e,r):k.IsRecord(r)?Wo(e,r):k.IsVoid(r)?M_(e,r):k.IsUndefined(r)?J.True:J.False}function t3(e,r){return r.anyOf.some(t=>Ot(e,t)===J.True)?J.True:J.False}function T_(e,r){return e.anyOf.every(t=>Ot(t,r)===J.True)?J.True:J.False}function wD(e,r){return J.True}function w_(e,r){return k.IsNever(r)?CD(e,r):k.IsIntersect(r)?Vg(e,r):k.IsUnion(r)?t3(e,r):k.IsAny(r)?e3(e,r):k.IsString(r)?TD(e,r):k.IsNumber(r)?SD(e,r):k.IsInteger(r)?ED(e,r):k.IsBoolean(r)?ID(e,r):k.IsArray(r)?HB(e,r):k.IsTuple(r)?E_(e,r):k.IsObject(r)?vn(e,r):k.IsUnknown(r)?J.True:J.False}function M_(e,r){return k.IsUndefined(e)||k.IsUndefined(e)?J.True:J.False}function A_(e,r){return k.IsIntersect(r)?Vg(e,r):k.IsUnion(r)?t3(e,r):k.IsUnknown(r)?wD(e,r):k.IsAny(r)?e3(e,r):k.IsObject(r)?vn(e,r):k.IsVoid(r)?J.True:J.False}function Ot(e,r){return k.IsTemplateLiteral(e)||k.IsTemplateLiteral(r)?x_(e,r):k.IsRegExp(e)||k.IsRegExp(r)?y_(e,r):k.IsNot(e)||k.IsNot(r)?i_(e,r):k.IsAny(e)?ZB(e,r):k.IsArray(e)?WB(e,r):k.IsBigInt(e)?KB(e,r):k.IsBoolean(e)?JB(e,r):k.IsAsyncIterator(e)?qB(e,r):k.IsConstructor(e)?YB(e,r):k.IsDate(e)?XB(e,r):k.IsFunction(e)?QB(e,r):k.IsInteger(e)?e_(e,r):k.IsIntersect(e)?t_(e,r):k.IsIterator(e)?r_(e,r):k.IsLiteral(e)?n_(e,r):k.IsNever(e)?o_(e,r):k.IsNull(e)?a_(e,r):k.IsNumber(e)?s_(e,r):k.IsObject(e)?f_(e,r):k.IsRecord(e)?g_(e,r):k.IsString(e)?b_(e,r):k.IsSymbol(e)?v_(e,r):k.IsTuple(e)?C_(e,r):k.IsPromise(e)?h_(e,r):k.IsUint8Array(e)?S_(e,r):k.IsUndefined(e)?D_(e,r):k.IsUnion(e)?T_(e,r):k.IsUnknown(e)?w_(e,r):k.IsVoid(e)?A_(e,r):hd("Unknown left type operand '".concat(e[Z],"'"))}function Mu(e,r){return Ot(e,r)}p();p();p();function F_(e,r,t,n,o){let i={};for(let a of globalThis.Object.getOwnPropertyNames(e))i[a]=gd(e[a],r,t,n,Yt(o));return i}function P_(e,r,t,n,o){return F_(e.properties,r,t,n,o)}function MD(e,r,t,n,o){let i=P_(e,r,t,n,o);return ct(i)}function O_(e,r,t,n){let o=Mu(e,r);return o===J.Union?Pt([t,n]):o===J.True?t:n}function gd(e,r,t,n,o){return Qt(e)?MD(e,r,t,n,o):ho(e)?te(AD(e,r,t,n,o)):te(O_(e,r,t,n),o)}function k_(e,r,t,n,o){return{[e]:gd(It(e),r,t,n,Yt(o))}}function B_(e,r,t,n,o){return e.reduce((i,a)=>w(w({},i),k_(a,r,t,n,o)),{})}function __(e,r,t,n,o){return B_(e.keys,r,t,n,o)}function AD(e,r,t,n,o){let i=__(e,r,t,n,o);return ct(i)}p();function L_(e){return e.allOf.every(r=>Cs(r))}function R_(e){return e.anyOf.some(r=>Cs(r))}function N_(e){return!Cs(e.not)}function Cs(e){return e[Z]==="Intersect"?L_(e):e[Z]==="Union"?R_(e):e[Z]==="Not"?N_(e):e[Z]==="Undefined"}p();function FD(e,r){return yd(Tl(e),r)}function j_(e,r){let t=e.filter(n=>Mu(n,r)===J.False);return t.length===1?t[0]:Pt(t)}function yd(e,r,t={}){return go(e)?te(FD(e,r),t):Qt(e)?te(PD(e,r),t):te(vt(e)?j_(e.anyOf,r):Mu(e,r)!==J.False?Ft():e,t)}function U_(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=yd(e[n],r);return t}function z_(e,r){return U_(e.properties,r)}function PD(e,r){let t=z_(e,r);return ct(t)}p();p();p();function OD(e,r){return bd(Tl(e),r)}function G_(e,r){let t=e.filter(n=>Mu(n,r)!==J.False);return t.length===1?t[0]:Pt(t)}function bd(e,r,t){return go(e)?te(OD(e,r),t):Qt(e)?te(kD(e,r),t):te(vt(e)?G_(e.anyOf,r):Mu(e,r)!==J.False?e:Ft(),t)}function $_(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=bd(e[n],r);return t}function V_(e,r){return $_(e.properties,r)}function kD(e,r){let t=V_(e,r);return ct(t)}p();function BD(e,r){return te(e.returns,r)}p();function _D(e){return te({[Z]:"Integer",type:"integer"},e)}p();p();p();function Z_(e,r,t){return{[e]:Pi(It(e),r,Yt(t))}}function H_(e,r,t){return e.reduce((o,i)=>w(w({},o),Z_(i,r,t)),{})}function W_(e,r,t){return H_(e.keys,r,t)}function LD(e,r,t){let n=W_(e,r,t);return ct(n)}function q_(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toLowerCase(),t].join("")}function K_(e){let[r,t]=[e.slice(0,1),e.slice(1)];return[r.toUpperCase(),t].join("")}function J_(e){return e.toUpperCase()}function Y_(e){return e.toLowerCase()}function X_(e,r,t){let n=dd(e.pattern);if(!Dl(n))return H(w({},e),{pattern:RD(e.pattern,r)});let a=[...mf(n)].map(c=>It(c)),l=ND(a,r),u=Pt(l);return kg([u],t)}function RD(e,r){return typeof e=="string"?r==="Uncapitalize"?q_(e):r==="Capitalize"?K_(e):r==="Uppercase"?J_(e):r==="Lowercase"?Y_(e):e:e.toString()}function ND(e,r){return e.map(t=>Pi(t,r))}function Pi(e,r,t={}){return ho(e)?LD(e,r,t):go(e)?X_(e,r,t):vt(e)?Pt(ND(e.anyOf,r),t):ys(e)?It(RD(e.const,r),t):te(e,t)}function jD(e,r={}){return Pi(e,"Capitalize",r)}p();function UD(e,r={}){return Pi(e,"Lowercase",r)}p();function zD(e,r={}){return Pi(e,"Uncapitalize",r)}p();function GD(e,r={}){return Pi(e,"Uppercase",r)}p();function $D(e,r){return te({[Z]:"Not",not:e},r)}p();p();p();function Q_(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=vd(e[o],r,Yt(t));return n}function eL(e,r,t){return Q_(e.properties,r,t)}function VD(e,r,t){let n=eL(e,r,t);return ct(n)}function tL(e,r){return e.map(t=>r3(t,r))}function rL(e,r){return e.map(t=>r3(t,r))}function nL(e,r){let o=e,{[r]:t}=o;return tn(o,[$h(r)])}function oL(e,r){return r.reduce((t,n)=>nL(t,n),e)}function iL(e,r){let t=pr(e,[Xt,"$id","required","properties"]),n=oL(e.properties,r);return Lt(n,t)}function r3(e,r){return Ir(e)?Xn(tL(e.allOf,r)):vt(e)?Pt(rL(e.anyOf,r)):Or(e)?iL(e,r):Lt({})}function vd(e,r,t){if(ho(r))return ZD(e,r,t);if(Qt(e))return VD(e,r,t);let n=Ai(r)?Yn(r):r;return te(w(w({},r3(e,n)),t))}function aL(e,r,t){return{[r]:vd(e,[r],Yt(t))}}function sL(e,r,t){return r.reduce((n,o)=>w(w({},n),aL(e,o,t)),{})}function uL(e,r,t){return sL(e,r.keys,t)}function ZD(e,r,t){let n=uL(e,r,t);return ct(n)}p();function HD(e,r){return Ta(e.parameters,r)}p();p();function WD(e){return e.map(r=>qD(r))}function lL(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=Jn(e[t]);return r}function cL(e){let r=pr(e,[Xt,"$id","required","properties"]),t=lL(e.properties);return Lt(t,r)}function qD(e){return Ir(e)?Xn(WD(e.allOf)):vt(e)?Pt(WD(e.anyOf)):Or(e)?cL(e):Lt({})}function Hg(e,r){return Qt(e)?KD(e,r):te(w(w({},qD(e)),r))}function dL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Hg(e[n],Yt(r));return t}function pL(e,r){return dL(e.properties,r)}function KD(e,r){let t=pL(e,r);return ct(t)}p();p();p();function mL(e,r,t){let n={};for(let o of globalThis.Object.getOwnPropertyNames(e))n[o]=xd(e[o],r,Yt(t));return n}function fL(e,r,t){return mL(e.properties,r,t)}function JD(e,r,t){let n=fL(e,r,t);return ct(n)}function hL(e,r){return e.map(t=>n3(t,r))}function gL(e,r){return e.map(t=>n3(t,r))}function yL(e,r){let t={};for(let n of r)n in e&&(t[n]=e[n]);return t}function bL(e,r){let t=pr(e,[Xt,"$id","required","properties"]),n=yL(e.properties,r);return Lt(n,t)}function n3(e,r){return Ir(e)?Xn(hL(e.allOf,r)):vt(e)?Pt(gL(e.anyOf,r)):Or(e)?bL(e,r):Lt({})}function xd(e,r,t){if(ho(r))return YD(e,r,t);if(Qt(e))return JD(e,r,t);let n=Ai(r)?Yn(r):r;return te(w(w({},n3(e,n)),t))}function vL(e,r,t){return{[r]:xd(e,[r],Yt(t))}}function xL(e,r,t){return r.reduce((n,o)=>w(w({},n),vL(e,o,t)),{})}function IL(e,r,t){return xL(e,r.keys,t)}function YD(e,r,t){let n=IL(e,r,t);return ct(n)}p();function XD(e){return Vo(Jn(e))}p();function wl(e,r,t){return te({[Z]:"Record",type:"object",patternProperties:{[e]:r}},t)}function o3(e,r,t){let n={};for(let o of e)n[o]=r;return Lt(n,H(w({},t),{[Go]:"Record"}))}function EL(e,r,t){return Pg(e)?o3(Yn(e),r,t):wl(e.pattern,r,t)}function CL(e,r,t){return o3(Yn(Pt(e)),r,t)}function SL(e,r,t){return o3([e.toString()],r,t)}function DL(e,r,t){return wl(e.source,r,t)}function TL(e,r,t){let n=or(e.pattern)?vs:e.pattern;return wl(n,r,t)}function wL(e,r,t){return wl(vs,r,t)}function ML(e,r,t){return wl($S,r,t)}function AL(e,r,t){return wl(bs,r,t)}function FL(e,r,t){return wl(bs,r,t)}function QD(e,r,t={}){return vt(e)?CL(e.anyOf,r,t):go(e)?EL(e,r,t):ys(e)?SL(e.const,r,t):El(e)?AL(e,r,t):Cl(e)?FL(e,r,t):kv(e)?DL(e,r,t):sf(e)?TL(e,r,t):Mv(e)?wL(e,r,t):Cu(e)?ML(e,r,t):Ft(t)}p();var PL=0;function e5(e,r={}){or(r.$id)&&(r.$id="T".concat(PL++));let t=ef(e({[Z]:"This",$ref:"".concat(r.$id)}));return t.$id=r.$id,te(w({[Go]:"Recursive"},t),r)}p();function t5(e,r){if(Zt(e))return te({[Z]:"Ref",$ref:e},r);if(or(e.$id))throw new Error("Reference target type must specify an $id");return te({[Z]:"Ref",$ref:e.$id},r)}p();function r5(e,r){let t=Zt(e)?new globalThis.RegExp(e):e;return te({[Z]:"RegExp",type:"RegExp",source:t.source,flags:t.flags},r)}p();p();function n5(e){return e.map(r=>o5(r))}function OL(e){let r={};for(let t of globalThis.Object.getOwnPropertyNames(e))r[t]=pr(e[t],[Pn]);return r}function kL(e){let r=pr(e,[Xt,"$id","required","properties"]),t=OL(e.properties);return Lt(t,r)}function o5(e){return Ir(e)?Xn(n5(e.allOf)):vt(e)?Pt(n5(e.anyOf)):Or(e)?kL(e):Lt({})}function Wg(e,r){return Qt(e)?i5(e,r):te(w(w({},o5(e)),r))}function BL(e,r){let t={};for(let n of globalThis.Object.getOwnPropertyNames(e))t[n]=Wg(e[n],r);return t}function _L(e,r){return BL(e.properties,r)}function i5(e,r){let t=_L(e,r);return ct(t)}p();function LL(e){var r;return Ir(e)?e.allOf:vt(e)?e.anyOf:Mi(e)?(r=e.items)!=null?r:[]:[]}function a5(e){return LL(e)}p();function s5(e,r){return te(e.returns,r)}p();function u5(e){return JSON.parse(JSON.stringify(e))}p();var i3=class{constructor(r){this.schema=r}Decode(r){return new a3(this.schema,r)}},a3=class{constructor(r,t){this.schema=r,this.decode=t}EncodeTransform(r,t){let i={Encode:a=>t[Xt].Encode(r(a)),Decode:a=>this.decode(t[Xt].Decode(a))};return H(w({},t),{[Xt]:i})}EncodeSchema(r,t){let n={Decode:this.decode,Encode:r};return H(w({},t),{[Xt]:n})}Encode(r){return ad(this.schema)?this.EncodeTransform(r,this.schema):this.EncodeSchema(r,this.schema)}};function l5(e){return new i3(e)}p();function qg(e={}){var r;return te({[Z]:(r=e[Z])!=null?r:"Unsafe"},e)}p();function c5(e){return te({[Z]:"Void",type:"void"},e)}p();var s3={};fu(s3,{Any:()=>Du,Array:()=>wg,AsyncIterator:()=>Mg,Awaited:()=>cD,BigInt:()=>md,Boolean:()=>Og,Capitalize:()=>jD,Composite:()=>mD,Const:()=>fD,Constructor:()=>Ag,ConstructorParameters:()=>hD,Date:()=>Ng,Deref:()=>Fi,Enum:()=>gD,Exclude:()=>yd,Extends:()=>gd,Extract:()=>bd,Function:()=>Tu,Index:()=>fd,InstanceType:()=>BD,Integer:()=>_D,Intersect:()=>Xn,Iterator:()=>_g,KeyOf:()=>Rg,Literal:()=>It,Lowercase:()=>UD,Mapped:()=>aD,Never:()=>Ft,Not:()=>$D,Null:()=>jg,Number:()=>Da,Object:()=>Lt,Omit:()=>vd,Optional:()=>Jn,Parameters:()=>HD,Partial:()=>Hg,Pick:()=>xd,Promise:()=>Lg,Readonly:()=>Vo,ReadonlyOptional:()=>XD,Record:()=>QD,Recursive:()=>e5,Ref:()=>t5,RegExp:()=>r5,Required:()=>Wg,Rest:()=>a5,ReturnType:()=>s5,Strict:()=>u5,String:()=>$o,Symbol:()=>Ug,TemplateLiteral:()=>kg,Transform:()=>l5,Tuple:()=>Ta,Uint8Array:()=>Gg,Uncapitalize:()=>zD,Undefined:()=>zg,Union:()=>Pt,Unknown:()=>Es,Unsafe:()=>qg,Uppercase:()=>GD,Void:()=>c5});p();var b=s3;p();var bf=b.Object({externalId:b.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:b.String({description:"The name of the entity."}),shortName:b.String({description:"A short name for the entity."}),description:b.String({description:"A description of the entity."}),icon:b.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),u3=b.Partial(bf,{$id:"Details",description:"Additional information about a given entity."}),yo=b.Object({details:b.Optional(b.Ref(u3))},{$id:"WithDetails"}),Ml=e=>{let r=[...e].sort(),t=b.Pick(bf,e),n=b.Omit(bf,e);return b.Object({details:b.Intersect([t,b.Partial(n)])},{$id:"WithRequiredDetails_".concat(r.join("_"))})},l3=[bf,u3];p();var Id=b.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),Ed=b.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),Al=b.Tuple([b.Ref(Id),b.Ref(Ed)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),xn=b.Object({type:b.Literal("Point"),coordinates:b.Ref(Al)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),Kg=b.Object({type:b.Literal("MultiPoint"),coordinates:b.Array(b.Ref(Al))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),Jg=b.Object({type:b.Literal("LineString"),coordinates:b.Array(b.Ref(Al),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Yg=b.Object({type:b.Literal("MultiLineString"),coordinates:b.Array(b.Array(b.Ref(Al),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),d5=b.Array(b.Ref(Al),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),c3=b.Array(b.Ref(d5),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),Cd=b.Object({type:b.Literal("Polygon"),coordinates:b.Ref(c3)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Sd=b.Object({type:b.Literal("MultiPolygon"),coordinates:b.Array(b.Ref(c3))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),on=(e,r,t)=>b.Object({type:b.Literal("Feature"),geometry:e,properties:r},t),kn=(e,r,t)=>b.Object({type:b.Literal("FeatureCollection"),features:b.Array(e,t)},r),d3=[Id,Ed,Al,xn,Kg,Jg,Yg,d5,c3,Cd,Sd];p();var mr=(e,r)=>b.Unsafe(b.String({$id:r,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),In=mr("g","GeometryId"),rt=mr("f","FloorId"),p3=[In,rt];p();p();p();var Xg=class{constructor(r){f(this,"_value");this._value=r}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let r=this._value;return this._value=null,{done:!1,value:r}}},Qg=class{constructor(r){f(this,"_tag","Some");f(this,"_value");this._value=r}get value(){return this._value}isSome(){return!0}isSomeAnd(r){return r(this.value)}isNone(){return!1}equals(r){return r.isSome()&&r.value===this.value}expect(r){return this.value}unwrap(){return this.value}unwrapOr(r){return this.value}unwrapOrElse(r){return this.value}inspect(r){return r(this.value),this}inspectNone(r){return this}map(r){return p5(r(this.value))}mapAsync(r){return r(this.value).then(t=>p5(t))}mapOr(r,t){return this.map(r).unwrapOr(t)}mapOrAsync(r,t){return this.mapAsync(r).then(n=>n.unwrapOr(t))}mapOrElse(r,t){return this.map(r).unwrapOrElse(t)}mapOrElseAsync(r,t){return this.mapAsync(r).then(n=>n.unwrapOrElse(t))}and(r){return r}andThen(r){return r(this.value)}andThenAsync(r){return r(this.value)}filter(r){return r(this.value)?this:Au()}or(r){return this}orElse(r){return this}xor(r){return r.isSome()?Au():this}toString(){return"Some(".concat(this.value,")")}okOr(r){return me(this.value)}okOrElse(r){return me(this.value)}iter(){return new Xg(this.value)}[Symbol.iterator](){return this.iter()}zip(r){return r.isSome()?Dd([this.value,r.value]):Au()}zipWith(r,t){return r.isSome()?Dd(t(this.value,r.value)):Au()}get[Symbol.toStringTag](){return"Some"}},ey=class{constructor(){f(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(r){return!1}isNone(){return!0}equals(r){return r.isNone()}expect(r){throw new Error(r)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(r){return r}unwrapOrElse(r){return r()}inspect(r){return this}inspectNone(r){return r(),this}map(r){return this}mapAsync(r){return Promise.resolve(this)}mapOr(r,t){return t}mapOrAsync(r,t){return Promise.resolve(t)}mapOrElse(r,t){return t()}mapOrElseAsync(r,t){return t()}and(r){return this}andThen(r){return this}andThenAsync(r){return Promise.resolve(this)}filter(r){return this}or(r){return r}orElse(r){return r()}xor(r){return r}toString(){return"None"}okOr(r){return ge(r)}okOrElse(r){return ge(r())}iter(){return new Xg(null)}[Symbol.iterator](){return this.iter()}zip(r){return this}zipWith(r,t){return this}get[Symbol.toStringTag](){return"None"}},Dd=e=>new Qg(e),Au=()=>new ey,p5=e=>e instanceof Qg||e instanceof ey?e:e==null?Au():Dd(e);var ty=class{constructor(r){f(this,"_value");this._value=r}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let r=this._value;return this._value=null,{done:!1,value:r}}},m3=class{constructor(r){f(this,"_tag","Ok");f(this,"_value");this._value=r}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(r){return r(this.value)}isErr(){return!1}isErrAnd(r){return!1}ok(){return Dd(this.value)}err(){return Au()}expect(r){return this.value}expectErr(r){throw new Error(r)}unwrap(){return this.value}unwrapOr(r){return this.value}unwrapOrElse(r){return this.value}inspect(r){return r(this.value),this}inspectErr(){return this}map(r){return me(r(this.value))}async mapAsync(r){return r(this.value).then(me)}mapOr(r,t){return r(this.value)}async mapOrAsync(r,t){return r(this.value)}mapOrElse(r,t){return r(this.value)}async mapOrElseAsync(r,t){return r(this.value)}mapErr(r){return this}iter(){return new ty(this.value)}[Symbol.iterator](){return this.iter()}and(r){return r}andThen(r){return r(this.value)}or(r){return this}orElse(r){return this}async andThenAsync(r){return r(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}},f3=class e{constructor(r){f(this,"_tag","Err");f(this,"_error");this._error=r}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(r){return!1}isErr(){return!0}isErrAnd(r){return r(this.error)}ok(){return Au()}err(){return Dd(this.error)}expect(r){throw new Error(r)}expectErr(r){return this.error}unwrap(){throw this.error}unwrapOr(r){return r}unwrapOrElse(r){return r()}inspect(){return this}inspectErr(r){return r(this.error),this}map(r){return this}iter(){return new ty(null)}[Symbol.iterator](){return this.iter()}async mapAsync(r){return this}mapOr(r,t){return t}async mapOrAsync(r,t){return t}mapOrElse(r,t){return t()}async mapOrElseAsync(r,t){return t()}mapErr(r){return new e(r(this.error))}and(r){return this}andThen(r){return this}async andThenAsync(r){return this}or(r){return r}orElse(r){return r(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}},me=e=>new m3(e),ge=e=>new f3(e);p();var eo;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(eo||(eo={}));p();p();p();p();var h3=class extends Be{constructor(r){super("Duplicate type kind '".concat(r,"' detected"))}},vf=class extends Be{constructor(r){super("Duplicate string format '".concat(r,"' detected"))}},ry;(function(e){function r(n,o){if(kr.Has(n))throw new h3(n);return kr.Set(n,o),(i={})=>qg(H(w({},i),{[Z]:n}))}e.Type=r;function t(n,o){if(On.Has(n))throw new vf(n);return On.Set(n,o),n}e.Format=t})(ry||(ry={}));p();function RL(e){switch(e.errorType){case W.ArrayContains:return"Expected array to contain at least one matching value";case W.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case W.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case W.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case W.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case W.ArrayUniqueItems:return"Expected array elements to be unique";case W.Array:return"Expected array";case W.AsyncIterator:return"Expected AsyncIterator";case W.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case W.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case W.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case W.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case W.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case W.BigInt:return"Expected bigint";case W.Boolean:return"Expected boolean";case W.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case W.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case W.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case W.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case W.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case W.Date:return"Expected Date";case W.Function:return"Expected function";case W.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case W.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case W.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case W.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case W.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case W.Integer:return"Expected integer";case W.IntersectUnevaluatedProperties:return"Unexpected property";case W.Intersect:return"Expected all values to match";case W.Iterator:return"Expected Iterator";case W.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case W.Never:return"Never";case W.Not:return"Value should not match";case W.Null:return"Expected null";case W.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case W.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case W.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case W.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case W.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case W.Number:return"Expected number";case W.Object:return"Expected object";case W.ObjectAdditionalProperties:return"Unexpected property";case W.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case W.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case W.ObjectRequiredProperty:return"Expected required property";case W.Promise:return"Expected Promise";case W.RegExp:return"Expected string to match regular expression";case W.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case W.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case W.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case W.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case W.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case W.String:return"Expected string";case W.Symbol:return"Expected symbol";case W.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case W.Tuple:return"Expected tuple";case W.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case W.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case W.Uint8Array:return"Expected Uint8Array";case W.Undefined:return"Expected undefined";case W.Union:return"Expected union value";case W.Void:return"Expected void";case W.Kind:return"Expected kind '".concat(e.schema[Z],"'");default:return"Unknown error type"}}var NL=RL;function m5(){return NL}p();var g3=class extends Be{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'")),this.schema=r}};function jL(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new g3(e);return dt(t,r)}function qo(e,r){return!ot(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function dt(e,r){return e[Z]==="This"||e[Z]==="Ref"?jL(e,r):e}p();var y3=class extends Be{constructor(r){super("Unable to hash value"),this.value=r}},bo;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(bo||(bo={}));var Td=BigInt("14695981039346656037"),[UL,zL]=[BigInt("1099511628211"),BigInt("18446744073709551616")],GL=Array.from({length:256}).map((e,r)=>BigInt(r)),f5=new Float64Array(1),h5=new DataView(f5.buffer),g5=new Uint8Array(f5.buffer);function*$L(e){let r=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let t=0;t<r;t++)yield e>>8*(r-1-t)&255}function VL(e){En(bo.Array);for(let r of e)wd(r)}function ZL(e){En(bo.Boolean),En(e?1:0)}function HL(e){En(bo.BigInt),h5.setBigInt64(0,e);for(let r of g5)En(r)}function WL(e){En(bo.Date),wd(e.getTime())}function qL(e){En(bo.Null)}function KL(e){En(bo.Number),h5.setFloat64(0,e);for(let r of g5)En(r)}function JL(e){En(bo.Object);for(let r of globalThis.Object.getOwnPropertyNames(e).sort())wd(r),wd(e[r])}function YL(e){En(bo.String);for(let r=0;r<e.length;r++)for(let t of $L(e.charCodeAt(r)))En(t)}function XL(e){En(bo.Symbol),wd(e.description)}function QL(e){En(bo.Uint8Array);for(let r=0;r<e.length;r++)En(e[r])}function eR(e){return En(bo.Undefined)}function wd(e){if(Ue(e))return VL(e);if(Ea(e))return ZL(e);if(rn(e))return HL(e);if(Fn(e))return WL(e);if(ms(e))return qL(e);if(Te(e))return KL(e);if($e(e))return JL(e);if(ot(e))return YL(e);if(fs(e))return XL(e);if(id(e))return QL(e);if(ir(e))return eR(e);throw new y3(e)}function En(e){Td=Td^GL[e],Td=Td*UL%zL}function Fu(e){return Td=BigInt("14695981039346656037"),wd(e),Td}p();var b3=class extends Be{constructor(r){super("Unknown type"),this.schema=r}};function tR(e){return e[Z]==="Any"||e[Z]==="Unknown"}function Qe(e){return e!==void 0}function rR(e,r,t){return!0}function nR(e,r,t){if(!Ue(t)||Qe(e.minItems)&&!(t.length>=e.minItems)||Qe(e.maxItems)&&!(t.length<=e.maxItems)||!t.every(i=>an(e.items,r,i))||e.uniqueItems===!0&&!function(){let i=new Set;for(let a of t){let l=Fu(a);if(i.has(l))return!1;i.add(l)}return!0}())return!1;if(!(Qe(e.contains)||Te(e.minContains)||Te(e.maxContains)))return!0;let n=Qe(e.contains)?e.contains:Ft(),o=t.reduce((i,a)=>an(n,r,a)?i+1:i,0);return!(o===0||Te(e.minContains)&&o<e.minContains||Te(e.maxContains)&&o>e.maxContains)}function oR(e,r,t){return Cg(t)}function iR(e,r,t){return!(!rn(t)||Qe(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||Qe(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||Qe(e.maximum)&&!(t<=e.maximum)||Qe(e.minimum)&&!(t>=e.minimum)||Qe(e.multipleOf)&&t%e.multipleOf!==BigInt(0))}function aR(e,r,t){return Ea(t)}function sR(e,r,t){return an(e.returns,r,t.prototype)}function uR(e,r,t){return!(!Fn(t)||Qe(e.exclusiveMaximumTimestamp)&&!(t.getTime()<e.exclusiveMaximumTimestamp)||Qe(e.exclusiveMinimumTimestamp)&&!(t.getTime()>e.exclusiveMinimumTimestamp)||Qe(e.maximumTimestamp)&&!(t.getTime()<=e.maximumTimestamp)||Qe(e.minimumTimestamp)&&!(t.getTime()>=e.minimumTimestamp)||Qe(e.multipleOfTimestamp)&&t.getTime()%e.multipleOfTimestamp!==0)}function lR(e,r,t){return Eu(t)}function cR(e,r,t){return!(!Tg(t)||Qe(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||Qe(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||Qe(e.maximum)&&!(t<=e.maximum)||Qe(e.minimum)&&!(t>=e.minimum)||Qe(e.multipleOf)&&t%e.multipleOf!==0)}function dR(e,r,t){let n=e.allOf.every(o=>an(o,r,t));if(e.unevaluatedProperties===!1){let o=new RegExp(Is(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a));return n&&i}else if(it(e.unevaluatedProperties)){let o=new RegExp(Is(e)),i=Object.getOwnPropertyNames(t).every(a=>o.test(a)||an(e.unevaluatedProperties,r,t[a]));return n&&i}else return n}function pR(e,r,t){return Sg(t)}function mR(e,r,t){return t===e.const}function fR(e,r,t){return!1}function hR(e,r,t){return!an(e.not,r,t)}function gR(e,r,t){return ms(t)}function yR(e,r,t){return!(!Tt.IsNumberLike(t)||Qe(e.exclusiveMaximum)&&!(t<e.exclusiveMaximum)||Qe(e.exclusiveMinimum)&&!(t>e.exclusiveMinimum)||Qe(e.minimum)&&!(t>=e.minimum)||Qe(e.maximum)&&!(t<=e.maximum)||Qe(e.multipleOf)&&t%e.multipleOf!==0)}function bR(e,r,t){if(!Tt.IsObjectLike(t)||Qe(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||Qe(e.maxProperties)&&!(Object.getOwnPropertyNames(t).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let o of n){let i=e.properties[o];if(e.required&&e.required.includes(o)){if(!an(i,r,t[o])||(Cs(i)||tR(i))&&!(o in t))return!1}else if(Tt.IsExactOptionalProperty(t,o)&&!an(i,r,t[o]))return!1}if(e.additionalProperties===!1){let o=Object.getOwnPropertyNames(t);return e.required&&e.required.length===n.length&&o.length===n.length?!0:o.every(i=>n.includes(i))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(t).every(i=>n.includes(i)||an(e.additionalProperties,r,t[i])):!0}function vR(e,r,t){return Dg(t)}function xR(e,r,t){if(!Tt.IsRecordLike(t)||Qe(e.minProperties)&&!(Object.getOwnPropertyNames(t).length>=e.minProperties)||Qe(e.maxProperties)&&!(Object.getOwnPropertyNames(t).length<=e.maxProperties))return!1;let[n,o]=Object.entries(e.patternProperties)[0],i=new RegExp(n),a=Object.entries(t).every(([c,d])=>i.test(c)?an(o,r,d):!0),l=typeof e.additionalProperties=="object"?Object.entries(t).every(([c,d])=>i.test(c)?!0:an(e.additionalProperties,r,d)):!0,u=e.additionalProperties===!1?Object.getOwnPropertyNames(t).every(c=>i.test(c)):!0;return a&&l&&u}function IR(e,r,t){return an(dt(e,r),r,t)}function ER(e,r,t){let n=new RegExp(e.source,e.flags);return Qe(e.minLength)&&!(t.length>=e.minLength)||Qe(e.maxLength)&&!(t.length<=e.maxLength)?!1:n.test(t)}function CR(e,r,t){return!ot(t)||Qe(e.minLength)&&!(t.length>=e.minLength)||Qe(e.maxLength)&&!(t.length<=e.maxLength)||Qe(e.pattern)&&!new RegExp(e.pattern).test(t)?!1:Qe(e.format)?On.Has(e.format)?On.Get(e.format)(t):!1:!0}function SR(e,r,t){return fs(t)}function DR(e,r,t){return ot(t)&&new RegExp(e.pattern).test(t)}function TR(e,r,t){return an(dt(e,r),r,t)}function wR(e,r,t){if(!Ue(t)||e.items===void 0&&t.length!==0||t.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!an(e.items[n],r,t[n]))return!1;return!0}function MR(e,r,t){return ir(t)}function AR(e,r,t){return e.anyOf.some(n=>an(n,r,t))}function FR(e,r,t){return!(!id(t)||Qe(e.maxByteLength)&&!(t.length<=e.maxByteLength)||Qe(e.minByteLength)&&!(t.length>=e.minByteLength))}function PR(e,r,t){return!0}function OR(e,r,t){return Tt.IsVoidLike(t)}function kR(e,r,t){return kr.Has(e[Z])?kr.Get(e[Z])(e,t):!1}function an(e,r,t){let n=Qe(e.$id)?[...r,e]:r,o=e;switch(o[Z]){case"Any":return rR(o,n,t);case"Array":return nR(o,n,t);case"AsyncIterator":return oR(o,n,t);case"BigInt":return iR(o,n,t);case"Boolean":return aR(o,n,t);case"Constructor":return sR(o,n,t);case"Date":return uR(o,n,t);case"Function":return lR(o,n,t);case"Integer":return cR(o,n,t);case"Intersect":return dR(o,n,t);case"Iterator":return pR(o,n,t);case"Literal":return mR(o,n,t);case"Never":return fR(o,n,t);case"Not":return hR(o,n,t);case"Null":return gR(o,n,t);case"Number":return yR(o,n,t);case"Object":return bR(o,n,t);case"Promise":return vR(o,n,t);case"Record":return xR(o,n,t);case"Ref":return IR(o,n,t);case"RegExp":return ER(o,n,t);case"String":return CR(o,n,t);case"Symbol":return SR(o,n,t);case"TemplateLiteral":return DR(o,n,t);case"This":return TR(o,n,t);case"Tuple":return wR(o,n,t);case"Undefined":return MR(o,n,t);case"Union":return AR(o,n,t);case"Uint8Array":return FR(o,n,t);case"Unknown":return PR(o,n,t);case"Void":return OR(o,n,t);default:if(!kr.Has(o[Z]))throw new b3(o);return kR(o,n,t)}}function Ye(...e){return e.length===3?an(e[0],e[1],e[2]):an(e[0],[],e[1])}var W;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(W||(W={}));var v3=class extends Be{constructor(r){super("Unknown type"),this.schema=r}};function Ss(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function et(e){return e!==void 0}var Ko=class{constructor(r){this.iterator=r}[Symbol.iterator](){return this.iterator}First(){let r=this.iterator.next();return r.done?void 0:r.value}};function pe(e,r,t,n,o=[]){return{type:e,schema:r,path:t,value:n,message:m5()({errorType:e,path:t,schema:r,value:n,errors:o}),errors:o}}function*BR(e,r,t,n){}function*_R(e,r,t,n){if(!Ue(n))return yield pe(W.Array,e,t,n);et(e.minItems)&&!(n.length>=e.minItems)&&(yield pe(W.ArrayMinItems,e,t,n)),et(e.maxItems)&&!(n.length<=e.maxItems)&&(yield pe(W.ArrayMaxItems,e,t,n));for(let a=0;a<n.length;a++)yield*ne(sn(e.items,r,"".concat(t,"/").concat(a),n[a]));if(e.uniqueItems===!0&&!function(){let a=new Set;for(let l of n){let u=Fu(l);if(a.has(u))return!1;a.add(u)}return!0}()&&(yield pe(W.ArrayUniqueItems,e,t,n)),!(et(e.contains)||et(e.minContains)||et(e.maxContains)))return;let o=et(e.contains)?e.contains:Ft(),i=n.reduce((a,l,u)=>sn(o,r,"".concat(t).concat(u),l).next().done===!0?a+1:a,0);i===0&&(yield pe(W.ArrayContains,e,t,n)),Te(e.minContains)&&i<e.minContains&&(yield pe(W.ArrayMinContains,e,t,n)),Te(e.maxContains)&&i>e.maxContains&&(yield pe(W.ArrayMaxContains,e,t,n))}function*LR(e,r,t,n){Cg(n)||(yield pe(W.AsyncIterator,e,t,n))}function*RR(e,r,t,n){if(!rn(n))return yield pe(W.BigInt,e,t,n);et(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield pe(W.BigIntExclusiveMaximum,e,t,n)),et(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield pe(W.BigIntExclusiveMinimum,e,t,n)),et(e.maximum)&&!(n<=e.maximum)&&(yield pe(W.BigIntMaximum,e,t,n)),et(e.minimum)&&!(n>=e.minimum)&&(yield pe(W.BigIntMinimum,e,t,n)),et(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield pe(W.BigIntMultipleOf,e,t,n))}function*NR(e,r,t,n){Ea(n)||(yield pe(W.Boolean,e,t,n))}function*jR(e,r,t,n){yield*ne(sn(e.returns,r,t,n.prototype))}function*UR(e,r,t,n){if(!Fn(n))return yield pe(W.Date,e,t,n);et(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield pe(W.DateExclusiveMaximumTimestamp,e,t,n)),et(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield pe(W.DateExclusiveMinimumTimestamp,e,t,n)),et(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield pe(W.DateMaximumTimestamp,e,t,n)),et(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield pe(W.DateMinimumTimestamp,e,t,n)),et(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield pe(W.DateMultipleOfTimestamp,e,t,n))}function*zR(e,r,t,n){Eu(n)||(yield pe(W.Function,e,t,n))}function*GR(e,r,t,n){if(!Tg(n))return yield pe(W.Integer,e,t,n);et(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield pe(W.IntegerExclusiveMaximum,e,t,n)),et(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield pe(W.IntegerExclusiveMinimum,e,t,n)),et(e.maximum)&&!(n<=e.maximum)&&(yield pe(W.IntegerMaximum,e,t,n)),et(e.minimum)&&!(n>=e.minimum)&&(yield pe(W.IntegerMinimum,e,t,n)),et(e.multipleOf)&&n%e.multipleOf!==0&&(yield pe(W.IntegerMultipleOf,e,t,n))}function*$R(e,r,t,n){let o=!1;for(let i of e.allOf)for(let a of sn(i,r,t,n))o=!0,yield a;if(o)return yield pe(W.Intersect,e,t,n);if(e.unevaluatedProperties===!1){let i=new RegExp(Is(e));for(let a of Object.getOwnPropertyNames(n))i.test(a)||(yield pe(W.IntersectUnevaluatedProperties,e,"".concat(t,"/").concat(a),n))}if(typeof e.unevaluatedProperties=="object"){let i=new RegExp(Is(e));for(let a of Object.getOwnPropertyNames(n))if(!i.test(a)){let l=sn(e.unevaluatedProperties,r,"".concat(t,"/").concat(a),n[a]).next();l.done||(yield l.value)}}}function*VR(e,r,t,n){Sg(n)||(yield pe(W.Iterator,e,t,n))}function*ZR(e,r,t,n){n!==e.const&&(yield pe(W.Literal,e,t,n))}function*HR(e,r,t,n){yield pe(W.Never,e,t,n)}function*WR(e,r,t,n){sn(e.not,r,t,n).next().done===!0&&(yield pe(W.Not,e,t,n))}function*qR(e,r,t,n){ms(n)||(yield pe(W.Null,e,t,n))}function*KR(e,r,t,n){if(!Tt.IsNumberLike(n))return yield pe(W.Number,e,t,n);et(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield pe(W.NumberExclusiveMaximum,e,t,n)),et(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield pe(W.NumberExclusiveMinimum,e,t,n)),et(e.maximum)&&!(n<=e.maximum)&&(yield pe(W.NumberMaximum,e,t,n)),et(e.minimum)&&!(n>=e.minimum)&&(yield pe(W.NumberMinimum,e,t,n)),et(e.multipleOf)&&n%e.multipleOf!==0&&(yield pe(W.NumberMultipleOf,e,t,n))}function*JR(e,r,t,n){if(!Tt.IsObjectLike(n))return yield pe(W.Object,e,t,n);et(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield pe(W.ObjectMinProperties,e,t,n)),et(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield pe(W.ObjectMaxProperties,e,t,n));let o=Array.isArray(e.required)?e.required:[],i=Object.getOwnPropertyNames(e.properties),a=Object.getOwnPropertyNames(n);for(let l of o)a.includes(l)||(yield pe(W.ObjectRequiredProperty,e.properties[l],"".concat(t,"/").concat(Ss(l)),void 0));if(e.additionalProperties===!1)for(let l of a)i.includes(l)||(yield pe(W.ObjectAdditionalProperties,e,"".concat(t,"/").concat(Ss(l)),n[l]));if(typeof e.additionalProperties=="object")for(let l of a)i.includes(l)||(yield*ne(sn(e.additionalProperties,r,"".concat(t,"/").concat(Ss(l)),n[l])));for(let l of i){let u=e.properties[l];e.required&&e.required.includes(l)?(yield*ne(sn(u,r,"".concat(t,"/").concat(Ss(l)),n[l])),Cs(e)&&!(l in n)&&(yield pe(W.ObjectRequiredProperty,u,"".concat(t,"/").concat(Ss(l)),void 0))):Tt.IsExactOptionalProperty(n,l)&&(yield*ne(sn(u,r,"".concat(t,"/").concat(Ss(l)),n[l])))}}function*YR(e,r,t,n){Dg(n)||(yield pe(W.Promise,e,t,n))}function*XR(e,r,t,n){if(!Tt.IsRecordLike(n))return yield pe(W.Object,e,t,n);et(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield pe(W.ObjectMinProperties,e,t,n)),et(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield pe(W.ObjectMaxProperties,e,t,n));let[o,i]=Object.entries(e.patternProperties)[0],a=new RegExp(o);for(let[l,u]of Object.entries(n))a.test(l)&&(yield*ne(sn(i,r,"".concat(t,"/").concat(Ss(l)),u)));if(typeof e.additionalProperties=="object")for(let[l,u]of Object.entries(n))a.test(l)||(yield*ne(sn(e.additionalProperties,r,"".concat(t,"/").concat(Ss(l)),u)));if(e.additionalProperties===!1){for(let[l,u]of Object.entries(n))if(!a.test(l))return yield pe(W.ObjectAdditionalProperties,e,"".concat(t,"/").concat(Ss(l)),u)}}function*QR(e,r,t,n){yield*ne(sn(dt(e,r),r,t,n))}function*eN(e,r,t,n){if(!ot(n))return yield pe(W.String,e,t,n);if(et(e.minLength)&&!(n.length>=e.minLength)&&(yield pe(W.StringMinLength,e,t,n)),et(e.maxLength)&&!(n.length<=e.maxLength)&&(yield pe(W.StringMaxLength,e,t,n)),!new RegExp(e.source,e.flags).test(n))return yield pe(W.RegExp,e,t,n)}function*tN(e,r,t,n){if(!ot(n))return yield pe(W.String,e,t,n);et(e.minLength)&&!(n.length>=e.minLength)&&(yield pe(W.StringMinLength,e,t,n)),et(e.maxLength)&&!(n.length<=e.maxLength)&&(yield pe(W.StringMaxLength,e,t,n)),ot(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield pe(W.StringPattern,e,t,n))),ot(e.format)&&(On.Has(e.format)?On.Get(e.format)(n)||(yield pe(W.StringFormat,e,t,n)):yield pe(W.StringFormatUnknown,e,t,n))}function*rN(e,r,t,n){fs(n)||(yield pe(W.Symbol,e,t,n))}function*nN(e,r,t,n){if(!ot(n))return yield pe(W.String,e,t,n);new RegExp(e.pattern).test(n)||(yield pe(W.StringPattern,e,t,n))}function*oN(e,r,t,n){yield*ne(sn(dt(e,r),r,t,n))}function*iN(e,r,t,n){if(!Ue(n))return yield pe(W.Tuple,e,t,n);if(e.items===void 0&&n.length!==0)return yield pe(W.TupleLength,e,t,n);if(n.length!==e.maxItems)return yield pe(W.TupleLength,e,t,n);if(e.items)for(let o=0;o<e.items.length;o++)yield*ne(sn(e.items[o],r,"".concat(t,"/").concat(o),n[o]))}function*aN(e,r,t,n){ir(n)||(yield pe(W.Undefined,e,t,n))}function*sN(e,r,t,n){if(Ye(e,r,n))return;let o=e.anyOf.map(i=>new Ko(sn(i,r,t,n)));yield pe(W.Union,e,t,n,o)}function*uN(e,r,t,n){if(!id(n))return yield pe(W.Uint8Array,e,t,n);et(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield pe(W.Uint8ArrayMaxByteLength,e,t,n)),et(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield pe(W.Uint8ArrayMinByteLength,e,t,n))}function*lN(e,r,t,n){}function*cN(e,r,t,n){Tt.IsVoidLike(n)||(yield pe(W.Void,e,t,n))}function*dN(e,r,t,n){kr.Get(e[Z])(e,n)||(yield pe(W.Kind,e,t,n))}function*sn(e,r,t,n){let o=et(e.$id)?[...r,e]:r,i=e;switch(i[Z]){case"Any":return yield*ne(BR(i,o,t,n));case"Array":return yield*ne(_R(i,o,t,n));case"AsyncIterator":return yield*ne(LR(i,o,t,n));case"BigInt":return yield*ne(RR(i,o,t,n));case"Boolean":return yield*ne(NR(i,o,t,n));case"Constructor":return yield*ne(jR(i,o,t,n));case"Date":return yield*ne(UR(i,o,t,n));case"Function":return yield*ne(zR(i,o,t,n));case"Integer":return yield*ne(GR(i,o,t,n));case"Intersect":return yield*ne($R(i,o,t,n));case"Iterator":return yield*ne(VR(i,o,t,n));case"Literal":return yield*ne(ZR(i,o,t,n));case"Never":return yield*ne(HR(i,o,t,n));case"Not":return yield*ne(WR(i,o,t,n));case"Null":return yield*ne(qR(i,o,t,n));case"Number":return yield*ne(KR(i,o,t,n));case"Object":return yield*ne(JR(i,o,t,n));case"Promise":return yield*ne(YR(i,o,t,n));case"Record":return yield*ne(XR(i,o,t,n));case"Ref":return yield*ne(QR(i,o,t,n));case"RegExp":return yield*ne(eN(i,o,t,n));case"String":return yield*ne(tN(i,o,t,n));case"Symbol":return yield*ne(rN(i,o,t,n));case"TemplateLiteral":return yield*ne(nN(i,o,t,n));case"This":return yield*ne(oN(i,o,t,n));case"Tuple":return yield*ne(iN(i,o,t,n));case"Undefined":return yield*ne(aN(i,o,t,n));case"Union":return yield*ne(sN(i,o,t,n));case"Uint8Array":return yield*ne(uN(i,o,t,n));case"Unknown":return yield*ne(lN(i,o,t,n));case"Void":return yield*ne(cN(i,o,t,n));default:if(!kr.Has(i[Z]))throw new v3(e);return yield*ne(dN(i,o,t,n))}}function wa(...e){let r=e.length===3?sn(e[0],e[1],"",e[2]):sn(e[0],[],"",e[1]);return new Ko(r)}p();p();var pN=function(e,r,t,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?e!==r||!o:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,t):o?o.value=t:r.set(e,t),t},b5=function(e,r,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(e):n?n.value:r.get(e)},x3,ny,v5,I3=class extends Be{constructor(r){let t=r.First();super(t===void 0?"Invalid Value":t.message),x3.add(this),ny.set(this,void 0),pN(this,ny,r,"f"),this.error=t}Errors(){return new Ko(b5(this,x3,"m",v5).call(this))}};ny=new WeakMap,x3=new WeakSet,v5=function*(){this.error&&(yield this.error),yield*ne(b5(this,ny,"f"))};function y5(e,r,t){if(!Ye(e,r,t))throw new I3(wa(e,r,t))}function oy(...e){return e.length===3?y5(e[0],e[1],e[2]):y5(e[0],[],e[1])}p();p();p();function mN(e){let r={};for(let t of Object.getOwnPropertyNames(e))r[t]=pt(e[t]);for(let t of Object.getOwnPropertySymbols(e))r[t]=pt(e[t]);return r}function fN(e){return e.map(r=>pt(r))}function hN(e){return e.slice()}function gN(e){return new Map(pt([...e.entries()]))}function yN(e){return new Set(pt([...e.entries()]))}function bN(e){return new Date(e.toISOString())}function pt(e){if(Ue(e))return fN(e);if(Fn(e))return bN(e);if(zo(e))return hN(e);if(rS(e))return gN(e);if(nS(e))return yN(e);if($e(e))return mN(e);if(nn(e))return e;throw new Error("ValueClone: Unable to clone value")}var vo=class extends Be{constructor(r,t){super(t),this.schema=r}};function mt(e){return Eu(e)?e():pt(e)}function vN(e,r){return Re(e,"default")?mt(e.default):{}}function xN(e,r){if(e.uniqueItems===!0&&!Re(e,"default"))throw new vo(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!Re(e,"default"))throw new vo(e,"Array with the contains constraint requires a default value");return"default"in e?mt(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(t=>xo(e.items,r)):[]}function IN(e,r){return Re(e,"default")?mt(e.default):function(){return oE(this,null,function*(){})}()}function EN(e,r){return Re(e,"default")?mt(e.default):BigInt(0)}function CN(e,r){return Re(e,"default")?mt(e.default):!1}function SN(e,r){if(Re(e,"default"))return mt(e.default);{let t=xo(e.returns,r);return typeof t=="object"&&!Array.isArray(t)?class{constructor(){for(let[n,o]of Object.entries(t)){let i=this;i[n]=o}}}:class{}}}function DN(e,r){return Re(e,"default")?mt(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}function TN(e,r){return Re(e,"default")?mt(e.default):()=>xo(e.returns,r)}function wN(e,r){return Re(e,"default")?mt(e.default):e.minimum!==void 0?e.minimum:0}function MN(e,r){if(Re(e,"default"))return mt(e.default);{let t=e.allOf.reduce((n,o)=>{let i=xo(o,r);return typeof i=="object"?w(w({},n),i):i},{});if(!Ye(e,r,t))throw new vo(e,"Intersect produced invalid value. Consider using a default value.");return t}}function AN(e,r){return Re(e,"default")?mt(e.default):function*(){}()}function FN(e,r){return Re(e,"default")?mt(e.default):e.const}function PN(e,r){if(Re(e,"default"))return mt(e.default);throw new vo(e,"Never types cannot be created. Consider using a default value.")}function ON(e,r){if(Re(e,"default"))return mt(e.default);throw new vo(e,"Not types must have a default value")}function kN(e,r){return Re(e,"default")?mt(e.default):null}function BN(e,r){return Re(e,"default")?mt(e.default):e.minimum!==void 0?e.minimum:0}function _N(e,r){if(Re(e,"default"))return mt(e.default);{let t=new Set(e.required),n={};for(let[o,i]of Object.entries(e.properties))t.has(o)&&(n[o]=xo(i,r));return n}}function LN(e,r){return Re(e,"default")?mt(e.default):Promise.resolve(xo(e.item,r))}function RN(e,r){let[t,n]=Object.entries(e.patternProperties)[0];if(Re(e,"default"))return mt(e.default);if(t===vs||t===bs)return{};{let o=t.slice(1,t.length-1).split("|"),i={};for(let a of o)i[a]=xo(n,r);return i}}function NN(e,r){return Re(e,"default")?mt(e.default):xo(dt(e,r),r)}function jN(e,r){if(Re(e,"default"))return mt(e.default);throw new vo(e,"RegExp types cannot be created. Consider using a default value.")}function UN(e,r){if(e.pattern!==void 0){if(Re(e,"default"))return mt(e.default);throw new vo(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(Re(e,"default"))return mt(e.default);throw new vo(e,"String types with formats must specify a default value")}else return Re(e,"default")?mt(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}function zN(e,r){return Re(e,"default")?mt(e.default):"value"in e?Symbol.for(e.value):Symbol()}function GN(e,r){if(Re(e,"default"))return mt(e.default);if(!Pg(e))throw new vo(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return pd(e)[0]}function $N(e,r){if(x5++>YN)throw new vo(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return Re(e,"default")?mt(e.default):xo(dt(e,r),r)}function VN(e,r){return Re(e,"default")?mt(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((t,n)=>xo(e.items[n],r))}function ZN(e,r){if(Re(e,"default"))return mt(e.default)}function HN(e,r){if(Re(e,"default"))return mt(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return xo(e.anyOf[0],r)}function WN(e,r){return Re(e,"default")?mt(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}function qN(e,r){return Re(e,"default")?mt(e.default):{}}function KN(e,r){if(Re(e,"default"))return mt(e.default)}function JN(e,r){if(Re(e,"default"))return mt(e.default);throw new Error("User defined types must specify a default value")}function xo(e,r){let t=qo(e,r),n=e;switch(n[Z]){case"Any":return vN(n,t);case"Array":return xN(n,t);case"AsyncIterator":return IN(n,t);case"BigInt":return EN(n,t);case"Boolean":return CN(n,t);case"Constructor":return SN(n,t);case"Date":return DN(n,t);case"Function":return TN(n,t);case"Integer":return wN(n,t);case"Intersect":return MN(n,t);case"Iterator":return AN(n,t);case"Literal":return FN(n,t);case"Never":return PN(n,t);case"Not":return ON(n,t);case"Null":return kN(n,t);case"Number":return BN(n,t);case"Object":return _N(n,t);case"Promise":return LN(n,t);case"Record":return RN(n,t);case"Ref":return NN(n,t);case"RegExp":return jN(n,t);case"String":return UN(n,t);case"Symbol":return zN(n,t);case"TemplateLiteral":return GN(n,t);case"This":return $N(n,t);case"Tuple":return VN(n,t);case"Undefined":return ZN(n,t);case"Union":return HN(n,t);case"Uint8Array":return WN(n,t);case"Unknown":return qN(n,t);case"Void":return KN(n,t);default:if(!kr.Has(n[Z]))throw new vo(n,"Unknown type");return JN(n,t)}}var YN=512,x5=0;function Jo(...e){return x5=0,e.length===2?xo(e[0],e[1]):xo(e[0],[])}var iy=class extends Be{constructor(r,t){super(t),this.schema=r}};function XN(e,r,t){if(e[Z]==="Object"&&typeof t=="object"&&!ms(t)){let n=e,o=Object.getOwnPropertyNames(t),i=Object.entries(n.properties),[a,l]=[1/i.length,i.length];return i.reduce((u,[c,d])=>{let m=d[Z]==="Literal"&&d.const===t[c]?l:0,h=Ye(d,r,t[c])?a:0,g=o.includes(c)?a:0;return u+(m+h+g)},0)}else return Ye(e,r,t)?1:0}function QN(e,r,t){let n=e.anyOf.map(a=>dt(a,r)),[o,i]=[n[0],0];for(let a of n){let l=XN(a,r,t);l>i&&(o=a,i=l)}return o}function ej(e,r,t){if("default"in e)return typeof t=="function"?e.default:pt(e.default);{let n=QN(e,r,t);return E3(n,r,t)}}function tj(e,r,t){return Ye(e,r,t)?pt(t):Jo(e,r)}function rj(e,r,t){return Ye(e,r,t)?t:Jo(e,r)}function nj(e,r,t){if(Ye(e,r,t))return pt(t);let n=Ue(t)?pt(t):Jo(e,r),o=Te(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,a=(Te(e.maxItems)&&o.length>e.maxItems?o.slice(0,e.maxItems):o).map(u=>Ma(e.items,r,u));if(e.uniqueItems!==!0)return a;let l=[...new Set(a)];if(!Ye(e,r,l))throw new iy(e,"Array cast produced invalid data due to uniqueItems constraint");return l}function oj(e,r,t){if(Ye(e,r,t))return Jo(e,r);let n=new Set(e.returns.required||[]),o=function(){};for(let[i,a]of Object.entries(e.returns.properties))!n.has(i)&&t.prototype[i]===void 0||(o.prototype[i]=Ma(a,r,t.prototype[i]));return o}function ij(e,r,t){let n=Jo(e,r),o=$e(n)&&$e(t)?w(w({},n),t):t;return Ye(e,r,o)?o:Jo(e,r)}function aj(e,r,t){throw new iy(e,"Never types cannot be cast")}function sj(e,r,t){if(Ye(e,r,t))return t;if(t===null||typeof t!="object")return Jo(e,r);let n=new Set(e.required||[]),o={};for(let[i,a]of Object.entries(e.properties))!n.has(i)&&t[i]===void 0||(o[i]=Ma(a,r,t[i]));if(typeof e.additionalProperties=="object"){let i=Object.getOwnPropertyNames(e.properties);for(let a of Object.getOwnPropertyNames(t))i.includes(a)||(o[a]=Ma(e.additionalProperties,r,t[a]))}return o}function uj(e,r,t){if(Ye(e,r,t))return pt(t);if(t===null||typeof t!="object"||Array.isArray(t)||t instanceof Date)return Jo(e,r);let n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n],i={};for(let[a,l]of Object.entries(t))i[a]=Ma(o,r,l);return i}function lj(e,r,t){return Ma(dt(e,r),r,t)}function cj(e,r,t){return Ma(dt(e,r),r,t)}function dj(e,r,t){return Ye(e,r,t)?pt(t):Ue(t)?e.items===void 0?[]:e.items.map((n,o)=>Ma(n,r,t[o])):Jo(e,r)}function pj(e,r,t){return Ye(e,r,t)?pt(t):ej(e,r,t)}function Ma(e,r,t){let n=ot(e.$id)?[...r,e]:r,o=e;switch(e[Z]){case"Array":return nj(o,n,t);case"Constructor":return oj(o,n,t);case"Intersect":return ij(o,n,t);case"Never":return aj(o,n,t);case"Object":return sj(o,n,t);case"Record":return uj(o,n,t);case"Ref":return lj(o,n,t);case"This":return cj(o,n,t);case"Tuple":return dj(o,n,t);case"Union":return pj(o,n,t);case"Date":case"Symbol":case"Uint8Array":return tj(e,r,t);default:return rj(o,n,t)}}function E3(...e){return e.length===3?Ma(e[0],e[1],e[2]):Ma(e[0],[],e[1])}p();function mj(e){return Su(e)&&e[Z]!=="Unsafe"}function fj(e,r,t){return Ue(t)?t.map(n=>Io(e.items,r,n)):t}function hj(e,r,t){let n=e.unevaluatedProperties,i=e.allOf.map(l=>Io(l,r,pt(t))).reduce((l,u)=>$e(u)?w(w({},l),u):u,{});if(!$e(t)||!$e(i)||!Su(n))return i;let a=Zr(e);for(let l of Object.getOwnPropertyNames(t))a.includes(l)||Ye(n,r,t[l])&&(i[l]=Io(n,r,t[l]));return i}function gj(e,r,t){if(!$e(t)||Ue(t))return t;let n=e.additionalProperties;for(let o of Object.getOwnPropertyNames(t)){if(Re(e.properties,o)){t[o]=Io(e.properties[o],r,t[o]);continue}if(Su(n)&&Ye(n,r,t[o])){t[o]=Io(n,r,t[o]);continue}delete t[o]}return t}function yj(e,r,t){if(!$e(t))return t;let n=e.additionalProperties,o=Object.getOwnPropertyNames(t),[i,a]=Object.entries(e.patternProperties)[0],l=new RegExp(i);for(let u of o){if(l.test(u)){t[u]=Io(a,r,t[u]);continue}if(Su(n)&&Ye(n,r,t[u])){t[u]=Io(n,r,t[u]);continue}delete t[u]}return t}function bj(e,r,t){return Io(dt(e,r),r,t)}function vj(e,r,t){return Io(dt(e,r),r,t)}function xj(e,r,t){if(!Ue(t))return t;if(ir(e.items))return[];let n=Math.min(t.length,e.items.length);for(let o=0;o<n;o++)t[o]=Io(e.items[o],r,t[o]);return t.length>n?t.slice(0,n):t}function Ij(e,r,t){for(let n of e.anyOf)if(mj(n)&&Ye(n,r,t))return Io(n,r,t);return t}function Io(e,r,t){let n=ot(e.$id)?[...r,e]:r,o=e;switch(o[Z]){case"Array":return fj(o,n,t);case"Intersect":return hj(o,n,t);case"Object":return gj(o,n,t);case"Record":return yj(o,n,t);case"Ref":return bj(o,n,t);case"This":return vj(o,n,t);case"Tuple":return xj(o,n,t);case"Union":return Ij(o,n,t);default:return t}}function ay(...e){return e.length===3?Io(e[0],e[1],e[2]):Io(e[0],[],e[1])}p();function sy(e){return ot(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}function Ej(e){return rn(e)||Ea(e)||Te(e)}function xf(e){return e===!0||Te(e)&&e===1||rn(e)&&e===BigInt("1")||ot(e)&&(e.toLowerCase()==="true"||e==="1")}function If(e){return e===!1||Te(e)&&(e===0||Object.is(e,-0))||rn(e)&&e===BigInt("0")||ot(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}function Cj(e){return ot(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}function Sj(e){return ot(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}function Dj(e){return ot(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}function Tj(e){return ot(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}function wj(e){return ot(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}function Mj(e,r){let t=E5(e);return t===r?t:e}function Aj(e,r){let t=C5(e);return t===r?t:e}function Fj(e,r){let t=I5(e);return t===r?t:e}function Pj(e,r){return ot(e.const)?Mj(r,e.const):Te(e.const)?Aj(r,e.const):Ea(e.const)?Fj(r,e.const):r}function I5(e){return xf(e)?!0:If(e)?!1:e}function Oj(e){let r=t=>t.split(".")[0];return sy(e)?BigInt(r(e)):Te(e)?BigInt(Math.trunc(e)):If(e)?BigInt(0):xf(e)?BigInt(1):e}function E5(e){return Ej(e)?e.toString():fs(e)&&e.description!==void 0?e.description.toString():e}function C5(e){return sy(e)?parseFloat(e):xf(e)?1:If(e)?0:e}function kj(e){return sy(e)?parseInt(e):Te(e)?e|0:xf(e)?1:If(e)?0:e}function Bj(e){return ot(e)&&e.toLowerCase()==="null"?null:e}function _j(e){return ot(e)&&e==="undefined"?void 0:e}function Lj(e){return Fn(e)?e:Te(e)?new Date(e):xf(e)?new Date(1):If(e)?new Date(0):sy(e)?new Date(parseInt(e)):Sj(e)?new Date("1970-01-01T".concat(e,".000Z")):Cj(e)?new Date("1970-01-01T".concat(e)):Tj(e)?new Date("".concat(e,".000Z")):Dj(e)?new Date(e):wj(e)?new Date("".concat(e,"T00:00:00.000Z")):e}function Rj(e,r,t){return(Ue(t)?t:[t]).map(o=>Aa(e.items,r,o))}function Nj(e,r,t){return Oj(t)}function jj(e,r,t){return I5(t)}function Uj(e,r,t){return Lj(t)}function zj(e,r,t){return kj(t)}function Gj(e,r,t){return e.allOf.reduce((n,o)=>Aa(o,r,n),t)}function $j(e,r,t){return Pj(e,t)}function Vj(e,r,t){return Bj(t)}function Zj(e,r,t){return C5(t)}function Hj(e,r,t){if(!$e(t))return t;for(let n of Object.getOwnPropertyNames(e.properties))Re(t,n)&&(t[n]=Aa(e.properties[n],r,t[n]));return t}function Wj(e,r,t){if(!$e(t))return t;let o=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[o];for(let[a,l]of Object.entries(t))t[a]=Aa(i,r,l);return t}function qj(e,r,t){return Aa(dt(e,r),r,t)}function Kj(e,r,t){return E5(t)}function Jj(e,r,t){return ot(t)||Te(t)?Symbol(t):t}function Yj(e,r,t){return Aa(dt(e,r),r,t)}function Xj(e,r,t){return Ue(t)&&!ir(e.items)?t.map((o,i)=>i<e.items.length?Aa(e.items[i],r,o):o):t}function Qj(e,r,t){return _j(t)}function eU(e,r,t){for(let n of e.anyOf){let o=Aa(n,r,pt(t));if(Ye(n,r,o))return o}return t}function Aa(e,r,t){let n=qo(e,r),o=e;switch(e[Z]){case"Array":return Rj(o,n,t);case"BigInt":return Nj(o,n,t);case"Boolean":return jj(o,n,t);case"Date":return Uj(o,n,t);case"Integer":return zj(o,n,t);case"Intersect":return Gj(o,n,t);case"Literal":return $j(o,n,t);case"Null":return Vj(o,n,t);case"Number":return Zj(o,n,t);case"Object":return Hj(o,n,t);case"Record":return Wj(o,n,t);case"Ref":return qj(o,n,t);case"String":return Kj(o,n,t);case"Symbol":return Jj(o,n,t);case"This":return Yj(o,n,t);case"Tuple":return Xj(o,n,t);case"Undefined":return Qj(o,n,t);case"Union":return eU(o,n,t);default:return t}}function uy(...e){return e.length===3?Aa(e[0],e[1],e[2]):Aa(e[0],[],e[1])}p();p();var Md=class extends Be{constructor(r,t,n){super("Unable to decode value as it does not match the expected schema"),this.schema=r,this.value=t,this.error=n}},Fl=class extends Be{constructor(r,t,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=r,this.path=t,this.value=n,this.error=o}};function ar(e,r,t){try{return Ht(e)?e[Xt].Decode(t):t}catch(n){throw new Fl(e,r,t,n)}}function tU(e,r,t,n){return Ue(n)?ar(e,t,n.map((o,i)=>Fa(e.items,r,"".concat(t,"/").concat(i),o))):ar(e,t,n)}function rU(e,r,t,n){if(!$e(n)||nn(n))return ar(e,t,n);let o=wu(e),i=o.map(d=>d[0]),a=w({},n);for(let[d,m]of o)d in a&&(a[d]=Fa(m,r,"".concat(t,"/").concat(d),a[d]));if(!Ht(e.unevaluatedProperties))return ar(e,t,a);let l=Object.getOwnPropertyNames(a),u=e.unevaluatedProperties,c=w({},a);for(let d of l)i.includes(d)||(c[d]=ar(u,"".concat(t,"/").concat(d),c[d]));return ar(e,t,c)}function nU(e,r,t,n){return ar(e,t,Fa(e.not,r,t,n))}function oU(e,r,t,n){if(!$e(n))return ar(e,t,n);let o=Zr(e),i=w({},n);for(let c of o)Re(i,c)&&(ir(i[c])&&(!sd(e.properties[c])||Tt.IsExactOptionalProperty(i,c))||(i[c]=Fa(e.properties[c],r,"".concat(t,"/").concat(c),i[c])));if(!it(e.additionalProperties))return ar(e,t,i);let a=Object.getOwnPropertyNames(i),l=e.additionalProperties,u=w({},i);for(let c of a)o.includes(c)||(u[c]=ar(l,"".concat(t,"/").concat(c),u[c]));return ar(e,t,u)}function iU(e,r,t,n){if(!$e(n))return ar(e,t,n);let o=Object.getOwnPropertyNames(e.patternProperties)[0],i=new RegExp(o),a=w({},n);for(let d of Object.getOwnPropertyNames(n))i.test(d)&&(a[d]=Fa(e.patternProperties[o],r,"".concat(t,"/").concat(d),a[d]));if(!it(e.additionalProperties))return ar(e,t,a);let l=Object.getOwnPropertyNames(a),u=e.additionalProperties,c=w({},a);for(let d of l)i.test(d)||(c[d]=ar(u,"".concat(t,"/").concat(d),c[d]));return ar(e,t,c)}function aU(e,r,t,n){let o=dt(e,r);return ar(e,t,Fa(o,r,t,n))}function sU(e,r,t,n){let o=dt(e,r);return ar(e,t,Fa(o,r,t,n))}function uU(e,r,t,n){return Ue(n)&&Ue(e.items)?ar(e,t,e.items.map((o,i)=>Fa(o,r,"".concat(t,"/").concat(i),n[i]))):ar(e,t,n)}function lU(e,r,t,n){for(let o of e.anyOf){if(!Ye(o,r,n))continue;let i=Fa(o,r,t,n);return ar(e,t,i)}return ar(e,t,n)}function Fa(e,r,t,n){let o=qo(e,r),i=e;switch(e[Z]){case"Array":return tU(i,o,t,n);case"Intersect":return rU(i,o,t,n);case"Not":return nU(i,o,t,n);case"Object":return oU(i,o,t,n);case"Record":return iU(i,o,t,n);case"Ref":return aU(i,o,t,n);case"Symbol":return ar(i,t,n);case"This":return sU(i,o,t,n);case"Tuple":return uU(i,o,t,n);case"Union":return lU(i,o,t,n);default:return ar(i,t,n)}}function Ad(e,r,t){return Fa(e,r,"",t)}p();var Fd=class extends Be{constructor(r,t,n){super("The encoded value does not match the expected schema"),this.schema=r,this.value=t,this.error=n}},Pl=class extends Be{constructor(r,t,n,o){super("".concat(o instanceof Error?o.message:"Unknown error")),this.schema=r,this.path=t,this.value=n,this.error=o}};function Cn(e,r,t){try{return Ht(e)?e[Xt].Encode(t):t}catch(n){throw new Pl(e,r,t,n)}}function cU(e,r,t,n){let o=Cn(e,t,n);return Ue(o)?o.map((i,a)=>Pa(e.items,r,"".concat(t,"/").concat(a),i)):o}function dU(e,r,t,n){let o=Cn(e,t,n);if(!$e(n)||nn(n))return o;let i=wu(e),a=i.map(m=>m[0]),l=w({},o);for(let[m,h]of i)m in l&&(l[m]=Pa(h,r,"".concat(t,"/").concat(m),l[m]));if(!Ht(e.unevaluatedProperties))return l;let u=Object.getOwnPropertyNames(l),c=e.unevaluatedProperties,d=w({},l);for(let m of u)a.includes(m)||(d[m]=Cn(c,"".concat(t,"/").concat(m),d[m]));return d}function pU(e,r,t,n){return Cn(e.not,t,Cn(e,t,n))}function mU(e,r,t,n){let o=Cn(e,t,n);if(!$e(o))return o;let i=Zr(e),a=w({},o);for(let d of i)Re(a,d)&&(ir(a[d])&&(!sd(e.properties[d])||Tt.IsExactOptionalProperty(a,d))||(a[d]=Pa(e.properties[d],r,"".concat(t,"/").concat(d),a[d])));if(!it(e.additionalProperties))return a;let l=Object.getOwnPropertyNames(a),u=e.additionalProperties,c=w({},a);for(let d of l)i.includes(d)||(c[d]=Cn(u,"".concat(t,"/").concat(d),c[d]));return c}function fU(e,r,t,n){let o=Cn(e,t,n);if(!$e(n))return o;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),l=w({},o);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(l[m]=Pa(e.patternProperties[i],r,"".concat(t,"/").concat(m),l[m]));if(!it(e.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),c=e.additionalProperties,d=w({},l);for(let m of u)a.test(m)||(d[m]=Cn(c,"".concat(t,"/").concat(m),d[m]));return d}function hU(e,r,t,n){let o=dt(e,r),i=Pa(o,r,t,n);return Cn(e,t,i)}function gU(e,r,t,n){let o=dt(e,r),i=Pa(o,r,t,n);return Cn(e,t,i)}function yU(e,r,t,n){let o=Cn(e,t,n);return Ue(e.items)?e.items.map((i,a)=>Pa(i,r,"".concat(t,"/").concat(a),o[a])):[]}function bU(e,r,t,n){for(let o of e.anyOf){if(!Ye(o,r,n))continue;let i=Pa(o,r,t,n);return Cn(e,t,i)}for(let o of e.anyOf){let i=Pa(o,r,t,n);if(Ye(e,r,i))return Cn(e,t,i)}return Cn(e,t,n)}function Pa(e,r,t,n){let o=qo(e,r),i=e;switch(e[Z]){case"Array":return cU(i,o,t,n);case"Intersect":return dU(i,o,t,n);case"Not":return pU(i,o,t,n);case"Object":return mU(i,o,t,n);case"Record":return fU(i,o,t,n);case"Ref":return hU(i,o,t,n);case"This":return gU(i,o,t,n);case"Tuple":return yU(i,o,t,n);case"Union":return bU(i,o,t,n);default:return Cn(i,t,n)}}function ly(e,r,t){return Pa(e,r,"",t)}p();function vU(e,r){return Ht(e)||Hr(e.items,r)}function xU(e,r){return Ht(e)||Hr(e.items,r)}function IU(e,r){return Ht(e)||Hr(e.returns,r)||e.parameters.some(t=>Hr(t,r))}function EU(e,r){return Ht(e)||Hr(e.returns,r)||e.parameters.some(t=>Hr(t,r))}function CU(e,r){return Ht(e)||Ht(e.unevaluatedProperties)||e.allOf.some(t=>Hr(t,r))}function SU(e,r){return Ht(e)||Hr(e.items,r)}function DU(e,r){return Ht(e)||Hr(e.not,r)}function TU(e,r){return Ht(e)||Object.values(e.properties).some(t=>Hr(t,r))||it(e.additionalProperties)&&Hr(e.additionalProperties,r)}function wU(e,r){return Ht(e)||Hr(e.item,r)}function MU(e,r){let t=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[t];return Ht(e)||Hr(n,r)||it(e.additionalProperties)&&Ht(e.additionalProperties)}function AU(e,r){return Ht(e)?!0:Hr(dt(e,r),r)}function FU(e,r){return Ht(e)?!0:Hr(dt(e,r),r)}function PU(e,r){return Ht(e)||!ir(e.items)&&e.items.some(t=>Hr(t,r))}function OU(e,r){return Ht(e)||e.anyOf.some(t=>Hr(t,r))}function Hr(e,r){let t=qo(e,r),n=e;if(e.$id&&C3.has(e.$id))return!1;switch(e.$id&&C3.add(e.$id),e[Z]){case"Array":return vU(n,t);case"AsyncIterator":return xU(n,t);case"Constructor":return IU(n,t);case"Function":return EU(n,t);case"Intersect":return CU(n,t);case"Iterator":return SU(n,t);case"Not":return DU(n,t);case"Object":return TU(n,t);case"Promise":return wU(n,t);case"Record":return MU(n,t);case"Ref":return AU(n,t);case"This":return FU(n,t);case"Tuple":return PU(n,t);case"Union":return OU(n,t);default:return Ht(e)}}var C3=new Set;function Oa(e,r){return C3.clear(),Hr(e,r)}function S5(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!Ye(r,t,n))throw new Md(r,n,wa(r,t,n).First());return Oa(r,t)?Ad(r,t,n):n}p();function Ds(e,r){let t=Re(e,"default")?e.default:void 0,n=Eu(t)?t():pt(t);return ir(r)?n:$e(r)&&$e(n)?Object.assign(n,r):r}function S3(e){return Su(e)&&"default"in e}function kU(e,r,t){let n=Ds(e,t);if(!Ue(n))return n;for(let o=0;o<n.length;o++)n[o]=Eo(e.items,r,n[o]);return n}function BU(e,r,t){return Fn(t)?t:Ds(e,t)}function _U(e,r,t){let n=Ds(e,t);return e.allOf.reduce((o,i)=>{let a=Eo(i,r,n);return $e(a)?w(w({},o),a):a},{})}function LU(e,r,t){let n=Ds(e,t);if(!$e(n))return n;let o=Object.getOwnPropertyNames(e.properties);for(let i of o){let a=Eo(e.properties[i],r,n[i]);ir(a)||(n[i]=Eo(e.properties[i],r,n[i]))}if(!S3(e.additionalProperties))return n;for(let i of Object.getOwnPropertyNames(n))o.includes(i)||(n[i]=Eo(e.additionalProperties,r,n[i]));return n}function RU(e,r,t){let n=Ds(e,t);if(!$e(n))return n;let o=e.additionalProperties,[i,a]=Object.entries(e.patternProperties)[0],l=new RegExp(i);for(let u of Object.getOwnPropertyNames(n))l.test(u)&&S3(a)&&(n[u]=Eo(a,r,n[u]));if(!S3(o))return n;for(let u of Object.getOwnPropertyNames(n))l.test(u)||(n[u]=Eo(o,r,n[u]));return n}function NU(e,r,t){return Eo(dt(e,r),r,Ds(e,t))}function jU(e,r,t){return Eo(dt(e,r),r,t)}function UU(e,r,t){let n=Ds(e,t);if(!Ue(n)||ir(e.items))return n;let[o,i]=[e.items,Math.max(e.items.length,n.length)];for(let a=0;a<i;a++)a<o.length&&(n[a]=Eo(o[a],r,n[a]));return n}function zU(e,r,t){let n=Ds(e,t);for(let o of e.anyOf){let i=Eo(o,r,pt(n));if(Ye(o,r,i))return i}return n}function Eo(e,r,t){let n=qo(e,r),o=e;switch(o[Z]){case"Array":return kU(o,n,t);case"Date":return BU(o,n,t);case"Intersect":return _U(o,n,t);case"Object":return LU(o,n,t);case"Record":return RU(o,n,t);case"Ref":return NU(o,n,t);case"This":return jU(o,n,t);case"Tuple":return UU(o,n,t);case"Union":return zU(o,n,t);default:return Ds(o,t)}}function cy(...e){return e.length===3?Eo(e[0],e[1],e[2]):Eo(e[0],[],e[1])}p();p();var Yo={};fu(Yo,{Delete:()=>$U,Format:()=>Ef,Get:()=>ZU,Has:()=>VU,Set:()=>GU,ValuePointerRootDeleteError:()=>py,ValuePointerRootSetError:()=>dy});p();var dy=class extends Be{constructor(r,t,n){super("Cannot set root value"),this.value=r,this.path=t,this.update=n}},py=class extends Be{constructor(r,t){super("Cannot delete root value"),this.value=r,this.path=t}};function D5(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function*Ef(e){if(e==="")return;let[r,t]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(t=n,yield D5(e.slice(r,t))),r=n+1):t=n;yield D5(e.slice(r))}function GU(e,r,t){if(r==="")throw new dy(e,r,t);let[n,o,i]=[null,e,""];for(let a of Ef(r))o[a]===void 0&&(o[a]={}),n=o,o=o[a],i=a;n[i]=t}function $U(e,r){if(r==="")throw new py(e,r);let[t,n,o]=[null,e,""];for(let i of Ef(r)){if(n[i]===void 0||n[i]===null)return;t=n,n=n[i],o=i}if(Array.isArray(t)){let i=parseInt(o);t.splice(i,1)}else delete t[o]}function VU(e,r){if(r==="")return!0;let[t,n,o]=[null,e,""];for(let i of Ef(r)){if(n[i]===void 0)return!1;t=n,n=n[i],o=i}return Object.getOwnPropertyNames(t).includes(o)}function ZU(e,r){if(r==="")return e;let t=e;for(let n of Ef(r)){if(t[n]===void 0)return;t=t[n]}return t}p();function HU(e,r){if(!$e(r))return!1;let t=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(r),...Object.getOwnPropertySymbols(r)];return t.length!==n.length?!1:t.every(o=>Ol(e[o],r[o]))}function WU(e,r){return Fn(r)&&e.getTime()===r.getTime()}function qU(e,r){return!Ue(r)||e.length!==r.length?!1:e.every((t,n)=>Ol(t,r[n]))}function KU(e,r){return!zo(r)||e.length!==r.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(r).constructor.name?!1:e.every((t,n)=>Ol(t,r[n]))}function JU(e,r){return e===r}function Ol(e,r){if(Fn(e))return WU(e,r);if(zo(e))return KU(e,r);if(Ue(e))return qU(e,r);if($e(e))return HU(e,r);if(nn(e))return JU(e,r);throw new Error("ValueEquals: Unable to compare value")}var YU=Lt({type:It("insert"),path:$o(),value:Es()}),XU=Lt({type:It("update"),path:$o(),value:Es()}),QU=Lt({type:It("delete"),path:$o()}),w5=Pt([YU,XU,QU]),my=class extends Be{constructor(r,t){super(t),this.value=r}};function fy(e,r){return{type:"update",path:e,value:r}}function M5(e,r){return{type:"insert",path:e,value:r}}function A5(e){return{type:"delete",path:e}}function T5(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new my(e,"Cannot diff objects with symbols")}function*ez(e,r,t){if(T5(r),T5(t),!wv(t))return yield fy(e,t);let n=globalThis.Object.getOwnPropertyNames(r),o=globalThis.Object.getOwnPropertyNames(t);for(let i of o)Re(r,i)||(yield M5("".concat(e,"/").concat(i),t[i]));for(let i of n)Re(t,i)&&(Ol(r,t)||(yield*ne(hy("".concat(e,"/").concat(i),r[i],t[i]))));for(let i of n)Re(t,i)||(yield A5("".concat(e,"/").concat(i)))}function*tz(e,r,t){if(!Ue(t))return yield fy(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*ne(hy("".concat(e,"/").concat(n),r[n],t[n]));for(let n=0;n<t.length;n++)n<r.length||(yield M5("".concat(e,"/").concat(n),t[n]));for(let n=r.length-1;n>=0;n--)n<t.length||(yield A5("".concat(e,"/").concat(n)))}function*rz(e,r,t){if(!zo(t)||r.length!==t.length||globalThis.Object.getPrototypeOf(r).constructor.name!==globalThis.Object.getPrototypeOf(t).constructor.name)return yield fy(e,t);for(let n=0;n<Math.min(r.length,t.length);n++)yield*ne(hy("".concat(e,"/").concat(n),r[n],t[n]))}function*nz(e,r,t){r!==t&&(yield fy(e,t))}function*hy(e,r,t){if(wv(r))return yield*ne(ez(e,r,t));if(Ue(r))return yield*ne(tz(e,r,t));if(zo(r))return yield*ne(rz(e,r,t));if(nn(r))return yield*ne(nz(e,r,t));throw new my(r,"Unable to diff value")}function F5(e,r){return[...hy("",e,r)]}function oz(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}function iz(e){return e.length===0}function P5(e,r){if(oz(r))return pt(r[0].value);if(iz(r))return pt(e);let t=pt(e);for(let n of r)switch(n.type){case"insert":{Yo.Set(t,n.path,n.value);break}case"update":{Yo.Set(t,n.path,n.value);break}case"delete":{Yo.Delete(t,n.path);break}}return t}p();function O5(...e){let[r,t,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],o=Oa(r,t)?ly(r,t,n):n;if(!Ye(r,t,o))throw new Fd(r,o,wa(r,t,o).First());return o}p();var gy=class extends Be{constructor(r){super(r)}};function az(e,r,t,n){if(!$e(t))Yo.Set(e,r,pt(n));else{let o=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(n);for(let a of o)i.includes(a)||delete t[a];for(let a of i)o.includes(a)||(t[a]=null);for(let a of i)D3(e,"".concat(r,"/").concat(a),t[a],n[a])}}function sz(e,r,t,n){if(!Ue(t))Yo.Set(e,r,pt(n));else{for(let o=0;o<n.length;o++)D3(e,"".concat(r,"/").concat(o),t[o],n[o]);t.splice(n.length)}}function uz(e,r,t,n){if(zo(t)&&t.length===n.length)for(let o=0;o<t.length;o++)t[o]=n[o];else Yo.Set(e,r,pt(n))}function lz(e,r,t,n){t!==n&&Yo.Set(e,r,n)}function D3(e,r,t,n){if(Ue(n))return sz(e,r,t,n);if(zo(n))return uz(e,r,t,n);if($e(n))return az(e,r,t,n);if(nn(n))return lz(e,r,t,n)}function k5(e){return zo(e)||nn(e)}function cz(e,r){return $e(e)&&Ue(r)||Ue(e)&&$e(r)}function B5(e,r){if(k5(e)||k5(r))throw new gy("Only object and array types can be mutated at the root level");if(cz(e,r))throw new gy("Cannot assign due type mismatch of assignable values");D3(e,"",e,r)}p();var dz=[(e,r,t)=>pt(t),(e,r,t)=>cy(e,r,t),(e,r,t)=>ay(e,r,t),(e,r,t)=>uy(e,r,t),(e,r,t)=>(oy(e,r,t),t),(e,r,t)=>Oa(e,r)?Ad(e,r,t):t];function _5(e,r,t){return dz.reduce((n,o)=>o(e,r,n),t)}function L5(...e){return e.length===3?_5(e[0],e[1],e[2]):_5(e[0],[],e[1])}p();var Xo={};fu(Xo,{Assert:()=>oy,Cast:()=>E3,Check:()=>Ye,Clean:()=>ay,Clone:()=>pt,Convert:()=>uy,Create:()=>Jo,Decode:()=>S5,Default:()=>cy,Diff:()=>F5,Edit:()=>w5,Encode:()=>O5,Equal:()=>Ol,Errors:()=>wa,Hash:()=>Fu,Mutate:()=>B5,Parse:()=>L5,Patch:()=>P5,ValueErrorIterator:()=>Ko});p();p();var R5={},pz=function(e,r,t,n,o){var i=new Worker(R5[r]||(R5[r]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(a){var l=a.data,u=l.$e$;if(u){var c=new Error(u[0]);c.code=u[1],c.stack=u[2],o(c,null)}else o(null,l)},i.postMessage(t,n),i},Rt=Uint8Array,Bn=Uint16Array,Tf=Int32Array,_d=new Rt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ld=new Rt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cf=new Rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),U5=function(e,r){for(var t=new Bn(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new Tf(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)o[i]=i-t[n]<<5|n;return{b:t,r:o}},z5=U5(_d,2),P3=z5.b,Iy=z5.r;P3[28]=258,Iy[258]=28;var G5=U5(Ld,0),$5=G5.b,w3=G5.r,Sf=new Bn(32768);for(Ct=0;Ct<32768;++Ct)Ts=(Ct&43690)>>1|(Ct&21845)<<1,Ts=(Ts&52428)>>2|(Ts&13107)<<2,Ts=(Ts&61680)>>4|(Ts&3855)<<4,Sf[Ct]=((Ts&65280)>>8|(Ts&255)<<8)>>1;var Ts,Ct,ei=function(e,r,t){for(var n=e.length,o=0,i=new Bn(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new Bn(r);for(o=1;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var l;if(t){l=new Bn(1<<r);var u=15-r;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],d=r-e[o],m=a[e[o]-1]++<<d,h=m|(1<<d)-1;m<=h;++m)l[Sf[m]>>u]=c}else for(l=new Bn(n),o=0;o<n;++o)e[o]&&(l[o]=Sf[a[e[o]-1]++]>>15-e[o]);return l},ws=new Rt(288);for(Ct=0;Ct<144;++Ct)ws[Ct]=8;var Ct;for(Ct=144;Ct<256;++Ct)ws[Ct]=9;var Ct;for(Ct=256;Ct<280;++Ct)ws[Ct]=7;var Ct;for(Ct=280;Ct<288;++Ct)ws[Ct]=8;var Ct,kd=new Rt(32);for(Ct=0;Ct<32;++Ct)kd[Ct]=5;var Ct,V5=ei(ws,9,0),Z5=ei(ws,9,1),H5=ei(kd,5,0),W5=ei(kd,5,1),by=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Qo=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},vy=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},wf=function(e){return(e+7)/8|0},Pu=function(e,r,t){return(r==null||r<0)&&(r=0),(t==null||t>e.length)&&(t=e.length),new Rt(e.subarray(r,t))},Dy={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},q5=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],sr=function(e,r,t){var n=new Error(r||q5[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,sr),!t)throw n;return n},K5=function(e,r,t,n){var o=e.length,i=n?n.length:0;if(!o||r.f&&!r.l)return t||new Rt(0);var a=!t,l=a||r.i!=2,u=r.i;a&&(t=new Rt(o*3));var c=function(R){var ue=t.length;if(R>ue){var ie=new Rt(Math.max(ue*2,R));ie.set(t),t=ie}},d=r.f||0,m=r.p||0,h=r.b||0,g=r.l,x=r.d,E=r.m,v=r.n,I=o*8;do{if(!g){d=Qo(e,m,1);var C=Qo(e,m+1,3);if(m+=3,C)if(C==1)g=Z5,x=W5,E=9,v=5;else if(C==2){var F=Qo(e,m,31)+257,P=Qo(e,m+10,15)+4,O=F+Qo(e,m+5,31)+1;m+=14;for(var _=new Rt(O),G=new Rt(19),L=0;L<P;++L)G[Cf[L]]=Qo(e,m+L*3,7);m+=P*3;for(var q=by(G),$=(1<<q)-1,K=ei(G,q,1),L=0;L<O;){var X=K[Qo(e,m,$)];m+=X&15;var S=X>>4;if(S<16)_[L++]=S;else{var V=0,Y=0;for(S==16?(Y=3+Qo(e,m,3),m+=2,V=_[L-1]):S==17?(Y=3+Qo(e,m,7),m+=3):S==18&&(Y=11+Qo(e,m,127),m+=7);Y--;)_[L++]=V}}var ee=_.subarray(0,F),oe=_.subarray(F);E=by(ee),v=by(oe),g=ei(ee,E,1),x=ei(oe,v,1)}else sr(1);else{var S=wf(m)+4,T=e[S-4]|e[S-3]<<8,A=S+T;if(A>o){u&&sr(0);break}l&&c(h+T),t.set(e.subarray(S,A),h),r.b=h+=T,r.p=m=A*8,r.f=d;continue}if(m>I){u&&sr(0);break}}l&&c(h+131072);for(var le=(1<<E)-1,ve=(1<<v)-1,he=m;;he=m){var V=g[vy(e,m)&le],de=V>>4;if(m+=V&15,m>I){u&&sr(0);break}if(V||sr(2),de<256)t[h++]=de;else if(de==256){he=m,g=null;break}else{var Fe=de-254;if(de>264){var L=de-257,ce=_d[L];Fe=Qo(e,m,(1<<ce)-1)+P3[L],m+=ce}var Pe=x[vy(e,m)&ve],He=Pe>>4;Pe||sr(3),m+=Pe&15;var oe=$5[He];if(He>3){var ce=Ld[He];oe+=vy(e,m)&(1<<ce)-1,m+=ce}if(m>I){u&&sr(0);break}l&&c(h+131072);var bt=h+Fe;if(h<oe){var B=i-oe,re=Math.min(oe,bt);for(B+h<0&&sr(3);h<re;++h)t[h]=n[B+h]}for(;h<bt;++h)t[h]=t[h-oe]}}r.l=g,r.p=he,r.b=h,r.f=d,g&&(d=1,r.m=E,r.d=x,r.n=v)}while(!d);return h!=t.length&&a?Pu(t,0,h):t.subarray(0,h)},ka=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},Pd=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8,e[n+2]|=t>>16},xy=function(e,r){for(var t=[],n=0;n<e.length;++n)e[n]&&t.push({s:n,f:e[n]});var o=t.length,i=t.slice();if(!o)return{t:k3,l:0};if(o==1){var a=new Rt(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(A,F){return A.f-F.f}),t.push({s:-1,f:25001});var l=t[0],u=t[1],c=0,d=1,m=2;for(t[0]={s:-1,f:l.f+u.f,l,r:u};d!=o-1;)l=t[t[c].f<t[m].f?c++:m++],u=t[c!=d&&t[c].f<t[m].f?c++:m++],t[d++]={s:-1,f:l.f+u.f,l,r:u};for(var h=i[0].s,n=1;n<o;++n)i[n].s>h&&(h=i[n].s);var g=new Bn(h+1),x=Ey(t[d-1],g,0);if(x>r){var n=0,E=0,v=x-r,I=1<<v;for(i.sort(function(F,P){return g[P.s]-g[F.s]||F.f-P.f});n<o;++n){var C=i[n].s;if(g[C]>r)E+=I-(1<<x-g[C]),g[C]=r;else break}for(E>>=v;E>0;){var S=i[n].s;g[S]<r?E-=1<<r-g[S]++-1:++n}for(;n>=0&&E;--n){var T=i[n].s;g[T]==r&&(--g[T],++E)}x=r}return{t:new Rt(g),l:x}},Ey=function(e,r,t){return e.s==-1?Math.max(Ey(e.l,r,t+1),Ey(e.r,r,t+1)):r[e.s]=t},M3=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new Bn(++r),n=0,o=e[0],i=1,a=function(u){t[n++]=u},l=1;l<=r;++l)if(e[l]==o&&l!=r)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[l]}return{c:t.subarray(0,n),n:r}},Od=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},O3=function(e,r,t){var n=t.length,o=wf(r+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=t[i];return(o+4+n)*8},A3=function(e,r,t,n,o,i,a,l,u,c,d){ka(r,d++,t),++o[256];for(var m=xy(o,15),h=m.t,g=m.l,x=xy(i,15),E=x.t,v=x.l,I=M3(h),C=I.c,S=I.n,T=M3(E),A=T.c,F=T.n,P=new Bn(19),O=0;O<C.length;++O)++P[C[O]&31];for(var O=0;O<A.length;++O)++P[A[O]&31];for(var _=xy(P,7),G=_.t,L=_.l,q=19;q>4&&!G[Cf[q-1]];--q);var $=c+5<<3,K=Od(o,ws)+Od(i,kd)+a,X=Od(o,h)+Od(i,E)+a+14+3*q+Od(P,G)+2*P[16]+3*P[17]+7*P[18];if(u>=0&&$<=K&&$<=X)return O3(r,d,e.subarray(u,u+c));var V,Y,ee,oe;if(ka(r,d,1+(X<K)),d+=2,X<K){V=ei(h,g,0),Y=h,ee=ei(E,v,0),oe=E;var le=ei(G,L,0);ka(r,d,S-257),ka(r,d+5,F-1),ka(r,d+10,q-4),d+=14;for(var O=0;O<q;++O)ka(r,d+3*O,G[Cf[O]]);d+=3*q;for(var ve=[C,A],he=0;he<2;++he)for(var de=ve[he],O=0;O<de.length;++O){var Fe=de[O]&31;ka(r,d,le[Fe]),d+=G[Fe],Fe>15&&(ka(r,d,de[O]>>5&127),d+=de[O]>>12)}}else V=V5,Y=ws,ee=H5,oe=kd;for(var O=0;O<l;++O){var ce=n[O];if(ce>255){var Fe=ce>>18&31;Pd(r,d,V[Fe+257]),d+=Y[Fe+257],Fe>7&&(ka(r,d,ce>>23&31),d+=_d[Fe]);var Pe=ce&31;Pd(r,d,ee[Pe]),d+=oe[Pe],Pe>3&&(Pd(r,d,ce>>5&8191),d+=Ld[Pe])}else Pd(r,d,V[ce]),d+=Y[ce]}return Pd(r,d,V[256]),d+Y[256]},J5=new Tf([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),k3=new Rt(0),Y5=function(e,r,t,n,o,i){var a=i.z||e.length,l=new Rt(n+a+5*(1+Math.ceil(a/7e3))+o),u=l.subarray(n,l.length-o),c=i.l,d=(i.r||0)&7;if(r){d&&(u[0]=i.r>>3);for(var m=J5[r-1],h=m>>13,g=m&8191,x=(1<<t)-1,E=i.p||new Bn(32768),v=i.h||new Bn(x+1),I=Math.ceil(t/3),C=2*I,S=function(se){return(e[se]^e[se+1]<<I^e[se+2]<<C)&x},T=new Tf(25e3),A=new Bn(288),F=new Bn(32),P=0,O=0,_=i.i||0,G=0,L=i.w||0,q=0;_+2<a;++_){var $=S(_),K=_&32767,X=v[$];if(E[K]=X,v[$]=K,L<=_){var V=a-_;if((P>7e3||G>24576)&&(V>423||!c)){d=A3(e,u,0,T,A,F,O,G,q,_-q,d),G=P=O=0,q=_;for(var Y=0;Y<286;++Y)A[Y]=0;for(var Y=0;Y<30;++Y)F[Y]=0}var ee=2,oe=0,le=g,ve=K-X&32767;if(V>2&&$==S(_-ve))for(var he=Math.min(h,V)-1,de=Math.min(32767,_),Fe=Math.min(258,V);ve<=de&&--le&&K!=X;){if(e[_+ee]==e[_+ee-ve]){for(var ce=0;ce<Fe&&e[_+ce]==e[_+ce-ve];++ce);if(ce>ee){if(ee=ce,oe=ve,ce>he)break;for(var Pe=Math.min(ve,ce-2),He=0,Y=0;Y<Pe;++Y){var bt=_-ve+Y&32767,B=E[bt],re=bt-B&32767;re>He&&(He=re,X=bt)}}}K=X,X=E[K],ve+=K-X&32767}if(oe){T[G++]=268435456|Iy[ee]<<18|w3[oe];var R=Iy[ee]&31,ue=w3[oe]&31;O+=_d[R]+Ld[ue],++A[257+R],++F[ue],L=_+ee,++P}else T[G++]=e[_],++A[e[_]]}}for(_=Math.max(_,L);_<a;++_)T[G++]=e[_],++A[e[_]];d=A3(e,u,c,T,A,F,O,G,q,_-q,d),c||(i.r=d&7|u[d/8|0]<<3,d-=7,i.h=v,i.p=E,i.i=_,i.w=L)}else{for(var _=i.w||0;_<a+c;_+=65535){var ie=_+65535;ie>=a&&(u[d/8|0]=c,ie=a),d=O3(u,d+1,e.subarray(_,ie))}i.i=a}return Pu(l,0,n+wf(d)+o)},mz=function(){for(var e=new Int32Array(256),r=0;r<256;++r){for(var t=r,n=9;--n;)t=(t&1&&-306674912)^t>>>1;e[r]=t}return e}(),X5=function(){var e=-1;return{p:function(r){for(var t=e,n=0;n<r.length;++n)t=mz[t&255^r[n]]^t>>>8;e=t},d:function(){return~e}}};var Q5=function(e,r,t,n,o){if(!o&&(o={l:1},r.dictionary)){var i=r.dictionary.subarray(-32768),a=new Rt(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length}return Y5(e,r.level==null?6:r.level,r.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+r.mem,t,n,o)},Ty=function(e,r){var t={};for(var n in e)t[n]=e[n];for(var n in r)t[n]=r[n];return t},N5=function(e,r,t){for(var n=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var l=n[a],u=i[a];if(typeof l=="function"){r+=";"+u+"=";var c=l.toString();if(l.prototype)if(c.indexOf("[native code]")!=-1){var d=c.indexOf(" ",8)+1;r+=c.slice(d,c.indexOf("(",d))}else{r+=c;for(var m in l.prototype)r+=";"+u+".prototype."+m+"="+l.prototype[m].toString()}else r+=c}else t[u]=l}return r},yy=[],fz=function(e){var r=[];for(var t in e)e[t].buffer&&r.push((e[t]=new e[t].constructor(e[t])).buffer);return r},hz=function(e,r,t,n){if(!yy[t]){for(var o="",i={},a=e.length-1,l=0;l<a;++l)o=N5(e[l],o,i);yy[t]={c:N5(e[a],o,i),e:i}}var u=Ty({},yy[t].e);return pz(yy[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,u,fz(u),n)},gz=function(){return[Rt,Bn,Tf,_d,Ld,Cf,P3,$5,Z5,W5,Sf,q5,ei,by,Qo,vy,wf,Pu,sr,K5,Ay,wy,eT]},yz=function(){return[Rt,Bn,Tf,_d,Ld,Cf,Iy,w3,V5,ws,H5,kd,Sf,J5,k3,ei,ka,Pd,xy,Ey,M3,Od,O3,A3,wf,Pu,Y5,Q5,My,wy]};var wy=function(e){return postMessage(e,[e.buffer])},eT=function(e){return e&&{out:e.size&&new Rt(e.size),dictionary:e.dictionary}},tT=function(e,r,t,n,o,i){var a=hz(t,n,o,function(l,u){a.terminate(),i(l,u)});return a.postMessage([e,r],r.consume?[e.buffer]:[]),function(){a.terminate()}};var Oi=function(e,r){return e[r]|e[r+1]<<8},ln=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},T3=function(e,r){return ln(e,r)+ln(e,r+4)*4294967296},un=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8};function bz(e,r,t){return t||(t=r,r={}),typeof t!="function"&&sr(7),tT(e,r,[yz],function(n){return wy(My(n.data[0],n.data[1]))},0,t)}function My(e,r){return Q5(e,r||{},0,0)}function vz(e,r,t){return t||(t=r,r={}),typeof t!="function"&&sr(7),tT(e,r,[gz],function(n){return wy(Ay(n.data[0],eT(n.data[1])))},1,t)}function Ay(e,r){return K5(e,{i:2},r&&r.out,r&&r.dictionary)}var B3=function(e,r,t,n){for(var o in e){var i=e[o],a=r+o,l=n;Array.isArray(i)&&(l=Ty(n,i[1]),i=i[0]),i instanceof Rt?t[a]=[i,l]:(t[a+="/"]=[new Rt(0),l],B3(i,a,t,n))}},j5=typeof TextEncoder<"u"&&new TextEncoder,F3=typeof TextDecoder<"u"&&new TextDecoder,xz=0;try{F3.decode(k3,{stream:!0}),xz=1}catch(e){}var Iz=function(e){for(var r="",t=0;;){var n=e[t++],o=(n>127)+(n>223)+(n>239);if(t+o>e.length)return{s:r,r:Pu(e,t-1)};o?o==3?(n=((n&15)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?r+=String.fromCharCode((n&31)<<6|e[t++]&63):r+=String.fromCharCode((n&15)<<12|(e[t++]&63)<<6|e[t++]&63):r+=String.fromCharCode(n)}};function Bd(e,r){if(r){for(var t=new Rt(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}if(j5)return j5.encode(e);for(var o=e.length,i=new Rt(e.length+(e.length>>1)),a=0,l=function(d){i[a++]=d},n=0;n<o;++n){if(a+5>i.length){var u=new Rt(a+8+(o-n<<1));u.set(i),i=u}var c=e.charCodeAt(n);c<128||r?l(c):c<2048?(l(192|c>>6),l(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,l(240|c>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|c&63)):(l(224|c>>12),l(128|c>>6&63),l(128|c&63))}return Pu(i,0,a)}function _3(e,r){if(r){for(var t="",n=0;n<e.length;n+=16384)t+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return t}else{if(F3)return F3.decode(e);var o=Iz(e),i=o.s,t=o.r;return t.length&&sr(8),i}}var rT=function(e,r){return r+30+Oi(e,r+26)+Oi(e,r+28)},nT=function(e,r,t){var n=Oi(e,r+28),o=_3(e.subarray(r+46,r+46+n),!(Oi(e,r+8)&2048)),i=r+46+n,a=ln(e,r+20),l=t&&a==4294967295?Ez(e,i):[a,ln(e,r+24),ln(e,r+42)],u=l[0],c=l[1],d=l[2];return[Oi(e,r+10),u,c,o,i+Oi(e,r+30)+Oi(e,r+32),d]},Ez=function(e,r){for(;Oi(e,r)!=1;r+=4+Oi(e,r+2));return[T3(e,r+12),T3(e,r+4),T3(e,r+20)]},Df=function(e){var r=0;if(e)for(var t in e){var n=e[t].length;n>65535&&sr(9),r+=n+4}return r},Cy=function(e,r,t,n,o,i,a,l){var u=n.length,c=t.extra,d=l&&l.length,m=Df(c);un(e,r,a!=null?33639248:67324752),r+=4,a!=null&&(e[r++]=20,e[r++]=t.os),e[r]=20,r+=2,e[r++]=t.flag<<1|(i<0&&8),e[r++]=o&&8,e[r++]=t.compression&255,e[r++]=t.compression>>8;var h=new Date(t.mtime==null?Date.now():t.mtime),g=h.getFullYear()-1980;if((g<0||g>119)&&sr(10),un(e,r,g<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),r+=4,i!=-1&&(un(e,r,t.crc),un(e,r+4,i<0?-i-2:i),un(e,r+8,t.size)),un(e,r+12,u),un(e,r+14,m),r+=16,a!=null&&(un(e,r,d),un(e,r+6,t.attrs),un(e,r+10,a),r+=14),e.set(n,r),r+=u,m)for(var x in c){var E=c[x],v=E.length;un(e,r,+x),un(e,r+2,v),e.set(E,r+4),r+=4+v}return d&&(e.set(l,r),r+=d),r},oT=function(e,r,t,n,o){un(e,r,101010256),un(e,r+8,t),un(e,r+10,t),un(e,r+12,n),un(e,r+16,o)};function iT(e,r,t){t||(t=r,r={}),typeof t!="function"&&sr(7);var n={};B3(e,"",n,r);var o=Object.keys(n),i=o.length,a=0,l=0,u=i,c=new Array(i),d=[],m=function(){for(var v=0;v<d.length;++v)d[v]()},h=function(v,I){Sy(function(){t(v,I)})};Sy(function(){h=t});var g=function(){var v=new Rt(l+22),I=a,C=l-a;l=0;for(var S=0;S<u;++S){var T=c[S];try{var A=T.c.length;Cy(v,l,T,T.f,T.u,A);var F=30+T.f.length+Df(T.extra),P=l+F;v.set(T.c,P),Cy(v,a,T,T.f,T.u,A,l,T.m),a+=16+F+(T.m?T.m.length:0),l=P+A}catch(O){return h(O,null)}}oT(v,a,c.length,C,I),h(null,v)};i||g();for(var x=function(v){var I=o[v],C=n[I],S=C[0],T=C[1],A=X5(),F=S.length;A.p(S);var P=Bd(I),O=P.length,_=T.comment,G=_&&Bd(_),L=G&&G.length,q=Df(T.extra),$=T.level==0?0:8,K=function(X,V){if(X)m(),h(X,null);else{var Y=V.length;c[v]=Ty(T,{size:F,crc:A.d(),c:V,f:P,m:G,u:O!=I.length||G&&_.length!=L,compression:$}),a+=30+O+q+Y,l+=76+2*(O+q)+(L||0)+Y,--i||g()}};if(O>65535&&K(sr(11,0,1),null),!$)K(null,S);else if(F<16e4)try{K(null,My(S,T))}catch(X){K(X,null)}else d.push(bz(S,T,K))},E=0;E<u;++E)x(E);return m}function aT(e,r){r||(r={});var t={},n=[];B3(e,"",t,r);var o=0,i=0;for(var a in t){var l=t[a],u=l[0],c=l[1],d=c.level==0?0:8,m=Bd(a),h=m.length,g=c.comment,x=g&&Bd(g),E=x&&x.length,v=Df(c.extra);h>65535&&sr(11);var I=d?My(u,c):u,C=I.length,S=X5();S.p(u),n.push(Ty(c,{size:u.length,crc:S.d(),c:I,f:m,m:x,u:h!=a.length||x&&g.length!=E,o,compression:d})),o+=30+h+v+C,i+=76+2*(h+v)+(E||0)+C}for(var T=new Rt(i+22),A=o,F=i-o,P=0;P<n.length;++P){var m=n[P];Cy(T,m.o,m,m.f,m.u,m.c.length);var O=30+m.f.length+Df(m.extra);T.set(m.c,m.o+O),Cy(T,o,m,m.f,m.u,m.c.length,m.o,m.m),o+=16+O+(m.m?m.m.length:0)}return oT(T,o,n.length,F,A),T}var Sy=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function sT(e,r,t){t||(t=r,r={}),typeof t!="function"&&sr(7);var n=[],o=function(){for(var v=0;v<n.length;++v)n[v]()},i={},a=function(v,I){Sy(function(){t(v,I)})};Sy(function(){a=t});for(var l=e.length-22;ln(e,l)!=101010256;--l)if(!l||e.length-l>65558)return a(sr(13,0,1),null),o;var u=Oi(e,l+8);if(u){var c=u,d=ln(e,l+16),m=d==4294967295||c==65535;if(m){var h=ln(e,l-12);m=ln(e,h)==101075792,m&&(c=u=ln(e,h+32),d=ln(e,h+48))}for(var g=r&&r.filter,x=function(v){var I=nT(e,d,m),C=I[0],S=I[1],T=I[2],A=I[3],F=I[4],P=I[5],O=rT(e,P);d=F;var _=function(L,q){L?(o(),a(L,null)):(q&&(i[A]=q),--u||a(null,i))};if(!g||g({name:A,size:S,originalSize:T,compression:C}))if(!C)_(null,Pu(e,O,O+S));else if(C==8){var G=e.subarray(O,O+S);if(T<524288||S>.8*T)try{_(null,Ay(G,{out:new Rt(T)}))}catch(L){_(L,null)}else n.push(vz(G,{size:T},_))}else _(sr(14,"unknown compression type "+C,1),null);else _(null,null)},E=0;E<c;++E)x(E)}else a(null,{});return o}function uT(e,r){for(var t={},n=e.length-22;ln(e,n)!=101010256;--n)(!n||e.length-n>65558)&&sr(13);var o=Oi(e,n+8);if(!o)return{};var i=ln(e,n+16),a=i==4294967295||o==65535;if(a){var l=ln(e,n-12);a=ln(e,l)==101075792,a&&(o=ln(e,l+32),i=ln(e,l+48))}for(var u=r&&r.filter,c=0;c<o;++c){var d=nT(e,i,a),m=d[0],h=d[1],g=d[2],x=d[3],E=d[4],v=d[5],I=rT(e,v);i=E,(!u||u({name:x,size:h,originalSize:g,compression:m}))&&(m?m==8?t[x]=Ay(e.subarray(I,I+h),{out:new Rt(g)}):sr(14,"unknown compression type "+m):t[x]=Pu(e,I,I+h))}return t}p();var Cz=e=>{if(e!=null)return e.trim()===""?void 0:e},Sz=e=>e!=null,Fy=(e,r,t=0)=>{var n;if(k.IsNull(e))return"null";if(k.IsUndefined(e))return"undefined";if(k.IsString(e))return"<string>";if(k.IsNumber(e))return"<number>";if(k.IsBoolean(e))return"<boolean>";if(k.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(k.IsRef(e)){let o=r.find(i=>i.$id===e.$ref);return o==null?e.$ref:Fy(o,r,t)}if(k.IsArray(e))return"".concat(Fy(e.items,r,t+1),"[]");if(k.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let i="".concat(e.anyOf.map(a=>Fy(a,r,t+1)).filter(Sz).join(" | "));return t>0?"(".concat(i,")"):i}return(n=e.$id)!=null?n:""},Dz=(e,r,t)=>{var i;let n=r.message;k.IsUnion(r.schema)&&(n="Expected one of: ".concat(Fy(r.schema,t)));let o="#/definitions/".concat(e).concat((i=Cz(r.path))!=null?i:"");return"".concat(o,": ").concat(n)},Py=(e,r,t)=>{let n=r.First();if(n!=null)return Dz(e,n,t)};var Rd;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Rd||(Rd={}));var Nd=class extends Error{constructor(t,n){super(n);f(this,"name");f(this,"kind");this.name="CompressError",this.kind=t}},Tz=e=>new Nd(Rd.Archive,e.message),wz=e=>{let r=Object.values(Dy);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},Mz=(e,r,t)=>{var n;return new Nd(Rd.Validate,(n=Py(e,r,t))!=null?n:"Unknown validate error")},Az=e=>new Nd(Rd.Encode,e.message),Fz=e=>new Nd(Rd.Unknown,e instanceof Error?e.message:String(e)),Mf=(e,r,t)=>r instanceof Pl?Az(r):r instanceof Ko?Mz(e,r,t):wz(r)?Tz(r):Fz(r);p();var jd;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(jd||(jd={}));var Ud=class extends Error{constructor(t,n){super(n);f(this,"name");f(this,"kind");this.name="DecompressError",this.kind=t}},Pz=e=>new Ud(jd.Unarchive,e.message),Oz=e=>{let r=Object.values(Dy);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&r.includes(e.code)},kz=(e,r,t)=>{var n;return new Ud(jd.Validate,(n=Py(e,r,t))!=null?n:"Unknown validate error")},Bz=e=>new Ud(jd.Decode,e.message),_z=e=>new Ud(jd.Unknown,e instanceof Error?e.message:String(e)),Af=(e,r,t)=>r instanceof Fl?Bz(r):r instanceof Ko?kz(e,r,t):Oz(r)?Pz(r):_z(r);var lT=function*(e,r=""){if(e!=null){if(Array.isArray(e)){for(let t=0;t<e.length;t++)yield[r+"[".concat(t,"]"),e[t]];return}if("features"in e){for(let t=0;t<e.features.length;t++)yield[r===""?"features[".concat(t,"]"):"".concat(r,".features[").concat(t,"]"),e.features[t]];return}for(let[t,n]of Object.entries(e)){let o=r===""?t:"".concat(r,".").concat(t);yield*ne(lT(n,o))}}},Lz=(e,r)=>e===""?r:r.startsWith("[")?"".concat(e).concat(r):"".concat(e,".").concat(r),fr=(e,r,t)=>{let n=new Set;for(let[o,i]of lT(e)){let a=r(i);if(n.has(a))return ge({kind:eo.DuplicateIdError,properties:{id:a,path:Lz(t,o)}});n.add(a)}return me(!0)};var cT=e=>e.floors==null?ge({kind:eo.FloorMissingError,properties:null}):fr(e.floors.features,r=>r.properties.id,"floors");var dT=b.Intersect([b.Object({id:b.Ref(rt),elevation:b.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:b.Optional(b.String({description:"The subtitle of the floor."})),maxHeight:b.Optional(b.Number({description:"The maximum height of the floor in meters. This includes the thickness of the floor itself, up to the tallest point on any wall. If the floor does not have a consistent height (eg, one room on the floor has a vaulted ceiling, the rest do not), this value represents the highest point anywhere on the floor. Must be a positive number, or undefined.",minimum:0}))}),yo],{$id:"FloorProperties"}),pT=on(b.Union([b.Ref(Cd),b.Ref(Sd),b.Null()]),b.Ref(dT),{$id:"FloorFeature"}),mT=kn(b.Ref(pT),{$id:"FloorCollection"}),Rz=b.Object({floors:b.Ref(mT)}),fT={name:"core:floors",intoBundle:function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},fromBundle:(e,r,t)=>{if(e==="floors.geojson")return{floors:t(r)}},integrityCheck:cT,schema:Rz,references:[dT,pT,mT]};p();p();var hr=e=>b.Unsafe(e);p();var st=e=>Object.keys(e);p();p();var Nz=e=>{var r,t;return new Map((t=(r=e.floors)==null?void 0:r.features.map(n=>[n.properties.id,n]))!=null?t:[])},ki=e=>{let r=Nz(e);return n=>{let o=r.get(n);return o==null?ge({kind:eo.UnknownFloorError,properties:{floorId:n}}):me(o)}};var hT=e=>{if(e.floors==null)return ge({kind:eo.FloorMissingError,properties:null});if(e.geometry==null)return ge({kind:eo.GeometryMissingError,properties:null});let r=fr(e.geometry,n=>n.properties.id,"geometry");if(r.isErr())return r;let t=ki(e);for(let n of st(e.geometry)){let o=t(n);if(o.isErr())return o}return me(!0)};var gT=b.Intersect([b.Object({id:b.Ref(In)}),yo],{$id:"GeometryProperties"}),yT=on(b.Union([b.Ref(xn),b.Ref(Kg),b.Ref(Jg),b.Ref(Yg),b.Ref(Cd),b.Ref(Sd)]),b.Ref(gT),{$id:"GeometryFeature"}),bT=kn(b.Ref(yT),{$id:"GeometryCollection"}),jz=b.Object({geometry:hr(b.Record(rt,b.Ref(bT),{additionalProperties:!1}))},{$id:"GeometrySchema"}),Uz=/^geometry\/(.*)\.geojson$/,vT={name:"core:geometry",schema:jz,intoBundle:function*(e){if(e.geometry!=null)for(let r of st(e.geometry))yield{path:"geometry/".concat(r,".geojson"),contents:e.geometry[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(Uz))==null?void 0:o[1];if(n)return{geometry:{[n]:t(r)}}},references:[gT,yT,bT],integrityCheck:hT};p();var L3=b.Object({type:b.Literal("file"),name:b.String({description:"The name of the file."})},{$id:"ManifestFile"}),xT=b.Recursive(e=>b.Object({type:b.Literal("folder"),name:b.String({description:"The name of the folder."}),children:b.Array(b.Union([e,b.Ref(L3)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),IT=b.Object({name:b.String({description:"The name of the map."}),version:b.Literal("3.0.0",{description:"The version of the manifest."}),orgId:b.Optional(b.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:b.Optional(b.String({description:"The identifier of the map that this MVF is for."})),contents:b.Array(b.Union([b.Ref(xT),b.Ref(L3)]),{minItems:1,description:"The contents of the MVF bundle."}),time:b.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:b.Optional(b.Unsafe(b.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:b.Optional(b.Number({minimum:0,maximum:360,description:'The angle, in degrees, the map is considered to be "naturally oriented" as, rather than facing directly north. 90 degrees means East is "up"'})),defaultFloor:b.Optional(b.Ref(rt,{description:"The default floor ID of the map."})),language:b.Optional(b.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),ET=kn(on(xn,b.Ref(IT)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),zz=b.Object({manifest:b.Ref(ET)}),CT={name:"core:manifest",intoBundle:function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},fromBundle:(e,r,t)=>{if(e==="manifest.geojson")return{manifest:t(r)}},schema:zz,references:[L3,xT,IT,ET]};p();p();p();p();var R3=class extends Be{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'"));f(this,"schema");this.schema=t}};function Gz(e,r){let t=r.find(n=>n.$id===e.$ref);if(t===void 0)throw new R3(e);return kl(t,r)}function Oy(e,r){return!nt.IsString(e.$id)||r.some(t=>t.$id===e.$id)||r.push(e),r}function kl(e,r){return e[Z]==="This"||e[Z]==="Ref"?Gz(e,r):e}p();function $z(e,r,t){let n=e.get(r);if(n!==void 0)return n;let o=Oa(r,t);return e.set(r,o),o}function ky(){let e=new WeakMap;return{HasTransform:(r,t)=>$z(e,r,t)}}function ur(e,r,t){try{return k.IsTransform(e)?e[Xt].Decode(t):t}catch(n){throw new Fl(e,r,t,n)}}function Vz(e,r,t,n,o){return nt.IsArray(n)?ur(e,t,n.map((i,a)=>Ba(e.items,r,"".concat(t,"/").concat(a),i,o))):ur(e,t,n)}function Zz(e,r,t,n,o){if(!nt.IsObject(n)||nn(n))return ur(e,t,n);let i=wu(e),a=i.map(m=>m[0]),l=w({},n);for(let[m,h]of i)m in l&&(l[m]=Ba(h,r,"".concat(t,"/").concat(m),l[m],o));if(!k.IsTransform(e.unevaluatedProperties))return ur(e,t,l);let u=Object.getOwnPropertyNames(l),c=e.unevaluatedProperties,d=w({},l);for(let m of u)a.includes(m)||(d[m]=ur(c,"".concat(t,"/").concat(m),d[m]));return ur(e,t,d)}function Hz(e,r,t,n,o){return ur(e,t,Ba(e.not,r,t,n,o))}function Wz(e,r,t,n,o){if(!nt.IsObject(n))return ur(e,t,n);let i=Zr(e),a=w({},n);for(let d of i)nt.HasPropertyKey(a,d)&&(nt.IsUndefined(a[d])&&(!k.IsUndefined(e.properties[d])||Tt.IsExactOptionalProperty(a,d))||(a[d]=Ba(e.properties[d],r,"".concat(t,"/").concat(d),a[d],o)));if(!k.IsSchema(e.additionalProperties))return ur(e,t,a);let l=Object.getOwnPropertyNames(a),u=e.additionalProperties,c=w({},a);for(let d of l)i.includes(d)||(c[d]=ur(u,"".concat(t,"/").concat(d),c[d]));return ur(e,t,c)}function qz(e,r,t,n,o){if(!nt.IsObject(n))return ur(e,t,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),l=w({},n);for(let m of Object.getOwnPropertyNames(n))a.test(m)&&(l[m]=Ba(e.patternProperties[i],r,"".concat(t,"/").concat(m),l[m],o));if(!k.IsSchema(e.additionalProperties))return ur(e,t,l);let u=Object.getOwnPropertyNames(l),c=e.additionalProperties,d=w({},l);for(let m of u)a.test(m)||(d[m]=ur(c,"".concat(t,"/").concat(m),d[m]));return ur(e,t,d)}function Kz(e,r,t,n,o){let i=kl(e,r);return ur(e,t,Ba(i,r,t,n,o))}function Jz(e,r,t,n,o){let i=kl(e,r);return ur(e,t,Ba(i,r,t,n,o))}function Yz(e,r,t,n,o){return nt.IsArray(n)&&nt.IsArray(e.items)?ur(e,t,e.items.map((i,a)=>Ba(i,r,"".concat(t,"/").concat(a),n[a],o))):ur(e,t,n)}function Xz(e,r,t,n,o){for(let i of e.anyOf){if(!Xo.Check(i,r,n))continue;let a=Ba(i,r,t,n,o);return ur(e,t,a)}return ur(e,t,n)}function Ba(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=Oy(e,r),a=e;switch(e[Z]){case"Array":return Vz(a,i,t,n,o);case"Intersect":return Zz(a,i,t,n,o);case"Not":return Hz(a,i,t,n,o);case"Object":return Wz(a,i,t,n,o);case"Record":return qz(a,i,t,n,o);case"Ref":return Kz(a,i,t,n,o);case"Symbol":return ur(a,t,n);case"This":return Jz(a,i,t,n,o);case"Tuple":return Yz(a,i,t,n,o);case"Union":return Xz(a,i,t,n,o);default:return ur(a,t,n)}}function ST(e,r,t){let n=ky();return Ba(e,r,"",t,n)}p();function Sn(e,r,t){try{return k.IsTransform(e)?e[Xt].Encode(t):t}catch(n){throw new Pl(e,r,t,n)}}function Qz(e,r,t,n,o){let i=Sn(e,t,n);return nt.IsArray(i)?i.map((a,l)=>_a(e.items,r,"".concat(t,"/").concat(l),a,o)):i}function eG(e,r,t,n,o){let i=Sn(e,t,n);if(!nt.IsObject(n)||nn(n))return i;let a=wu(e),l=a.map(h=>h[0]),u=w({},i);for(let[h,g]of a)h in u&&(u[h]=_a(g,r,"".concat(t,"/").concat(h),u[h],o));if(!k.IsTransform(e.unevaluatedProperties))return u;let c=Object.getOwnPropertyNames(u),d=e.unevaluatedProperties,m=w({},u);for(let h of c)l.includes(h)||(m[h]=Sn(d,"".concat(t,"/").concat(h),m[h]));return m}function tG(e,r,t,n){return Sn(e.not,t,Sn(e,t,n))}function rG(e,r,t,n,o){let i=Sn(e,t,n);if(!nt.IsObject(i))return i;let a=Zr(e),l=w({},i);for(let m of a)nt.HasPropertyKey(l,m)&&(nt.IsUndefined(l[m])&&(!k.IsUndefined(e.properties[m])||Tt.IsExactOptionalProperty(l,m))||(l[m]=_a(e.properties[m],r,"".concat(t,"/").concat(m),l[m],o)));if(!k.IsSchema(e.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),c=e.additionalProperties,d=w({},l);for(let m of u)a.includes(m)||(d[m]=Sn(c,"".concat(t,"/").concat(m),d[m]));return d}function nG(e,r,t,n,o){let i=Sn(e,t,n);if(!nt.IsObject(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],l=new RegExp(a),u=w({},i);for(let h of Object.getOwnPropertyNames(n))l.test(h)&&(u[h]=_a(e.patternProperties[a],r,"".concat(t,"/").concat(h),u[h],o));if(!k.IsSchema(e.additionalProperties))return u;let c=Object.getOwnPropertyNames(u),d=e.additionalProperties,m=w({},u);for(let h of c)l.test(h)||(m[h]=Sn(d,"".concat(t,"/").concat(h),m[h]));return m}function oG(e,r,t,n,o){let i=kl(e,r),a=_a(i,r,t,n,o);return Sn(e,t,a)}function iG(e,r,t,n,o){let i=kl(e,r),a=_a(i,r,t,n,o);return Sn(e,t,a)}function aG(e,r,t,n,o){let i=Sn(e,t,n);return nt.IsArray(e.items)?e.items.map((a,l)=>_a(a,r,"".concat(t,"/").concat(l),i[l],o)):[]}function sG(e,r,t,n,o){for(let i of e.anyOf){if(!Xo.Check(i,r,n))continue;let a=_a(i,r,t,n,o);return Sn(e,t,a)}for(let i of e.anyOf){let a=_a(i,r,t,n,o);if(Xo.Check(e,r,a))return Sn(e,t,a)}return Sn(e,t,n)}function _a(e,r,t,n,o){if(!o.HasTransform(e,r))return n;let i=Oy(e,r),a=e;switch(e[Z]){case"Array":return Qz(a,i,t,n,o);case"Intersect":return eG(a,i,t,n,o);case"Not":return tG(a,i,t,n);case"Object":return rG(a,i,t,n,o);case"Record":return nG(a,i,t,n,o);case"Ref":return oG(a,i,t,n,o);case"This":return iG(a,i,t,n,o);case"Tuple":return aG(a,i,t,n,o);case"Union":return sG(a,i,t,n,o);default:return Sn(a,t,n)}}function DT(e,r,t){let n=ky();return _a(e,r,"",t,n)}p();var N3=class{constructor(r,t,n,o){this.schema=r,this.references=t,this.checkFunc=n,this.code=o,this.hasTransform=Oa(r,t)}Code(){return this.code}Errors(r){return wa(this.schema,this.references,r)}Check(r){return this.checkFunc(r)}Decode(r){if(!this.checkFunc(r))throw new Md(this.schema,r,this.Errors(r).First());return this.hasTransform?Ad(this.schema,this.references,r):r}Encode(r){let t=this.hasTransform?ly(this.schema,this.references,r):r;if(!this.checkFunc(t))throw new Fd(this.schema,r,this.Errors(r).First());return t}},Ms;(function(e){function r(i){return i===36}e.DollarSign=r;function t(i){return i===95}e.IsUnderscore=t;function n(i){return i>=65&&i<=90||i>=97&&i<=122}e.IsAlpha=n;function o(i){return i>=48&&i<=57}e.IsNumeric=o})(Ms||(Ms={}));var By;(function(e){function r(i){return i.length===0?!1:Ms.IsNumeric(i.charCodeAt(0))}function t(i){if(r(i))return!1;for(let a=0;a<i.length;a++){let l=i.charCodeAt(a);if(!(Ms.IsAlpha(l)||Ms.IsNumeric(l)||Ms.DollarSign(l)||Ms.IsUnderscore(l)))return!1}return!0}function n(i){return i.replace(/'/g,"\\'")}function o(i,a){return t(a)?"".concat(i,".").concat(a):"".concat(i,"['").concat(n(a),"']")}e.Encode=o})(By||(By={}));var j3;(function(e){function r(t){let n=[];for(let o=0;o<t.length;o++){let i=t.charCodeAt(o);Ms.IsNumeric(i)||Ms.IsAlpha(i)?n.push(t.charAt(o)):n.push("_".concat(i,"_"))}return n.join("").replace(/__/g,"_")}e.Encode=r})(j3||(j3={}));var U3;(function(e){function r(t){return t.replace(/'/g,"\\'")}e.Escape=r})(U3||(U3={}));var z3=class extends Be{constructor(r){super("Unknown type"),this.schema=r}},_y=class extends Be{constructor(r){super("Preflight validation check failed to guard for the given schema"),this.schema=r}},Bl;(function(e){function r(a,l,u){return Tt.ExactOptionalPropertyTypes?"('".concat(l,"' in ").concat(a," ? ").concat(u," : true)"):"(".concat(By.Encode(a,l)," !== undefined ? ").concat(u," : true)")}e.IsExactOptionalProperty=r;function t(a){return Tt.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null)"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,"))")}e.IsObjectLike=t;function n(a){return Tt.AllowArrayObject?"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))"):"(typeof ".concat(a," === 'object' && ").concat(a," !== null && !Array.isArray(").concat(a,") && !(").concat(a," instanceof Date) && !(").concat(a," instanceof Uint8Array))")}e.IsRecordLike=n;function o(a){return Tt.AllowNaN?"typeof ".concat(a," === 'number'"):"Number.isFinite(".concat(a,")")}e.IsNumberLike=o;function i(a){return Tt.AllowNullVoid?"(".concat(a," === undefined || ").concat(a," === null)"):"".concat(a," === undefined")}e.IsVoidLike=i})(Bl||(Bl={}));var Ly;(function(e){function r(B){return B[Z]==="Any"||B[Z]==="Unknown"}function*t(B,re,R){yield"true"}function*n(B,re,R){yield"Array.isArray(".concat(R,")");let[ue,ie]=[Fe("value","any"),Fe("acc","number")];Te(B.maxItems)&&(yield"".concat(R,".length <= ").concat(B.maxItems)),Te(B.minItems)&&(yield"".concat(R,".length >= ").concat(B.minItems));let se=le(B.items,re,"value");if(yield"".concat(R,".every((").concat(ue,") => ").concat(se,")"),it(B.contains)||Te(B.minContains)||Te(B.maxContains)){let Le=it(B.contains)?B.contains:Ft(),Et=le(Le,re,"value"),Ce=Te(B.minContains)?["(count >= ".concat(B.minContains,")")]:[],xe=Te(B.maxContains)?["(count <= ".concat(B.maxContains,")")]:[],We="const count = value.reduce((".concat(ie,", ").concat(ue,") => ").concat(Et," ? acc + 1 : acc, 0)"),Gr=["(count > 0)",...Ce,...xe].join(" && ");yield"((".concat(ue,") => { ").concat(We,"; return ").concat(Gr,"})(").concat(R,")")}if(B.uniqueItems===!0){let Et="const set = new Set(); for(const element of value) { ".concat("const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true"," }");yield"((".concat(ue,") => { ").concat(Et," )(").concat(R,")")}}function*o(B,re,R){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(R,")")}function*i(B,re,R){yield"(typeof ".concat(R," === 'bigint')"),rn(B.exclusiveMaximum)&&(yield"".concat(R," < BigInt(").concat(B.exclusiveMaximum,")")),rn(B.exclusiveMinimum)&&(yield"".concat(R," > BigInt(").concat(B.exclusiveMinimum,")")),rn(B.maximum)&&(yield"".concat(R," <= BigInt(").concat(B.maximum,")")),rn(B.minimum)&&(yield"".concat(R," >= BigInt(").concat(B.minimum,")")),rn(B.multipleOf)&&(yield"(".concat(R," % BigInt(").concat(B.multipleOf,")) === 0"))}function*a(B,re,R){yield"(typeof ".concat(R," === 'boolean')")}function*l(B,re,R){yield*ne(ee(B.returns,re,"".concat(R,".prototype")))}function*u(B,re,R){yield"(".concat(R," instanceof Date) && Number.isFinite(").concat(R,".getTime())"),Te(B.exclusiveMaximumTimestamp)&&(yield"".concat(R,".getTime() < ").concat(B.exclusiveMaximumTimestamp)),Te(B.exclusiveMinimumTimestamp)&&(yield"".concat(R,".getTime() > ").concat(B.exclusiveMinimumTimestamp)),Te(B.maximumTimestamp)&&(yield"".concat(R,".getTime() <= ").concat(B.maximumTimestamp)),Te(B.minimumTimestamp)&&(yield"".concat(R,".getTime() >= ").concat(B.minimumTimestamp)),Te(B.multipleOfTimestamp)&&(yield"(".concat(R,".getTime() % ").concat(B.multipleOfTimestamp,") === 0"))}function*c(B,re,R){yield"(typeof ".concat(R," === 'function')")}function*d(B,re,R){yield"Number.isInteger(".concat(R,")"),Te(B.exclusiveMaximum)&&(yield"".concat(R," < ").concat(B.exclusiveMaximum)),Te(B.exclusiveMinimum)&&(yield"".concat(R," > ").concat(B.exclusiveMinimum)),Te(B.maximum)&&(yield"".concat(R," <= ").concat(B.maximum)),Te(B.minimum)&&(yield"".concat(R," >= ").concat(B.minimum)),Te(B.multipleOf)&&(yield"(".concat(R," % ").concat(B.multipleOf,") === 0"))}function*m(B,re,R){let ue=B.allOf.map(ie=>le(ie,re,R)).join(" && ");if(B.unevaluatedProperties===!1){let ie=he("".concat(new RegExp(Is(B)),";")),se="Object.getOwnPropertyNames(".concat(R,").every(key => ").concat(ie,".test(key))");yield"(".concat(ue," && ").concat(se,")")}else if(it(B.unevaluatedProperties)){let ie=he("".concat(new RegExp(Is(B)),";")),se="Object.getOwnPropertyNames(".concat(R,").every(key => ").concat(ie,".test(key) || ").concat(le(B.unevaluatedProperties,re,"".concat(R,"[key]")),")");yield"(".concat(ue," && ").concat(se,")")}else yield"(".concat(ue,")")}function*h(B,re,R){yield"(typeof value === 'object' && Symbol.iterator in ".concat(R,")")}function*g(B,re,R){typeof B.const=="number"||typeof B.const=="boolean"?yield"(".concat(R," === ").concat(B.const,")"):yield"(".concat(R," === '").concat(U3.Escape(B.const),"')")}function*x(B,re,R){yield"false"}function*E(B,re,R){let ue=le(B.not,re,R);yield"(!".concat(ue,")")}function*v(B,re,R){yield"(".concat(R," === null)")}function*I(B,re,R){yield Bl.IsNumberLike(R),Te(B.exclusiveMaximum)&&(yield"".concat(R," < ").concat(B.exclusiveMaximum)),Te(B.exclusiveMinimum)&&(yield"".concat(R," > ").concat(B.exclusiveMinimum)),Te(B.maximum)&&(yield"".concat(R," <= ").concat(B.maximum)),Te(B.minimum)&&(yield"".concat(R," >= ").concat(B.minimum)),Te(B.multipleOf)&&(yield"(".concat(R," % ").concat(B.multipleOf,") === 0"))}function*C(B,re,R){yield Bl.IsObjectLike(R),Te(B.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(R,").length >= ").concat(B.minProperties)),Te(B.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(R,").length <= ").concat(B.maxProperties));let ue=Object.getOwnPropertyNames(B.properties);for(let ie of ue){let se=By.Encode(R,ie),Le=B.properties[ie];if(B.required&&B.required.includes(ie))yield*ne(ee(Le,re,se)),(Cs(Le)||r(Le))&&(yield"('".concat(ie,"' in ").concat(R,")"));else{let Et=le(Le,re,se);yield Bl.IsExactOptionalProperty(R,ie,Et)}}if(B.additionalProperties===!1)if(B.required&&B.required.length===ue.length)yield"Object.getOwnPropertyNames(".concat(R,").length === ").concat(ue.length);else{let ie="[".concat(ue.map(se=>"'".concat(se,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(R,").every(key => ").concat(ie,".includes(key))")}if(typeof B.additionalProperties=="object"){let ie=le(B.additionalProperties,re,"".concat(R,"[key]")),se="[".concat(ue.map(Le=>"'".concat(Le,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(R,").every(key => ").concat(se,".includes(key) || ").concat(ie,"))")}}function*S(B,re,R){yield"(typeof value === 'object' && typeof ".concat(R,".then === 'function')")}function*T(B,re,R){yield Bl.IsRecordLike(R),Te(B.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(R,").length >= ").concat(B.minProperties)),Te(B.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(R,").length <= ").concat(B.maxProperties));let[ue,ie]=Object.entries(B.patternProperties)[0],se=he("".concat(new RegExp(ue))),Le=le(ie,re,"value"),Et=it(B.additionalProperties)?le(B.additionalProperties,re,R):B.additionalProperties===!1?"false":"true",Ce="(".concat(se,".test(key) ? ").concat(Le," : ").concat(Et,")");yield"(Object.entries(".concat(R,").every(([key, value]) => ").concat(Ce,"))")}function*A(B,re,R){let ue=dt(B,re);if(oe.functions.has(B.$ref))return yield"".concat(ve(B.$ref),"(").concat(R,")");yield*ne(ee(ue,re,R))}function*F(B,re,R){let ue=he("".concat(new RegExp(B.source,B.flags),";"));yield"(typeof ".concat(R," === 'string')"),Te(B.maxLength)&&(yield"".concat(R,".length <= ").concat(B.maxLength)),Te(B.minLength)&&(yield"".concat(R,".length >= ").concat(B.minLength)),yield"".concat(ue,".test(").concat(R,")")}function*P(B,re,R){if(yield"(typeof ".concat(R," === 'string')"),Te(B.maxLength)&&(yield"".concat(R,".length <= ").concat(B.maxLength)),Te(B.minLength)&&(yield"".concat(R,".length >= ").concat(B.minLength)),B.pattern!==void 0){let ue=he("".concat(new RegExp(B.pattern),";"));yield"".concat(ue,".test(").concat(R,")")}B.format!==void 0&&(yield"format('".concat(B.format,"', ").concat(R,")"))}function*O(B,re,R){yield"(typeof ".concat(R," === 'symbol')")}function*_(B,re,R){yield"(typeof ".concat(R," === 'string')");let ue=he("".concat(new RegExp(B.pattern),";"));yield"".concat(ue,".test(").concat(R,")")}function*G(B,re,R){yield"".concat(ve(B.$ref),"(").concat(R,")")}function*L(B,re,R){if(yield"Array.isArray(".concat(R,")"),B.items===void 0)return yield"".concat(R,".length === 0");yield"(".concat(R,".length === ").concat(B.maxItems,")");for(let ue=0;ue<B.items.length;ue++){let ie=le(B.items[ue],re,"".concat(R,"[").concat(ue,"]"));yield"".concat(ie)}}function*q(B,re,R){yield"".concat(R," === undefined")}function*$(B,re,R){let ue=B.anyOf.map(ie=>le(ie,re,R));yield"(".concat(ue.join(" || "),")")}function*K(B,re,R){yield"".concat(R," instanceof Uint8Array"),Te(B.maxByteLength)&&(yield"(".concat(R,".length <= ").concat(B.maxByteLength,")")),Te(B.minByteLength)&&(yield"(".concat(R,".length >= ").concat(B.minByteLength,")"))}function*X(B,re,R){yield"true"}function*V(B,re,R){yield Bl.IsVoidLike(R)}function*Y(B,re,R){let ue=oe.instances.size;oe.instances.set(ue,B),yield"kind('".concat(B[Z],"', ").concat(ue,", ").concat(R,")")}function*ee(B,re,R,ue=!0){let ie=ot(B.$id)?[...re,B]:re,se=B;if(ue&&ot(B.$id)){let Le=ve(B.$id);if(oe.functions.has(Le))return yield"".concat(Le,"(").concat(R,")");{let Et=de(Le,B,re,"value",!1);return oe.functions.set(Le,Et),yield"".concat(Le,"(").concat(R,")")}}switch(se[Z]){case"Any":return yield*ne(t(se,ie,R));case"Array":return yield*ne(n(se,ie,R));case"AsyncIterator":return yield*ne(o(se,ie,R));case"BigInt":return yield*ne(i(se,ie,R));case"Boolean":return yield*ne(a(se,ie,R));case"Constructor":return yield*ne(l(se,ie,R));case"Date":return yield*ne(u(se,ie,R));case"Function":return yield*ne(c(se,ie,R));case"Integer":return yield*ne(d(se,ie,R));case"Intersect":return yield*ne(m(se,ie,R));case"Iterator":return yield*ne(h(se,ie,R));case"Literal":return yield*ne(g(se,ie,R));case"Never":return yield*ne(x(se,ie,R));case"Not":return yield*ne(E(se,ie,R));case"Null":return yield*ne(v(se,ie,R));case"Number":return yield*ne(I(se,ie,R));case"Object":return yield*ne(C(se,ie,R));case"Promise":return yield*ne(S(se,ie,R));case"Record":return yield*ne(T(se,ie,R));case"Ref":return yield*ne(A(se,ie,R));case"RegExp":return yield*ne(F(se,ie,R));case"String":return yield*ne(P(se,ie,R));case"Symbol":return yield*ne(O(se,ie,R));case"TemplateLiteral":return yield*ne(_(se,ie,R));case"This":return yield*ne(G(se,ie,R));case"Tuple":return yield*ne(L(se,ie,R));case"Undefined":return yield*ne(q(se,ie,R));case"Union":return yield*ne($(se,ie,R));case"Uint8Array":return yield*ne(K(se,ie,R));case"Unknown":return yield*ne(X(se,ie,R));case"Void":return yield*ne(V(se,ie,R));default:if(!kr.Has(se[Z]))throw new z3(B);return yield*ne(Y(se,ie,R))}}let oe={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function le(B,re,R,ue=!0){return"(".concat([...ee(B,re,R,ue)].join(" && "),")")}function ve(B){return"check_".concat(j3.Encode(B))}function he(B){let re="local_".concat(oe.variables.size);return oe.variables.set(re,"const ".concat(re," = ").concat(B)),re}function de(B,re,R,ue,ie=!0){let[se,Le]=["\n",We=>"".padStart(We," ")],Et=Fe("value","any"),Ce=ce("boolean"),xe=[...ee(re,R,ue,ie)].map(We=>"".concat(Le(4)).concat(We)).join(" &&".concat(se));return"function ".concat(B,"(").concat(Et,")").concat(Ce," {").concat(se).concat(Le(2),"return (").concat(se).concat(xe).concat(se).concat(Le(2),")\n}")}function Fe(B,re){let R=oe.language==="typescript"?": ".concat(re):"";return"".concat(B).concat(R)}function ce(B){return oe.language==="typescript"?": ".concat(B):""}function Pe(B,re,R){let ue=de("check",B,re,"value"),ie=Fe("value","any"),se=ce("boolean"),Le=[...oe.functions.values()],Et=[...oe.variables.values()],Ce=ot(B.$id)?"return function check(".concat(ie,")").concat(se," {\n return ").concat(ve(B.$id),"(value)\n}"):"return ".concat(ue);return[...Et,...Le,Ce].join("\n")}function He(...B){let re={language:"javascript"},[R,ue,ie]=B.length===2&&Ue(B[1])?[B[0],B[1],re]:B.length===2&&!Ue(B[1])?[B[0],[],B[1]]:B.length===3?[B[0],B[1],B[2]]:B.length===1?[B[0],[],re]:[null,[],re];if(oe.language=ie.language,oe.variables.clear(),oe.functions.clear(),oe.instances.clear(),!it(R))throw new _y(R);for(let se of ue)if(!it(se))throw new _y(se);return Pe(R,ue,ie)}e.Code=He;function bt(B,re=[]){let R=He(B,re,{language:"javascript"}),ue=globalThis.Function("kind","format","hash",R),ie=new Map(oe.instances);function se(xe,We,Gr){if(!kr.Has(xe)||!ie.has(We))return!1;let xi=kr.Get(xe),ca=ie.get(We);return xi(ca,Gr)}function Le(xe,We){return On.Has(xe)?On.Get(xe)(We):!1}function Et(xe){return Fu(xe)}let Ce=ue(se,Le,Et);return new N3(B,re,Ce,R)}e.Compile=bt})(Ly||(Ly={}));p();p();p();var uG=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,lG=[0,31,28,31,30,31,30,31,31,30,31,30,31],cG=e=>e%4===0&&(e%100!==0||e%400===0),Ry=e=>{let r=uG.exec(e);if(!r)return!1;let t=+r[1],n=+r[2],o=+r[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&cG(t)?29:lG[n])};p();var dG=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,Ny=e=>{let r=dG.exec(e);if(!r)return!1;let t=+r[1],n=+r[2],o=+r[3],i=r[4],a=r[5]==="-"?-1:1,l=+(r[6]||0),u=+(r[7]||0);if(l>23||u>59||!i)return!1;if(t<=23&&n<=59&&o<60)return!0;let c=n-u*a,d=t-l*a-(c<0?1:0);return(d===23||d===-1)&&(c===59||c===-1)&&o<61};var pG=/t|\s/i,TT=e=>{let r=e.split(pG);return r.length===2&&Ry(r[0])&&Ny(r[1])};p();var mG=/\/|:/,fG=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,wT=e=>mG.test(e)&&fG.test(e);var hG=[["date",Ry],["time",Ny],["date-time",TT],["uri",wT]],MT=()=>{for(let[e,r]of hG)try{ry.Format(e,r)}catch(t){if(t instanceof vf)continue;throw t}};p();var G3=b.Record(b.String(),b.Unknown(),{$id:"Extra"}),Bi=b.Object({extra:b.Optional(b.Ref(G3))}),$3=[G3];p();p();p();p();p();p();var ft=e=>Object.entries(e);var gG=e=>{var t;let r=new Map;for(let[n,o]of ft((t=e.geometry)!=null?t:{}))r.set(n,new Map(o==null?void 0:o.features.map(i=>[i.properties.id,i])));return r},Br=e=>{let r=gG(e);return(n,o)=>{let i=r.get(n);if(i==null)return ge({kind:eo.UnknownFloorError,properties:{floorId:n}});let a=i.get(o);return a==null?ge({kind:eo.UnknownGeometryError,properties:{floorId:n,geometryId:o}}):me(a)}};p();var ti=b.Object({geometryId:b.Ref(In)},{$id:"WithGeometryId"}),zd=b.Object({geometryIds:b.Array(b.Ref(In))},{$id:"WithGeometryIds"}),V3=[ti,zd];p();p();p();var AT=e=>e instanceof Error?e:new Error(String(e));var Gd=e=>(...r)=>{try{return me(e(...r))}catch(t){return ge(AT(t))}};var FT=Gd((e,r)=>{let t={};for(let n of r)for(let o of n.intoBundle(e))t[o.path]=Bd(JSON.stringify(o.contents));return t}),Z3=async(e,r,t)=>FT(e,r).andThenAsync(n=>new Promise(o=>{iT(n,H(w({},t),{consume:!0}),(i,a)=>{o(i?ge(i):me(a))})})),yG=Gd(aT),H3=(e,r,t)=>FT(e,r).andThen(n=>yG(n,t));p();p();function jy(e,r,t=[]){let n=w({},e);for(let[o,i]of Object.entries(r))if(i!==void 0)if(o in n){let a=o;if(Array.isArray(i)&&i.length>0){let l=bG(i[0],t);if(l){let u=n[a];if(!Array.isArray(u))throw new Error("Expected array at ".concat(o,", got ").concat(typeof u));let c=new Map(i.map(h=>[PT(h,l),h])),m=u.map(h=>{let g=c.get(PT(h,l));return g?jy(h,g,t):h});n[a]=m}else n[a]=i}else{let l=n[a];typeof l=="object"&&l!==null&&typeof i=="object"&&i!==null?Object.keys(i).length===0?n[a]=i:n[a]=jy(l,i,t):n[o]=i}}else n[o]=i;return n}function bG(e,r){function t(n){if(typeof n!="object"||n===null)return null;for(let o of r)if(o in n&&typeof n[o]<"u")return[o];if(Array.isArray(n))return null;for(let[o,i]of Object.entries(n)){let a=t(i);if(a)return[o,...a]}return null}return t(e)}function PT(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}var vG=e=>e,xG=e=>JSON.parse(_3(e)),OT=(e,r)=>r.some(t=>t.fromBundle(e.name,new Uint8Array,vG)!==void 0),kT=Gd((e,r)=>{let t={};for(let n of Object.keys(e)){let o=e[n];for(let i of r){let a=i.fromBundle(n,o,xG);if(a){t=jy(t,a,[]);break}}}return t}),W3=async(e,r)=>new Promise(t=>sT(e,{filter:n=>OT(n,r)},(n,o)=>{t(n?ge(n):me(o))})).then(t=>t.andThen(n=>kT(n,r))),IG=Gd(uT),q3=(e,r)=>IG(e,{filter:t=>OT(t,r)}).andThen(t=>kT(t,r));p();var EG=e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string",CG=e=>{if(e.length<2)return!1;let r=e.filter(EG);if(r.length!==e.length)return!1;let t=r[0].$ref;return r.slice(1).every(n=>n.$ref===t)},Uy=e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&CG(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,Uy(t)])):Array.isArray(e)?e.map(Uy):e;p();var zy=e=>typeof e=="object"&&e!=null&&"$ref"in e?H(w({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([r,t])=>[r,zy(t)])):Array.isArray(e)?e.map(zy):e;var $d;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})($d||($d={}));var SG=e=>({next(){for(let t of e){let n=t.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),DG=(...e)=>{let r=new Map;for(let t of SG(e)){if(!t.$id)continue;let n=r.get(t.$id);if(n!=null&&n!==t)return ge({kind:$d.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:t});r.set(t.$id,t)}return me(r)},Wr,Vd,Co,cn,K3=class K3{constructor(r,t,n,o){D(this,Wr);D(this,Vd);D(this,Co,[]);D(this,cn);M(this,Wr,r),M(this,Vd,t),M(this,Co,n),M(this,cn,o),this.is=this.is.bind(this),this.parse=this.parse.bind(this),this.verify=this.verify.bind(this),this.jsonSchema=this.jsonSchema.bind(this),this.compress=this.compress.bind(this),this.decompress=this.decompress.bind(this)}static create(r,t="CoreMVF",n=!1){let o=b.Composite(r.extensions.map(a=>a.schema),{$id:t});if(!k.IsSchema(o))return ge({kind:$d.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:o});let i=DG(d3.values(),p3.values(),l3.values(),$3.values(),J3.values(),V3.values(),r.extensions.flatMap(a=>{var l;return(l=a.references)!=null?l:[]}).values());if(!i.isOk())return i;try{MT();let a=n?null:Ly.Compile(o,[...i.value.values()]);return me(new K3(o,a,r.extensions,i.value))}catch(a){return a instanceof Be?ge({kind:$d.TypeboxError,message:a.message,original:a}):ge({kind:$d.UnknownError,message:"An unknown error occurred while compiling the schema",original:a})}}is(r){var t,n;return(n=(t=s(this,Vd))==null?void 0:t.Check(r))!=null?n:Xo.Check(s(this,Wr),[...s(this,cn).values()],r)}parse(r){var t,n;return this.is(r)?me(r):ge((n=(t=s(this,Vd))==null?void 0:t.Errors(r))!=null?n:Xo.Errors(s(this,Wr),[...s(this,cn).values()],r))}decode(r){try{return me(ST(s(this,Wr),[...s(this,cn).values()],r))}catch(t){return ge(t)}}encode(r){try{return me(DT(s(this,Wr),[...s(this,cn).values()],r))}catch(t){return ge(t)}}verify(r){for(let t of s(this,Co))if(t.integrityCheck){let n=t.integrityCheck(r);if(n.isErr())return ge(n.error)}return me(!0)}jsonSchema(){var n;let r=JSON.parse(JSON.stringify([s(this,Wr),...s(this,cn).values()])),t=Uy(zy({$id:"#/definitions/".concat((n=s(this,Wr).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:r}));return JSON.stringify(t,null,2)}async compress(r){return this.encode(r).andThen(t=>this.parse(t)).andThenAsync(t=>Z3(t,s(this,Co))).then(t=>t.mapErr(n=>{var o;return Mf((o=s(this,Wr).$id)!=null?o:"CoreMVF",n,[...s(this,cn).values()])}))}async compressUnsafe(r){return this.encode(r).andThenAsync(t=>Z3(t,s(this,Co))).then(t=>t.mapErr(n=>{var o;return Mf((o=s(this,Wr).$id)!=null?o:"CoreMVF",n,[...s(this,cn).values()])}))}compressSync(r){return this.encode(r).andThen(t=>this.parse(t)).andThen(t=>H3(t,s(this,Co))).mapErr(t=>{var n;return Mf((n=s(this,Wr).$id)!=null?n:"CoreMVF",t,[...s(this,cn).values()])})}compressUnsafeSync(r){return this.encode(r).andThen(t=>H3(t,s(this,Co))).mapErr(t=>{var n;return Mf((n=s(this,Wr).$id)!=null?n:"CoreMVF",t,[...s(this,cn).values()])})}async decompress(r){return W3(r,s(this,Co)).then(t=>t.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var o;return Af((o=s(this,Wr).$id)!=null?o:"CoreMVF",n,[...s(this,cn).values()])}))}async decompressUnsafe(r){return W3(r,s(this,Co)).then(t=>t.andThen(n=>this.decode(n)).mapErr(n=>{var o;return Af((o=s(this,Wr).$id)!=null?o:"CoreMVF",n,[...s(this,cn).values()])}))}decompressSync(r){return q3(r,s(this,Co)).andThen(t=>this.parse(t)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return Af((n=s(this,Wr).$id)!=null?n:"CoreMVF",t,[...s(this,cn).values()])})}decompressUnsafeSync(r){return q3(r,s(this,Co)).andThen(t=>this.decode(t)).mapErr(t=>{var n;return Af((n=s(this,Wr).$id)!=null?n:"CoreMVF",t,[...s(this,cn).values()])})}};Wr=new WeakMap,Vd=new WeakMap,Co=new WeakMap,cn=new WeakMap;var Gy=K3;var Zd,$y=class{constructor(){D(this,Zd,[]);this.extend=this.extend.bind(this)}extend(r){return s(this,Zd).push(r),this}extendOptional(r){let t=H(w({},r),{schema:b.Partial(r.schema)});return s(this,Zd).push(t),this}build(r){return Gy.create(this,void 0,r==null?void 0:r.cspSafe)}get extensions(){return s(this,Zd)}};Zd=new WeakMap;p();p();p();p();var Hd=b.Object({geometryId:b.Ref(In),floorId:b.Ref(rt)},{$id:"GeometryAnchor"}),TG=b.Object({geometryAnchor:b.Ref(Hd)}),Ff=(e,r)=>b.Object({geometryAnchors:b.Array(b.Ref(Hd),e)},r),J3=[Hd];p();p();p();var BT=(e,r)=>b.Unsafe(b.Transform(b.String(r)).Decode(t=>e.includes(t)?t:"unknown").Encode(t=>t)),to=(e,r)=>{let t=BT(e,r),n=[...e,"unknown"],o=Object.freeze(Object.fromEntries([...e,"unknown"].map(i=>[i,i])));return{schema:t,values:n,record:o}};var _T=()=>new $y().extend(fT).extend(vT).extend(CT);p();var wG=e=>{if(e==="space"||e==="obstruction"||e==="entrance")return{}},MG=/\.json|\.geojson$/,Vy=(e,r,t)=>{let n=e[r];if(typeof n!="object"||Object.keys(n).length===0)return wG(r);let o={};for(let[i,a]of Object.entries(n)){let l=i.replace(MG,"");o[l]=JSON.parse(t(a))}return o},AG=["floorstack.json","styles.json","shapes.json","mapstack.json","floor.geojson","tileset.json","location.json","category.json","navigationFlags.json","annotation-symbols.json"],FG=AG,PG=["annotation","textAreas","enterprise","floorImages","shapeInstances","modelInstances","window","area","facade"],OG=PG,Zy=e=>{let r=new TextDecoder("utf-8"),t=r.decode.bind(r),n={"manifest.geojson":JSON.parse(t(e["manifest.geojson"])),"mapstack.geojson":JSON.parse(t(e["mapstack.geojson"])),"map.geojson":JSON.parse(t(e["map.geojson"])),"node.geojson":JSON.parse(t(e["node.geojson"])),"connection.json":JSON.parse(t(e["connection.json"])),space:Vy(e,"space",t),obstruction:Vy(e,"obstruction",t),entrance:Vy(e,"entrance",t)};for(let o of FG)e[o]&&(n[o]=JSON.parse(t(e[o])));for(let o of OG)e[o]&&(n[o]=Vy(e,o,t));return n};p();p();p();p();p();var Pf;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(Pf||(Pf={}));var LT=e=>{var o;if(e.annotations==null)return me(!0);let r=fr(e.annotations,i=>i.id,"annotations");if(r.isErr())return r;let t=Br(e),n=new Set(st((o=e.annotationSymbols)!=null?o:{}));for(let i of st(e.annotations)){let a=e.annotations[i];if(a!=null)for(let l of a){if(!n.has(l.symbolKey))return ge({kind:Pf.AnnotationUnknownSymbolError,properties:{annotationId:l.id,symbolKey:l.symbolKey}});let u=t(i,l.geometryId);if(u.isErr())return u;if(u.value.geometry.type!=="Point")return ge({kind:Pf.AnnotationNonPointGeometryError,properties:{annotationId:l.id,floorId:i,geometryId:l.geometryId}})}}return me(!0)};var RT=mr("a","AnnotationId"),Y3=b.Intersect([ti,b.Object({id:b.Ref(RT,{description:"The unique identifier for the annotation."}),externalId:b.Optional(b.String({description:"The external identifier for the annotation."})),symbolKey:b.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),NT=b.Object({url:b.String({format:"uri",description:"The URL for the symbol."}),name:b.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),kG=b.Object({annotations:hr(b.Record(rt,b.Array(b.Ref(Y3)),{additionalProperties:!1})),annotationSymbols:hr(b.Record(b.Index(Y3,["symbolKey"]),b.Ref(NT)))},{$id:"AnnotationsSchema"}),BG=/^annotations\/(.*)\.json$/,jT={name:"ext:mvf-annotations",schema:kG,intoBundle:function*(e){if(e.annotations!=null)for(let r of st(e.annotations))yield{path:"annotations/".concat(r,".json"),contents:e.annotations[r]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},fromBundle:(e,r,t)=>{var o;if(e==="annotation-symbols.json")return{annotationSymbols:t(r)};let n=(o=e.match(BG))==null?void 0:o[1];if(n)return{annotations:{[n]:t(r)}}},references:[RT,Y3,NT],integrityCheck:LT};p();p();p();var As=mr("lcat","LocationCategoryId"),X3=b.Intersect([b.Object({id:b.Ref(As),parent:b.Optional(b.Ref(As))}),Ml(["name"]),Bi],{$id:"LocationCategory"}),UT=[As,X3];p();p();var _l;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(_l||(_l={}));var zT=e=>{var o,i,a,l,u,c,d,m,h;if(e.locationCategories==null&&e.locations==null)return me(!0);if(e.locationCategories!=null){let g=fr(e.locationCategories,x=>x.id,"locationCategories");if(g.isErr())return g}if(e.locations!=null){let g=fr(e.locations,x=>x.id,"locations");if(g.isErr())return g}if(e.locationInstances!=null){let g=fr(e.locationInstances,x=>x.id,"locationInstances");if(g.isErr())return g}let r=new Set((i=(o=e.locationCategories)==null?void 0:o.map(g=>g.id))!=null?i:[]);for(let g of(a=e.locationCategories)!=null?a:[])if(g.parent!=null&&!r.has(g.parent))return ge({kind:_l.UnknownParentCategoryError,properties:{categoryId:g.id,parentCategoryId:g.parent}});let t=Br(e);for(let g of(l=e.locations)!=null?l:[]){for(let x of g.categories)if(!r.has(x))return ge({kind:_l.UnknownCategoryError,properties:{locationId:g.id,categoryId:x}});for(let x of g.geometryAnchors){let E=t(x.floorId,x.geometryId);if(E.isErr())return E}}let n=new Set((c=(u=e.locations)==null?void 0:u.map(g=>g.id))!=null?c:[]);for(let g of(d=e.locationInstances)!=null?d:[]){if(!n.has(g.parentId))return ge({kind:_l.UnknownParentLocationError,properties:{locationInstanceId:g.id,parentLocationId:g.parentId}});for(let x of(m=g.categories)!=null?m:[])if(!r.has(x))return ge({kind:_l.UnknownCategoryError,properties:{locationId:g.id,categoryId:x}});for(let x of(h=g.geometryAnchors)!=null?h:[]){let E=t(x.floorId,x.geometryId);if(E.isErr())return E}}return me(!0)};p();var Fs=mr("loc","LocationId"),Hy=mr("loci","LocationInstanceId"),GT=b.Object({name:b.String(),url:b.String({format:"uri"})},{$id:"LocationSocial"}),$T=b.Object({url:b.String({format:"uri"})},{$id:"LocationImage"}),Q3=b.Object({label:b.String(),url:b.String({format:"uri"})},{$id:"LocationLink"}),ex=b.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),VT=b.Union([b.Literal("Sunday"),b.Literal("Monday"),b.Literal("Tuesday"),b.Literal("Wednesday"),b.Literal("Thursday"),b.Literal("Friday"),b.Literal("Saturday")],{$id:"OpeningHoursDay"}),_G="PublicHolidays",tx=b.Union([VT,b.Literal(_G)],{$id:"OpeningHoursDayOrPublicHoliday"}),Wy=b.Object({"@type":b.Optional(b.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:b.Optional(b.Ref(ex,{description:"The time the opening hours start"})),closes:b.Optional(b.Ref(ex,{description:"The time the opening hours end"})),dayOfWeek:b.Optional(b.Union([b.Ref(tx),b.Array(b.Ref(tx))],{description:"The days of the week the opening hours apply to"})),validFrom:b.Optional(b.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:b.Optional(b.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),qy=b.Intersect([b.Object({id:b.Ref(Fs),categories:b.Array(b.Ref(As)),logo:b.Optional(b.String({format:"uri"})),phone:b.Optional(b.String()),social:b.Array(b.Ref(GT)),images:b.Array(b.Ref($T)),links:b.Array(b.Ref(Q3)),website:b.Optional(b.Ref(Q3)),openingHours:b.Optional(b.Array(b.Ref(Wy)))}),Ml(["name"]),Ff(),Bi],{$id:"Location"}),rx=b.Intersect([b.Object({id:b.Ref(Hy),parentId:b.Ref(Fs)}),b.Partial(b.Omit(qy,["id","parentId","details"])),yo],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),Ky=[Fs,Hy,GT,$T,Q3,ex,VT,tx,Wy,qy,rx];var LG=b.Object({locations:b.Array(b.Ref(qy)),locationCategories:b.Array(b.Ref(X3)),locationInstances:b.Optional(b.Array(b.Ref(rx)))},{$id:"LocationsExtensionSchema"}),ZT="locations.json",HT="location-categories.json",WT="location-instances.json",qT={name:"ext:locations",schema:LG,intoBundle:function*(e){e.locations!=null&&(yield{path:ZT,contents:e.locations}),e.locationCategories!=null&&(yield{path:HT,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:WT,contents:e.locationInstances})},fromBundle:(e,r,t)=>{if(e===ZT)return{locations:t(r)};if(e===HT)return{locationCategories:t(r)};if(e===WT)return{locationInstances:t(r)}},references:[...UT,...Ky],integrityCheck:zT};p();p();var _i;(function(e){e.EnterpriseLocationWithUnknownLocationError="EnterpriseLocationWithUnknownLocationError",e.EnterpriseCategoryWithUnknownLocationCategoryError="EnterpriseCategoryWithUnknownLocationCategoryError",e.InstanceWithUnknownLocationInstanceError="InstanceWithUnknownLocationInstanceError",e.InstanceWithUnknownEnterpriseLocationError="InstanceWithUnknownEnterpriseLocationError",e.EnterpriseLocationWithUnknownSibling="EnterpriseLocationWithUnknownSibling",e.EnterpriseLocationInstanceWithUnknownSibling="EnterpriseLocationInstanceWithUnknownSibling",e.EnterpriseVenueWithUnknownTopLocationError="EnterpriseVenueWithUnknownTopLocationError",e.EnterpriseLocationWithInvalidPrimaryCategory="EnterpriseLocationWithInvalidPrimaryCategory"})(_i||(_i={}));var KT=e=>{var h,g,x,E,v,I,C,S,T,A,F,P,O,_,G,L,q,$,K,X;if(e.cms==null)return me(!0);let r=e.cms,t=fr(e.cms.categories,V=>V.id,"cms.categories");if(t.isErr())return t;let n=new Set((g=(h=e.locationCategories)==null?void 0:h.map(V=>V.id))!=null?g:[]);for(let V of(x=r.categories)!=null?x:[])if(!n.has(V.categoryId))return ge({kind:_i.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:V.id,locationCategoryId:V.categoryId}});let o=fr(e.cms.locations,V=>V.id,"cms.locations");if(o.isErr())return o;let i=new Map((v=(E=e.locations)==null?void 0:E.map(V=>[V.id,V]))!=null?v:[]);for(let V of(I=r.locations)!=null?I:[]){if(!i.has(V.locationId))return ge({kind:_i.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:V.id,locationId:V.locationId}});for(let Y of(C=V.siblingGroups)!=null?C:[])for(let ee of(S=Y.siblings)!=null?S:[])if(!i.has(ee))return ge({kind:_i.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:V.id,siblingLocationId:ee,label:Y.label}});if(V.primaryCategory!=null){let Y=i.get(V.locationId);if(Y!=null&&!Y.categories.includes(V.primaryCategory))return ge({kind:_i.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:V.id,locationId:V.locationId,primaryCategory:V.primaryCategory}})}}if(((T=r.venue)==null?void 0:T.topLocations)!=null){for(let V of r.venue.topLocations)if(!i.has(V))return ge({kind:_i.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:V}})}let a=new Set((F=(A=e.cms.locations)==null?void 0:A.map(V=>V.id))!=null?F:[]),l=fr(e.cms.locationInstances,V=>V.id,"cms.locationInstances");if(l.isErr())return l;let u=new Set((O=(P=e.locationInstances)==null?void 0:P.map(V=>V.id))!=null?O:[]);for(let V of(_=r.locationInstances)!=null?_:[]){if(!a.has(V.parentId))return ge({kind:_i.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:V.id,enterpriseLocationId:V.parentId}});if(!u.has(V.locationInstanceId))return ge({kind:_i.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:V.id,locationInstanceId:V.locationInstanceId}});for(let Y of(G=V.siblingGroups)!=null?G:[])for(let ee of(L=Y.siblings)!=null?L:[])if(!i.has(ee))return ge({kind:_i.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:V.id,siblingLocationId:ee,label:Y.label}})}let c=ki(e),d=Br(e),m=fr(e.cms.floorText,V=>V.properties.id,"cms.floorText");if(m.isErr())return m;for(let[V,Y]of ft((q=r.floorText)!=null?q:{})){let ee=c(V);if(ee.isErr())return ee;for(let oe of Y.features){if(!("geometryId"in oe.properties))continue;let le=d(V,oe.properties.geometryId);if(le.isErr())return le}}for(let[V,Y]of ft(($=r.textures)!=null?$:{})){let ee=c(V);if(ee.isErr())return ee;for(let oe of Y){let le=d(V,oe.geometryId);if(le.isErr())return le}}for(let[V,Y]of ft((K=r.layers)!=null?K:{})){let ee=c(V);if(ee.isErr())return ee;for(let oe of st(Y!=null?Y:{})){let le=d(V,oe);if(le.isErr())return le}}for(let[V,Y]of ft((X=r.textAreas)!=null?X:{})){let ee=c(V);if(ee.isErr())return ee;for(let oe of Y.features)if("geometryId"in oe.properties){let le=d(V,oe.properties.geometryId);if(le.isErr())return le}}return me(!0)};p();p();var Of=mr("el","EnterpriseLocationId"),nx=mr("ec","EnterpriseCategoryId"),ox=mr("eli","EnterpriseLocationInstanceId"),ix=mr("ev","EnterpriseVenueId"),ax=mr("eft","EnterpriseFloorTextId"),JT=[Of,nx,ox,ix,ax];var YT=b.Object({id:b.Ref(nx),categoryId:b.Ref(As),color:b.Optional(b.String()),sortOrder:b.Number(),iconFromDefaultList:b.Optional(b.Union([b.String(),b.Null()])),picture:b.Optional(b.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),sx=b.Object({categories:b.Optional(b.Array(b.Ref(YT)))},{$id:"EnterpriseCategoriesSchema"}),XT=[YT,sx];p();var QT=to(["left","center","right"]),RG=QT.schema,a4e=QT.values,ux=b.Object({id:b.Ref(ax),text:b.String(),visible:b.Boolean({default:!0}),fontSize:b.Number({default:12,exclusiveMinimum:0}),fontFamily:b.String({default:"Droid Sans"}),color:b.String({default:"black"}),rotation:b.Number({minimum:0,maximum:360}),align:RG},{$id:"FloorTextCommonProperties"}),lx=b.Intersect([b.Ref(ux),ti],{$id:"AnchoredFloorTextProperties"}),cx=b.Intersect([b.Ref(ux),b.Object({verticalOffset:b.Number()})],{$id:"FloatingFloorTextProperties"}),e7=b.Union([b.Ref(lx),b.Ref(cx)],{$id:"FloorTextProperties"}),t7=on(xn,b.Ref(e7),{$id:"FloorTextFeature"}),NG=on(xn,b.Ref(lx),{$id:"AnchoredFloorTextFeature"}),jG=on(xn,b.Ref(cx),{$id:"FloatingFloorTextFeature"}),r7=kn(b.Ref(t7),{$id:"EnterpriseFloorTextFeatureCollection"}),n7=b.Record(rt,b.Ref(r7),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),dx=b.Object({floorText:b.Optional(b.Ref(n7))},{$id:"EnterpriseFloorTextSchema"}),o7=[ux,lx,cx,e7,t7,NG,jG,r7,n7,dx];p();var i7=hr(b.Record(In,b.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),a7=hr(b.Record(rt,b.Ref(i7),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),px=b.Object({layers:b.Optional(b.Ref(a7))},{$id:"EnterpriseLayersSchema"}),s7=[i7,a7,px];p();p();p();var mx=to(["closed-temporarily","new","pop-up","coming-soon","relocated"]),UG=mx.schema,y4e=mx.values,b4e=mx.record,fx=b.Object({type:UG,start:b.Optional(b.String({format:"date",description:"The start date of the state"})),end:b.Optional(b.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),hx=b.Object({label:b.String(),siblings:b.Array(b.Ref(Fs))},{$id:"SiblingGroup"}),Jy=b.Object({name:b.String(),code:b.String()},{$id:"Language"}),u7=[fx,hx,Jy];var Yy=b.Object({id:b.Ref(Of),locationId:b.Ref(Fs),cmsId:b.String(),type:b.String(),sortOrder:b.Number(),tags:b.Optional(b.Array(b.String())),picture:b.Optional(b.String({format:"uri",description:"The picture of the location"})),states:b.Optional(b.Array(b.Ref(fx),{description:"The location's state. No more than one state should be active at a time, and all but at most one should have dates set"})),siblingGroups:b.Optional(b.Array(b.Ref(hx))),gallery:b.Optional(b.Array(b.Object({caption:b.Optional(b.String()),image:b.String({format:"uri"}),embeddedUrl:b.Optional(b.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:b.Optional(b.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:b.Optional(b.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:b.Optional(b.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:b.Optional(b.Ref(As))},{$id:"EnterpriseLocation"}),gx=b.Object({locations:b.Optional(b.Array(b.Ref(Yy)))},{$id:"EnterpriseLocationsSchema"}),l7=[Yy,gx];var c7=b.Intersect([b.Object({id:b.Ref(ox),parentId:b.Ref(Of),locationInstanceId:b.Ref(Hy)}),b.Partial(b.Omit(Yy,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),yx=b.Object({locationInstances:b.Optional(b.Array(b.Ref(c7)))},{$id:"EnterpriseLocationInstancesSchema"}),d7=[c7,yx];p();var bx=to(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),p7=bx.schema,R4e=bx.values,N4e=bx.record,vx=b.Object({maxWidth:b.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:b.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:b.Ref(p7),rotation:b.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),m7=b.Intersect([b.Ref(vx),ti],{$id:"EnterpriseAnchoredTextAreaProperties"}),f7=b.Intersect([b.Ref(vx),b.Object({verticalOffset:b.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),h7=b.Union([m7,f7],{$id:"EnterpriseTextAreaProperties"}),g7=on(b.Ref(xn),h7,{$id:"EnterpriseTextAreaFeature"}),y7=kn(b.Ref(g7),{$id:"EnterpriseTextAreaCollection"}),b7=b.Record(rt,b.Ref(y7),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),v7=b.Object({textAreas:b.Optional(b.Ref(b7))},{$id:"EnterpriseTextAreasSchema"}),x7=[p7,vx,m7,f7,h7,g7,y7,b7];p();var xx=b.Object({u:b.Number(),v:b.Number()},{$id:"EnterpriseTextureUV"}),Ix=to(["top","side"],{$id:"EnterpriseTextureFace"}),I7=Ix.schema,$4e=Ix.values,V4e=Ix.record,Ex=to(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),E7=Ex.schema,Z4e=Ex.values,H4e=Ex.record,C7=b.Tuple([Id,Ed,Id,Ed],{$id:"EnterpriseTextureBounds"}),S7=b.Intersect([b.Object({repeat:b.Ref(xx),offset:b.Ref(xx),rotation:b.Number({minimum:0,maximum:360}),path:b.String({format:"uri"}),face:b.Ref(I7),surface:b.Ref(E7),bounds:b.Ref(C7)},{$id:"EnterpriseTextureProperties"}),ti],{$id:"EnterpriseTexture"}),D7=b.Array(b.Ref(S7),{$id:"EnterpriseTextures"}),T7=b.Record(rt,b.Ref(D7),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),Cx=b.Object({textures:b.Optional(b.Ref(T7))},{$id:"EnterpriseTexturesSchema"}),w7=[S7,D7,Cx,xx,I7,E7,C7,T7];p();var M7=b.Intersect([b.Object({id:b.Ref(ix),slug:b.String(),defaultLanguage:b.Ref(Jy),languages:b.Array(b.Ref(Jy)),countrycode:b.Optional(b.String()),logo:b.Optional(b.String({format:"uri"})),mappedinWebUrl:b.Optional(b.String({format:"uri"})),topLocations:b.Optional(b.Array(b.Ref(Fs))),operationHours:b.Optional(b.Array(b.Ref(Wy))),coverImage:b.Optional(b.String({format:"uri"}))}),Ml(["name"]),Bi],{$id:"EnterpriseVenue"}),Sx=b.Object({venue:b.Optional(b.Ref(M7))},{$id:"EnterpriseVenueSchema"}),A7=[M7,Sx];var P7=b.Intersect([Sx,gx,yx,sx,Cx,dx,px,v7],{$id:"CMSProperties"}),F7=b.Object({cms:b.Optional(b.Ref(P7))},{$id:"CMSExtensionSchema"}),zG=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,O7={name:"ext:cms",schema:F7,intoBundle:function*(e){var t,n,o,i,a,l;if(e.cms==null)return;let r=e.cms;for(let u of st(r))switch(u){case"floorText":for(let c of st((t=r.floorText)!=null?t:{}))yield{path:"cms/floorText/".concat(c,".geojson"),contents:((n=r.floorText)!=null?n:{})[c]};continue;case"textures":for(let c of st((o=r.textures)!=null?o:{}))yield{path:"cms/textures/".concat(c,".json"),contents:((i=r.textures)!=null?i:{})[c]};continue;case"textAreas":for(let c of st((a=r.textAreas)!=null?a:{}))yield{path:"cms/textAreas/".concat(c,".geojson"),contents:((l=r.textAreas)!=null?l:{})[c]};continue;default:yield{path:"cms/".concat(u,".json"),contents:r[u]};continue}},fromBundle:(e,r,t)=>{let n=e.match(zG);if(!n)return;let[,o,i]=n,a=t(r);switch(o){case"floorText":case"textures":case"textAreas":return{cms:{[o]:{[i]:a}}};default:return{cms:{[i]:a}}}},references:[P7,F7,...A7,...l7,...d7,...XT,...w7,...s7,...o7,...x7,...JT,...u7,...Ky],integrityCheck:KT};p();p();p();p();var Li;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Li||(Li={}));var k7=e=>{let{navigationFlags:r}=e;if(!r||Object.keys(r).length===0)return me(!0);let t=Object.entries(r).map(([i,a])=>w({key:i},a)).sort((i,a)=>i.index!==a.index?i.index-a.index:i.bit-a.bit),n=0,o=-1;for(let i of t){if(i.bit===o)return ge({kind:Li.NavigationFlagDuplicateBit,properties:{index:i.index,bit:i.bit,path:"navigationFlags.".concat(i.key)}});if(i.index!=n){if(o!=31)return ge({kind:Li.NavigationFlagMissingDeclaration,properties:{index:n,bit:o+1,path:"navigationFlags"}});if(i.index!=n+1||i.bit!=0)return ge({kind:Li.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=i.index,o=0}else{if(i.bit!==o+1)return ge({kind:Li.NavigationFlagMissingDeclaration,properties:{index:i.index,bit:o+1,path:"navigationFlags"}});o=i.bit}}return me(!0)};p();function Ou(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}p();var B7=2**32-1,kf=e=>{var o;let r=Object.keys((o=e.navigationFlags)!=null?o:{}).length;if(r===0)return{index:-1,flag:0};let t=Math.floor(r/32),n=r%32;return{index:t,flag:2**n-1}},Wd=(e,r,t)=>{if(r.index==-1&&e.length===0)return me(!0);let n=r.flag>0||r.index===-1?r.index+1:r.index;if(e.length!==n)return ge({kind:Li.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:t}});for(let o=0;o<e.length;o++){let i=e[o];if(o<r.index){if(i>B7)return ge({kind:Li.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:B7,path:t}});continue}else if(i>r.flag)return ge({kind:Li.NavigationFlagValueTooBig,properties:{index:o,flagValue:i,expectedMaxFlagValue:r.flag,path:t}})}return me(!0)};var GG=b.Object({index:b.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:b.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),_7=b.Intersect([GG,yo],{$id:"NavigationFlagDeclaration",description:'A NavigationFlagDeclaration describes the relationship between a "key" that a developer might use to wayfind using that flag, and the index and bit position in an object\'s `flags` array.'}),Dx={accessible:"accessible",outdoors:"outdoors",public:"public"},L7=b.Record(b.String(),_7,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),$G=b.Object({navigationFlags:b.Ref(L7)},{$id:"NavigationFlagsSchema"}),Xy=b.Array(b.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),Tx=b.Object({flags:b.Ref(Xy)},{$id:"WithFlags"}),Ll=b.Intersect([Hd,Tx],{$id:"FlaggedGeometryAnchor"}),VG=b.Object({geometryAnchor:Ll},{$id:"WithFlaggedGeometryAnchor"}),ZG=b.Object({geometryAnchors:b.Array(Ll)},{$id:"WithFlaggedGeometryAnchors"}),R7={name:"ext:mvf-navigation-flags",schema:$G,intoBundle:function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},fromBundle:(e,r,t)=>e!=="navigationFlags.json"?void 0:{navigationFlags:t(r)},references:[_7,L7,Xy,Ll,VG,ZG],integrityCheck:k7};p();var N7=e=>{if(e.connections==null)return me(!0);let r=fr(e.connections,o=>o.id,"connections");if(r.isErr())return r;let t=Br(e),n=kf(e);for(let[o,i]of e.connections.entries()){for(let[a,l]of i.entrances.entries()){let u=t(l.floorId,l.geometryId);if(u.isErr())return u;let c=Wd(l.flags,n,"connections[".concat(o,"].entrances[").concat(a,"]"));if(c.isErr())return c}for(let[a,l]of i.exits.entries()){let u=t(l.floorId,l.geometryId);if(u.isErr())return u;let c=Wd(l.flags,n,"connections[".concat(o,"].exits[").concat(a,"]"));if(c.isErr())return c}}return me(!0)};var U7=mr("c","ConnectionId"),{schema:HG,values:Jbe,record:WG}=to(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),z7=HG;var wx=WG,G7=b.Intersect([b.Object({id:b.Ref(U7,{description:"The unique identifier for the connection."}),entrances:b.Array(b.Ref(Ll)),exits:b.Array(b.Ref(Ll)),entryCost:b.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:b.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:b.Ref(z7,{description:"The type of connection."})}),yo,Bi],{$id:"ConnectionsProperties"}),$7=b.Array(b.Ref(G7),{$id:"ConnectionsCollection"}),qG=b.Object({connections:b.Ref($7)},{$id:"ConnectionsExtensionSchema"}),j7="connections.json",V7={name:"ext:connections",schema:qG,intoBundle:function*(e){e.connections!=null&&(yield{path:j7,contents:e.connections})},fromBundle:(e,r,t)=>{if(e===j7)return{connections:t(r)}},references:[G7,$7,z7,U7,Ll,Xy],integrityCheck:N7};p();p();var Z7=e=>{if(e.defaultStyle==null)return me(!0);let r=Br(e);for(let t of Object.values(e.defaultStyle))if(t!=null)for(let n of t.geometryAnchors){let o=r(n.floorId,n.geometryId);if(o.isErr())return o}return me(!0)};var H7=b.Intersect([Ff(),Bi,b.Object({altitude:b.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:b.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:b.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:b.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:b.Number({description:"The buffer amount to apply to the geometry, in meters. This can be used to inflate line string geometry for walls, but might also be applicable as a way to grow or shrink polygon geometry for aesthetic purposes. Can be negative."}),hidden:b.Optional(b.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),W7=b.Record(b.String(),b.Ref(H7),{$id:"DefaultStyleCollection",additionalProperties:!1}),KG=b.Object({defaultStyle:b.Ref(W7)},{$id:"DefaultStyleSchema"}),q7={name:"ext:mvf-default-style",schema:KG,intoBundle:function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},fromBundle:(e,r,t)=>{if(e==="default-style.json")return{defaultStyle:t(r)}},references:[H7,W7],integrityCheck:Z7};p();p();p();p();var Qy;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Qy||(Qy={}));var K7=e=>{if(e.floorStacks==null)return me(!0);let r=fr(e.floorStacks,n=>n.id,"floorStacks");if(r.isErr())return r;let t=ki(e);for(let n of e.floorStacks){for(let o of n.floors){let i=t(o);if(i.isErr())return i}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return ge({kind:Qy.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return me(!0)};var Bf=mr("fs","FloorStackId"),Y7=b.Intersect([b.Object({id:b.Ref(Bf,{description:"The unique identifier for the floor stack."}),floors:b.Array(b.Ref(rt),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:b.Optional(b.Ref(rt,{description:"The default floor for the floor stack."}))}),yo],{$id:"FloorStacksProperties"}),X7=b.Array(b.Ref(Y7),{$id:"FloorStackCollection"}),JG=b.Object({floorStacks:b.Ref(X7)},{$id:"FloorStackExtensionSchema"}),J7="floor-stacks.json",Q7={name:"ext:floor-stacks",schema:JG,intoBundle:function*(e){e.floorStacks!=null&&(yield{path:J7,contents:e.floorStacks})},fromBundle:(e,r,t)=>{if(e===J7)return{floorStacks:t(r)}},references:[Bf,Y7,X7],integrityCheck:K7};p();p();var _f;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(_f||(_f={}));var ew=e=>{if(e.facade==null)return me(!0);if(e.floorStacks==null)return ge({kind:_f.MissingFloorStackError,properties:null});let r=new Set(e.floorStacks.map(o=>o.id)),t=Br(e),n=ki(e);for(let[o,i]of ft(e.facade)){if(i==null)continue;let a=n(o);if(a.isErr())return a;for(let l of i){let{floorStackId:u,geometryIds:c}=l;if(!r.has(u))return ge({kind:_f.UnknownFloorStackError,properties:{floorStackId:u}});for(let d of c){let m=t(o,d);if(m.isErr())return m}}}return me(!0)};var tw=b.Intersect([b.Object({floorStackId:b.Ref(Bf)}),zd],{$id:"Facade"}),YG=b.Object({facade:hr(b.Record(rt,b.Array(b.Ref(tw)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),XG=/^facade\/(.*)\.json$/,rw={name:"ext:facade",schema:YG,intoBundle:function*(e){if(e.facade!=null)for(let r of st(e.facade))yield{path:"facade/".concat(r,".json"),contents:e.facade[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(XG))==null?void 0:o[1];if(n)return{facade:{[n]:t(r)}}},references:[Bf,tw],integrityCheck:ew};p();p();var nw=e=>{if(e.floorImages==null)return me(!0);let r=Br(e);for(let[t,n]of ft(e.floorImages))if(n!=null)for(let o of n.features){if(!("geometryId"in o.properties))continue;let i=o.properties.geometryId,a=r(t,i);if(a.isErr())return a}return me(!0)};var Mx=b.Object({path:b.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:b.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:b.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:b.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),ow=b.Intersect([b.Ref(Mx),ti],{$id:"AnchoredFloorImageProperties"}),iw=b.Intersect([b.Ref(Mx),b.Object({verticalOffset:b.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),aw=b.Union([ow,iw],{$id:"FloorImageProperties"}),sw=on(b.Ref(xn),aw,{$id:"FloorImageFeature"}),uw=kn(b.Ref(sw),{$id:"FloorImageCollection"}),QG=b.Object({floorImages:hr(b.Record(rt,b.Ref(uw),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),e$=/^floorImages\/(.*)\.geojson$/,lw={name:"ext:floor-images",schema:QG,intoBundle:function*(e){if(e.floorImages!=null)for(let r of st(e.floorImages))yield{path:"floorImages/".concat(r,".geojson"),contents:e.floorImages[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(e$))==null?void 0:o[1];if(n)return{floorImages:{[n]:t(r)}}},references:[Mx,ow,iw,aw,sw,uw],integrityCheck:nw};p();p();var cw=e=>{if(e.kinds==null)return me(!0);let r=Br(e);for(let[t,n]of ft(e.kinds))if(n!=null)for(let o of st(n)){let i=r(t,o);if(i.isErr())return i}return me(!0)};var{values:u3e,schema:t$,record:l3e}=to(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),dw=t$;var pw=hr(b.Record(In,b.Ref(dw),{additionalProperties:!1,$id:"GeometryKinds"})),r$=b.Object({kinds:hr(b.Record(rt,b.Ref(pw),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),n$=/^kinds\/(.*)\.json$/,mw={name:"ext:kinds",schema:r$,intoBundle:function*(e){if(e.kinds!=null)for(let r of st(e.kinds))yield{path:"kinds/".concat(r,".json"),contents:e.kinds[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(n$))==null?void 0:o[1];if(n)return{kinds:{[n]:t(r)}}},references:[dw,pw],integrityCheck:cw};p();p();p();var Lf;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(Lf||(Lf={}));var fw=e=>{if(e.nodes==null)return me(!0);let r=fr(e.nodes,o=>o.properties.id,"nodes");if(r.isErr())return r;let t=Br(e),n=kf(e);for(let[o,i]of ft(e.nodes)){if(i==null)continue;let a=new Set(i.features.map(l=>l.properties.id));for(let[l,u]of i.features.entries()){for(let c of u.properties.geometryIds){let d=t(o,c);if(d.isErr())return d}for(let[c,d]of u.properties.neighbors.entries()){if(!a.has(d.id))return ge({kind:Lf.UnknownNeighbor,properties:{floorId:o,nodeId:u.properties.id,neighborId:d.id}});if(d.id===u.properties.id)return ge({kind:Lf.SelfReference,properties:{floorId:o,nodeId:u.properties.id}});let m=Wd(d.flags,n,'nodes["'.concat(o,'"].features[').concat(l,"].properties.neighbors[").concat(c,"]"));if(m.isErr())return m}}}return me(!0)};var Ax=mr("n","NodeId"),hw=b.Intersect([b.Object({id:b.Ref(Ax,{description:"The unique identifier for the node."}),extraCost:b.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),Tx],{$id:"NodeNeighbor"}),gw=b.Intersect([b.Object({id:b.Ref(Ax,{description:"The unique identifier for the node."}),neighbors:b.Array(b.Ref(hw),{description:"The neighbors of the node."})}),zd],{$id:"NodeProperties"}),yw=on(b.Ref(xn),gw,{$id:"NodeFeature"}),bw=kn(b.Ref(yw),{$id:"NodeCollection"}),o$=b.Object({nodes:hr(b.Record(rt,b.Ref(bw),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),i$=/^nodes\/(.*)\.(geo)?json$/,vw={name:"ext:nodes",schema:o$,intoBundle:function*(e){if(e.nodes!=null)for(let r of st(e.nodes))yield{path:"nodes/".concat(r,".geojson"),contents:e.nodes[r]}},fromBundle:(e,r,t)=>{var o;let n=(o=e.match(i$))==null?void 0:o[1];if(n)return{nodes:{[n]:t(r)}}},references:[Ax,hw,gw,yw,bw],integrityCheck:fw};p();p();p();var e1;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(e1||(e1={}));var xw=e=>{if(e.outdoors==null)return me(!0);let r=ki(e);for(let t of e.outdoors.floors){let n=r(t);if(n.isErr())return n;if(e.floorStacks!=null){for(let o of e.floorStacks)if(o.floors.includes(t))return ge({kind:e1.FloorInFloorStackError,properties:{floorId:t,floorStackId:o.id}})}}return me(!0)};var Ew=b.Object({floors:b.Array(b.Ref(rt),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),a$=b.Object({outdoors:b.Ref(Ew)},{$id:"OutdoorsExtensionSchema"}),Iw="outdoors.json",Cw={name:"ext:outdoors",schema:a$,intoBundle:function*(e){e.outdoors!=null&&(yield{path:Iw,contents:e.outdoors})},fromBundle:(e,r,t)=>{if(e===Iw)return{outdoors:t(r)}},references:[Ew],integrityCheck:xw};p();p();p();var t1;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(t1||(t1={}));var Sw=e=>{if(e.tileset==null)return me(!0);let r=new Set;if(r.add(e.tileset.default.key),e.tileset.others)for(let t of e.tileset.others){if(r.has(t.key))return ge({kind:t1.TilesetDuplicateKeyError,properties:{key:t.key}});r.add(t.key)}return me(!0)};var Fx=b.Object({key:b.String({minLength:1,description:"Unique identifier for the tileset style."}),name:b.String({minLength:1,description:"Display name of the tileset style."}),url:b.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),Dw=b.Object({default:b.Ref(Fx,{description:"The default tileset style, which should be used."}),others:b.Optional(b.Array(b.Ref(Fx,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),s$=b.Object({tileset:b.Ref(Dw)},{$id:"TilesetExtensionSchema"}),Tw={name:"ext:mvf-tileset",schema:s$,intoBundle:function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},fromBundle:(e,r,t)=>{if(e==="tileset.json")return{tileset:t(r)}},references:[Fx,Dw],integrityCheck:Sw};p();var ww=b.Object({},{$id:"WalkableProperties"}),Mw=b.Object({},{$id:"NonWalkableProperties"}),Aw=hr(b.Record(In,b.Ref(ww),{$id:"WalkableGeometries",additionalProperties:!1})),Fw=hr(b.Record(In,b.Ref(Mw),{$id:"NonWalkableGeometries",additionalProperties:!1})),u$=b.Object({walkable:hr(b.Record(rt,b.Ref(Aw),{additionalProperties:!1})),nonwalkable:hr(b.Record(rt,b.Ref(Fw),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),l$=/^walkable\/(.*)\.json$/,c$=/^nonwalkable\/(.*)\.json$/,Pw={name:"ext:mvf-traversability",schema:u$,intoBundle:function*(e){if(e.walkable!=null)for(let r of st(e.walkable))yield{path:"walkable/".concat(r,".json"),contents:e.walkable[r]};if(e.nonwalkable!=null)for(let r of st(e.nonwalkable))yield{path:"nonwalkable/".concat(r,".json"),contents:e.nonwalkable[r]}},fromBundle:(e,r,t)=>{var i,a;let n=(i=e.match(l$))==null?void 0:i[1];if(n!=null)return{walkable:{[n]:t(r)}};let o=(a=e.match(c$))==null?void 0:a[1];if(o!=null)return{nonwalkable:{[o]:t(r)}}},references:[ww,Mw,Aw,Fw]};p();p();function Ow(e){return e.replace(/^g_/,"s_")}function r1(e){return e.replace(/^g_/,"o_")}function d$(e){return e.replace(/^g_/,"w_")}function kw(e){return e.replace(/^loci_/,"eli_")}function Rf(e){return e.replace(/^loc_/,"el_")}function n1(e){return e.replace(/^lcat_/,"ec_")}function p$(e){return e.replace(/^g_/,"ar_")}function Bw(e){return e.replace(/^n_/,"s_")}function m$(e,r,t){switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":{let n=[],o=0,i=e.geometry.type.replace("Multi","");for(let a of e.geometry.coordinates)n.push(H(w({},e),{geometry:{type:i,coordinates:a},properties:H(w({},e.properties),{id:"".concat(r,"-").concat(o++),kind:t})}));return n}default:return[H(w({},e),{properties:H(w({},e.properties),{id:r,kind:t})})]}}function qd(e,r,t,n){let o=new Map;for(let{feature:i,floorId:a}of e){let l=i.properties.id,u=n.get(l);if(r.has(l)){let c=m$(i,t(l),u),d=c.map(h=>h.properties.id),m=d.map(h=>({geometryId:h,floorId:a}));o.set(l,{ids:d,features:c,anchors:m})}}return o}function _w(e){var c,d;let r={space:new Map,obstruction:new Map,area:new Map,window:new Map,object:new Map};if(!e.geometry)return r;let t=f$(e),n=ft(e.geometry).flatMap(([m,h])=>{var g;return((g=h==null?void 0:h.features)!=null?g:[]).map(x=>({feature:x,floorId:m}))}).flat(),o=new Set(Object.values((c=e.walkable)!=null?c:{}).filter(m=>m!==void 0).flatMap(st)),i=new Set(Object.values((d=e.nonwalkable)!=null?d:{}).filter(m=>m!==void 0).flatMap(st)),a=new Set(Array.from(t.entries()).filter(([m,h])=>h==="area").map(([m])=>m)),l=new Set(Array.from(t.entries()).filter(([m,h])=>h==="object").map(([m])=>m)),u=new Set(Array.from(t.entries()).filter(([m,h])=>h==="window").map(([m])=>m));return o.size>0&&(r.space=qd(n,o,Ow,t)),i.size>0&&(r.obstruction=qd(n,i,r1,t)),a.size>0&&(r.area=qd(n,a,p$,t)),l.size>0&&(r.object=qd(n,l,r1,t)),u.size>0&&(r.window=qd(n,u,d$,t)),o.size===0&&i.size===0&&a.size===0&&(r.space=qd(n,new Set(n.map(m=>m.feature.properties.id)),Ow,t)),r}function f$(e){var t,n,o;let r=new Map(Object.values((t=e.kinds)!=null?t:{}).filter(i=>i!==void 0).flatMap(ft));for(let i of(o=(n=e.connections)==null?void 0:n.filter(a=>a.type!=="door"))!=null?o:[]){for(let a of i.entrances)r.set(a.geometryId,"connection.".concat(i.type));for(let a of i.exits)r.set(a.geometryId,"connection.".concat(i.type))}return r}function Lw(e){if(!e||e.length===0)return[];let r=Math.max(...e.map(t=>t.length));return e.reduce((t,n)=>t.map((o,i)=>{var a;return o|((a=n[i])!=null?a:0)}),Array(r).fill(0))}function Rw(e){var u;let{nodesByGeometryId:r,incomingEdgesByNodeId:t,nodesById:n}=h$(e),o=_w(e),i=g$(e),a=(u=e.navigationFlags)!=null?u:{};return{geometryMaps:o,nodesByGeometryId:r,geometryFeatureById:i,navigationFlags:a,incomingEdgesByNodeId:t,nodesById:n}}function h$(e){var o,i,a;let r=new Map,t=new Map,n=new Map;for(let l of Object.values((o=e.nodes)!=null?o:{}))for(let u of(i=l==null?void 0:l.features)!=null?i:[]){if(n.set(u.properties.id,u),u.properties.geometryIds.length>0)for(let c of u.properties.geometryIds){let d=(a=r.get(c))!=null?a:[];d.push(u.properties.id),r.set(c,d)}if(u.properties.neighbors.length>0)for(let c of u.properties.neighbors){let d=t.get(c.id);d!=null?d.push(c):t.set(c.id,[c])}}return{nodesByGeometryId:r,incomingEdgesByNodeId:t,nodesById:n}}function g$(e){var t,n;let r=new Map;for(let o of Object.values((t=e.geometry)!=null?t:{}))for(let i of(n=o==null?void 0:o.features)!=null?n:[])r.set(i.properties.id,i);return r}p();function Nw(e,r){if(!e.annotations||!e.annotationSymbols||!e.geometry)return{};let t={};for(let[n,o]of ft(e.annotations)){if(!o||o.length===0||!e.geometry[n]||e.geometry[n].features.length===0)continue;let i=new Map(e.geometry[n].features.map(l=>[l.properties.id,l])),a={type:"FeatureCollection",features:[]};for(let l of o){let u=i.get(l.geometryId);if(!u||u.geometry.type!=="Point")continue;let c={id:l.id,externalId:l.externalId,symbolId:l.symbolKey};a.features.push({type:"Feature",geometry:u.geometry,properties:c})}t[n]=a}return{annotation:t}}p();function jw(e,{nodesByGeometryId:r}){var a,l,u,c,d,m,h;let t={"connection.json":[],entrance:{}},n=(a=e.navigationFlags)==null?void 0:a[Dx.accessible],o=(l=e.navigationFlags)==null?void 0:l[Dx.outdoors],i=new Map(Object.values((u=e.geometry)!=null?u:{}).flatMap(g=>{var x;return(x=g==null?void 0:g.features)!=null?x:[]}).map(g=>[g.properties.id,g]));for(let g of(c=e.connections)!=null?c:[]){if(Px(g,i)&&!y$(g)){let C=b$(g,i,r,o);for(let[S,T]of C)t.entrance[S]||(t.entrance[S]={type:"FeatureCollection",features:[]}),t.entrance[S].features.push(T);continue}let x=n!=null&&g.entrances.some(C=>Ou(C,n))&&g.exits.some(C=>Ou(C,n)),E=Array.from(new Set([...g.entrances.map(C=>r.get(C.geometryId)),...g.exits.map(C=>r.get(C.geometryId))].flat().filter(C=>C!=null))),v=Lw([...g.entrances.map(C=>C.flags),...g.exits.map(C=>C.flags)]),I={id:g.id,externalId:(m=(d=g.details)==null?void 0:d.externalId)!=null?m:"",type:g.type,accessible:x,nodes:E,flags:v};(h=g.details)!=null&&h.name&&(I.details={name:g.details.name}),g.extra&&(I.extra=g.extra),t["connection.json"].push(I)}return t}function Px(e,r){return e.type==wx.door&&e.entrances.every(t=>{let n=r.get(t.geometryId);return(n==null?void 0:n.geometry.type)==="LineString"})}function y$(e){return e.entrances.length===0||e.exits.length===0?!1:new Set([...e.entrances.map(t=>t.floorId),...e.exits.map(t=>t.floorId)]).size>=2}function b$(e,r,t,n){var i,a;if(e.type!==wx.door)return[];let o=[];for(let l of e.entrances){let u=r.get(l.geometryId);if((u==null?void 0:u.geometry.type)==="LineString"){let c={type:"Feature",geometry:u.geometry,properties:{id:e.id,externalId:(a=(i=e.details)==null?void 0:i.externalId)!=null?a:"",isExterior:v$(e,n)}},d=e.details;d&&(c.properties.details={name:d.name,description:d.description},d.icon&&(c.properties.details.images=[{url:d.icon,altText:"".concat(d.name," icon")}]));let m=t.get(l.geometryId);m&&m.length>0&&(c.properties.node=m[0]),o.push([l.floorId,c])}}return o}function v$(e,r){return e.entrances.some(t=>Ou(t,r))||e.exits.some(t=>Ou(t,r))}p();function zw(e,{geometryMaps:r,nodesByGeometryId:t}){var S,T,A,F,P,O,_,G,L,q,$,K,X,V,Y,ee,oe,le,ve,he,de,Fe,ce,Pe,He,bt,B,re,R,ue,ie,se,Le,Et,Ce,xe,We,Gr,xi,ca,po,da,Ii,_o,ml,Gc,mu,Ei;let n={categories:[],locations:[],locationInstances:[],layers:[],venue:{slug:"",name:"",externalId:"",defaultLanguage:{name:"English",code:"en"},languages:[]}},o=(S=e.manifest)==null?void 0:S.features[0];o&&(n.venue.defaultFloor=o.properties.defaultFloor,n.venue.tzid=o.properties.tzid,n.venue.name=o.properties.name,n.venue.defaultLanguage={name:(T=o.properties.language)!=null?T:"English",code:(A=o.properties.language)!=null?A:"en"});let i=(F=e.cms)==null?void 0:F.venue;i&&(n.venue=H(w({},n.venue),{slug:i.slug,name:(_=(O=(P=i.details)==null?void 0:P.name)!=null?O:n.venue.name)!=null?_:o.properties.name,externalId:(L=(G=i.details)==null?void 0:G.externalId)!=null?L:"",defaultLanguage:i.defaultLanguage,languages:(q=i.languages)!=null?q:[],countrycode:i.countrycode,coverImage:i.coverImage,logo:i.logo,icon:($=i.details)==null?void 0:$.icon,extra:i.extra,mappedinWebUrl:i.mappedinWebUrl,operationHours:i.operationHours,topLocations:i.topLocations}));let a=new Map,l=(K=e.locations)!=null?K:[],u=(V=(X=e.cms)==null?void 0:X.locations)!=null?V:[],c=(ee=(Y=e.cms)==null?void 0:Y.categories)!=null?ee:[],d=new Map((c!=null?c:[]).map(Vt=>[Vt.categoryId,Vt]));if(l.length>0){let Vt=new Map(u.map(Ae=>[Ae.locationId,Ae]));for(let Ae of l){let ye=(oe=Vt.get(Ae.id))!=null?oe:{};if(Ae){let ke=Ae.details,Ne={id:(ye==null?void 0:ye.cmsId)!==void 0?"el_".concat(ye==null?void 0:ye.cmsId):Rf(Ae.id),name:ke.name,externalId:(le=ke.externalId)!=null?le:"",type:(ve=ye.type)!=null?ve:"location",sortOrder:(he=ye.sortOrder)!=null?he:0,amenity:ye.amenity,description:ke.description,extra:Ae.extra,links:Ae.links,operationHours:Ae.openingHours,gallery:ye.gallery,logo:Ae.logo,shortName:ke.shortName,picture:ye.picture,showFloatingLabelWhenImagePresent:ye.showFloatingLabelWhenImagePresent,showLogo:ye.showLogo,siblingGroups:ye.siblingGroups,states:ye.states,tags:ye.tags,spaces:[],nodes:[],polygons:[]};if(Ae.phone&&(Ne.phone={number:Ae.phone}),ye.primaryCategory){let Ve=d.get(ye.primaryCategory);Ve&&(Ne.primaryCategory=Ve.id)}let Je=Uw(Ae.social);Ae.website&&(Je.website=Ae.website.url),Ne.social=Je;for(let Ve of Ae.geometryAnchors){let br=r.space.get(Ve.geometryId),wn=r.obstruction.get(Ve.geometryId),hn=br!=null?br:wn;if(hn){let ns=new Set(hn.features.filter(Ci=>Ci.geometry.type==="Polygon").map(Ci=>Ci.properties.id));for(let Ci of hn.anchors)br!=null&&hn===br&&Ne.spaces.push({floor:Ci.floorId,id:Ci.geometryId}),ns.has(Ci.geometryId)&&Ne.polygons.push({map:Ci.floorId,id:Ci.geometryId})}let Mn=t.get(Ve.geometryId);for(let ns of Mn!=null?Mn:[])Ne.nodes.push({map:Ve.floorId,id:ns})}n.locations.push(Ne);for(let Ve of Ae.categories)a.set(Ve,[...(de=a.get(Ve))!=null?de:[],Ae.id])}}}let m=(ce=(Fe=e.cms)==null?void 0:Fe.locationInstances)!=null?ce:[],h=e.locationInstances;if(h){let Vt=new Map(m.map(ye=>[ye.locationInstanceId,ye])),Ae=[];for(let ye of h){let ke=(Pe=Vt.get(ye.id))!=null?Pe:{};if(ye){let Ne={id:kw(ye.id),parent:(He=ke.parentId)!=null?He:Rf(ye.parentId),name:(bt=ye.details)==null?void 0:bt.name,externalId:(B=ye.details)==null?void 0:B.externalId,type:ke.type,sortOrder:ke.sortOrder,amenity:ke.amenity,description:(re=ye.details)==null?void 0:re.description,extra:ye.extra,links:ye.links,operationHours:ye.openingHours,gallery:ke.gallery,picture:ke.picture,showFloatingLabelWhenImagePresent:ke.showFloatingLabelWhenImagePresent,showLogo:ke.showLogo,siblingGroups:ke.siblingGroups,states:ke.states,tags:ke.tags,logo:ye.logo,shortName:(R=ye.details)==null?void 0:R.shortName};ye.phone&&(Ne.phone={number:ye.phone});let Je=Uw((ue=ye.social)!=null?ue:[]);if(ye.website&&(Je.website=ye.website.url),Object.keys(Je).length>0&&(Ne.social=Je),(ie=ye.geometryAnchors)!=null&&ie.length){let Ve=ye.geometryAnchors.flatMap(br=>{var wn,hn;return(hn=(wn=r.space.get(br.geometryId))==null?void 0:wn.anchors)!=null?hn:[]});Ve.length>0&&(Ne.spaces=Ve.map(br=>({floor:br.floorId,id:br.geometryId})))}if(ye.geometryAnchors){Ne.spaces=[],Ne.polygons=[],Ne.nodes=[];for(let Ve of ye.geometryAnchors){let br=r.space.get(Ve.geometryId);if(br){let hn=new Set(br.features.filter(Mn=>Mn.geometry.type==="Polygon").map(Mn=>Mn.properties.id));for(let Mn of br.anchors)Ne.spaces.push({floor:Mn.floorId,id:Mn.geometryId}),hn.has(Mn.geometryId)&&Ne.polygons.push({map:Mn.floorId,id:Mn.geometryId})}let wn=t.get(Ve.geometryId);for(let hn of wn!=null?wn:[])Ne.nodes.push({map:Ve.floorId,id:hn})}}Ae.push(Ne)}}Ae.length>0&&(n.locationInstances=Ae)}let g=e.locationCategories;if(g){let Vt=[],Ae=new Map(g.map(Je=>[Je.id,Je])),ye=new Map((c!=null?c:[]).map(Je=>[Je.categoryId,Je])),ke=new Map;for(let Je of g){let Ve=Ae.get(Je.parent);if(Ve){let br=(se=ke.get(Ve.id))!=null?se:[];br.push(Je.id),ke.set(Ve.id,br)}}for(let Je of g){let Ve=ye.get(Je.id);if(Je){let br=((Le=ke.get(Je.id))!=null?Le:[]).map(n1),wn={id:n1(Je.id),name:Je.details.name,externalId:(Et=Je.details.externalId)!=null?Et:"",sortOrder:(Ce=Ve==null?void 0:Ve.sortOrder)!=null?Ce:0,children:br,locations:((xe=a.get(Je.id))!=null?xe:[]).map(Rf),icon:Je.details.icon,picture:Ve==null?void 0:Ve.picture,color:Ve==null?void 0:Ve.color,extra:Je.extra,iconFromDefaultList:Ve==null?void 0:Ve.iconFromDefaultList};Vt.push(wn)}}n.categories=Vt;let Ne={};for(let Je of l)Ne[Rf(Je.id)]=Je.categories.map(n1).filter(Ve=>Ve!==void 0);n.categoryPriorities=Ne}let x={};for(let[Vt,Ae]of Object.entries((We=e.defaultStyle)!=null?We:{}))if(Ae.buffer){let ye=Ae.geometryAnchors.flatMap(ke=>{var Ne,Je;return(Je=(Ne=r.space.get(ke.geometryId))==null?void 0:Ne.anchors)!=null?Je:[]});x[Vt]={edgeOffset:Ae.buffer,geometryAnchors:ye}}Object.keys(x).length>0&&(n.enterpriseStyles=x);let E=new Map;for(let Vt of Object.values((xi=(Gr=e.cms)==null?void 0:Gr.layers)!=null?xi:{}))if(Vt)for(let[Ae,ye]of ft(Vt)){if(typeof ye!="string")continue;let ke=(ca=E.get(ye))!=null?ca:{name:ye,id:"ely_".concat(ye),spaces:[]};ke.spaces.push(...(da=(po=r.space.get(Ae))==null?void 0:po.anchors.map(Ne=>({floorId:Ne.floorId,spaceId:Ne.geometryId})))!=null?da:[]),E.set(ye,ke)}E.size>0&&(n.layers=Array.from(E.values()));let v=[];for(let Vt of Object.values((_o=(Ii=e.cms)==null?void 0:Ii.textures)!=null?_o:{}))for(let Ae of Vt){let ye=(ml=r.space.get(Ae.geometryId))==null?void 0:ml.anchors;!ye||ye.length<1||Ae.face==="unknown"||Ae.surface==="unknown"||v.push({repeat:Ae.repeat,offset:Ae.offset,rotation:Ae.rotation,path:Ae.path,face:Ae.face,surface:Ae.surface,bounds:Ae.bounds,geometryAnchors:ye})}v.length>0&&(n.textures=v);let I={};for(let[Vt,Ae]of Object.entries((mu=(Gc=e.cms)==null?void 0:Gc.floorText)!=null?mu:{})){let ye={type:"FeatureCollection",features:[]};for(let ke of Ae.features){if(ke.properties.align==="unknown")continue;let Ne={align:ke.properties.align,color:ke.properties.color,fontFamily:ke.properties.fontFamily,fontSize:ke.properties.fontSize,rotation:ke.properties.rotation,text:ke.properties.text,visible:ke.properties.visible};"geometryId"in ke.properties?Ne.geometryId=ke.properties.geometryId:Ne.verticalOffset=ke.properties.verticalOffset,ye.features.push({type:"Feature",geometry:ke.geometry,properties:Ne})}ye.features.length>0&&(I[Vt]=ye)}Object.keys(I).length>0&&(n.floorText=I);let C={enterprise:n};if((Ei=e.cms)!=null&&Ei.textAreas){let Vt={};for(let[Ae,ye]of ft(e.cms.textAreas)){let ke={type:"FeatureCollection",features:[]};for(let Ne of ye.features){if(Ne.properties.align==="unknown")continue;let Je={align:Ne.properties.align,maxWidth:Ne.properties.maxWidth,maxHeight:Ne.properties.maxHeight,rotation:Ne.properties.rotation};"geometryId"in Ne.properties?Je.anchorId=Ne.properties.geometryId:Je.verticalOffset=Ne.properties.verticalOffset;let Ve={type:"Feature",geometry:Ne.geometry,properties:Je};ke.features.push(Ve)}Vt[Ae]=ke}C.textAreas=Vt}return C}var x$=["facebook","instagram","twitter"];function Uw(e){let r={};for(let{name:t,url:n}of e){let o=t.toLowerCase();x$.includes(o)&&(r[o]=n)}return r}p();var I$=e=>"fc_".concat(e.slice(3));function Gw(e,{geometryMaps:r}){var o;if(!e.facade)return{};let t={},n={};for(let[i,a]of ft(e.facade))if(a)for(let l of Object.values(a)){let{floorStackId:u,geometryIds:c}=l,d=I$(u);(o=n[u])!=null||(n[u]={id:d,spaces:[]}),n[u].spaces.push(...c.map(m=>{var h,g;return{floorId:i,spaceId:(g=(h=r.space.get(m))==null?void 0:h.ids[0])!=null?g:""}}))}return Object.keys(n).length>0&&(t.facade=n),t}p();function $w(e,r={}){var o,i,a,l,u,c,d,m,h,g,x,E;let t={type:"FeatureCollection",features:[]},n=[];for(let v of e.floors.features)n.push({id:v.properties.id,externalId:(i=(o=v.properties.details)==null?void 0:o.externalId)!=null?i:"",elevation:v.properties.elevation,name:(l=(a=v.properties.details)==null?void 0:a.name)!=null?l:"",shortName:(c=(u=v.properties.details)==null?void 0:u.shortName)!=null?c:"",subtitle:v.properties.subtitle,maxHeight:v.properties.maxHeight}),t.features.push({type:"Feature",geometry:v.geometry,properties:{id:v.properties.id,externalId:(m=(d=v.properties.details)==null?void 0:d.externalId)!=null?m:"",elevation:v.properties.elevation,name:(g=(h=v.properties.details)==null?void 0:h.name)!=null?g:"",shortName:(E=(x=v.properties.details)==null?void 0:x.shortName)!=null?E:"",subtitle:v.properties.subtitle,maxHeight:v.properties.maxHeight}});return{"floor.geojson":t,"map.geojson":n}}p();function Vw(e,{geometryMaps:r}){var o,i,l,u,c;let t={},n={};for(let[d,m]of ft((o=e.floorImages)!=null?o:{})){let h={features:[],type:"FeatureCollection"};for(let g of(i=m==null?void 0:m.features)!=null?i:[])if("verticalOffset"in g.properties)h.features.push(g);else{let a=g.properties,{geometryId:x}=a,E=tn(a,["geometryId"]),v=(c=(l=r.space.get(x))==null?void 0:l.ids[0])!=null?c:(u=r.obstruction.get(x))==null?void 0:u.ids[0];if(!v)continue;let I={geometry:g.geometry,properties:H(w({},E),{anchorId:v}),type:g.type};h.features.push(I)}n[d]=h}return Object.keys(n).length>0&&(t.floorImages=n),t}p();function Zw(e,r={}){var o,i,a,l,u,c,d;let t=[];for(let m of(o=e==null?void 0:e.floorStacks)!=null?o:[]){let h={id:m.id,floors:m.floors,maps:m.floors,externalId:(a=(i=m.details)==null?void 0:i.externalId)!=null?a:"",name:(u=(l=m.details)==null?void 0:l.name)!=null?u:"",shortName:(d=(c=m.details)==null?void 0:c.shortName)!=null?d:"",type:"Building"};m.defaultFloor&&(h.defaultFloor=m.defaultFloor),t.push(h)}if(e.outdoors&&e.outdoors.floors.length>0){let m={id:"outdoors",floors:e.outdoors.floors,maps:e.outdoors.floors,type:"Outdoor",name:"Outdoors",externalId:"outdoors"};t.push(m)}return{"floorstack.json":t,"mapstack.geojson":t}}p();p();var Kw=Vh(qw(),1),T$=e=>{let r=e.geometry.coordinates[0],t=0;for(let n=0;n<r.length-1;n++)t+=r[n][0]*r[n+1][1]-r[n+1][0]*r[n][1];return Math.abs(t/2)},w$=(e,r)=>{let[t,n]=e,o=r.geometry.coordinates[0],i=!1;for(let a=0,l=o.length-1;a<o.length;l=a++){let[u,c]=o[a],[d,m]=o[l];c>n!=m>n&&t<(d-u)*(n-c)/(m-c)+u&&(i=!i)}return i},M$=e=>{let r=e.geometry.coordinates[0],t=0,n=0;for(let o=0;o<r.length-1;o++)t+=r[o][0],n+=r[o][1];return{geometry:{coordinates:[t/(r.length-1),n/(r.length-1)]}}},A$=e=>{let r=T$(e),t=Number.isFinite(r)?Math.max(r,1):1;return Math.sqrt(t)*1e-6},i1=e=>{try{let t=M$(e).geometry.coordinates;if(!w$(t,e)){let o=(0,Kw.default)(e.geometry.coordinates,A$(e));return me([o[0],o[1]])}return me(t)}catch(r){return ge(new Error("Unable to calculate center of polygon"))}};function _x(e){var r;return((r=e==null?void 0:e.geometry)==null?void 0:r.type)==="Polygon"}function Yw(e,{geometryMaps:r,nodesByGeometryId:t,nodesById:n}){var d,m,h,g,x,E,v,I,C,S;let o=k$(e.defaultStyle),i={},a={},l={},u={};for(let T of st(e.geometry)){let A=e.geometry[T];if(!A)continue;let F=[],P=[],O=[],_=[];for(let G of A.features){let L=G.properties.id,q=o.has(L),$=(d=t.get(L))!=null?d:[];for(let K of(h=(m=r.space.get(L))==null?void 0:m.features)!=null?h:[])F.push(Jw(K,$));for(let K of(x=(g=r.obstruction.get(L))==null?void 0:g.features)!=null?x:[])if(P.push(F$(K,q)),r.object.has(L)){let X=(E=t.get(L))!=null?E:[],V=X.map(Y=>n.get(Y)).filter(Y=>Y!=null);for(let Y of V){let ee=Jw({type:"Feature",geometry:Y.geometry,properties:{id:Bw(Y.properties.id),kind:"desk-entrance",details:{externalId:r1(L)}}},X);F.push(ee)}}for(let K of(I=(v=r.area.get(L))==null?void 0:v.features)!=null?I:[])O.push(P$(K,$));for(let K of(S=(C=r.window.get(L))==null?void 0:C.features)!=null?S:[])_.push(O$(K))}F.length>0&&(i[T]={type:"FeatureCollection",features:F.filter(G=>G!==null)}),P.length>0&&(a[T]={type:"FeatureCollection",features:P.filter(G=>G!==null)}),O.length>0&&(l[T]={type:"FeatureCollection",features:O.filter(G=>G!==null)}),_.length>0&&(u[T]={type:"FeatureCollection",features:_.filter(G=>G!==null)})}let c={space:i,obstruction:a};return Object.keys(l).length>0&&(c.area=l),Object.keys(u).length>0&&(c.window=u),c}function Jw(e,r){var n,o;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":return null}let t={type:"Feature",geometry:e.geometry,properties:{destinationNodes:r,id:e.properties.id,externalId:(o=(n=e.properties.details)==null?void 0:n.externalId)!=null?o:"",kind:e.properties.kind}};return e.properties.details&&(t.properties.details={name:e.properties.details.name,description:e.properties.details.description,images:e.properties.details.icon?[{url:e.properties.details.icon,altText:e.properties.details.name?"".concat(e.properties.details.name," icon"):"icon"}]:void 0}),_x(t)&&(t.properties.center=i1(t).unwrapOr(void 0)),t}function F$(e,r){var o,i;switch(e.geometry.type){case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"Point":return null}let t=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:t.id,externalId:(i=(o=t.details)==null?void 0:o.externalId)!=null?i:"",entrances:[],kind:t.kind,footprintComponent:r}};return _x(n)&&(n.properties.center=i1(n).unwrapOr(void 0)),t.details&&(n.properties.details={name:t.details.name,description:t.details.description,images:t.details.icon?[{url:t.details.icon,altText:t.details.name?"".concat(t.details.name," icon"):"icon"}]:void 0}),n}function P$(e,r){var o,i;if(e.geometry.type!=="Polygon")return null;let t=e.properties,n={type:"Feature",geometry:e.geometry,properties:{id:t.id,externalId:(i=(o=t.details)==null?void 0:o.externalId)!=null?i:"",destinationNodes:r}};return _x(n)&&(n.properties.center=i1(n).unwrapOr(void 0)),t.details&&(n.properties.details={name:t.details.name,description:t.details.description,images:t.details.icon?[{url:t.details.icon,altText:t.details.name?"".concat(t.details.name," icon"):"icon"}]:void 0}),n}function O$(e){return e.geometry.type!=="LineString"?null:{type:"Feature",geometry:e.geometry,properties:{id:e.properties.id}}}function k$(e){var t,n;return new Set(((n=(t=e==null?void 0:e.ExteriorWalls)==null?void 0:t.geometryAnchors)!=null?n:[]).map(o=>o.geometryId))}p();function Xw(e,{geometryMaps:r,geometryFeatureById:t}){var o,i,a,l,u,c,d,m,h,g,x,E,v;if(!e.locationCategories&&!e.locations)return{};let n={};if((o=e.locationCategories)!=null&&o.length){let I=[];for(let C of e.locationCategories){let S={id:C.id,name:C.details.name,icon:(i=C.details.icon)!=null?i:""};C.parent&&(S.parent=C.parent),I.push(S)}n["category.json"]=I}if((a=e.locations)!=null&&a.length){let I=B$(e,{geometryFeatureById:t}),C=[];for(let S of e.locations){let T={id:S.id,name:S.details.name,categories:S.categories,spaces:[],obstructions:[],areas:[],annotations:[],connections:[],entrances:[],links:S.links,openingHoursSpecification:(l=S.openingHours)!=null?l:[],pictures:S.images,social:S.social,description:S.details.description,externalId:S.details.externalId,icon:S.details.icon,logo:S.logo,phone:S.phone,website:S.website};C.push(T);for(let{geometryId:A,floorId:F}of S.geometryAnchors)T.spaces.push(...(c=(u=r.space.get(A))==null?void 0:u.ids.map(P=>({id:P,floor:F})))!=null?c:[]),T.obstructions.push(...(m=(d=r.obstruction.get(A))==null?void 0:d.ids.map(P=>({id:P,floor:F})))!=null?m:[]),T.areas.push(...(g=(h=r.area.get(A))==null?void 0:h.ids.map(P=>({id:P,floor:F})))!=null?g:[]),T.entrances.push(...(x=I.entrancesByGeometryId.get(A))!=null?x:[]),T.connections.push(...(E=I.connectionsByGeometryId.get(A))!=null?E:[]),T.annotations.push(...(v=I.annotationsByGeometryId.get(A))!=null?v:[])}n["location.json"]=C}return n}function B$(e,{geometryFeatureById:r}){var n,o,i;let t={annotationsByGeometryId:new Map,connectionsByGeometryId:new Map,entrancesByGeometryId:new Map};if(e.annotations)for(let[a,l]of ft(e.annotations))for(let u of l!=null?l:[]){let c=u.geometryId,d=u.id,m=(n=t.annotationsByGeometryId.get(c))!=null?n:[];m.push({floor:a,id:d}),t.annotationsByGeometryId.set(c,m)}if(e.connections)for(let a of e.connections){let l=Px(a,r),u=Array.from(new Map([...a.entrances,...a.exits].map(c=>["".concat(c.geometryId,"_").concat(c.floorId),c])).values());for(let c of u){let d=c.geometryId;if(l){let m=(o=t.entrancesByGeometryId.get(d))!=null?o:[];m.push({floor:c.floorId,id:a.id}),t.entrancesByGeometryId.set(d,m)}else{let m=(i=t.connectionsByGeometryId.get(d))!=null?i:[];m.push(a.id),t.connectionsByGeometryId.set(d,m)}}}return t}p();function Qw(e,r){let t={features:[],type:"FeatureCollection"},n={"manifest.geojson":t},o=e.manifest;if(o.features.length>0){let i=o.features[0],a=i.properties,l={type:"Feature",geometry:i.geometry,properties:{folder_struct:[],version:"2.0.0",time:a.time,name:a.name,naturalBearing:a.naturalBearing,tzid:a.tzid,map:a.mapId,org_id:a.orgId,language:a.language}};t.features.push(l)}return n}p();function eM(e,{geometryMaps:r,navigationFlags:t,incomingEdgesByNodeId:n}){var c,d,m,h,g,x;let o={"node.geojson":{type:"FeatureCollection",features:[]}},i=o["node.geojson"].features,a=_$(e),l=L$(e),u=R$(e,l,a);for(let[E,v]of ft((c=e.nodes)!=null?c:{}))for(let I of(d=v==null?void 0:v.features)!=null?d:[]){let C=(m=r.space.get(I.properties.geometryIds[0]))==null?void 0:m.features[0],S=(C==null?void 0:C.geometry.type)==="Point"&&((h=C==null?void 0:C.properties.details)!=null&&h.externalId)?C.properties.details.externalId:"",T=(g=n.get(I.properties.id))!=null?g:[],A=Object.keys(t!=null?t:{}),F=[];for(let O of T)for(let _ of A)Ou(O,t[_])&&F.push(t[_]);let P={type:"Feature",geometry:I.geometry,properties:{id:I.properties.id,floor:E,space:I.properties.geometryIds.map(O=>{var _;return(_=r.space.get(O))==null?void 0:_.ids}).flat().filter(O=>O!==void 0),neighbors:[...I.properties.neighbors.map(O=>({id:O.id,weight:O.extraCost})),...(x=u.get(I.properties.id))!=null?x:[]],map:E,externalId:S,flags:F.length>0?N$(F):void 0}};i.push(P)}return o}function _$(e){var t,n;let r=new Map;for(let o of(n=(t=e.floors)==null?void 0:t.features)!=null?n:[])r.set(o.properties.id,o.properties.elevation);return r}function L$(e){var t,n,o;let r=new Map;for(let i of Object.values((t=e.nodes)!=null?t:{}))for(let a of(n=i==null?void 0:i.features)!=null?n:[])if(a.properties.geometryIds.length!==0)for(let l of a.properties.geometryIds){let u=(o=r.get(l))!=null?o:[];u.includes(a.properties.id)||(u.push(a.properties.id),r.set(l,u))}return r}function R$(e,r,t){var o,i,a,l,u;let n=new Map;for(let c of(o=e.connections)!=null?o:[]){let d=c.exits.map(m=>{var h;return H(w({},m),{nodes:(h=r.get(m.geometryId))!=null?h:[]})});for(let m of c.entrances){let h=(i=r.get(m.geometryId))!=null?i:[];for(let g of h)for(let x of d){let E=Math.abs(((a=t.get(m.floorId))!=null?a:0)-((l=t.get(x.floorId))!=null?l:0))*c.floorCostMultiplier,v=(u=n.get(g))!=null?u:[];v.push(...x.nodes.filter(I=>I!==g).map(I=>({id:I,weight:E+c.entryCost}))),n.set(g,v)}}}return n}function N$(e){if(e==null||e.length===0)return;let r=new Array(Math.max(...e.map(t=>t.index))+1).fill(0);for(let t of e)r[t.index]|=1<<t.bit;return r}p();function j$(e,r){var n;let t={};for(let o of e){let i=r.get(o);i&&((n=t[i])!=null||(t[i]=[]),t[i].push(o))}return t}function tM(e,{geometryMaps:r}){var a,l,u;if(!e.defaultStyle)return{};let t={},n={};t["styles.json"]=n;let o=[...Array.from(r.space.values()).map(c=>c.features),...Array.from(r.obstruction.values()).map(c=>c.features)],i=new Map(o.flatMap(c=>c.map(d=>[d.properties.id,d.geometry.type])));for(let[c,d]of ft(e.defaultStyle)){let m=j$(d.geometryAnchors.flatMap(h=>{var g,x,E,v;return[...(x=(g=r.space.get(h.geometryId))==null?void 0:g.ids)!=null?x:[],...(v=(E=r.obstruction.get(h.geometryId))==null?void 0:E.ids)!=null?v:[]]}),i);if(m.Point&&m.Point.length>0){let h={points:Array.from(m.Point.values()),showImage:((a=d.extra)==null?void 0:a.showImage)!==void 0?((l=d.extra)==null?void 0:l.showImage)===!0:d.opacity!==0};n["".concat(c,".Point")]=h}if(m.LineString&&m.LineString.length>0){let h={lineStrings:Array.from(m.LineString.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity,width:d.buffer};n["".concat(c,".LineString")]=h}if(m.Polygon&&m.Polygon.length>0){let h={polygons:Array.from(m.Polygon.values()),altitude:d.altitude,color:d.color,height:d.height,opacity:d.opacity};((u=d.extra)==null?void 0:u.showImage)!==void 0&&(h.showImage=d.extra.showImage===!0),n["".concat(c,".Polygon")]=h}}return t}var U$=_T().extendOptional(R7).extendOptional(vw).extendOptional(V7).extendOptional(mw).extendOptional(Pw).extendOptional(q7).extendOptional(Q7).extendOptional(Cw).extendOptional(Tw).extendOptional(lw).extendOptional(rw).extendOptional(jT).extendOptional(qT).extendOptional(O7).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");function rM(e){let r=Rw(e),t=$w(e,r),n=Yw(e,r),o=eM(e,r),i=jw(e,r),a=tM(e,r),l=Zw(e,r),u=Vw(e,r),c=Gw(e,r),d=Nw(e,r),m=Xw(e,r),h=zw(e,r),g=Qw(e,r);return w(w(w(w(w(w(w(w(w(w(w(w(w(w(w({},e.tileset?{"tileset.json":e.tileset}:{}),e.navigationFlags?{"navigationFlags.json":e.navigationFlags}:{}),e.annotationSymbols?{"annotation-symbols.json":e.annotationSymbols}:{}),t),n),o),i),a),l),u),c),d),m),h),g)}function Lx(e){let r=U$.decompressUnsafeSync(e);return r.isOk()?me(rM(r.value)):ge(r.error)}p();function Kd(e){return e.endsWith("/")?e:"".concat(e,"/")}p();var Jd="https://app.mappedin.com/",nM="https://auth.mappedin.com/",oM=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),z$=Object.freeze(H(w({},oM),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),G$=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),$$=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),V$=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),Z$={eu:G$,us:oM,"us-enterprise":z$,"us-staging-enterprise":$$,"us-staging-self-serve":V$};function iM(e){return Z$[e]}p();p();var H$=e=>{let r=Date.now();return e-r},a1=(e,r)=>H$(e)<=r*60*1e3;var sM=60,uM=sM*60*1e3,aM="accessTokens";async function Nf(e,r=!1){let t="".concat(e.key),n=ss.getInstance(),o=(n==null?void 0:n.loadSessionData(aM))||{},i=Math.floor(Date.now()/1e3);if(o[t]&&!a1(o[t].expiresTimestamp*1e3,sM))return o[t];let a=r?await W$(e,i):await q$(e,i),l=H(w({},o),{[t]:a});return n==null||n.saveSessionData(aM,l),a}async function W$(e,r){var i;let t;e.customAuthUri?t=e.customAuthUri:t="".concat((i=e.baseAuthUri)!=null?i:nM,"oauth2/token");let n;try{n=await So()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"client_credentials",client_id:e.key,client_secret:e.secret})})}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error("Failed to fetch enterprise access token from ".concat(t,": ").concat(l))}if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{accessToken:o.access_token,expiresTimestamp:r+o.expires_in}}async function q$(e,r){let t;e.customAuthUri?t=e.customAuthUri:t="".concat(e.baseAuthUri?Kd(e.baseAuthUri):Jd,"api/v1/api-key/token");let n;try{n=await So()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})})}catch(i){let a=i instanceof Error?i.message:String(i);throw new Error("Failed to fetch access token from ".concat(t,": ").concat(a))}if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{accessToken:o.access_token,expiresTimestamp:r+o.expires_in}}p();var cM=60,dM=cM*60*1e3,lM="miSasTokens";async function Rx(e,r){let t="".concat(r,"__").concat(e.mapId),n=ss.getInstance(),o=(n==null?void 0:n.loadSessionData(lM))||{};if(o[t]&&!a1(o[t].expires,cM))return o[t];let i=await K$(e,r),a=H(w({},o),{[t]:{token:i.token,expires:new Date(i.expires).getTime()}});return n==null||n.saveSessionData(lM,a),i}async function K$(e,r){let t="".concat(e.baseUri?Kd(e.baseUri):Jd,"api/v1/venue/").concat(e.mapId,"/sas-token"),n=await So()(t,{method:"GET",headers:{Authorization:"Bearer ".concat(r)}});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText,": ").concat(await n.text()));let o=await n.json();return{token:o.token,expires:new Date(o.expires).getTime()}}p();var Do=Uint8Array,Rl=Uint16Array,pM=Uint32Array,mM=new Do([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fM=new Do([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),J$=new Do([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hM=function(e,r){for(var t=new Rl(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var o=new pM(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)o[i]=i-t[n]<<5|n;return[t,o]},gM=hM(mM,2),yM=gM[0],Y$=gM[1];yM[28]=258,Y$[258]=28;var bM=hM(fM,0),X$=bM[0],EIe=bM[1],zx=new Rl(32768);for(St=0;St<32768;++St)Ps=(St&43690)>>>1|(St&21845)<<1,Ps=(Ps&52428)>>>2|(Ps&13107)<<2,Ps=(Ps&61680)>>>4|(Ps&3855)<<4,zx[St]=((Ps&65280)>>>8|(Ps&255)<<8)>>>1;var Ps,St,jf=function(e,r,t){for(var n=e.length,o=0,i=new Rl(r);o<n;++o)e[o]&&++i[e[o]-1];var a=new Rl(r);for(o=0;o<r;++o)a[o]=a[o-1]+i[o-1]<<1;var l;if(t){l=new Rl(1<<r);var u=15-r;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],d=r-e[o],m=a[e[o]-1]++<<d,h=m|(1<<d)-1;m<=h;++m)l[zx[m]>>>u]=c}else for(l=new Rl(n),o=0;o<n;++o)e[o]&&(l[o]=zx[a[e[o]-1]++]>>>15-e[o]);return l},Uf=new Do(288);for(St=0;St<144;++St)Uf[St]=8;var St;for(St=144;St<256;++St)Uf[St]=9;var St;for(St=256;St<280;++St)Uf[St]=7;var St;for(St=280;St<288;++St)Uf[St]=8;var St,vM=new Do(32);for(St=0;St<32;++St)vM[St]=5;var St;var Q$=jf(Uf,9,1);var eV=jf(vM,5,1),Nx=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Ri=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},jx=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},tV=function(e){return(e+7)/8|0},$x=function(e,r,t){(r==null||r<0)&&(r=0),(t==null||t>e.length)&&(t=e.length);var n=new(e.BYTES_PER_ELEMENT==2?Rl:e.BYTES_PER_ELEMENT==4?pM:Do)(t-r);return n.set(e.subarray(r,t)),n};var rV=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ni=function(e,r,t){var n=new Error(r||rV[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Ni),!t)throw n;return n},nV=function(e,r,t){var n=e.length;if(!n||t&&t.f&&!t.l)return r||new Do(0);var o=!r||t,i=!t||t.i;t||(t={}),r||(r=new Do(n*3));var a=function(Pe){var He=r.length;if(Pe>He){var bt=new Do(Math.max(He*2,Pe));bt.set(r),r=bt}},l=t.f||0,u=t.p||0,c=t.b||0,d=t.l,m=t.d,h=t.m,g=t.n,x=n*8;do{if(!d){l=Ri(e,u,1);var E=Ri(e,u+1,3);if(u+=3,E)if(E==1)d=Q$,m=eV,h=9,g=5;else if(E==2){var S=Ri(e,u,31)+257,T=Ri(e,u+10,15)+4,A=S+Ri(e,u+5,31)+1;u+=14;for(var F=new Do(A),P=new Do(19),O=0;O<T;++O)P[J$[O]]=Ri(e,u+O*3,7);u+=T*3;for(var _=Nx(P),G=(1<<_)-1,L=jf(P,_,1),O=0;O<A;){var q=L[Ri(e,u,G)];u+=q&15;var v=q>>>4;if(v<16)F[O++]=v;else{var $=0,K=0;for(v==16?(K=3+Ri(e,u,3),u+=2,$=F[O-1]):v==17?(K=3+Ri(e,u,7),u+=3):v==18&&(K=11+Ri(e,u,127),u+=7);K--;)F[O++]=$}}var X=F.subarray(0,S),V=F.subarray(S);h=Nx(X),g=Nx(V),d=jf(X,h,1),m=jf(V,g,1)}else Ni(1);else{var v=tV(u)+4,I=e[v-4]|e[v-3]<<8,C=v+I;if(C>n){i&&Ni(0);break}o&&a(c+I),r.set(e.subarray(v,C),c),t.b=c+=I,t.p=u=C*8,t.f=l;continue}if(u>x){i&&Ni(0);break}}o&&a(c+131072);for(var Y=(1<<h)-1,ee=(1<<g)-1,oe=u;;oe=u){var $=d[jx(e,u)&Y],le=$>>>4;if(u+=$&15,u>x){i&&Ni(0);break}if($||Ni(2),le<256)r[c++]=le;else if(le==256){oe=u,d=null;break}else{var ve=le-254;if(le>264){var O=le-257,he=mM[O];ve=Ri(e,u,(1<<he)-1)+yM[O],u+=he}var de=m[jx(e,u)&ee],Fe=de>>>4;de||Ni(3),u+=de&15;var V=X$[Fe];if(Fe>3){var he=fM[Fe];V+=jx(e,u)&(1<<he)-1,u+=he}if(u>x){i&&Ni(0);break}o&&a(c+131072);for(var ce=c+ve;c<ce;c+=4)r[c]=r[c-V],r[c+1]=r[c+1-V],r[c+2]=r[c+2-V],r[c+3]=r[c+3-V];c=ce}}t.l=d,t.p=oe,t.b=c,t.f=l,d&&(l=1,t.m=h,t.d=m,t.n=g)}while(!l);return c==r.length?r:$x(r,0,c)};var oV=new Do(0);var La=function(e,r){return e[r]|e[r+1]<<8},ji=function(e,r){return(e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24)>>>0},Ux=function(e,r){return ji(e,r)+ji(e,r+4)*4294967296};function iV(e,r){return nV(e,r)}var Gx=typeof TextDecoder<"u"&&new TextDecoder,aV=0;try{Gx.decode(oV,{stream:!0}),aV=1}catch(e){}var sV=function(e){for(var r="",t=0;;){var n=e[t++],o=(n>127)+(n>223)+(n>239);if(t+o>e.length)return[r,$x(e,t-1)];o?o==3?(n=((n&15)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r+=String.fromCharCode(55296|n>>10,56320|n&1023)):o&1?r+=String.fromCharCode((n&31)<<6|e[t++]&63):r+=String.fromCharCode((n&15)<<12|(e[t++]&63)<<6|e[t++]&63):r+=String.fromCharCode(n)}};function uV(e,r){if(r){for(var t="",n=0;n<e.length;n+=16384)t+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return t}else{if(Gx)return Gx.decode(e);var o=sV(e),i=o[0],a=o[1];return a.length&&Ni(8),i}}var lV=function(e,r){return r+30+La(e,r+26)+La(e,r+28)},cV=function(e,r,t){var n=La(e,r+28),o=uV(e.subarray(r+46,r+46+n),!(La(e,r+8)&2048)),i=r+46+n,a=ji(e,r+20),l=t&&a==4294967295?dV(e,i):[a,ji(e,r+24),ji(e,r+42)],u=l[0],c=l[1],d=l[2];return[La(e,r+10),u,c,o,i+La(e,r+30)+La(e,r+32),d]},dV=function(e,r){for(;La(e,r)!=1;r+=4+La(e,r+2));return[Ux(e,r+12),Ux(e,r+4),Ux(e,r+20)]};function Vx(e,r){for(var t={},n=e.length-22;ji(e,n)!=101010256;--n)(!n||e.length-n>65558)&&Ni(13);var o=La(e,n+8);if(!o)return{};var i=ji(e,n+16),a=i==4294967295||o==65535;if(a){var l=ji(e,n-12);a=ji(e,l)==101075792,a&&(o=ji(e,l+32),i=ji(e,l+48))}for(var u=r&&r.filter,c=0;c<o;++c){var d=cV(e,i,a),m=d[0],h=d[1],g=d[2],x=d[3],E=d[4],v=d[5],I=lV(e,v);i=E,(!u||u({name:x,size:h,originalSize:g,compression:m}))&&(m?m==8?t[x]=iV(e.subarray(I,I+h),new Do(g)):Ni(14,"unknown compression type "+m):t[x]=$x(e,I,I+h))}return t}var xM=globalThis.fetch,EM,mV=(EM=y==null?void 0:y.env)==null?void 0:EM.npm_package_version;function So(){if(xM==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return xM}var Zx={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function CM(e){var t;let r=w(w({},Zx),e);return r.headers=H(w({},r.headers),{"mappedin-sdk-version":mV}),r.things=[],"platformString"in e&&(r.headers=H(w({},r.headers),{"mappedin-platform-version":e.platformString})),r.noAuth||(r.accessToken?r.authorization="Bearer ".concat(r.accessToken):r.clientId&&r.clientSecret&&(r.authorization="Basic ".concat(globalThis.btoa("".concat(r.clientId,":").concat(r.clientSecret))))),r.language=(t=r.language)==null?void 0:t.toLowerCase(),r}function fV(e,r,t=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};t&&delete n.language;let{headers:o}=e;o["Content-Type"]=o["Content-Type"]||"text/json",e.accessToken?o.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(o["x-mappedin-key"]=btoa(e.clientId),o["x-mappedin-secret"]=btoa(e.clientSecret));let i={method:"GET",headers:o};return e.secure&&(r+="&withcdntoken"),{req:i,url:r}}async function hV(e,r,t=!1){let n=fV(e,r,t),o=await So()(n.url,n.req);if(!o.ok)throw new Error("".concat(o.status," ").concat(o.statusText));return o.json()}var gV=e=>{let r=e!=null&&typeof e=="object"&&"perspectives"in e&&e.perspectives!=null&&typeof e.perspectives=="object"?e.perspectives:null;if(r==null||Object.keys(r).length===0)return z.warn("No perspectives available in response!"),null;let t={};for(let[n,o]of Object.entries(r)){let i="url"in o&&typeof o.url=="string"?o.url:null,a="locale_packs"in o&&typeof o.locale_packs=="object"?o.locale_packs:null;if(i==null||a==null){z.warn("Perspective ".concat(n," is missing url or locale_packs!"));continue}t[n]={url:i,locale_packs:a}}return t};async function yV(e,r="exports/mvf/1/bundle"){var c,d;let t=CM(w(w({baseUri:"https://api-gateway.mappedin.com/"},Zx),e)),n="".concat(t.baseUri+r,"?venue=").concat(t.venue,"&version=").concat((c=t.version)!=null?c:"2.0.0");t.headers["Content-Type"]="application/zip";let o=await hV(t,n),i=o.url,a=o.locale_packs,l=(d=t.perspective)!=null?d:Zx.perspective,u=gV(o);if(l!=null&&l!==""&&u!=null){let m=u[l];m==null?z.warn("Perspective ".concat(l," not found in response! Loading default perspective instead.")):(z.log('Loading perspective "'.concat(l,'"')),i=m.url,a=m.locale_packs)}return{url:i,localePacks:a,updated_at:o.updated_at}}var Yd=function(){let e;return()=>(e||(e=new TextDecoder),e)}();async function Hx(e,{signal:r}){let t=await(await So()(e,{signal:r})).arrayBuffer();return new Uint8Array(t)}async function Xd(e){let r=Vx(e),t={};if(r["enterprise/"]!=null){t.enterprise={};let n=r["enterprise/locations.json"];n&&(t.enterprise.locations=JSON.parse(Yd().decode(n)));let o=r["enterprise/locationInstances.json"];o&&(t.enterprise.locationInstances=JSON.parse(Yd().decode(o)));let i=r["enterprise/categories.json"];i&&(t.enterprise.categories=JSON.parse(Yd().decode(i)))}return r["floorstack.json"]&&(t["floorstack.json"]=JSON.parse(Yd().decode(r["floorstack.json"]))),r["floor.geojson"]&&(t["floor.geojson"]=JSON.parse(Yd().decode(r["floor.geojson"]))),r["manifest.json"]&&(t["manifest.geojson"]=JSON.parse(Yd().decode(r["manifest.json"]))),t}async function SM(e,{signal:r}){try{let t=await(await So()(e,{signal:r})).arrayBuffer();if(r.aborted)return;let n=new Uint8Array(t);return await Xd(n)}catch(t){let n=new Error("downloadLanguagePack failed");throw n.cause=t,n}}function bV(e){let{mvfVersion:r,useDraftData:t}=e;if(r==="3.0.0")return t?"exports/mvf3-draft/1/bundle":"exports/mvf3/1/bundle";if(r==null||r==="2.0.0")return t?"exports/mvf2-draft/1/bundle":"exports/mvf2/1/bundle";if(r==="2.0.0-c")return t?"exports/mvf2c-draft/1/bundle":"exports/mvf2c/1/bundle";throw new Error("Unsupported MVF version: ".concat(r))}async function Wx(e){return new Promise(async(r,t)=>{try{let n=bV(e),{url:o,localePacks:i}=await yV(e,n),a=await So()(o).then(u=>u.arrayBuffer()),l=new Uint8Array(a);r({compressed:l,localePacks:i})}catch(n){t(n)}})}async function qx(e,r){return new Promise(async(t,n)=>{try{let{url:o}=await vV(e,r),i=await So()(o).then(l=>l.arrayBuffer()),a=new Uint8Array(i);t(a)}catch(o){n(o)}})}async function vV(e,r){let t=new URL("".concat(e.baseUri?Kd(e.baseUri):Jd,"api/v1/venue/").concat(e.mapId,"/mvf"));e.viewId&&t.searchParams.set("configId",e.viewId),e.mvfVersion&&t.searchParams.set("version",e.mvfVersion);let n=await So()(t.toString(),{headers:{Authorization:"Bearer ".concat(r)}});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}function DM(e){return Zy(e)}function xV(e){if(e==null||typeof e!="object")return!1;let r=["connection.json","manifest.geojson","floor.geojson"in e?"floor.geojson":"map.geojson","node.geojson","floorstack.json"in e?"floorstack.json":"mapstack.json"in e?"mapstack.json":"mapstack.geojson"];"styles.json"in e&&r.push("styles.json"),"shapes.json"in e&&r.push("shapes.json"),"navigationFlags.json"in e&&r.push("navigationFlags.json"),"annotation-symbols.json"in e&&r.push("annotation-symbols.json");for(let t of r)if(e[t]==null||e[t][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}async function Kx(e){return new Promise(async(r,t)=>{try{if(e==null||typeof e!="object")throw new Error("Error parsing data! Unzipping failed.");if(e[Symbol.toStringTag]!=="Uint8Array")throw new Error("Unexpected file type! Unzipping failed.");let n=Vx(e);if(!xV(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={},i=Object.keys(n);for(let a of i){if(n[a].length===0)continue;let l=a.split("/");if(l.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(l.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(l.length===1){o[l[0]]=n[a];continue}if(l[0]==="image"){z.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[l[0]]==null&&(o[l[0]]={}),o[l[0]][l[1]]=n[a]}r(o)}catch(n){t(n)}})}function Bu(){let e="us",r={};function t(){return IV(iM(e),r)}return{updateByUserOption(n){var o,i;n.environment&&(e=n.environment),n.baseUri&&(r.baseUri=n.baseUri),n.baseAuthUri&&(r.baseAuthUri=n.baseAuthUri),(o=n.analytics)!=null&&o.baseUri&&(r.analyticsBaseUri=(i=n.analytics)==null?void 0:i.baseUri)},updateTileServerBaseUrl(n){r.tileServerUri=n},updateEnvironment(n){e=n},setEnterprise(n){(e==="us"||e==="us-enterprise")&&(e=n?"us-enterprise":"us")},getBaseUri(){return t().baseUri},getBaseAuthUri(){return t().baseAuthUri},getAnalyticsBaseUri(){return t().analyticsBaseUri},getTileServerUri(){return t().tileServerUri},reset(){e="us",r={}},__getState:t}}function IV(e,r){return w(w({},e),r)}var s1=e=>{var t,n;let r=Object.values((n=(t=e["floorstack.json"])!=null?t:e["mapstack.json"])!=null?n:{});return r.length===1?[]:r.filter(o=>o.type!=="Outdoor").map(o=>o.id.replace("fs_","").replace("ms_",""))},IM=async e=>{let r=performance.now(),t=Lx(e);return z.log("Parsed MVFv3 in ".concat(performance.now()-r,"ms")),t.inspectErr(o=>{throw z.error(o),new Error("MVFv3 parsing failed!")}),t.unwrap()};async function u1(e,r="2.0.0"){switch(r){case"2.0.0":case"2.0.0-c":try{let t=performance.now(),n=await Kx(e),o=Zy(n);return z.log("Parsed MVFv2 in ".concat(performance.now()-t,"ms")),o}catch(t){return z.error("MVFv2 parsing failed! Trying MVFv3."),IM(e)}case"3.0.0":return IM(e);default:throw new Error("Unsupported MVF version: ".concat(r))}}p();p();p();function ri(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function To(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Qd(e){return e.type==="Feature"?e.geometry:e}function TM(e,r){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function EV(e,r,t){t===void 0&&(t={});for(var n=ri(e),o=To(r),i=0;i<o.length-1;i++){var a=!1;if(t.ignoreEndVertices&&(i===0&&(a="start"),i===o.length-2&&(a="end"),i===0&&i+1===o.length-1&&(a="both")),CV(o[i],o[i+1],n,a,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function CV(e,r,t,n,o){var i=t[0],a=t[1],l=e[0],u=e[1],c=r[0],d=r[1],m=t[0]-l,h=t[1]-u,g=c-l,x=d-u,E=m*x-h*g;if(o!==null){if(Math.abs(E)>o)return!1}else if(E!==0)return!1;if(n){if(n==="start")return Math.abs(g)>=Math.abs(x)?g>0?l<i&&i<=c:c<=i&&i<l:x>0?u<a&&a<=d:d<=a&&a<u;if(n==="end")return Math.abs(g)>=Math.abs(x)?g>0?l<=i&&i<c:c<i&&i<=l:x>0?u<=a&&a<d:d<a&&a<=u;if(n==="both")return Math.abs(g)>=Math.abs(x)?g>0?l<i&&i<c:c<i&&i<l:x>0?u<a&&a<d:d<a&&a<u}else return Math.abs(g)>=Math.abs(x)?g>0?l<=i&&i<=c:c<=i&&i<=l:x>0?u<=a&&a<=d:d<=a&&a<=u;return!1}var wM=EV;p();function SV(e,r){r===void 0&&(r={});var t=bu(e),n=(t[0]+t[2])/2,o=(t[1]+t[3])/2;return ya([n,o],r.properties,r)}var ep=SV;p();p();function DV(e,r,t){t===void 0&&(t={});var n=ri(e),o=ri(r),i=Kn(o[1]-n[1]),a=Kn(o[0]-n[0]),l=Kn(n[1]),u=Kn(o[1]),c=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(u);return _E(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),t.units)}var _u=DV;function l1(e,r){return r===void 0&&(r={}),NE(e,function(t,n){var o=n.geometry.coordinates;return t+_u(o[0],o[1],r)},0)}p();p();p();function c1(e,r,t){if(t===void 0&&(t={}),t.final===!0)return TV(e,r);var n=ri(e),o=ri(r),i=Kn(n[0]),a=Kn(o[0]),l=Kn(n[1]),u=Kn(o[1]),c=Math.sin(a-i)*Math.cos(u),d=Math.cos(l)*Math.sin(u)-Math.sin(l)*Math.cos(u)*Math.cos(a-i);return Nm(Math.atan2(c,d))}function TV(e,r){var t=c1(r,e);return t=(t+180)%360,t}p();function Nl(e,r,t,n){n===void 0&&(n={});var o=ri(e),i=Kn(o[0]),a=Kn(o[1]),l=Kn(t),u=LE(r,n.units),c=Math.asin(Math.sin(a)*Math.cos(u)+Math.cos(a)*Math.sin(u)*Math.cos(l)),d=i+Math.atan2(Math.sin(l)*Math.sin(u)*Math.cos(a),Math.cos(u)-Math.sin(a)*Math.sin(c)),m=Nm(d),h=Nm(c);return ya([m,h],n.properties)}p();p();function wV(e){if(!e)throw new Error("geojson is required");var r=[];return ba(e,function(t){MV(t,r)}),bl(r)}function MV(e,r){var t=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":t=To(n);break;case"LineString":t=[To(n)]}t.forEach(function(o){var i=AV(o,e.properties);i.forEach(function(a){a.id=r.length,r.push(a)})})}}function AV(e,r){var t=[];return e.reduce(function(n,o){var i=us([n,o],r);return i.bbox=FV(n,o),t.push(i),o}),t}function FV(e,r){var t=e[0],n=e[1],o=r[0],i=r[1],a=t<o?t:o,l=n<i?n:i,u=t>o?t:o,c=n>i?n:i;return[a,l,u,c]}var Jx=wV;var ZM=Vh($M(),1);function nZ(e,r){var t={},n=[];if(e.type==="LineString"&&(e=Xb(e)),r.type==="LineString"&&(r=Xb(r)),e.type==="Feature"&&r.type==="Feature"&&e.geometry!==null&&r.geometry!==null&&e.geometry.type==="LineString"&&r.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&r.geometry.coordinates.length===2){var o=VM(e,r);return o&&n.push(o),bl(n)}var i=(0,ZM.default)();return i.load(Jx(r)),Qb(Jx(e),function(a){Qb(i.search(a),function(l){var u=VM(a,l);if(u){var c=To(u).join(",");t[c]||(t[c]=!0,n.push(u))}})}),bl(n)}function VM(e,r){var t=To(e),n=To(r);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=t[0][0],i=t[0][1],a=t[1][0],l=t[1][1],u=n[0][0],c=n[0][1],d=n[1][0],m=n[1][1],h=(m-c)*(a-o)-(d-u)*(l-i),g=(d-u)*(i-c)-(m-c)*(o-u),x=(a-o)*(i-c)-(l-i)*(o-u);if(h===0)return null;var E=g/h,v=x/h;if(E>=0&&E<=1&&v>=0&&v<=1){var I=o+E*(a-o),C=i+E*(l-i);return ya([I,C])}return null}var rp=nZ;function oZ(e,r,t){t===void 0&&(t={});var n=ya([1/0,1/0],{dist:1/0}),o=0;return ba(e,function(i){for(var a=To(i),l=0;l<a.length-1;l++){var u=ya(a[l]);u.properties.dist=_u(r,u,t);var c=ya(a[l+1]);c.properties.dist=_u(r,c,t);var d=_u(u,c,t),m=Math.max(u.properties.dist,c.properties.dist),h=c1(u,c),g=Nl(r,m,h+90,t),x=Nl(r,m,h-90,t),E=rp(us([g.geometry.coordinates,x.geometry.coordinates]),us([u.geometry.coordinates,c.geometry.coordinates])),v=null;E.features.length>0&&(v=E.features[0],v.properties.dist=_u(r,v,t),v.properties.location=o+_u(u,v,t)),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=l,n.properties.location=o),c.properties.dist<n.properties.dist&&(n=c,n.properties.index=l+1,n.properties.location=o+d),v&&v.properties.dist<n.properties.dist&&(n=v,n.properties.index=l),o+=d}}),n}var Gf=oZ;function iZ(e,r,t){var n=To(t);if(TM(t)!=="LineString")throw new Error("line must be a LineString");var o=Gf(t,e),i=Gf(t,r),a;o.properties.index<=i.properties.index?a=[o,i]:a=[i,o];for(var l=[a[0].geometry.coordinates],u=a[0].properties.index+1;u<a[1].properties.index+1;u++)l.push(n[u]);return l.push(a[1].geometry.coordinates),us(l,t.properties)}var l2=iZ;var aZ=1e-7;function c2(e){return{type:"Point",coordinates:e}}function sZ(e,r){let{coordinates:t}=r.geometry,{coordinates:n}=e.geometry,o=t.map(i=>Gf(e,c2(i)));return n.reduce((i,a)=>{let l=l2(c2(a),o[0],e),u=l2(c2(a),o[1],e),c=l1(l)<l1(u)?l:u;return c.properties=H(w({},e.properties),{entrances:[]}),i.concat([c])},[])}function d2(e,r){return r.reduce((t,n)=>{let o={epsilon:aZ},i=t.obstructions.findIndex(l=>wM(ep(n),l,o)),a=t.obstructions[i];if(a){let[l,u]=sZ(a,n);t.entrances.push(n),t.obstructions.splice(i,1,l,u)}return t},{obstructions:[e],entrances:[]})}p();p();p();var Lr=class{constructor(r){f(this,"id");this.id=r}};p();p();var np=class np{constructor(r,t,n){f(this,"__type",np.__type);f(this,"id",Bt());f(this,"latitude");f(this,"longitude");f(this,"floorId");f(this,"verticalOffset");var o;if(typeof r=="object")this.latitude=r.latitude,this.longitude=r.longitude,this.floorId=r.floorId,this.verticalOffset=(o=r.verticalOffset)!=null?o:0;else{if(t==null)throw new Error("Coordinate longitude is required.");this.latitude=r,this.longitude=t,this.floorId=n,this.verticalOffset=0}}static is(r){return r.__type===np.__type}get anchorTarget(){return this}get focusTarget(){return this}isEqual(r){return this.latitude===r.latitude&&this.longitude===r.longitude&&this.floorId===r.floorId}toJSON(){return{__type:np.__type,latitude:this.latitude,longitude:this.longitude,floorId:this.floorId,verticalOffset:this.verticalOffset}}toGeoJSON(){var r;return{type:"Point",coordinates:[this.longitude,this.latitude,(r=this.verticalOffset)!=null?r:0]}}destroy(){}};f(np,"__type","coordinate");var p2=np,De=p2;function m2(e){var o,i,a,l,u,c;let r=((i=(o=e.enterprise)==null?void 0:o.locations)==null?void 0:i.reduce((d,m)=>(d[m.id]=m,d),{}))||{};for(let d of((a=e.enterprise)==null?void 0:a.locationInstances)||[])r[d.id]=d;let t={};for(let d of e["floorstack.json"]||[])t[d.id]=d;let n={};for(let d of((l=e["floor.geojson"])==null?void 0:l.features)||[])d.properties&&d.properties.id&&(n[d.properties.id]=d.properties);return{type:"downloaded",data:e,optimized:{"enterprise-location":r,"enterprise-category":((c=(u=e.enterprise)==null?void 0:u.categories)==null?void 0:c.reduce((d,m)=>(d[m.id]=m,d),{}))||{},"floor-stack":t,floor:n}}}function HM(e){return/^https?:\/\/cdn\.mappedin\.com/.test(e)}function WM(e){let r=e.split("?")[1];return!!(r!=null&&r.includes("sv="))}function qr(e,r){var n;let t=((n=e==null?void 0:e.properties)==null?void 0:n.id)||"unknown";if(e.geometry==null)return z.error('Cannot get the center coordinate for "'.concat(t,'" because it has no geometry.')),new De({latitude:0,longitude:0,floorId:r});try{if(e.geometry.type==="LineString"){let[[o,i],[a,l]]=e.geometry.coordinates,u=(o+a)/2,c=(i+l)/2;return new De({latitude:c,longitude:u,floorId:r})}else if(e.geometry.type==="Point"){let[o,i]=e.geometry.coordinates;return new De({latitude:i,longitude:o,floorId:r})}else if(e.geometry.type==="Polygon"){let o=e;if(o.properties.center!=null){let[i,a]=o.properties.center;return new De({latitude:a,longitude:i,floorId:r})}}}catch(o){}try{let[o,i]=ep(e).geometry.coordinates;return new De({latitude:i,longitude:o,floorId:r})}catch(o){return z.error('Failed to get center coordinate for "'.concat(t,'" ').concat(o instanceof Error?o.stack:"")),new De({latitude:0,longitude:0,floorId:r})}}function qM(e,r){return r&&(e.flags[r.index]&1<<r.bit)!==0}var wo,Kr,jl,Os,op=class op extends Lr{constructor(t,n){super(n.mvfData.properties.id);f(this,"__type",op.__type);D(this,wo);D(this,Kr,{});D(this,jl);D(this,Os);M(this,wo,t),M(this,jl,n.floorId),M(this,Os,n.mvfData)}static is(t){return t.__type===op.__type}get locations(){return s(this,Kr).locations?s(this,Kr).locations:(s(this,Kr).locations=(s(this,wo).locationIdsByNodeId[this.id]||[]).map(t=>s(this,wo).getById("enterprise-location",t)).filter(Boolean),s(this,Kr).locations)}get space(){var t;return s(this,wo).getById("space",(t=s(this,wo).spaceIdsByNodeId[this.id])==null?void 0:t[0])}get object(){var t;return s(this,wo).getById("object",(t=s(this,wo).objectIdsByNodeId[this.id])==null?void 0:t[0])}get floor(){let t=s(this,wo).getById("floor",s(this,jl));if(t==null)throw new Error("Floor ".concat(s(this,jl)," not found!"));return t}get coordinate(){return s(this,Kr).coordinate==null&&(s(this,Kr).coordinate=qr(s(this,Os),s(this,jl))),s(this,Kr).coordinate}get externalId(){var t;return(t=s(this,Os).properties.externalId)!=null?t:""}get neighbors(){if(s(this,Kr).neighbors==null){let t=s(this,Os).properties.neighbors.map(n=>{let o=s(this,wo).getById("node",n.id);if(o==null)throw new Error("Node ".concat(n.id," not found!"));return o});s(this,Kr).neighbors=t}return s(this,Kr).neighbors}get navigationFlags(){if(s(this,Kr).navigationFlags==null){let t=[],n=s(this,Os).properties.flags;if(n!=null&&n.length>0)for(let[o,i]of Object.entries(s(this,wo).navigationFlags))n.length>i.index&&n[i.index]!=null&&qM({flags:n},i)&&t.push(o);s(this,Kr).navigationFlags=Object.freeze(t)}return s(this,Kr).navigationFlags}get geoJSON(){return H(w({},s(this,Os)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:op.__type,id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(t=>t.id)}}destroy(){for(let t of Object.keys(s(this,Kr)))delete s(this,Kr)[t]}};wo=new WeakMap,Kr=new WeakMap,jl=new WeakMap,Os=new WeakMap,f(op,"__type","node");var f2=op,ni=f2;p();p();p();p();var $f,ks,ip=class ip extends Lr{constructor(t){super(String(Bt()));f(this,"__type",ip.__type);D(this,$f,{});D(this,ks);M(this,ks,t.mvfData)}static is(t){return t.__type===ip.__type}get url(){return s(this,ks).url}get name(){if("displayName"in s(this,ks))return s(this,ks).displayName;if("label"in s(this,ks))return s(this,ks).label}toJSON(){return{__type:ip.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,$f)))delete s(this,$f)[t]}};$f=new WeakMap,ks=new WeakMap,f(ip,"__type","hyperlink");var h2=ip,Ul=h2;p();p();function Vf(e){return typeof e=="string"?e:e.id}function y2(e){return Array.isArray(e)&&Number.isFinite(e[0])&&Number.isFinite(e[1])}var g2=8,Na=e=>typeof e=="number"?e.toFixed(g2):y2(e)?e[1].toFixed(g2)+"-"+e[0].toFixed(g2):e.map(r=>Na(r)).join("-"),uZ=/^https:\/\/cdn\.mappedin\.com\/category-symbols\/.+$/,lZ=/^https:\/\/cdn-staging\.mappedin\.net\/category-symbols\/.+$/,cZ=e=>uZ.test(e)||lZ.test(e),dZ=/^https:\/\/cdn\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,pZ=/^https:\/\/cdn-staging\.mappedin\.net\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,mZ=e=>cZ(e)?!1:dZ.test(e)||pZ.test(e),f1=e=>{var a;if(!mZ(e))return null;let r="";e.startsWith("https://")?(r="https://",e=e.slice(8)):e.startsWith("http://")&&(r="http://",e=e.slice(7));let[t,n,o]=e.split("/"),i=(a=o.split(".").pop())!=null?a:"";return{origin:r+t,mapId:n,fileName:o,fileType:i}};function b2(e){return e.reduce((r,t,n)=>n===0?r:r+Lo(e[n-1].toGeoJSON().coordinates,t.toGeoJSON().coordinates),0)}function zl(e){return e!=null&&typeof e=="object"&&"__type"in e&&e.__type!==null&&typeof e.__type=="string"}function v2(e){return e!=null&&typeof e=="object"&&"name"in e&&e.name!=null&&typeof e.name=="string"&&e.name!==""}function KM(e){return zl(e)&&v2(e)}var Zf,Ru,Gl,ap=class ap extends Lr{constructor(t){super(String(Bt()));f(this,"__type",ap.__type);D(this,Zf,{});D(this,Ru);D(this,Gl);M(this,Ru,t.mvfData),M(this,Gl,t.mapData)}static is(t){return t.__type===ap.__type}get url(){let t=s(this,Ru).url;if(s(this,Gl).tokenManager==null)return t;let n=f1(s(this,Ru).url);if(n==null)return t;let o=n.mapId;try{if(s(this,Gl).tokenManager.isEnterpriseMode())return t;let i=s(this,Gl).tokenManager.getSasToken(o).token;if(i==null||i==="")throw new Error("SAS token empty!");return"".concat(t,"?").concat(i)}catch(i){return n.fileType!=="svg"&&z.error("Error getting SAS token for image",{error:i,url:t}),t}}get name(){return s(this,Ru).altText}get altText(){return s(this,Ru).altText}toJSON(){return{__type:ap.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let t of globalThis.Object.keys(s(this,Zf)))delete s(this,Zf)[t]}};Zf=new WeakMap,Ru=new WeakMap,Gl=new WeakMap,f(ap,"__type","image");var x2=ap,Bs=x2;p();var $l,Ui=class{constructor(r,t){f(this,"id");D(this,$l);this.id=r}get geoJSONBoundingBox(){return s(this,$l)?s(this,$l):"bbox"in this.geoJSON.geometry&&this.geoJSON.geometry.bbox?this.geoJSON.geometry.bbox:(M(this,$l,bu(this.geoJSON)),s(this,$l))}get geoJSON(){return{properties:null,type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}}}};$l=new WeakMap;var sp,_s,Ls,dn=class extends Ui{constructor(t,n){super(n.properties.id,t);D(this,sp);D(this,_s);D(this,Ls,{});M(this,sp,t),M(this,_s,n)}get externalId(){var t;return(t=s(this,_s).properties.externalId)!=null?t:""}get name(){var n,o,i,a;let t=(o=(n=s(this,_s).properties.details)==null?void 0:n.name)!=null?o:"";return t===""&&(t=(a=(i=this.locationProfiles.find(l=>l.name&&l.name.length>0))==null?void 0:i.name)!=null?a:""),t}get icon(){var t;return(t=this.locationProfiles.find(n=>n.icon!=null&&n.icon.url!=null&&n.icon.url.length>0))==null?void 0:t.icon}get description(){var n,o,i,a;let t=(o=(n=s(this,_s).properties.details)==null?void 0:n.description)!=null?o:"";return t===""&&(t=(a=(i=this.locationProfiles.find(l=>l.description&&l.description.length>0))==null?void 0:i.description)!=null?a:""),t}get images(){var n,o,i,a,l;if(s(this,Ls).images!=null)return s(this,Ls).images;let t=(i=(o=(n=s(this,_s).properties.details)==null?void 0:n.images)==null?void 0:o.map(u=>new Bs({mvfData:u,mapData:s(this,sp)})))!=null?i:[];return(t==null||t.length===0)&&(t=(l=(a=this.locationProfiles.find(u=>u.images.length>0))==null?void 0:a.images)!=null?l:[]),s(this,Ls).images=t,t}get links(){var n,o,i,a,l;if(s(this,Ls).links!=null)return s(this,Ls).links;let t=(i=(o=(n=s(this,_s).properties.details)==null?void 0:n.links)==null?void 0:o.map(u=>new Ul({mvfData:u})))!=null?i:[];return(t==null||t.length===0)&&(t=(l=(a=this.locationProfiles.find(u=>u.links.length>0))==null?void 0:a.links)!=null?l:[]),s(this,Ls).links=t,t}get locationProfiles(){var t;return(t=s(this,sp).locationProfilesByAttachedFeatureId[this.id])!=null?t:[]}};sp=new WeakMap,_s=new WeakMap,Ls=new WeakMap;var Hf,Vl,lp,cp,up=class up extends dn{constructor(t,n){super(t,n.mvfData);f(this,"__type",up.__type);D(this,Hf);D(this,Vl);D(this,lp,{});D(this,cp);M(this,Hf,t),M(this,Vl,n.floorId),M(this,cp,n.mvfData)}static is(t){return t.__type===up.__type}get center(){return s(this,lp).center==null&&(s(this,lp).center=qr(s(this,cp),s(this,Vl))),s(this,lp).center}get floor(){let t=s(this,Hf).getById("floor",s(this,Vl));if(t==null)throw new Error("Floor ".concat(s(this,Vl)," not found!"));return t}get geoJSON(){return H(w({},s(this,cp)),{properties:null})}get focusTarget(){return this}get anchorTarget(){return this.center}toJSON(){return{__type:up.__type,id:this.id,name:this.name,floor:this.floor.id}}destroy(){}};Hf=new WeakMap,Vl=new WeakMap,lp=new WeakMap,cp=new WeakMap,f(up,"__type","area");var I2=up,oi=I2;p();var Zl,Rs,Hl,Wl,dp=class dp extends dn{constructor(t,n){super(t,n.mvfData);f(this,"__type",dp.__type);D(this,Zl);D(this,Rs);D(this,Hl);D(this,Wl);M(this,Rs,{}),M(this,Wl,n.mvfData),M(this,Zl,t),M(this,Hl,n.floorId)}static is(t){return t.__type===dp.__type}get floor(){let t=s(this,Zl).getById("floor",s(this,Hl));if(t==null)throw new Error("Floor ".concat(s(this,Hl)," not found!"));return t}get center(){return s(this,Rs).center==null&&(s(this,Rs).center=qr(s(this,Wl),s(this,Hl))),s(this,Rs).center}get isExterior(){var o;if(s(this,Wl).properties.isExterior)return!0;let t=s(this,Zl).obstructionIdByEntranceId[this.id],n=s(this,Zl).getMVFFeatureById("obstruction",t);return(o=n==null?void 0:n.properties.footprintComponent)!=null?o:!1}get geoJSON(){return H(w({},s(this,Wl)),{properties:null})}get focusTarget(){return this.center}get anchorTarget(){return this.center}toJSON(){return{__type:dp.__type,id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of Object.keys(s(this,Rs)))delete s(this,Rs)[t]}};Zl=new WeakMap,Rs=new WeakMap,Hl=new WeakMap,Wl=new WeakMap,f(dp,"__type","door");var E2=dp,_n=E2;p();var Ns,ql,Jr,Nu,pp=class pp extends dn{constructor(t,n){super(t,n.mvfData);f(this,"__type",pp.__type);D(this,Ns);D(this,ql);D(this,Jr,{});D(this,Nu);M(this,Ns,t),M(this,ql,n.floorId),M(this,Nu,n.mvfData)}static is(t){return t.__type===pp.__type}get type(){return hZ(s(this,Nu).properties.kind)}get locations(){if(s(this,Jr).locations)return s(this,Jr).locations;s(this,Jr).locations=[];let t=s(this,Ns).mvfLocationsByGeometryId[s(this,Nu).properties.id];if((t==null?void 0:t.length)>0)for(let n of t){let o=s(this,Ns).getById("enterprise-location",n.id);o&&s(this,Jr).locations.push(o)}return s(this,Jr).locations}get floor(){let t=s(this,Ns).getById("floor",s(this,ql));if(t==null)throw new Error("Floor ".concat(s(this,ql)," not found!"));return t}get doors(){var n,o;if(s(this,Jr).doors)return s(this,Jr).doors;s(this,Jr).doors=[];let t=(o=(n=s(this,Ns).entranceNodeIdsBySpaceId)==null?void 0:n[this.id])!=null?o:[];for(let i of t){let a=s(this,Ns).doorsByNodeId[i];a&&s(this,Jr).doors.push(a)}return s(this,Jr).doors}get center(){return s(this,Jr).center==null&&(s(this,Jr).center=qr(s(this,Nu),s(this,ql))),s(this,Jr).center}get geoJSON(){return H(w({},s(this,Nu)),{properties:null})}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get anchorTarget(){return this.center}toJSON(){return{__type:pp.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of Object.keys(s(this,Jr)))delete s(this,Jr)[t]}};Ns=new WeakMap,ql=new WeakMap,Jr=new WeakMap,Nu=new WeakMap,f(pp,"__type","space");var C2=pp,fZ=["room","hallway","exterior","void","gate"];function hZ(e){if(e==null||e==="default")return"room";let r=e.toLowerCase();return fZ.includes(r)?r:"room"}var gr=C2;p();var ii,kt,ro,fp,h1,mp=class mp extends Ui{constructor(t,n){super(n.mvfData.properties.id,t);D(this,fp);f(this,"__type",mp.__type);D(this,ii);D(this,kt,{});D(this,ro);M(this,ii,t),M(this,ro,n.mvfData)}static is(t){return t.__type===mp.__type}get focusTarget(){return this}get name(){var n;if(!("name"in s(this,ro).properties))return(n=s(this,ro).properties.externalId)!=null?n:"";let t=Q(this,fp,h1).call(this,"name");return typeof t=="string"?t:""}get shortName(){var n;if(!("shortName"in s(this,ro).properties))return(n=s(this,ro).properties.externalId)!=null?n:"";let t=Q(this,fp,h1).call(this,"shortName");return typeof t=="string"?t:""}get subtitle(){let t=Q(this,fp,h1).call(this,"subtitle");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,ro).properties.externalId)!=null?t:""}get elevation(){return s(this,ro).properties.elevation}get maxHeight(){return s(this,ro).properties.maxHeight}get spaces(){if(s(this,kt).spaces==null){let t=s(this,ii).spaces.filter(n=>n.floor.id===this.id);s(this,kt).spaces=t}return s(this,kt).spaces}get geoJSON(){var t;return{type:"Feature",properties:null,geometry:(t=s(this,ro).geometry)!=null?t:{type:"Polygon",coordinates:[]}}}get objects(){if(s(this,kt).objects==null){let t=s(this,ii).objects.filter(n=>n.floor.id===this.id);s(this,kt).objects=t}return s(this,kt).objects}get connections(){if(s(this,kt).connections==null){let t=s(this,ii).connections.filter(n=>n.floors.includes(this));s(this,kt).connections=t}return s(this,kt).connections}get doors(){if(s(this,kt).doors==null){let t=s(this,ii).doors.filter(n=>n.floor.id===this.id);s(this,kt).doors=t}return s(this,kt).doors}get annotations(){if(s(this,kt).annotations==null){let t=s(this,ii).annotations.filter(n=>n.floor.id===this.id);s(this,kt).annotations=t}return s(this,kt).annotations}get pois(){if(s(this,kt).pois==null){let t=s(this,ii).pointsOfInterest.filter(n=>n.floor.id===this.id);s(this,kt).pois=t}return s(this,kt).pois}get floorStack(){if(s(this,kt).floorStack==null){let t=s(this,ii).floorStacks.find(n=>n.floors.includes(this));s(this,kt).floorStack=t}return s(this,kt).floorStack}get center(){return s(this,kt).center==null&&(s(this,kt).center=qr(s(this,ro),this.id)),s(this,kt).center}toJSON(){return{__type:mp.__type,id:this.id,name:this.name,shortName:this.shortName,subtitle:this.subtitle,elevation:this.elevation,maxHeight:this.maxHeight,spaces:this.spaces.map(t=>t.id),objects:this.objects.map(t=>t.id),connections:this.connections.map(t=>t.id),doors:this.doors.map(t=>t.id),annotations:this.annotations.map(t=>t.id),pois:this.pois.map(t=>t.id)}}destroy(){for(let t of globalThis.Object.keys(s(this,kt)))delete s(this,kt)[t]}};ii=new WeakMap,kt=new WeakMap,ro=new WeakMap,fp=new WeakSet,h1=function(t){let n=s(this,ro).properties[t];return s(this,ii).getPropTranslation(this.__type,t,this.id,n)},f(mp,"__type","floor");var S2=mp,no=S2;p();p();p();function hp(e){let r;if(gr.is(e)||_n.is(e)||oo.is(e)||oi.is(e)||Yr.is(e))r=e.center;else if(Mo.is(e)||zi.is(e))r=e.coordinate;else if(De.is(e))r=e;else if(ni.is(e))r=e.coordinate;else if(ja.is(e))r=e.coordinates[0];else return;return r}p();p();var JM=3.333333333,Wf={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!0,floorGap:"auto"},disableUpdateStateValidation:!1},Ua="ExteriorWalls",ju="Walls",YM=0,gp="InteriorDoors",yp="ExteriorDoors",yr="GeometryLayer",za="LabelsLayer",Gi="MarkersLayer",bp="FootprintLayer",Kl="OcclusionLayer",Jl="AreasLayer",vp="ImagesLayer",Yl="FacadesLayer",Ga="PathsLayer";var XM=["https://mappedin.auth0.com","https://mappedin-staging.auth0.com","https://staging.mappedin.com","https://mappedin-staging.auth0.com/userinfo","https://mappedin.com","https://mappedin.auth0.com/userinfo"],gZ={orange:"#F26336",teal:"#057685",lightTeal:"#5DC7D0"};var yZ=new Set(["outdoorView","bearing","pitch","zoomLevel","screenOffsets","debug","initialFloor","shadingAndOutlines","wallTopColor","style","multiFloorView","occlusion","imagePlacementOptions","flipImagesToFaceCamera","injectStyles","useStandaloneCamera","preloadFloors"]),bZ=new Set(["style","enabled","layersHiddenByGeometry","lowDpi"]);function D2(e){var r,t;(r=e.outdoorView)!=null&&r.enabled&&!((t=e.outdoorView)!=null&&t.token)&&z.error("Enable outdoor view requires a token. Provide token in `options.outdoorView.token`")}function T2(e,r){var o,i,a,l,u,c,d;let t=((o=e==null?void 0:e.outdoorView)==null?void 0:o.token)||r.outdoorViewToken,n=H(w(w({},Wf),e),{outdoorView:w({enabled:((i=e==null?void 0:e.outdoorView)==null?void 0:i.enabled)===void 0?!!t:(a=e==null?void 0:e.outdoorView)==null?void 0:a.enabled,layersHiddenByGeometry:(l=Wf.outdoorView)==null?void 0:l.layersHiddenByGeometry},e==null?void 0:e.outdoorView),bearing:(c=(u=e==null?void 0:e.bearing)!=null?u:r.naturalBearing)!=null?c:0,imagePlacementOptions:w(w({},Wf.imagePlacementOptions),e==null?void 0:e.imagePlacementOptions),multiFloorView:w(w({},Wf.multiFloorView),e==null?void 0:e.multiFloorView),disableUpdateStateValidation:(d=e==null?void 0:e.disableUpdateStateValidation)!=null?d:!1});return t&&n.outdoorView&&(n.outdoorView.token=t),n}function QM(e){let r={remove_watermark:!1};if(e)try{let t=ag(e);Object.assign(r,t.capabilities)}catch(t){z.error("Error decoding capabilities from token",t)}return r}function eA(e){let r=Object.fromEntries(Object.entries(e).filter(([t])=>yZ.has(t)));return r.outdoorView&&(r.outdoorView=Object.fromEntries(Object.entries(r.outdoorView).filter(([t])=>bZ.has(t)))),r}var Uu,ai,js,xp=class xp extends dn{constructor(t,n){let o=Object.values(n.mvfDataByFloorId)[0];super(t,o);f(this,"__type",xp.__type);D(this,Uu);D(this,ai);D(this,js);M(this,ai,{}),M(this,Uu,t),M(this,js,n.mvfDataByFloorId)}static is(t){return t.__type===xp.__type}get accessible(){var t;return(t=Object.values(s(this,js))[0].properties.accessible)!=null?t:!1}get type(){var t,n;return(n=(t=Object.values(s(this,js))[0].properties.kind)==null?void 0:t.split(".")[1])!=null?n:"unknown"}get extra(){return Object.values(s(this,js))[0].properties.extra}get coordinates(){return s(this,ai).coordinates==null&&(s(this,ai).coordinates=Object.entries(s(this,js)).map(([t,n])=>qr(n,t))),s(this,ai).coordinates}get nodes(){return Object.values(s(this,js))[0].properties.nodes.map(t=>s(this,Uu).getById("node",t))}get floors(){return this.coordinates.map(t=>t.floorId?s(this,Uu).getById("floor",t.floorId):void 0).filter(Vm)}get locationProfiles(){var n,o,i,a,l;if(s(this,ai).locationProfiles!=null)return s(this,ai).locationProfiles;let t=super.locationProfiles;if(t==null||t.length===0){let u=[(o=(n=this.coordinates[0])==null?void 0:n.longitude)!=null?o:0,(a=(i=this.coordinates[0])==null?void 0:i.latitude)!=null?a:0],c=Na(u),d=(l=s(this,Uu).mvfConnectionIdsByLatLon[c])!=null?l:[];for(let m of d){let h=s(this,Uu).locationProfilesByAttachedFeatureId[m];if(h!=null){t=h;break}}}return s(this,ai).locationProfiles=t!=null?t:[],t}get focusTarget(){return this.coordinates}toJSON(){return{__type:xp.__type,id:this.id,name:this.name,type:this.type,externalId:this.externalId,coordinates:this.coordinates.map(t=>t.toJSON()),floors:this.floors.map(t=>t.id),extra:this.extra}}destroy(){for(let t of Object.keys(s(this,ai)))delete s(this,ai)[t]}};Uu=new WeakMap,ai=new WeakMap,js=new WeakMap,f(xp,"__type","connection");var w2=xp,Ao=w2;p();var Xl,Ql,Fo,zu,Ip=class Ip extends dn{constructor(t,n){super(t,n.mvfData);f(this,"__type",Ip.__type);D(this,Xl);D(this,Ql);D(this,Fo,{});D(this,zu);M(this,Xl,t),M(this,Ql,n.floorId),M(this,zu,n.mvfData)}static is(t){return t.__type===Ip.__type}get type(){let t=s(this,zu).properties.kind;return t==null&&(t="object"),t==="Desks"&&(t="desk"),t.toLowerCase()}get locations(){if(s(this,Fo).locations)return s(this,Fo).locations;s(this,Fo).locations=[];let t=s(this,Xl).mvfLocationsByGeometryId[s(this,zu).properties.id];if((t==null?void 0:t.length)>0)for(let n of t){let o=s(this,Xl).getById("enterprise-location",n.id);o&&s(this,Fo).locations.push(o)}return s(this,Fo).locations}get floor(){let t=s(this,Xl).getById("floor",s(this,Ql));if(t==null)throw new Error("Floor ".concat(s(this,Ql)," not found!"));return t}get center(){return s(this,Fo).center==null&&(s(this,Fo).center=qr(s(this,zu),s(this,Ql))),s(this,Fo).center}get geoJSON(){return H(w({},s(this,zu)),{properties:null})}get anchorTarget(){return this.center}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}toJSON(){return{__type:Ip.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let t of globalThis.Object.keys(s(this,Fo)))s(this,Fo)[t]=null}};Xl=new WeakMap,Ql=new WeakMap,Fo=new WeakMap,zu=new WeakMap,f(Ip,"__type","object");var M2=Ip,oo=M2;p();var qf,ec,Gu,Cp,Ep=class Ep extends dn{constructor(t,n){super(t,n.mvfData);f(this,"__type",Ep.__type);D(this,qf);D(this,ec);D(this,Gu,{});D(this,Cp);M(this,qf,t),M(this,Cp,n.mvfData),M(this,ec,n.floorId)}static is(t){return t.__type===Ep.__type}get floor(){let t=s(this,qf).getById("floor",s(this,ec));if(t==null)throw new Error("Floor ".concat(s(this,ec)," not found!"));return t}get coordinate(){return s(this,Gu).coordinate==null&&(s(this,Gu).coordinate=qr(s(this,Cp),s(this,ec))),s(this,Gu).coordinate}get geoJSON(){return H(w({},s(this,Cp)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:Ep.__type,id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let t in s(this,Gu))s(this,Gu)[t]=null}};qf=new WeakMap,ec=new WeakMap,Gu=new WeakMap,Cp=new WeakMap,f(Ep,"__type","point-of-interest");var A2=Ep,Mo=A2;p();var Dp,tc,$i,rc,nc,Kf,P2,Sp=class Sp extends dn{constructor(t,n){var o;super(t,n.mvfData);D(this,Kf);f(this,"__type",Sp.__type);D(this,Dp);D(this,tc);D(this,$i,{});D(this,rc);D(this,nc);M(this,Dp,t),M(this,tc,n.floorId),M(this,rc,n.mvfData),M(this,nc,(o=n.symbol)!=null?o:{url:"",name:""})}static is(t){return t.__type===Sp.__type}get group(){return Q(this,Kf,P2).call(this).group}get type(){return Q(this,Kf,P2).call(this).type}get coordinate(){return s(this,$i).coordinate==null&&(s(this,$i).coordinate=qr(s(this,rc),s(this,tc))),s(this,$i).coordinate}get floor(){let t=s(this,Dp).getById("floor",s(this,tc));if(t==null)throw new Error("Floor ".concat(s(this,tc)," not found!"));return t}get name(){return super.name||s(this,nc).name||""}get icon(){return s(this,$i).icon==null&&(s(this,$i).icon=super.icon||new Bs({mvfData:{url:s(this,nc).url,altText:s(this,nc).name},mapData:s(this,Dp)})),s(this,$i).icon}get geoJSON(){return H(w({},s(this,rc)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:Sp.__type,id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let t of Object.keys(s(this,$i)))delete s(this,$i)[t]}};Dp=new WeakMap,tc=new WeakMap,$i=new WeakMap,rc=new WeakMap,nc=new WeakMap,Kf=new WeakSet,P2=function(){let[t,n]=s(this,rc).properties.symbolId.split("--");return{group:t,type:n}},f(Sp,"__type","annotation");var F2=Sp,zi=F2;p();var $u,si,Vi,wp,Jf,k2,Tp=class Tp extends Ui{constructor(t,n){super(n.mvfData.id,t);D(this,Jf);f(this,"__type",Tp.__type);D(this,$u);D(this,si,{});D(this,Vi);D(this,wp);M(this,$u,t),M(this,Vi,n.mvfData),M(this,wp,n.facadeId)}static is(t){return t.__type===Tp.__type}get type(){return s(this,Vi).type}get name(){let t=Q(this,Jf,k2).call(this,"name");return typeof t=="string"?t:""}get shortName(){let t=Q(this,Jf,k2).call(this,"shortName");return typeof t=="string"?t:""}get externalId(){var t;return(t=s(this,Vi).externalId)!=null?t:""}get floors(){var t,n;if(s(this,si).floors==null){let o=((n=(t=s(this,Vi).floors)!=null?t:s(this,Vi).maps)!=null?n:[]).reduce((i,a)=>{let l=s(this,$u).floorsById[a];return l&&i.push(l),i},[]);o.length===0&&z.error("Floor stack ".concat(this.id," has no floors")),s(this,si).floors=o.sort((i,a)=>i.elevation-a.elevation)}return s(this,si).floors}get defaultFloor(){if(s(this,si).defaultFloor!=null)return s(this,si).defaultFloor;let t=s(this,Vi).defaultFloor?s(this,$u).getById("floor",s(this,Vi).defaultFloor):void 0;return s(this,si).defaultFloor=t||this.floors.reduce((n,o)=>Math.abs(o.elevation)<Math.abs(n.elevation)?o:n),s(this,si).defaultFloor}get facade(){return s(this,wp)?s(this,$u).facadesById[s(this,wp)]:void 0}toJSON(){return{__type:Tp.__type,id:this.id,name:this.name,shortName:this.shortName,type:this.type,floors:this.floors.map(t=>t.id)}}destroy(){for(let t of globalThis.Object.keys(s(this,si)))delete s(this,si)[t]}};$u=new WeakMap,si=new WeakMap,Vi=new WeakMap,wp=new WeakMap,Jf=new WeakSet,k2=function(t){return s(this,$u).getPropTranslation(this.__type,t,this.id,s(this,Vi)[t])},f(Tp,"__type","floor-stack");var O2=Tp,g1=O2;p();var Ap,oc,Fp,$a,Mp=class Mp extends Ui{constructor(t,n){super(n.mvfData.id,t);f(this,"__type",Mp.__type);D(this,Ap);D(this,oc);D(this,Fp);D(this,$a,{});M(this,Ap,n.mvfData),M(this,oc,t),M(this,Fp,n.floorStackId)}static is(t){return t.__type===Mp.__type}get floorStack(){return s(this,oc).getById("floor-stack",s(this,Fp))}get spaces(){if(!s(this,$a).spaces){s(this,$a).spaces=[];for(let t of s(this,Ap).spaces){let n=s(this,oc).getById("space",t.spaceId);n&&s(this,$a).spaces.push(n)}}return s(this,$a).spaces}get center(){if(!s(this,$a).center){let t={type:"FeatureCollection",features:[]};for(let o of this.spaces){let i=s(this,oc).mvfSpacesById[o.id];i&&t.features.push(i)}if(t.features.length===0)throw new Vr("No geometry found for facade!");let n=ep(t);s(this,$a).center=new De({latitude:n.geometry.coordinates[1],longitude:n.geometry.coordinates[0],floorId:s(this,Ap).spaces[0].floorId})}return s(this,$a).center}get focusTarget(){return this.spaces}get anchorTarget(){return this.center}toJSON(){return{id:this.id,__type:Mp.__type,floorStackId:s(this,Fp),floorStack:this.floorStack,spaces:this.spaces}}};Ap=new WeakMap,oc=new WeakMap,Fp=new WeakMap,$a=new WeakMap,f(Mp,"__type","facade");var B2=Mp,Yr=B2;p();var vZ=new Set(["wall","area"]),xZ=new Set(["void","desk-entrance"]),IZ=(e,r)=>{var u,c,d,m,h,g,x,E,v,I,C;let t={},n={},o={},i={},a={},l={};for(let S of e["location.json"]||[]){let T=new ic(r,{mvfData:S});if(t[S.id]=T,S.externalId&&(i[S.externalId]==null&&(i[S.externalId]=[]),i[S.externalId].push(T)),S.categories)for(let F of S.categories)a[F]==null&&(a[F]=[]),a[F].push(T);let A=[...(c=(u=S.obstructions)==null?void 0:u.map(F=>F.id))!=null?c:[],...(m=(d=S.spaces)==null?void 0:d.map(F=>F.id))!=null?m:[],...(g=(h=S.annotations)==null?void 0:h.map(F=>F.id))!=null?g:[],...(x=S.connections)!=null?x:[],...(v=(E=S.entrances)==null?void 0:E.map(F=>F.id))!=null?v:[],...(C=(I=S.areas)==null?void 0:I.map(F=>F.id))!=null?C:[]];for(let F of A)F&&(l[F]==null&&(l[F]=[]),l[F].push(T))}for(let S of e["category.json"]||[]){let T=new b1(r,{mvfData:S});n[S.id]=T,S.parent&&(o[S.parent]==null&&(o[S.parent]=[]),o[S.parent].push(T))}return{locationCategoriesByParentId:o,locationProfilesById:t,locationCategoriesById:n,locationProfilesByExternalId:i,locationProfilesByCategoryId:a,locationProfilesByAttachedFeatureId:l}},EZ=(e,r,t)=>{var E;let n={},o={},i={},a={},l={},u={},c={},d={},m={},h={},g={},x=globalThis.Object.keys(e.space);for(let v of x){let I=e.space[v];if(I!=null){for(let C of I.features)if(g[C.properties.id]=v,u[C.properties.id]=C,C.properties.kind==="desk-entrance"&&(l[C.properties.externalId]==null&&(l[C.properties.externalId]=[]),l[C.properties.externalId].push(...C.properties.destinationNodes)),!LZ(C)){if((E=C.properties.kind)!=null&&E.includes("connection")){let S=Na(C.geometry.coordinates);m[S]==null&&(m[S]=[]),m[S].push(C.properties.id);continue}if(C.properties.kind==="poi"||C.geometry.type==="Point"&&C.properties.kind==null){let S=new Mo(t,{floorId:v,mvfData:C});i[C.properties.id]=S,d[v]||(d[v]=[]),d[v].push(C),C.properties.externalId&&(a[C.properties.externalId]==null&&(a[C.properties.externalId]=[]),a[C.properties.externalId].push(S))}else if(C.geometry.type==="Point")z.warn("Encountered a point space with an unknown kind!",C.properties.kind);else{let S=new gr(t,{floorId:v,mvfData:C});n[C.properties.id]=S,C.properties.externalId&&(o[C.properties.externalId]==null&&(o[C.properties.externalId]=[]),o[C.properties.externalId].push(S)),c[v]||(c[v]=[]),c[v].push(C)}}}}for(let v in m){let I=m[v],C={};for(let T of I){let A=g[T],F=u[T],P=r==null?void 0:r["n_"+F.properties.id.split("s_")[1]];C[A]=H(w({},F),{properties:H(w({},F.properties),{accessible:(P==null?void 0:P.accessible)===!0})})}let S=new Ao(t,{mvfDataByFloorId:C});h[S.id]=S}return{spacesById:n,spacesByExternalId:o,poisById:i,poisByExternalId:a,connectionsById:h,objectEntranceNodeIdsByObstructionId:l,mvfSpacesById:u,connectionIdsByLatLon:m,mvfSpacesByFloorId:c,mvfPoisByFloorId:d}},CZ=(e,r)=>{var a,l;let t={},n={},o={},i={};for(let u of e["node.geojson"].features){o[u.properties.id]=u;let c=new ni(r,{mvfData:u,floorId:(a=u.properties.floor)!=null?a:u.properties.map});t[u.properties.id]=c,u.properties.externalId&&(n[u.properties.externalId]==null&&(n[u.properties.externalId]=[]),n[u.properties.externalId].push(c));let d=(l=u.properties.floor)!=null?l:u.properties.map;i[d]||(i[d]=[]),i[d].push(u)}return{nodesById:t,nodesByExternalId:n,mvfNodesById:o,mvfNodesByFloorId:i}},SZ=(e,r)=>{var l,u;let t={},n={},o={},i={},a=globalThis.Object.keys(e.obstruction);for(let c of a){let d=e.obstruction[c];if(d!=null)for(let m of d.features){o[m.properties.id]=m;for(let g of m.properties.entrances)i[g]=m.properties.id;if(vZ.has((u=(l=m.properties.kind)==null?void 0:l.toLowerCase())!=null?u:""))continue;let h=new oo(r,{floorId:c,mvfData:m});t[m.properties.id]=h,m.properties.externalId&&(n[m.properties.externalId]==null&&(n[m.properties.externalId]=[]),n[m.properties.externalId].push(h))}}return{objectsById:t,objectsByExternalId:n,mvfObstructionById:o,obstructionIdByEntranceId:i}},DZ=(e,r)=>{let t={},n={},o={};if("floor.geojson"in e&&e["floor.geojson"]!=null)for(let i of e["floor.geojson"].features){o[i.properties.id]=i.properties;let a=new no(r,{mvfData:i});t[i.properties.id]=a,i.properties.externalId&&(n[i.properties.externalId]==null&&(n[i.properties.externalId]=[]),n[i.properties.externalId].push(a))}else for(let i of e["map.geojson"]){o[i.id]=i;let a=new no(r,{mvfData:{properties:i}});t[i.id]=a}return{floorsById:t,floorsByExternalId:n,mvfFloorsById:o}},TZ=(e,r)=>{var u;let t={},n={},o={},i={},a={},l=e["floorstack.json"]||e["mapstack.json"]||e["mapstack.geojson"];if(l!=null)for(let c of l){let d=(u=e.facade)==null?void 0:u[c.id],m=new g1(r,{mvfData:c,facadeId:d==null?void 0:d.id});if(t[c.id]=m,c.externalId&&(n[c.externalId]==null&&(n[c.externalId]=[]),n[c.externalId].push(m)),o[c.id]=c,d){let h=new Yr(r,{mvfData:d,floorStackId:c.id});i[d.id]=h;for(let g of d.spaces)a[g.spaceId]=h}}return{floorStacksById:t,floorStacksByExternalId:n,mvfFloorStacksById:o,facadesById:i,facadesBySpaceId:a}},wZ=(e,r)=>{let t={},n={},o=e["connection.json"].reduce((i,a)=>{a.nodes.forEach(u=>i[u]=a),t[a.id]=a;let l=r==null?void 0:r[a.nodes[0]];if(l!=null){let u=Na(l.geometry.coordinates);n[u]==null&&(n[u]=[]),n[u].push(a.id)}return i},{});return{mvfConnectionsById:t,mvfConnectionsByNodeId:o,mvfConnectionIdsByLatLon:n}},MZ=(e,r)=>{let t={},n={},o={},i={},a={},l=globalThis.Object.keys(e.entrance);for(let u of l){let c=e.entrance[u];if(c!=null)for(let d of c.features){i[d.properties.id]=d;let m=new _n(r,{floorId:u,mvfData:d});d.properties.node&&(o[d.properties.node]=m),t[d.properties.id]=m,d.properties.externalId&&(n[d.properties.externalId]==null&&(n[d.properties.externalId]=[]),n[d.properties.externalId].push(m)),a[u]||(a[u]=[]),a[u].push(d)}}return{doorsById:t,doorsByExternalId:n,doorsByNodeId:o,mvfEntrancesById:i,mvfEntrancesByFloorId:a}},AZ=(e,r,t)=>{var n;if(e.textAreas!=null)for(let o in e.textAreas){let i=(n=e.textAreas[o])==null?void 0:n.features;if(i!=null){for(let a of i)if("anchorId"in a.properties){let l=a==null?void 0:a.properties,u=r[l.anchorId]||t[l.anchorId];if(u!=null&&l!=null){let c=u.properties;c.textArea=l,c.textArea&&(c.textArea.position=a.geometry.coordinates)}}}}},FZ=(e,r,t)=>{var n;if(e.floorImages!=null)for(let o in e.floorImages){let i=(n=e.floorImages[o])==null?void 0:n.features;if(i!=null){for(let a of i)if("anchorId"in a.properties){let l=a==null?void 0:a.properties,u=r[l.anchorId]||t[l.anchorId];if(u!=null&&l!=null){let c=u.properties;c.image=l,c.image&&(c.image.position=a.geometry.coordinates)}}}}},PZ=(e,r)=>{var n,o;if(((n=e.enterprise)==null?void 0:n.enterpriseStyles)==null)return;let t=(o=e.enterprise)==null?void 0:o.enterpriseStyles;for(let i in t){let a=t[i];a.geometryAnchors.forEach(l=>{let u=r[l.geometryId];if(u!=null){let c=u.properties;c.style={styleId:i,edgeOffset:a.edgeOffset}}})}},OZ=(e,r,t)=>{if(!(e.enterprise==null||e.enterprise.textures==null))for(let n of e.enterprise.textures)for(let o of n.geometryAnchors){let i=r[o.geometryId]||t[o.geometryId];if(i!=null){let a=i.properties;a.textures==null&&(a.textures=[]),a.textures.push(n)}}},kZ=(e,r)=>{let t={},n={},o={};if(e.annotation==null)return{annotationsById:t,mvfAnnotationsById:n,mvfAnnotationsByFloorId:o};let i=e["annotation-symbols.json"]||{},a=globalThis.Object.keys(e.annotation);for(let l of a){let u=e.annotation[l];if(u!=null)for(let c of u.features){n[c.properties.id]=c;let d=new zi(r,{floorId:l,mvfData:c,symbol:i[c.properties.symbolId]});t[c.properties.id]=d,o[l]||(o[l]=[]),o[l].push(c)}}return{annotationsById:t,mvfAnnotationsById:n,mvfAnnotationsByFloorId:o}},BZ=(e,r)=>{let t={},n={},o={};if(e.area==null)return{areasById:t,areasByExternalId:n,mvfAreasById:o};let i=globalThis.Object.keys(e.area);for(let a of i){let l=e.area[a];if(l!=null)for(let u of l.features){o[u.properties.id]=u;let c=new oi(r,{floorId:a,mvfData:u});t[u.properties.id]=c,u.properties.externalId&&(n[u.properties.externalId]==null&&(n[u.properties.externalId]=[]),n[u.properties.externalId].push(c))}}return{areasById:t,areasByExternalId:n,mvfAreasById:o}},_Z=(e,r)=>{var a;let t={},n={},o={},i={};for(let l in e){let u=e[l];if(u==null)continue;let c=(a=u.properties.destinationNodes)!=null?a:[];if(c.length<1)continue;let d=[];for(let m of c)r[m]!=null&&d.push(m),n[m]==null&&(n[m]=[]),n[m].push(u.properties.id),u.properties.kind==="desk-entrance"&&(o[m]==null&&(o[m]=[]),o[m].push(u.properties.externalId));d.length>0&&(t[l]=d),i[l]=c}return{entranceNodeIdsBySpaceId:t,spaceIdsByNodeId:n,objectIdsByNodeId:o,destinationNodesIdsBySpaceId:i}},tA=(e,r)=>{var v,I,C,S,T,A,F,P,O,_,G,L,q;let t={},n={},o={},i={},a=((I=(v=e.enterprise)==null?void 0:v.locations)!=null?I:[]).reduce(($,K)=>($[K.id]=K,$),{}),l={},u={},c={},d={},m={},h={},g=((C=e.enterprise)==null?void 0:C.venue)||{},x={};for(let $ of(T=(S=e.enterprise)==null?void 0:S.categories)!=null?T:[]){let K=new y1(r,{mvfData:$});l[$.id]=K,$.externalId&&(u[$.externalId]==null&&(u[$.externalId]=[]),u[$.externalId].push(K)),c[$.id]=$,$.locations.forEach(X=>{m[X]==null&&(m[X]=[]),m[X].push($.id)})}let E={};for(let $ of(F=(A=e.enterprise)==null?void 0:A.locationInstances)!=null?F:[]){let K=a[$.parent],X=Object.keys(K),V={};for(let ee of X)V[ee]=void 0;let Y=w(H(w({},V),{polygons:[],nodes:[]}),$);E[Y.parent]==null&&(E[Y.parent]=[]),E[Y.parent].push(new ja(r,{mvfData:Y,categoryIds:((O=(P=e.enterprise)==null?void 0:P.categoryPriorities)==null?void 0:O[Y.id])||m[Y.id],parentId:$.parent})),x[Y.id]=$}for(let $ of(G=(_=e.enterprise)==null?void 0:_.locations)!=null?G:[]){let K=new ja(r,{mvfData:$,categoryIds:((q=(L=e.enterprise)==null?void 0:L.categoryPriorities)==null?void 0:q[$.id])||m[$.id],locationInstances:E[$.id]});o[$.id]=K,$.externalId&&(i[$.externalId]==null&&(i[$.externalId]=[]),i[$.externalId].push(K)),$.nodes.forEach(X=>{h[X.id]==null&&(h[X.id]=[]),h[X.id].push($.id)});for(let X of $.polygons)d[X.id]==null&&(d[X.id]=[]),d[X.id].push($)}if(r.enterpriseMode===!0){for(let $ in r.mvfConnectionsById){let K={},X=r.mvfConnectionsById[$];for(let V of r.mvfConnectionsById[$].nodes){let Y=r.nodesById[V];Y!=null&&(K[Y.floor.id]={type:"Feature",geometry:{type:"Point",coordinates:[Y.coordinate.longitude,Y.coordinate.latitude]},properties:{id:$,externalId:X.externalId,kind:"enterprise."+X.type,destinationNodes:[],flags:X.flags,type:X.type,nodes:X.nodes,accessible:X.accessible,extra:X.extra,details:X.details}})}Object.keys(K).length>0&&(t[$]=new Ao(r,{mvfDataByFloorId:K}),X.externalId&&(n[X.externalId]==null&&(n[X.externalId]=[]),n[X.externalId].push(t[$])))}r.connectionsById=t}return{connectionsByExternalId:n,locationIdsByNodeId:h,mvfLocationsByGeometryId:d,mvfLocationsById:a,mvfCategoriesById:c,locationsById:o,locationsByExternalId:i,locationInstancesById:x,categoriesById:l,categoriesByExternalId:u,venue:g}},rA=(e,r)=>{let{nodesById:t,nodesByExternalId:n,mvfNodesById:o,mvfNodesByFloorId:i}=CZ(e,r),{mvfConnectionsById:a,mvfConnectionsByNodeId:l,mvfConnectionIdsByLatLon:u}=wZ(e,o),{spacesById:c,spacesByExternalId:d,poisById:m,poisByExternalId:h,mvfSpacesById:g,objectEntranceNodeIdsByObstructionId:x,connectionsById:E,connectionIdsByLatLon:v,mvfSpacesByFloorId:I,mvfPoisByFloorId:C}=EZ(e,l,r),{objectsById:S,objectsByExternalId:T,mvfObstructionById:A,obstructionIdByEntranceId:F}=SZ(e,r),{floorsById:P,floorsByExternalId:O,mvfFloorsById:_}=DZ(e,r),{floorStacksById:G,floorStacksByExternalId:L,mvfFloorStacksById:q,facadesById:$,facadesBySpaceId:K}=TZ(e,r),{doorsById:X,doorsByExternalId:V,doorsByNodeId:Y,mvfEntrancesById:ee,mvfEntrancesByFloorId:oe}=MZ(e,r),{annotationsById:le,mvfAnnotationsById:ve,mvfAnnotationsByFloorId:he}=kZ(e,r),{areasById:de,areasByExternalId:Fe,mvfAreasById:ce}=BZ(e,r);FZ(e,g,A),AZ(e,g,A),PZ(e,g),OZ(e,g,A);let{locationCategoriesByParentId:Pe,locationProfilesById:He,locationCategoriesById:bt,locationProfilesByExternalId:B,locationProfilesByCategoryId:re,locationProfilesByAttachedFeatureId:R}=IZ(e,r),{entranceNodeIdsBySpaceId:ue,spaceIdsByNodeId:ie,objectIdsByNodeId:se,destinationNodesIdsBySpaceId:Le}=_Z(g,Y);return{spacesById:c,spacesByExternalId:d,nodesById:t,nodesByExternalId:n,objectsById:S,objectsByExternalId:T,floorsById:P,floorsByExternalId:O,floorStacksById:G,floorStacksByExternalId:L,facadesById:$,facadesBySpaceId:K,connectionsById:E,doorsById:X,doorsByExternalId:V,doorsByNodeId:Y,poisById:m,poisByExternalId:h,annotationsById:le,areasById:de,areasByExternalId:Fe,objectEntranceNodeIdsByObstructionId:x,obstructionIdByEntranceId:F,connectionIdsByLatLon:v,locationProfilesById:He,locationCategoriesById:bt,locationProfilesByExternalId:B,locationProfilesByCategoryId:re,locationCategoriesByParentId:Pe,mvfSpacesById:g,mvfNodesById:o,mvfObstructionById:A,mvfFloorsById:_,mvfFloorStacksById:q,mvfConnectionsById:a,mvfConnectionsByNodeId:l,mvfEntrancesById:ee,mvfAnnotationsById:ve,mvfNodesByFloorId:i,mvfSpacesByFloorId:I,mvfPoisByFloorId:C,mvfAreasById:ce,mvfEntrancesByFloorId:oe,mvfAnnotationsByFloorId:he,locationProfilesByAttachedFeatureId:R,mvfConnectionIdsByLatLon:u,entranceNodeIdsBySpaceId:ue,spaceIdsByNodeId:ie,objectIdsByNodeId:se,destinationNodesIdsBySpaceId:Le}};function LZ(e){var r;return!["Polygon","MultiPolygon"].includes(e.geometry.type)&&"kind"in e.properties&&e.properties.kind==null||xZ.has((r=e.properties.kind)!=null?r:"")}p();var RZ=new Set(["polygons"]),Po,ht,Rr,Yf,Pp=class Pp extends Lr{constructor(t,n){super(n.mvfData.externalId);f(this,"__type",Pp.__type);f(this,"description");f(this,"name","");f(this,"amenity");f(this,"externalId","");f(this,"extra");f(this,"gallery");f(this,"instances");f(this,"logo");f(this,"operationHours");f(this,"phone");f(this,"picture");f(this,"shortName");f(this,"showFloatingLabelWhenImagePresent");f(this,"showLogo");f(this,"siblingGroups");f(this,"social");f(this,"sortOrder",-1);f(this,"states");f(this,"tags");f(this,"type","");f(this,"hidden",!1);f(this,"primaryCategory");D(this,Po);D(this,ht,{});D(this,Rr);D(this,Yf);M(this,Po,t),M(this,Rr,n.mvfData),M(this,Yf,n.categoryIds||[]),this.instances=n.locationInstances||[];for(let o in n.mvfData)!RZ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{enumerable:!0,get(){if(n.parentId){let i=s(this,Po).locationsById[n.parentId];return s(this,Rr)[o]!=null?s(this,Po).getPropTranslation(this.__type,o,s(this,Rr).id,s(this,Rr)[o]):s(this,Po).getPropTranslation(this.__type,o,s(this,Rr).id,i[o])}return s(this,Po).getPropTranslation(this.__type,o,s(this,Rr).id,s(this,Rr)[o])}})}static is(t){return t.__type===Pp.__type}get focusTarget(){return this.spaces}get categories(){return s(this,ht).categories?s(this,ht).categories:(s(this,ht).categories=(s(this,Yf).map(t=>s(this,Po).getById("enterprise-category",t))||[]).filter(Boolean),s(this,ht).categories)}get coordinates(){if(s(this,ht).coordinates)return s(this,ht).coordinates;s(this,ht).coordinates=[];for(let t=0;t<this.nodes.length;t++)s(this,ht).coordinates.push(this.nodes[t].coordinate);return s(this,ht).coordinates}get nodes(){if(s(this,ht).nodes)return s(this,ht).nodes;s(this,ht).nodes=[];for(let t=0;t<s(this,Rr).nodes.length;t++){let n=s(this,Po).getById("node",s(this,Rr).nodes[t].id);n&&s(this,ht).nodes.push(n)}return s(this,ht).nodes}get points(){if(s(this,ht).points)return s(this,ht).points;s(this,ht).points=[];for(let t=0;t<s(this,Rr).spaces.length;t++){let n=s(this,Po).getById("point-of-interest",s(this,Rr).spaces[t].id);n&&s(this,ht).points.push(n)}return s(this,ht).points}get spaces(){if(s(this,ht).spaces)return s(this,ht).spaces;s(this,ht).spaces=[];let t=Array.isArray(s(this,Rr).spaces)?s(this,Rr).spaces:s(this,Rr).polygons;for(let n=0;n<t.length;n++){let o=s(this,Po).getById("space",t[n].id);o&&s(this,ht).spaces.push(o)}return s(this,ht).spaces}get objects(){if(s(this,ht).objects)return s(this,ht).objects;s(this,ht).objects=[];for(let t=0;t<s(this,Rr).polygons.length;t++){let n=s(this,Po).getById("object",s(this,Rr).polygons[t].id);n&&s(this,ht).objects.push(n)}return s(this,ht).objects}toJSON(){return{__type:Pp.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,ht)))delete s(this,ht)[t]}};Po=new WeakMap,ht=new WeakMap,Rr=new WeakMap,Yf=new WeakMap,f(Pp,"__type","enterprise-location");var _2=Pp,ja=_2;p();var NZ=new Set,ac,Ln,Va,Op=class Op extends Lr{constructor(t,n){super(n.mvfData.externalId);f(this,"__type",Op.__type);f(this,"name","");f(this,"color");f(this,"externalId","");f(this,"extra");f(this,"icon");f(this,"iconFromDefaultList");f(this,"sortOrder",-1);f(this,"picture");D(this,ac);D(this,Ln,{});D(this,Va);M(this,ac,t),M(this,Va,n.mvfData);for(let o in n.mvfData)!NZ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{get(){return s(this,ac).getPropTranslation(this.__type,o,s(this,Va).id,s(this,Va)[o])}})}static is(t){return t.__type===Op.__type}get children(){if(s(this,Ln).children)return s(this,Ln).children;s(this,Ln).children=[];for(let t=0;t<s(this,Va).children.length;t++){let n=s(this,ac).getById("enterprise-category",s(this,Va).children[t]);n&&s(this,Ln).children.push(n)}return s(this,Ln).children}get locations(){if(s(this,Ln).locations)return s(this,Ln).locations;s(this,Ln).locations=[];for(let t=0;t<s(this,Va).locations.length;t++){let n=s(this,ac).getById("enterprise-location",s(this,Va).locations[t]);n&&s(this,Ln).locations.push(n)}return s(this,Ln).locations}toJSON(){return{__type:Op.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,Ln)))delete s(this,Ln)[t]}};ac=new WeakMap,Ln=new WeakMap,Va=new WeakMap,f(Op,"__type","enterprise-category");var L2=Op,y1=L2;p();var jZ=new Set,Xf,Bp,kp=class kp extends Lr{constructor(t,n){super(n.mvfData.externalId);f(this,"__type",kp.__type);f(this,"countrycode");f(this,"coverImage");f(this,"externalId","");f(this,"defaultLanguage",{code:"en",name:"English"});f(this,"defaultFloor");f(this,"extra");f(this,"icon");f(this,"languages",[]);f(this,"links",[]);f(this,"logo");f(this,"mappedinWebUrl");f(this,"operationHours");f(this,"slug","");f(this,"topLocations");f(this,"tzid");D(this,Xf,{});D(this,Bp);M(this,Bp,n.mvfData);for(let o in n.mvfData)!jZ.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&(this[o]=n.mvfData[o])}static is(t){return t.__type===kp.__type}get name(){var t;return(t=s(this,Bp).name)!=null?t:""}get defaultMap(){var t,n;return(n=(t=s(this,Bp).defaultMap)!=null?t:this.defaultFloor)!=null?n:""}toJSON(){return{__type:kp.__type,id:this.id,name:this.name}}destroy(){for(let t of Object.keys(s(this,Xf)))delete s(this,Xf)[t]}};Xf=new WeakMap,Bp=new WeakMap,f(kp,"__type","enterprise-venue");var R2=kp,N2=R2;p();p();function Qf(e,r,t=[]){let n=w({},e);for(let[o,i]of Object.entries(r))if(i!==void 0)if(o in n){let a=o;if(Array.isArray(i)&&i.length>0){let l=UZ(i[0],t);if(l){let u=n[a];if(!Array.isArray(u))throw new Error("Expected array at ".concat(o,", got ").concat(typeof u));let c=new Map(i.map(h=>[nA(h,l),h])),m=u.map(h=>{let g=c.get(nA(h,l));return g?Qf(h,g,t):h});n[a]=m}else n[a]=i}else{let l=n[a];typeof l=="object"&&l!==null&&typeof i=="object"&&i!==null?Object.keys(i).length===0?n[a]=i:n[a]=Qf(l,i,t):n[o]=i}}else n[o]=i;return n}function UZ(e,r){function t(n){if(typeof n!="object"||n===null)return null;for(let o of r)if(o in n&&typeof n[o]<"u")return[o];if(Array.isArray(n))return null;for(let[o,i]of Object.entries(n)){let a=t(i);if(a)return[o,...a]}return null}return t(e)}function nA(e,r){return r.reduce((t,n)=>{if(t&&typeof t=="object")return t[n]},e)}p();p();p();p();p();var oA=(i=>(i.Departure="Departure",i.TakeConnection="TakeConnection",i.ExitConnection="ExitConnection",i.Turn="Turn",i.Arrival="Arrival",i))(oA||{}),j2=(a=>(a.Straight="Straight",a.Right="Right",a.SlightRight="SlightRight",a.Left="Left",a.SlightLeft="SlightLeft",a.Back="Back",a))(j2||{}),iA=(d=>(d.stairs="stairs",d.elevator="elevator",d.escalator="escalator",d.door="door",d.ramp="ramp",d.slide="slide",d.portal="portal",d.security="security",d.shuttle="shuttle",d.ladder="ladder",d))(iA||{}),v1=(t=>(t.Exterior="exterior-walls",t.Interior="interior-walls",t))(v1||{}),x1=(t=>(t.Interior="interior-doors",t.Exterior="exterior-doors",t))(x1||{});function ui(e){return e.verticalOffset===0?[e.longitude,e.latitude]:[e.longitude,e.latitude,e.verticalOffset]}function GZ(e){return new Map(e.map(r=>{let{properties:t}=r,{id:n}=t;return[n,r]}))}var U2=(e,r)=>{let t=GZ(r),n={entrances:{type:"FeatureCollection",features:[]},walls:{type:"Feature",properties:{id:e[0].properties.id},geometry:{type:"MultiLineString",coordinates:[]}}};for(let o of e){let i=[o.geometry.coordinates],a=(o.properties.entrances||[]).reduce((l,u)=>(t.has(u)&&l.push(t.get(u)),l),[]);if(a.length){let{entrances:l,obstructions:u}=d2(o,a);i=u.map(c=>c.geometry.coordinates),n.entrances.features.push(...l)}n.walls.geometry.coordinates.push(...i)}return n};function aA(e,r){return((r-e+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}function sA(e,r){let t="Left";return e<=-Math.PI/4?t="Right":e<=-r?t="SlightRight":e<=r?t="Straight":e<=Math.PI/4?t="SlightLeft":t="Left",t}function uA(e){let r={};for(let t in e){let n=e[t];if(n!=null){if(n.id=t,"polygons"in n)for(let o of n.polygons)r[o]=n;else if("lineStrings"in n)for(let o of n.lineStrings)r[o]=n;else if("points"in n)for(let o of n.points)r[o]=n}}return r}function z2(e,r){return e.reduce((t,n)=>{let o=r[n.properties.id];if(o==null)return t;if("textures"in n.properties&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0){let i=H(w({},o),{id:o.id+"-textures"});t.set(i,[n])}else t.has(o)||t.set(o,[]),t.get(o).push(n);return t},new Map)}function _p(e,r={}){var o,i,a,l,u,c,d;let t=H(w({},e),{flipImageToFaceCamera:(o=r==null?void 0:r.flipImagesToFaceCamera)!=null?o:!0}),n=(a=(i=r==null?void 0:r.style)==null?void 0:i.shading)!=null?a:r==null?void 0:r.shadingAndOutlines;if(n===!0?t.shading={start:.1,end:.15,intensity:.4}:typeof n=="object"&&(t.shading={start:n.start,end:n.end,intensity:n.intensity}),t.outline=(u=(l=r==null?void 0:r.style)==null?void 0:l.outlines)!=null?u:r==null?void 0:r.shadingAndOutlines,"lineStrings"in e){let m=(d=(c=r==null?void 0:r.style)==null?void 0:c.wallTopColor)!=null?d:r==null?void 0:r.wallTopColor;m!=null&&(t.topColor=m)}return t}var lA=(e,r)=>{var o;let n=((o=r.currentMap)==null?void 0:o.currentFloor).layers.get(yr);switch(e){case"interior-walls":return n==null?void 0:n.layers.get(ju);case"exterior-walls":return n==null?void 0:n.layers.get(Ua);case"interior-doors":return n==null?void 0:n.layers.get(gp);case"exterior-doors":return n==null?void 0:n.layers.get(yp);default:return typeof e=="string"?e:e==null?void 0:e.id}};function G2(e){return new Promise(r=>{e.onComplete(r),e.onStop(r)})}function I1(e){return e.bbox?e.bbox:bu(e)}function cA(e,r){return[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])]}function e0(e,r,t){return e.floorId&&r.has(e.floorId)?r.get(e.floorId):t}function Lp(e){if(gr.is(e)||oo.is(e))return e.id}function dA(e,r,t){var i,a;let n=e.coordinates.length===2&&e.coordinates[0].floorId!==e.coordinates[1].floorId,o=!0;if(n&&e.coordinates[0].floorId!=null&&e.coordinates[1].floorId!=null){let l=r==null?void 0:r.getById("floor",e.coordinates[0].floorId),u=r==null?void 0:r.getById("floor",e.coordinates[1].floorId);if(l&&u){let c=t.getState(l),d=t.getState(u);c!=null&&d!=null&&(o=c.visible&&d.visible&&c.altitude!==d.altitude)}}else{let l=e.coordinates[0].floorId!=null?r==null?void 0:r.getById("floor",e.coordinates[0].floorId):void 0;o=l&&(a=(i=t.getState(l))==null?void 0:i.visible)!=null?a:!0}return o}function pA(e,r){let t=e.properties.path.split("/"),n=t[t.length-1].split(".")[0],o=atob(n);return"img_"+sg(o).toString()+"-"+r}function Us(e="auto",r){return e==="auto"?r?Math.round(r*JM):10:e}function mA(e,r="auto"){if(!e.length)return new Map;let t=e.sort((l,u)=>l.elevation-u.elevation),n=t.findIndex(l=>l.elevation>=0);n===-1&&(n=t.length);let o=0,i=new Map;for(let l=n;l<t.length;l+=1){let u=t[l],c=t[l+1],d=u.elevation,m=c?c.elevation:void 0,h=m!==void 0?Math.max(0,m-d-1):0,g=l===n?d:0,x=Us(r,u.maxHeight)*(1+h+g),E=o;i.set(u.elevation,{altitude:E,effectiveHeight:x}),o+=x}let a=l=>-l-1;o=0;for(let l=n-1;l>=0;l-=1){let u=t[l],c=t[l-1],d=a(u.elevation),m=c?a(c.elevation):void 0,h=m!==void 0?Math.max(0,m-d-1):0,g=l===n-1?d:0,x=Us(r,u.maxHeight)*(1+h+g),E=-(o+x);i.set(u.elevation,{altitude:E,effectiveHeight:x}),o+=x}return i}function E1(e,r){let t=r(e.center);return{center:new De({latitude:t[1],longitude:t[0]}),radius:e.radius}}var fA=Math.PI*.1,Rn,io,Oo,zs,sc,Np,li,hA,Rp,gA,Vu=class{constructor(r,t,n,o,i){D(this,li);f(this,"id");D(this,Rn,{});D(this,io);D(this,Oo);f(this,"departure");f(this,"destination");D(this,zs);D(this,sc);D(this,Np);var a;this.id=(a=i==null?void 0:i.id)!=null?a:Bt(),M(this,io,t),M(this,Oo,r.features),this.departure=n,this.destination=o}get path(){return s(this,Oo).map(r=>s(this,io).getById("node",r.properties.id)).filter(Boolean)}get coordinates(){return s(this,Rn).coordinates?s(this,Rn).coordinates:(s(this,Rn).coordinates=s(this,Oo).map(r=>new De(r.geometry.coordinates[1],r.geometry.coordinates[0],r.properties.groupBy)),s(this,Rn).coordinates)}get distance(){return s(this,Rn).distance?s(this,Rn).distance:(s(this,Rn).distance=s(this,Oo).reduce((r,t)=>r+(t.properties.distance||0),0),s(this,Rn).distance)}get instructions(){if(s(this,Oo).length<2)return[];if(s(this,Rn).instructions)return s(this,Rn).instructions;let r=[],t=0;for(let n=0;n<s(this,Oo).length;n++){let o=s(this,Oo)[n],i=s(this,Oo)[n-1],a=s(this,Oo)[n+1],l=new De(o.geometry.coordinates[1],o.geometry.coordinates[0],o.properties.groupBy),u=Q(this,li,hA).call(this,{prevDirection:i,direction:o,nextDirection:a});t+=(i==null?void 0:i.properties.distance)||0;for(let c of u)c&&(r.push({action:c,distance:t,coordinate:l,node:s(this,io).getById("node",o.properties.id)}),t=0)}return s(this,Rn).instructions=r,s(this,Rn).instructions}toJSON(){return{id:this.id,directions:s(this,Oo),__type:"directions",from:this.departure,to:this.destination}}};Rn=new WeakMap,io=new WeakMap,Oo=new WeakMap,zs=new WeakMap,sc=new WeakMap,Np=new WeakMap,li=new WeakSet,hA=function(r){var x,E;let{prevDirection:t,direction:n,nextDirection:o}=r,i=t&&s(this,io).getById("floor",t.properties.groupBy),a=s(this,io).getById("floor",n.properties.groupBy),l=o&&s(this,io).getById("floor",o.properties.groupBy),u=[];t||u.push({type:"Departure"});let c=s(this,io).getMVFFeatureByNodeId("connection",n.properties.id),d=c?s(this,io).getById("connection",c.id):void 0,m=c&&c.nodes.length>1,h=s(this,io).enterpriseMode&&(!n.properties.destination||!(c!=null&&c.nodes.includes(n.properties.destination))||!(c!=null&&c.nodes.includes(n.properties.id)));if(c&&!(!m||h))if(!s(this,zs)||s(this,zs)==="exit")u.push(Q(this,li,Rp).call(this,"TakeConnection",a,l,d,c)),M(this,zs,"take"),M(this,sc,d),M(this,Np,c);else{let v=s(this,io).getMVFFeatureByNodeId("connection",(x=t==null?void 0:t.properties.id)!=null?x:""),I=s(this,io).getById("connection",(E=v==null?void 0:v.id)!=null?E:"");u.push(Q(this,li,Rp).call(this,"ExitConnection",a,i,I,v)),M(this,zs,"exit"),M(this,sc,d),M(this,Np,c)}else s(this,zs)==="take"?(u.push(Q(this,li,Rp).call(this,"ExitConnection",a,i,s(this,sc),s(this,Np))),M(this,zs,"exit"),M(this,sc,d)):l&&(a==null?void 0:a.id)!==l.id?u.push(Q(this,li,Rp).call(this,"TakeConnection",a,l,d)):i&&i.id!==(a==null?void 0:a.id)?u.push(Q(this,li,Rp).call(this,"ExitConnection",a,i,d)):u.push(Q(this,li,gA).call(this,t,n));return o||u.push({type:"Arrival"}),u},Rp=function(r,t,n,o,i){var c,d;let a="none",l=t?t.elevation:0;if(l!=null&&(n==null?void 0:n.elevation)!=null){let m=l-n.elevation;m>0?a="down":m<0&&(a="up")}let u=(d=(c=o==null?void 0:o.type)!=null?c:i==null?void 0:i.type)!=null?d:"stairs";return{type:r,fromFloor:t,toFloor:n,direction:a,connection:o,connectionType:u}},gA=function(r,t){let n=t.properties.edges;if(!n||n.filter(a=>a.destination.properties.id!==(r==null?void 0:r.properties.id)&&a.destination.properties.id!==t.properties.destination).length===0)return null;let i=r?-aA(r.properties.angle,t.properties.angle):0;return Math.abs(i)>=fA?{type:"Turn",bearing:sA(i,fA),referencePosition:"At"}:null};p();p();p();p();p();p();p();var uc=class{constructor({origin:r,destination:t,distance:n=0,angle:o=0,pathWeight:i=0,multiplicativeDistanceWeightScaling:a=!0}){f(this,"origin");f(this,"destination");f(this,"distance");f(this,"angle");f(this,"weight");if(this.origin=r,this.destination=t,this.distance=n,this.angle=o,this.weight=i||0,a?r.properties.floor===t.properties.floor&&(this.weight=(this.weight>=0?this.distance*this.weight:0)+this.distance):r.properties.map===t.properties.map&&(this.weight=this.weight>=0?this.distance+this.weight:0),isNaN(this.angle))throw new Error("Invalid angle: Expected a numeric value, but received NaN.")}};p();p();p();function Gs(e,r,t){if(t===void 0&&(t={}),!e)throw new Error("point is required");if(!r)throw new Error("polygon is required");var n=ri(e),o=Qd(r),i=o.type,a=r.bbox,l=o.coordinates;if(a&&$Z(n,a)===!1)return!1;i==="Polygon"&&(l=[l]);for(var u=!1,c=0;c<l.length&&!u;c++)if(yA(n,l[c][0],t.ignoreBoundary)){for(var d=!1,m=1;m<l[c].length&&!d;)yA(n,l[c][m],!t.ignoreBoundary)&&(d=!0),m++;d||(u=!0)}return u}function yA(e,r,t){var n=!1;r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]&&(r=r.slice(0,r.length-1));for(var o=0,i=r.length-1;o<r.length;i=o++){var a=r[o][0],l=r[o][1],u=r[i][0],c=r[i][1],d=e[1]*(a-u)+l*(u-e[0])+c*(e[0]-a)===0&&(a-e[0])*(u-e[0])<=0&&(l-e[1])*(c-e[1])<=0;if(d)return!t;var m=l>e[1]!=c>e[1]&&e[0]<(u-a)*(e[1]-l)/(c-l)+a;m&&(n=!n)}return n}function $Z(e,r){return r[0]<=e[0]&&r[1]<=e[1]&&r[2]>=e[0]&&r[3]>=e[1]}p();p();function $s([e,r],[t,n]){let o=r-n,i=e-t;return(Math.atan2(i,o)+Math.PI*3)%(Math.PI*2)}p();p();function C1(e,r,t,n){let[o,i]=e,[a,l]=r,[u,c]=t,[d,m]=n;if(i===l&&o===a||c===m&&u===d)return null;let h=(d-u)*(l-i)-(m-c)*(a-o);if(h===0)return null;let g=((m-c)*(o-u)-(d-u)*(i-c))/h,x=((l-i)*(o-u)-(a-o)*(i-c))/h;if(g<0||g>1||x<0||x>1)return null;let E=i+g*(l-i);return[o+g*(a-o),E]}p();function $2(e,r,t,n){let o=Nl(e,t/1e3,n),i=Nl(r,t/1e3,n);return[o.geometry.coordinates,i.geometry.coordinates]}p();function V2(e){let r=e*(180/Math.PI);return r=r%360,r>180?r-=360:r<-180&&(r+=360),Object.is(r,-0)?0:r}var bA=111e3;function S1(e,r,t=[],n=0){let o=!0,i=e.geometry.coordinates,a=r.geometry.coordinates,l=V2($s(i,a)-Math.PI/2),u=V2($s(i,a)+Math.PI/2),c=n/bA,d=n/(bA*Math.cos(i[1]*Math.PI/180)),m=Math.min(i[1],a[1])-c,h=Math.max(i[1],a[1])+c,g=Math.min(i[0],a[0])-d,x=Math.max(i[0],a[0])+d;for(let E of t)if(!(Math.max(E[0][1],E[1][1])<m||Math.min(E[0][1],E[1][1])>h||Math.max(E[0][0],E[1][0])<g||Math.min(E[0][0],E[1][0])>x)){if(n>0){let v=$2(i,a,n,l),I=$2(i,a,n,u);if(C1(v[0],v[1],E[0],E[1])||C1(I[0],I[1],E[0],E[1]))return o=!1,!1}else if(C1(i,a,E[0],E[1]))return o=!1,!1}return o}var H2=.4,lc,pn,Z2,vA,xA,IA,EA,CA,SA,T1,D1=class{constructor({nodes:r,groupBy:t,multiplicativeDistanceWeightScaling:n}){D(this,pn);f(this,"edges",{});f(this,"nodesById");f(this,"nodesByGroup",new Map);D(this,lc);f(this,"hasLineOfSight",(r,t,n=[],o=H2)=>S1({type:"Feature",properties:{id:"origin",neighbors:[]},geometry:{type:"Point",coordinates:r}},{type:"Feature",properties:{id:"destination",neighbors:[]},geometry:{type:"Point",coordinates:t}},n,o)===!0);D(this,T1,(r,t)=>{let n=0;for(let o of t)(!o[s(this,lc)]||o[s(this,lc)]===r.properties[s(this,lc)])&&Gs(r.geometry.coordinates,o.geometry.geometry)&&(n+=Math.max(0,o.cost));return n});M(this,lc,t);let{features:o}=r;this.nodesById=Q(this,pn,vA).call(this,o),Q(this,pn,xA).call(this),Q(this,pn,IA).call(this,o,t,{multiplicativeDistanceWeightScaling:n})}getShortestEuclideanDistance(r,t){return t.reduce((n,o)=>{let i=wE(r.geometry.coordinates,o.geometry.coordinates);return Math.min(n,i)},Number.MAX_VALUE)}dijkstraFindWithinTravelDistance(r,t,n,o,i,a){var g;let l=this.nodesById[r];if(!l)return[];let u=[],c={},d={},m=new Set,h=[];for(u.push({node:l,distance:0}),c[l.properties.id]=null,d[l.properties.id]=0;u.length>0;){u.sort((I,C)=>I.distance-C.distance);let x=u.shift();if(!x)break;let E=x.node,v=x.distance;if(!m.has(E.properties.id)){if(m.add(E.properties.id),h.length>=a)break;E.properties.id!=null&&n.includes((g=E.properties.id)==null?void 0:g.toString())&&(i?this.hasLineOfSight(l.geometry.coordinates,E.geometry.coordinates,o)&&h.push({feature:E,distance:v}):h.push({feature:E,distance:v}));for(let I of this.edges[E.properties.id]){let C=I.destination,S=v+I.distance,T=d[E.properties.id]+I.weight;S>t||m.has(C.properties.id)||d[C.properties.id]!==void 0&&T>=d[C.properties.id]||(d[C.properties.id]=T,c[C.properties.id]=I,u.push({node:C,distance:S}))}}}return h.sort((x,E)=>x.distance-E.distance)}aStar({originIds:r,destinationNodeIds:t,disabledConnectionNodeIds:n,zones:o,overrideEdgeWeights:i,disabledNodeIds:a}){var h;let l=Q(this,pn,Z2).call(this,r),u=Q(this,pn,Z2).call(this,t);if(l.length===0||u.length===0)return[];let{frontier:c,cameFrom:d,costSoFar:m}=Q(this,pn,EA).call(this,l,u);for(;c.length>0;){let g=c.shift();if(!g)break;if(Q(this,pn,CA).call(this,g.origin,u))return Q(this,pn,SA).call(this,d,g.origin.properties.id);for(let x of this.edges[g.origin.properties.id]){let E=(h=i==null?void 0:i.get(x))!=null?h:x.weight;if(n!=null&&n.has(x.origin.properties.id)&&x.destination.properties.map!==x.origin.properties.map||a!=null&&a.has(x.origin.properties.id))continue;let v=m[g.origin.properties.id]+E+s(this,T1).call(this,x.destination,o);if(v!==1/0&&(m[x.destination.properties.id]==null||v<m[x.destination.properties.id])){let I=v+this.getShortestEuclideanDistance(x.destination,u);m[x.destination.properties.id]=v,d[x.destination.properties.id]=x,c.push({origin:x.destination,priority:I})}}c.sort((x,E)=>x.priority-E.priority)}return[]}};lc=new WeakMap,pn=new WeakSet,Z2=function(r){return r.map(t=>this.nodesById[t]).filter(Boolean)},vA=function(r){return r.reduce((t,n)=>(t[n.properties.id]=n,t),{})},xA=function(){for(let r in this.nodesById)this.nodesById.hasOwnProperty(r)&&(this.nodesById[r].properties.neighbors=this.nodesById[r].properties.neighbors.filter(({id:t})=>!!this.nodesById[t]))},IA=function(r,t,n){r.forEach(o=>{let i=t==="default"?t:o.properties[t];this.nodesByGroup.has(i)||this.nodesByGroup.set(i,[]),this.nodesByGroup.get(i).push(o),this.edges[o.properties.id]=o.properties.neighbors.map(({id:a,weight:l})=>{let u=this.nodesById[a],c=Lo(o.geometry.coordinates,u.geometry.coordinates),d=$s(o.geometry.coordinates,u.geometry.coordinates);return new uc({origin:o,destination:u,pathWeight:l,distance:c,angle:d,multiplicativeDistanceWeightScaling:n==null?void 0:n.multiplicativeDistanceWeightScaling})})})},EA=function(r,t){let n=[],o={},i={};return r.forEach(a=>{let l=this.getShortestEuclideanDistance(a,t);n.push({origin:a,priority:l}),o[a.properties.id]=null,i[a.properties.id]=0}),n.sort((a,l)=>a.priority-l.priority),{frontier:n,cameFrom:o,costSoFar:i}},CA=function(r,t){return t.some(n=>n.properties.id===r.properties.id)},SA=function(r,t){let n=[],o=r[t];for(;o;)n.push(o),o=r[o.origin.properties.id];return n.reverse()},T1=new WeakMap;p();function W2(e,r,t){if(e==null||e[r]==null)return!1;let n=1<<t;return(e[r]&n)!==0}var jp=class{constructor({nodes:r,geojsonCollection:t,groupBy:n="default",multiplicativeDistanceWeightScaling:o,flagDeclarations:i}){f(this,"groupBy");f(this,"graph");f(this,"geometryEdgesByMapId",new Map);f(this,"flagDeclarations",{});f(this,"disabledNodeIds");f(this,"generatePath",r=>{let{destination:t}=r[r.length-1],n={type:"FeatureCollection",features:[]};for(let i=0;i<r.length;i++){let{origin:a,destination:l}=r[i],u={id:a.properties.id,angle:r[i].angle,distance:r[i].distance,destination:l.properties.id,edges:this.graph.edges[a.properties.id]};this.groupBy!=="default"&&(u.groupBy=a.properties[this.groupBy]),n.features.push({type:"Feature",geometry:{type:"Point",coordinates:[a.geometry.coordinates[0],a.geometry.coordinates[1]]},properties:u})}let o={id:t.properties.id,edges:this.graph.edges[t.properties.id]};return this.groupBy!=="default"&&(o.groupBy=t.properties[this.groupBy]),n.features.push({type:"Feature",geometry:{type:"Point",coordinates:[t.geometry.coordinates[0],t.geometry.coordinates[1]]},properties:o}),n});f(this,"findNearestNodesOnGraph",(r,t,n,o,i=!1,a=1/0)=>{var l;return this.graph.dijkstraFindWithinTravelDistance(r,t,o,(l=this.geometryEdgesByMapId.get(n))!=null?l:[],i,a)});f(this,"hasLineOfSight",(r,t,n,o)=>this.graph.hasLineOfSight(r,t,this.geometryEdgesByMapId.get(n),o));f(this,"getDistance",(r,t)=>Lo(r,t));f(this,"getAngle",(r,t)=>$s(r,t));this.groupBy=n,this.graph=new D1({nodes:r,groupBy:this.groupBy,multiplicativeDistanceWeightScaling:o});let a=(t==null?void 0:t.features)||[];this.flagDeclarations=i!=null?i:{},this.disabledNodeIds=this.getDisabledNodeIds(),a.forEach(l=>{let u=null;if(l.geometry.type==="LineString"?u=l.geometry.coordinates:l.geometry.type==="Polygon"&&(u=l.geometry.coordinates.flat()),u){let c=this.groupBy==="default"?this.groupBy:l.properties[this.groupBy];this.geometryEdgesByMapId.has(c)||this.geometryEdgesByMapId.set(c,[]),u.forEach((d,m)=>{this.geometryEdgesByMapId.get(c).push([d,u[m+1]||u[0]])})}})}getDisabledNodeIds(){let r=new Set;if(Ig.public in this.flagDeclarations)for(let t in this.graph.nodesById)W2(this.graph.nodesById[t].properties.flags,this.flagDeclarations[Ig.public].index,this.flagDeclarations[Ig.public].bit)||r.add(t);return r}getDirections({zones:r,originIds:t,destinationNodeIds:n,disabledConnectionNodeIds:o,simplify:i,multiplicativeDistanceWeightScaling:a,overrideEdgeWeights:l}){var m,h;let u=(m=i==null?void 0:i.enabled)!=null?m:!0,c=r!=null?r:[],d=this.graph.aStar({originIds:t,destinationNodeIds:n,zones:c,disabledConnectionNodeIds:new Set(o),overrideEdgeWeights:l,disabledNodeIds:this.disabledNodeIds});return d.length===0?{type:"FeatureCollection",features:[]}:(u&&(d=this.simplifyAllSteps(d,(h=i==null?void 0:i.bufferRadius)!=null?h:H2,a)),this.generatePath(d))}simplifyAllSteps(r,t,n){var c,d;let o=[],i=[r[0]];for(let m=1;m<r.length;m++)if(this.groupBy!=="default"&&r[m].origin.properties[this.groupBy]!==r[m-1].origin.properties[this.groupBy]){let h=r[m-1].origin.properties[this.groupBy],g=(c=this.geometryEdgesByMapId.get(h))!=null?c:[];o.push(...this.simplifySteps(i,g,t,n)),i=[r[m]]}else i.push(r[m]);let a=r[r.length-1],l=this.groupBy==="default"?this.groupBy:a.origin.properties[this.groupBy],u=(d=this.geometryEdgesByMapId.get(l))!=null?d:[];return o.push(...this.simplifySteps(i,u,t,n)),o}simplifySteps(r,t,n,o){var l,u,c,d;if(r.length<3)return r;let i=[r[0]],a=1;for(let m=a+2;m<r.length;m++)if("outdoors"in this.flagDeclarations&&W2((d=(c=(u=(l=r[a])==null?void 0:l.origin)==null?void 0:u.properties)==null?void 0:c.flags)!=null?d:[],this.flagDeclarations.outdoors.index,this.flagDeclarations.outdoors.bit)||r[a].origin.properties.preventSmoothing||!S1(r[a].origin,r[m].origin,t,n)){let h=m-1;i.push(new uc(H(w({},r[a]),{destination:r[h].origin,distance:Lo(r[a].origin.geometry.coordinates,r[h].origin.geometry.coordinates),angle:$s(r[a].origin.geometry.coordinates,r[h].origin.geometry.coordinates)}))),a=h}return i.push(new uc(H(w({},r[a]),{destination:r[r.length-1].origin,distance:Lo(r[a].origin.geometry.coordinates,r[r.length-1].origin.geometry.coordinates),angle:$s(r[a].origin.geometry.coordinates,r[r.length-1].origin.geometry.coordinates),multiplicativeDistanceWeightScaling:o})),r[r.length-1]),i}};p();var VZ={lineOfSight:!0,mode:"absolute-distance",maxResults:1};function DA(e){return H(w({},VZ),{lineOfSight:!e})}var Wt=new WeakMap;function w1(e,r,t){var a;let n=DA(t),o=r.Query.__LEGACY_NEAREST_SYNC(e,r.getByType("node"),n),i=(a=o==null?void 0:o[0])==null?void 0:a.feature.id;return i?[i]:[]}async function M1(e,r,t){var a;let n=DA(t),o=await r.Query.nearest(e,r.getByType("node"),n),i=(a=o==null?void 0:o[0])==null?void 0:a.feature.id;return i?[i]:[]}function ZZ(e,r,t){let n=[];for(let o of e.navigationTarget){let i=Up(o,r,t);n.push(...i)}return n}async function HZ(e,r,t){let n=[];for(let o of e.navigationTarget){let i=await Zu(o,r,t);n.push(...i)}return n}function TA(e,r){let t=r==null?void 0:r.getMVFFeatureById("entrance",e.id),n=t==null?void 0:t.properties.node;return n?[n]:[]}function wA(e,r){var n;let t=r==null?void 0:r.getMVFFeatureById("area",e.id);return(n=t==null?void 0:t.properties.destinationNodes)!=null?n:[]}function MA(e,r){var o,i;let t=r==null?void 0:r.getMVFFeatureById("space",e.id);if(t==null)return[];let n=(o=r.entranceNodeIdsBySpaceId)==null?void 0:o[e.id];return n&&n.length>0?n:(i=t.properties.destinationNodes)!=null?i:[]}function WZ(e,r,t){let n=[];for(let o of e.coordinates){let i=w1(o,r,t);i.length>0&&n.push(i[0])}return n}async function qZ(e,r,t){let n=[];for(let o of e.coordinates){let i=await M1(o,r,t);i.length>0&&n.push(i[0])}return n}function AA(e,r){var t;return(t=r==null?void 0:r.objectEntranceNodeIdsByObstructionId[e.id])!=null?t:[]}function FA(e,r){return e.spaces.flatMap(t=>{var n,o;return(o=(n=r==null?void 0:r.getMVFFeatureById("space",t.id))==null?void 0:n.properties.destinationNodes)!=null?o:[]}).filter(t=>typeof t=="string")}function PA(e){return e.nodes.map(r=>r.id)}function Up(e,r,t){if(Wt.has(e))return Wt.get(e);if(ic.is(e)){let n=ZZ(e,r,t);return Wt.set(e,n),n}else if(zi.is(e)){let n=w1(e,r,t);return Wt.set(e,n),n}else if(De.is(e)){let n=w1(e,r,t);return Wt.set(e,n),n}else{if(Mo.is(e))return w1(e,r,t);if(_n.is(e)){let n=TA(e,r);return Wt.set(e,n),n}else if(oi.is(e)){let n=wA(e,r);return Wt.set(e,n),n}else if(gr.is(e)){let n=MA(e,r);return Wt.set(e,n),n}else if(Ao.is(e)){let n=WZ(e,r,t);return Wt.set(e,n),n}else if(oo.is(e)){let n=AA(e,r);return Wt.set(e,n),n}else if(Yr.is(e)){let n=FA(e,r);return Wt.set(e,n),n}else if(ja.is(e)){let n=PA(e);return Wt.set(e,n),n}else if(ni.is(e)){let n=[e.id];return Wt.set(e,n),n}else return[]}}async function Zu(e,r,t){if(Wt.has(e))return Wt.get(e);if(ic.is(e)){let n=await HZ(e,r,t);return Wt.set(e,n),n}else if(zi.is(e)){let n=await M1(e,r,t);return Wt.set(e,n),n}else if(De.is(e)){let n=await M1(e,r,t);return Wt.set(e,n),n}else if(Mo.is(e)){let n=await M1(e,r,t);return Wt.set(e,n),n}else if(_n.is(e)){let n=TA(e,r);return Wt.set(e,n),n}else if(oi.is(e)){let n=wA(e,r);return Wt.set(e,n),n}else if(gr.is(e)){let n=MA(e,r);return Wt.set(e,n),n}else if(Ao.is(e)){let n=await qZ(e,r,t);return Wt.set(e,n),n}else if(oo.is(e)){let n=AA(e,r);return Wt.set(e,n),n}else{if(Yr.is(e))return FA(e,r);if(ja.is(e)){let n=PA(e);return Wt.set(e,n),n}else if(ni.is(e)){let n=[e.id];return Wt.set(e,n),n}else return[]}}function OA(e,r,t){var i,a;let n=(i=e.features[0])==null?void 0:i.properties.id,o=r[0];if(r.length>1){for(let l of r)if(((a=t.get(l))!=null?a:[]).includes(n)){o=l;break}}return o}function kA(e,r,t){var i,a;let n=(i=e.features[e.features.length-1])==null?void 0:i.properties.id,o=r[0];if(r.length>1){for(let l of r)if(((a=t.get(l))!=null?a:[]).includes(n)){o=l;break}}return o}var t0,A1,zp=class{constructor({nodes:r,geojsonCollection:t,connections:n,groupBy:o,multiplicativeDistanceWeightScaling:i,flagDeclarations:a}){f(this,"navigator");f(this,"connections");f(this,"getDirections",async(r,t,n,o)=>{let i=new Map,a=new Map;for(let d of r)i.set(d,await Zu(d,o,o.enterpriseMode));for(let d of t)a.set(d,await Zu(d,o,o.enterpriseMode));let{originIds:l,destinationNodeIds:u,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,t0).call(this,r,t,l,u,n,o,c)});f(this,"getDirectionsSync",(r,t,n,o)=>{let i=new Map(r.map(d=>[d,Up(d,o,o.enterpriseMode)])),a=new Map(t.map(d=>[d,Up(d,o,o.enterpriseMode)])),{originIds:l,destinationNodeIds:u,featureToNodeIdsMap:c}=this.processTargets(i,a,o);return s(this,t0).call(this,r,t,l,u,n,o,c)});D(this,t0,(r,t,n,o,i,a,l)=>{let u=this.getDisabledConnectionNodeIds(i.accessible).filter(E=>!n.includes(E)&&!o.includes(E)),c=new Map,d=w({},i.connectionIdWeightMap);for(let E of i.excludedConnections)d[E.id]=1/0;for(let E in d){let v=a.getById("connection",E);v&&s(this,A1).call(this,v,d[E],c)}let m=this.navigator.getDirections({zones:i.zones.map(E=>{var v;return{geometry:E.geometry,cost:E.cost,map:(v=E.floor)==null?void 0:v.id}}),originIds:n,destinationNodeIds:o,disabledConnectionNodeIds:u,simplify:{enabled:i.smoothing.enabled,bufferRadius:i.smoothing.radius},overrideEdgeWeights:c,multiplicativeDistanceWeightScaling:!a.enterpriseMode});this.addCoordinateDirections(m,r,t);let h=OA(m,r,l),g=kA(m,t,l),x=new Vu(m,a,h,g);if(!(x.distance===0&&new Set([...n,...o]).size===n.length+o.length))return x});f(this,"getDisabledConnectionNodeIds",r=>r===!1?[]:this.connections.reduce((t,n)=>n.accessible?t:t.concat(n.nodes),[]));D(this,A1,(r,t,n)=>{if(r.nodes.length<2)return;let o=new Set(r.nodes.map(i=>i.id));for(let i of r.nodes){let a=this.navigator.graph.edges[i.id];if(a)for(let l of a)o.has(l.destination.properties.id)&&n.set(l,t)}});f(this,"addCoordinateDirections",(r,[t],[n])=>{if(r.features.length){if(De.is(t)){let o=this.createDirectionFeature(t,this.navigator.getAngle([t.longitude,t.latitude],r.features[0].geometry.coordinates),this.navigator.getDistance([t.longitude,t.latitude],r.features[0].geometry.coordinates));r.features.splice(0,0,o)}if(De.is(n)){let o=this.createDirectionFeature(n,0,0),i=r.features[r.features.length-1];i.properties.distance=this.navigator.getDistance(i.geometry.coordinates,[n.longitude,n.latitude]),i.properties.angle=this.navigator.getAngle(i.geometry.coordinates,[n.longitude,n.latitude]),r.features.push(o)}}});f(this,"createDirectionFeature",(r,t,n)=>({type:"Feature",geometry:{type:"Point",coordinates:[r.longitude,r.latitude]},properties:{groupBy:r.floorId,id:r.id,angle:t,distance:n,edges:[]}}));this.navigator=new jp({nodes:r,geojsonCollection:this.createCollection(t),groupBy:o,multiplicativeDistanceWeightScaling:i,flagDeclarations:a}),this.connections=n}processTargets(r,t,n){let o=[],i=[],a=new Map,l=new Set,u=new Set;for(let[c,d]of r){a.has(c)||a.set(c,[]);let m=a.get(c);gr.is(c)&&l.add(c.id);for(let h of d)m.push(h),o.push(h)}for(let[c,d]of t){a.has(c)||a.set(c,[]);let m=a.get(c);gr.is(c)&&u.add(c.id);for(let h of d)m.push(h),i.push(h)}if(l.size===0&&u.size===0)return{originIds:o,destinationNodeIds:i,featureToNodeIdsMap:a};for(let c of o){let d=n.spaceIdsByNodeId[c]||[];for(let m of d)if(u.has(m)){i.push(c);break}}for(let c of i){let d=n.spaceIdsByNodeId[c]||[];for(let m of d)if(l.has(m)){o.push(c);break}}return{originIds:o,destinationNodeIds:i,featureToNodeIdsMap:a}}createCollection(r){return{type:"FeatureCollection",features:Object.entries(r).reduce((t,[n,o])=>t.concat(o.features.map(i=>(i.properties.map=n,i))),[])}}};t0=new WeakMap,A1=new WeakMap;p();p();p();p();p();p();function BA(e){let r=+this._x.call(null,e),t=+this._y.call(null,e);return _A(this.cover(r,t),r,t,e)}function _A(e,r,t,n){if(isNaN(r)||isNaN(t))return e;var o,i=e._root,a={data:n},l=e._x0,u=e._y0,c=e._x1,d=e._y1,m,h,g,x,E,v,I,C;if(!i)return e._root=a,e;for(;i.length;)if((E=r>=(m=(l+c)/2))?l=m:c=m,(v=t>=(h=(u+d)/2))?u=h:d=h,o=i,!(i=i[I=v<<1|E]))return o[I]=a,e;if(g=+e._x.call(null,i.data),x=+e._y.call(null,i.data),r===g&&t===x)return a.next=i,o?o[I]=a:e._root=a,e;do o=o?o[I]=new Array(4):e._root=new Array(4),(E=r>=(m=(l+c)/2))?l=m:c=m,(v=t>=(h=(u+d)/2))?u=h:d=h;while((I=v<<1|E)===(C=(x>=h)<<1|g>=m));return o[C]=i,o[I]=a,e}function LA(e){var r,t,n=e.length,o,i,a=new Array(n),l=new Array(n),u=1/0,c=1/0,d=-1/0,m=-1/0;for(t=0;t<n;++t)isNaN(o=+this._x.call(null,r=e[t]))||isNaN(i=+this._y.call(null,r))||(a[t]=o,l[t]=i,o<u&&(u=o),o>d&&(d=o),i<c&&(c=i),i>m&&(m=i));if(u>d||c>m)return this;for(this.cover(u,c).cover(d,m),t=0;t<n;++t)_A(this,a[t],l[t],e[t]);return this}p();function RA(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var t=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(t))o=(t=Math.floor(e))+1,i=(n=Math.floor(r))+1;else{for(var a=o-t||1,l=this._root,u,c;t>e||e>=o||n>r||r>=i;)switch(c=(r<n)<<1|e<t,u=new Array(4),u[c]=l,l=u,a*=2,c){case 0:o=t+a,i=n+a;break;case 1:t=o-a,i=n+a;break;case 2:o=t+a,n=i-a;break;case 3:t=o-a,n=i-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=t,this._y0=n,this._x1=o,this._y1=i,this}p();function NA(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}p();function jA(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}p();p();function Xr(e,r,t,n,o){this.node=e,this.x0=r,this.y0=t,this.x1=n,this.y1=o}function UA(e,r,t){var n,o=this._x0,i=this._y0,a,l,u,c,d=this._x1,m=this._y1,h=[],g=this._root,x,E;for(g&&h.push(new Xr(g,o,i,d,m)),t==null?t=1/0:(o=e-t,i=r-t,d=e+t,m=r+t,t*=t);x=h.pop();)if(!(!(g=x.node)||(a=x.x0)>d||(l=x.y0)>m||(u=x.x1)<o||(c=x.y1)<i))if(g.length){var v=(a+u)/2,I=(l+c)/2;h.push(new Xr(g[3],v,I,u,c),new Xr(g[2],a,I,v,c),new Xr(g[1],v,l,u,I),new Xr(g[0],a,l,v,I)),(E=(r>=I)<<1|e>=v)&&(x=h[h.length-1],h[h.length-1]=h[h.length-1-E],h[h.length-1-E]=x)}else{var C=e-+this._x.call(null,g.data),S=r-+this._y.call(null,g.data),T=C*C+S*S;if(T<t){var A=Math.sqrt(t=T);o=e-A,i=r-A,d=e+A,m=r+A,n=g.data}}return n}p();function zA(e){if(isNaN(d=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e)))return this;var r,t=this._root,n,o,i,a=this._x0,l=this._y0,u=this._x1,c=this._y1,d,m,h,g,x,E,v,I;if(!t)return this;if(t.length)for(;;){if((x=d>=(h=(a+u)/2))?a=h:u=h,(E=m>=(g=(l+c)/2))?l=g:c=g,r=t,!(t=t[v=E<<1|x]))return this;if(!t.length)break;(r[v+1&3]||r[v+2&3]||r[v+3&3])&&(n=r,I=v)}for(;t.data!==e;)if(o=t,!(t=t.next))return this;return(i=t.next)&&delete t.next,o?(i?o.next=i:delete o.next,this):r?(i?r[v]=i:delete r[v],(t=r[0]||r[1]||r[2]||r[3])&&t===(r[3]||r[2]||r[1]||r[0])&&!t.length&&(n?n[I]=t:this._root=t),this):(this._root=i,this)}function GA(e){for(var r=0,t=e.length;r<t;++r)this.remove(e[r]);return this}p();function $A(){return this._root}p();function VA(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}p();function ZA(e){var r=[],t,n=this._root,o,i,a,l,u;for(n&&r.push(new Xr(n,this._x0,this._y0,this._x1,this._y1));t=r.pop();)if(!e(n=t.node,i=t.x0,a=t.y0,l=t.x1,u=t.y1)&&n.length){var c=(i+l)/2,d=(a+u)/2;(o=n[3])&&r.push(new Xr(o,c,d,l,u)),(o=n[2])&&r.push(new Xr(o,i,d,c,u)),(o=n[1])&&r.push(new Xr(o,c,a,l,d)),(o=n[0])&&r.push(new Xr(o,i,a,c,d))}return this}p();function HA(e){var r=[],t=[],n;for(this._root&&r.push(new Xr(this._root,this._x0,this._y0,this._x1,this._y1));n=r.pop();){var o=n.node;if(o.length){var i,a=n.x0,l=n.y0,u=n.x1,c=n.y1,d=(a+u)/2,m=(l+c)/2;(i=o[0])&&r.push(new Xr(i,a,l,d,m)),(i=o[1])&&r.push(new Xr(i,d,l,u,m)),(i=o[2])&&r.push(new Xr(i,a,m,d,c)),(i=o[3])&&r.push(new Xr(i,d,m,u,c))}t.push(n)}for(;n=t.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}p();function WA(e){return e[0]}function qA(e){return arguments.length?(this._x=e,this):this._x}p();function KA(e){return e[1]}function JA(e){return arguments.length?(this._y=e,this):this._y}function r0(e,r,t){var n=new q2(r==null?WA:r,t==null?KA:t,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function q2(e,r,t,n,o,i){this._x=e,this._y=r,this._x0=t,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function YA(e){for(var r={data:e.data},t=r;e=e.next;)t=t.next={data:e.data};return r}var Nn=r0.prototype=q2.prototype;Nn.copy=function(){var e=new q2(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,t,n;if(!r)return e;if(!r.length)return e._root=YA(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(n=r.source[o])&&(n.length?t.push({source:n,target:r.target[o]=new Array(4)}):r.target[o]=YA(n));return e};Nn.add=BA;Nn.addAll=LA;Nn.cover=RA;Nn.data=NA;Nn.extent=jA;Nn.find=UA;Nn.remove=zA;Nn.removeAll=GA;Nn.root=$A;Nn.size=VA;Nn.visit=ZA;Nn.visitAfter=HA;Nn.x=qA;Nn.y=JA;p();function K2(e,r,t,n=0,o=0,i=0,a=0){if(t===void 0){t=e.root();let u=e.extent();if(u&&([[n,o],[i,a]]=u,r(t,n,o,i,a)))return!0;if(!t)return!1}let l=[[n,o,(i+n)/2,(a+o)/2],[(i+n)/2,o,i,(a+o)/2],[n,(a+o)/2,(i+n)/2,a],[(i+n)/2,(a+o)/2,i,a]];for(let u=0;u<4;u++){let c=t[u];if(c){let[d,m,h,g]=l[u];r(c,d,m,h,g)||K2(e,r,c,d,m,h,g)}}return!1}var XA=1e3,KZ=.1,JZ=5,YZ=1.5,Zi,n0,P1,QA,ao,cc,F1=class{constructor(r,t){D(this,P1);D(this,Zi,{});D(this,n0,new Map);f(this,"getMaxSearchRadiusForFloorId",(r,t)=>{var i;let n=(i=s(this,n0).get(s(this,ao).mapName))==null?void 0:i.get(t);if(n)return n;let o=this.getNodeTreeByTypeAndFloorId(r,s(this,ao).mapName,t);if(typeof o.extent=="function")if(o.extent()){let[[a,l],[u,c]]=o.extent(),d=u-a,m=c-l;n=Math.max(d,m)}else n=XA;else n=XA;return s(this,n0).set(s(this,ao).mapName,new Map([[t,n]])),n});D(this,ao);D(this,cc);M(this,ao,r),M(this,cc,t)}searchWithIncludedIds(r,t,n,o,i,a,l=!1,u=1/0){let c=this.getNodeTreeByTypeAndFloorId(t,n,o),d=new Set,m=[],h=JZ,g=Math.max(a,this.getMaxSearchRadiusForFloorId(t,o));for(;m.length<u&&h<=g;){let x=Q(this,P1,QA).call(this,r,c,i,h,a,d);x.sort((E,v)=>E.distance-v.distance);for(let E of x){if(m.length>=u)break;l?s(this,ao).directions.navigator.hasLineOfSight(r,E.node.geometry.coordinates,o,KZ)&&m.push(E):m.push(E)}h=h*YZ}return m}getNodeTreeByTypeAndFloorId(r,t,n){var a,l;if(s(this,Zi)[r]||(s(this,Zi)[r]={}),(a=s(this,Zi)[r][t])!=null&&a[n])return s(this,Zi)[r][t][n];s(this,Zi)[r][t]||(s(this,Zi)[r][t]={}),s(this,Zi)[r][t][n]=r0();let o=s(this,Zi)[r][t][n];o.x(u=>s(this,cc).call(this,u.geometry.coordinates).x),o.y(u=>s(this,cc).call(this,u.geometry.coordinates).y);let i=[];switch(r){case"space":i=s(this,ao).mvfSpacesByFloorId[n].flatMap(c=>c.properties.destinationNodes).map(c=>{let d=s(this,ao).mvfNodesById[c];return d?H(w({},d),{properties:{id:d.properties.id,parentId:d.properties.space[0]}}):null});break;case"node":i=((l=s(this,ao).mvfNodesByFloorId[n])==null?void 0:l.filter(c=>c.properties.neighbors.length>0))||[];break;case"point-of-interest":i=s(this,ao).mvfPoisByFloorId[n]||[];break;case"door":i=s(this,ao).mvfEntrancesByFloorId[n]||[];break;case"annotation":i=s(this,ao).mvfAnnotationsByFloorId[n]||[];break}return(i==null?void 0:i.length)>0&&o.addAll(i),o}};Zi=new WeakMap,n0=new WeakMap,P1=new WeakSet,QA=function(r,t,n,o,i,a){let{x:l,y:u}=s(this,cc).call(this,r),c=l-o,d=l+o,m=u-o,h=u+o,g=[];return K2(t,(x,E,v,I,C)=>{let S=E>=d||v>=h||I<c||C<m;if("data"in x){let T=x.data,A=T.properties.parentId||T.properties.id;if(n.includes(A)&&!a.has(A)){a.add(A);let F=Lo(r,T.geometry.coordinates);F<=i&&g.push({node:T,distance:F})}}return S}),g},ao=new WeakMap,cc=new WeakMap;import dc from"zod";var Gp=50,eF=111319.9,J2=1,Y2=!1,tF=dc.object({limit:dc.enum(["same-floor","same-elevation"]).optional(),mode:dc.enum(["travel-distance","absolute-distance"]).optional(),lineOfSight:dc.boolean().optional().or(dc.literal("auto")),maxDistance:dc.number().optional(),maxResults:dc.number().optional()}),rF={lineOfSight:Y2,mode:"travel-distance",maxDistance:Gp,limit:"same-floor",maxResults:J2},Er,i0,O1,a0,X2,$p,k1,B1,o0=class{constructor(r){D(this,a0);D(this,Er);D(this,i0);D(this,O1,([r,t])=>{let[n,o]=[s(this,Er).mapCenter.longitude,s(this,Er).mapCenter.latitude],i=eF,a=eF*Math.cos(t*Math.PI/180),l=(r-n)*a,u=(t-o)*i;return{x:l,y:u}});f(this,"__LEGACY_NEAREST_SYNC",(r,t,n)=>{let o=w(w({},rF),n);try{tF.parse(o)}catch(d){z.error(d);return}let i=hp(r);if(!i)return;let a=Q(this,a0,X2).call(this,i,o),l=[],u={},c=[];for(let d of t){let m=Up(d,s(this,Er),s(this,Er).enterpriseMode);if(m)for(let h of m)u[h]||(u[h]=[]),u[h].push(d),c.push(h)}return(n==null?void 0:n.mode)==="absolute-distance"?l=s(this,$p).call(this,i,a,t,o):l=s(this,B1).call(this,r,a,c,u,o),l.sort((d,m)=>d.distance-m.distance)});D(this,$p,(r,t,n,o)=>{var l,u;let i=[],a=new Set(n.map(c=>c.__type));for(let c of t)for(let d of a){let m=s(this,i0).searchWithIncludedIds([r.longitude,r.latitude],d,s(this,Er).mapName,c,n.filter(h=>h.__type===d).map(h=>h.id),(l=o==null?void 0:o.maxDistance)!=null?l:Gp,(o==null?void 0:o.lineOfSight)==="auto"?Y2:o==null?void 0:o.lineOfSight,(u=o==null?void 0:o.maxResults)!=null?u:1);if(m)for(let h of m)i.push({distance:h.distance,feature:s(this,Er).getById(d,h.node.properties.parentId)||s(this,Er).getById(d,h.node.properties.id)})}return i});D(this,k1,async(r,t,n,o,i)=>{var l,u,c,d;let a=[];for(let m of t){let h,g=0;if(!ni.is(r)){let x=s(this,$p).call(this,r.anchorTarget,[m],s(this,Er).getByType("node").filter(E=>E.floor.id===m),{limit:"same-floor",lineOfSight:(l=i==null?void 0:i.lineOfSight)!=null?l:!0,mode:"absolute-distance",maxDistance:(u=i==null?void 0:i.maxDistance)!=null?u:Gp,maxResults:1});x.length>0&&(h=x[0].feature,g=x[0].distance)}if(h){let x=new Set,E=s(this,Er).directions.navigator.findNearestNodesOnGraph(h.id,((c=i==null?void 0:i.maxDistance)!=null?c:Gp)-g,m,n,!1,(d=i==null?void 0:i.maxResults)!=null?d:J2);for(let v of E)for(let I of o[v.feature.properties.id])x.has(I.id)||(a.push({distance:v.distance+g,feature:I}),x.add(I.id))}}return a});D(this,B1,(r,t,n,o,i)=>{var l,u,c,d,m;let a=[];for(let h of t){let g;if(ni.is(r)||(g=(c=this.__LEGACY_NEAREST_SYNC(r,s(this,Er).getByType("node"),{lineOfSight:(l=i==null?void 0:i.lineOfSight)!=null?l:!0,mode:"absolute-distance",maxDistance:(u=i==null?void 0:i.maxDistance)!=null?u:Gp,maxResults:1}))==null?void 0:c[0].feature),g){let x=s(this,Er).directions.navigator.findNearestNodesOnGraph(g.id,(d=i==null?void 0:i.maxDistance)!=null?d:Gp,h,n,(i==null?void 0:i.lineOfSight)==="auto"?Y2:i==null?void 0:i.lineOfSight,(m=i==null?void 0:i.maxResults)!=null?m:J2);for(let E of x)for(let v of o[E.feature.properties.id])a.push({distance:E.distance,feature:v})}}return a});M(this,Er,r),M(this,i0,new F1(s(this,Er),s(this,O1)))}async nearest(r,t,n){let o=w(w({},rF),n);try{tF.parse(o)}catch(m){z.error(m);return}let i=hp(r);if(!i)return;let a=Q(this,a0,X2).call(this,i,o),l=[],u={},c=[],d=[];if((n==null?void 0:n.mode)==="absolute-distance")l=s(this,$p).call(this,i,a,t,o);else{for(let m of t)d.push(Zu(m,s(this,Er),s(this,Er).enterpriseMode).then(h=>{if(h)for(let g of h)u[g]||(u[g]=[]),u[g].push(m),c.push(g)}));await Promise.all(d),l=await s(this,k1).call(this,r,a,c,u,o)}return l.sort((m,h)=>m.distance-h.distance)}};Er=new WeakMap,i0=new WeakMap,O1=new WeakMap,a0=new WeakSet,X2=function(r,t){let n=r.floorId?[r.floorId]:[];if(r.floorId==null)for(let o of s(this,Er).getByType("floor-stack")){let i=o.defaultFloor;i&&n.push(i.id)}else if((t==null?void 0:t.limit)==="same-elevation"){let o=s(this,Er).floorsById[r.floorId];if(o){let i=o==null?void 0:o.elevation;i&&(n=s(this,Er).getByType("floor-stack").map(a=>{var l;return(l=a.floors.find(u=>u.elevation===i))==null?void 0:l.id}).filter(Boolean))}}return n},$p=new WeakMap,k1=new WeakMap,B1=new WeakMap;p();p();var s0,_1=class{constructor(r){D(this,s0);M(this,s0,r||[])}get raw(){return s(this,s0)}};s0=new WeakMap;var mn,Ie,Gt,Vp=class Vp extends Lr{constructor(t,n){super(n.mvfData.id);f(this,"__type",Vp.__type);f(this,"id","loc_");f(this,"name","");f(this,"externalId");f(this,"description");f(this,"logo");f(this,"phone");f(this,"social",[]);f(this,"images",[]);f(this,"links",[]);f(this,"website");f(this,"icon");D(this,mn);D(this,Ie,{});D(this,Gt);M(this,mn,t),M(this,Gt,n.mvfData);for(let o in n.mvfData)o==="links"?this.links=n.mvfData.links.map(i=>new Ul({mvfData:i})):o==="pictures"?this.images=n.mvfData.pictures.map(i=>{var a;return i.url?new Bs({mvfData:H(w({},i),{url:(a=i.url)!=null?a:""}),mapData:s(this,mn)}):void 0}).filter(i=>i!=null):o==="website"?n.mvfData.website&&(this.website=new Ul({mvfData:n.mvfData.website})):o==="icon"?n.mvfData.icon&&(this.icon=new Bs({mvfData:{url:n.mvfData.icon},mapData:s(this,mn)})):Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return s(this,Gt)[o]}})}static is(t){return t.__type===Vp.__type}get spaces(){if(s(this,Ie).spaces)return s(this,Ie).spaces;if(s(this,Gt).spaces==null)return s(this,Ie).spaces=[],s(this,Ie).spaces;s(this,Ie).spaces=[];for(let t=0;t<s(this,Gt).spaces.length;t++){let n=s(this,mn).getById("space",s(this,Gt).spaces[t].id);n&&s(this,Ie).spaces.push(n)}return s(this,Ie).spaces}get points(){if(s(this,Ie).points)return s(this,Ie).points;if(s(this,Gt).spaces==null)return s(this,Ie).points=[],s(this,Ie).points;s(this,Ie).points=[];for(let t=0;t<s(this,Gt).spaces.length;t++){let n=s(this,mn).getById("point-of-interest",s(this,Gt).spaces[t].id);n&&s(this,Ie).points.push(n)}return s(this,Ie).points}get doors(){if(s(this,Ie).doors)return s(this,Ie).doors;if(s(this,Gt).entrances==null)return s(this,Ie).doors=[],s(this,Ie).doors;s(this,Ie).doors=[];for(let t=0;t<s(this,Gt).entrances.length;t++){let n=s(this,mn).getById("door",s(this,Gt).entrances[t].id);n&&s(this,Ie).doors.push(n)}return s(this,Ie).doors}get connections(){var n;if(s(this,Ie).connections)return s(this,Ie).connections;if(s(this,Gt).connections==null)return s(this,Ie).connections=[],s(this,Ie).connections;let t=new Set;for(let o=0;o<s(this,Gt).connections.length;o++){let i=s(this,Gt).connections[o],a=s(this,mn).mvfConnectionsById[i],u=(a==null?[]:a.nodes).map(c=>s(this,mn).getById("node",c)).filter(Boolean);for(let c of u){if(c==null)continue;let d=Na([c.coordinate.longitude,c.coordinate.latitude]),h=((n=s(this,mn).connectionSpaceIdsByLatLon[d])!=null?n:[]).map(g=>s(this,mn).connectionsById[g]).filter(g=>g!=null);for(let g of h)t.add(g)}}return s(this,Ie).connections=Array.from(t),s(this,Ie).connections}get annotations(){if(s(this,Ie).annotations)return s(this,Ie).annotations;if(s(this,Gt).annotations==null)return s(this,Ie).annotations=[],s(this,Ie).annotations;s(this,Ie).annotations=[];for(let t=0;t<s(this,Gt).annotations.length;t++){let n=s(this,mn).getById("annotation",s(this,Gt).annotations[t].id);n&&s(this,Ie).annotations.push(n)}return s(this,Ie).annotations}get categories(){return s(this,Ie).categories?s(this,Ie).categories:s(this,Gt).categories==null?(s(this,Ie).categories=[],s(this,Ie).categories):(s(this,Ie).categories=s(this,Gt).categories.map(t=>s(this,mn).getById("location-category",t)).filter(t=>t!=null),s(this,Ie).categories)}get mapObjects(){return s(this,Ie).mapObjects?s(this,Ie).mapObjects:s(this,Gt).obstructions==null?(s(this,Ie).mapObjects=[],s(this,Ie).mapObjects):(s(this,Ie).mapObjects=s(this,Gt).obstructions.map(t=>s(this,mn).getById("object",t.id)).filter(t=>t!=null),s(this,Ie).mapObjects)}get areas(){return s(this,Ie).areas?s(this,Ie).areas:s(this,Gt).areas==null?(s(this,Ie).areas=[],s(this,Ie).areas):(s(this,Ie).areas=s(this,Gt).areas.map(t=>s(this,mn).getById("area",t.id)).filter(t=>t!=null),s(this,Ie).areas)}get focusTarget(){if(s(this,Ie).focusTarget)return s(this,Ie).focusTarget;let t=[];for(let n of this.spaces)t.push(n);for(let n of this.connections)t.push(...n.coordinates);for(let n of this.doors)t.push(n.focusTarget);for(let n of this.mapObjects)t.push(n.focusTarget);for(let n of this.annotations)t.push(n.focusTarget);for(let n of this.points)t.push(n.focusTarget);for(let n of this.areas)t.push(n.focusTarget);return s(this,Ie).focusTarget=t,t}get openingHours(){var t;return s(this,Ie).openingHours?s(this,Ie).openingHours:(s(this,Ie).openingHours=new _1((t=s(this,Gt).openingHoursSpecification)!=null?t:[]),s(this,Ie).openingHours)}get navigationTarget(){if(s(this,Ie).navigationTarget)return s(this,Ie).navigationTarget;let t=[];for(let n of this.spaces)t.push(n);for(let n of this.connections)t.push(...n.coordinates);for(let n of this.doors)t.push(n.focusTarget);for(let n of this.mapObjects)t.push(n.focusTarget);for(let n of this.annotations)t.push(n.focusTarget);for(let n of this.points)t.push(n.focusTarget);return s(this,Ie).navigationTarget=t,t}toJSON(){return{__type:Vp.__type,id:this.id,name:this.name}}};mn=new WeakMap,Ie=new WeakMap,Gt=new WeakMap,f(Vp,"__type","location-profile");var Q2=Vp,ic=Q2;p();var Hu,so,pc,Zp=class Zp extends Lr{constructor(t,n){super(n.mvfData.id);f(this,"__type",Zp.__type);f(this,"id","cat_");f(this,"name","");f(this,"icon","");D(this,Hu);D(this,so,{});D(this,pc);M(this,Hu,t),M(this,pc,n.mvfData);for(let o in n.mvfData)Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return s(this,pc)[o]}})}static is(t){return t.__type===Zp.__type}get parent(){return s(this,so).parent?s(this,so).parent:(s(this,so).parent=s(this,pc).parent?s(this,Hu).getById("location-category",s(this,pc).parent):void 0,s(this,so).parent)}get children(){return s(this,so).children?s(this,so).children:(s(this,so).children=s(this,Hu).locationCategoriesByParentId[this.id]||[],s(this,so).children)}get locationProfiles(){if(s(this,so).locationProfiles)return s(this,so).locationProfiles;let t=[];for(let n of s(this,Hu).locationProfilesByCategoryId[this.id]||[]){let o=s(this,Hu).getById("location-profile",n.id);o&&t.push(o)}return s(this,so).locationProfiles=t,t}toJSON(){return{__type:Zp.__type,id:this.id,name:this.name}}};Hu=new WeakMap,so=new WeakMap,pc=new WeakMap,f(Zp,"__type","location-category");var eI=Zp,b1=eI;var Me,L1,oF,Hp,Wp,mc=class extends Ge{constructor(t,n){var a,l,u,c,d,m;super();D(this,L1);f(this,"Analytics");D(this,Me,{});f(this,"Query");f(this,"mvf");f(this,"outdoorViewToken");f(this,"objectEntranceNodeIdsByObstructionId");f(this,"obstructionIdByEntranceId");f(this,"venue");f(this,"tokenManager");f(this,"directions");f(this,"enterpriseMode",!1);f(this,"nodesById");f(this,"spacesById");f(this,"floorsById");f(this,"floorStacksById");f(this,"facadesById");f(this,"facadesBySpaceId");f(this,"connectionsById");f(this,"objectsById");f(this,"doorsById");f(this,"pointsOfInterestById");f(this,"annotationsById");f(this,"areasById");f(this,"locationProfilesById");f(this,"locationCategoriesById");f(this,"locationProfilesByExternalId");f(this,"locationProfilesByCategoryId");f(this,"locationCategoriesByParentId");f(this,"doorsByNodeId");f(this,"mvfAnnotationsById");f(this,"mvfConnectionsById");f(this,"mvfConnectionsByNodeId");f(this,"mvfConnectionIdsByLatLon");f(this,"mvfEntrancesById");f(this,"mvfNodesById");f(this,"mvfObstructionById");f(this,"mvfSpacesById");f(this,"mvfFloorsById");f(this,"mvfFloorStacksById");f(this,"mvfAreasById");f(this,"spacesByExternalId");f(this,"nodesByExternalId");f(this,"objectsByExternalId");f(this,"poisByExternalId");f(this,"floorsByExternalId");f(this,"floorStacksByExternalId");f(this,"doorsByExternalId");f(this,"areasByExternalId");f(this,"connectionSpaceIdsByLatLon",{});f(this,"locationProfilesByAttachedFeatureId",{});f(this,"entranceNodeIdsBySpaceId",{});f(this,"locationsById",{});f(this,"categoriesById",{});f(this,"mvfLocationsByGeometryId",{});f(this,"locationIdsByNodeId",{});f(this,"spaceIdsByNodeId",{});f(this,"objectIdsByNodeId",{});f(this,"connectionsByExternalId",{});f(this,"locationsByExternalId",{});f(this,"categoriesByExternalId",{});f(this,"destinationNodesIdsBySpaceId",{});f(this,"mvfNodesByFloorId");f(this,"mvfSpacesByFloorId");f(this,"mvfPoisByFloorId");f(this,"mvfEntrancesByFloorId");f(this,"mvfAnnotationsByFloorId");f(this,"localePacksUrls");f(this,"currentLanguage");f(this,"languagePacks",{});f(this,"tilesets",{});f(this,"navigationFlags");f(this,"binaryBundle");f(this,"envControl");f(this,"getMapDataOptions");D(this,Hp,new De(0,0,"initializing"));f(this,"propTranslationCache",new Map);D(this,Wp);f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(t,n,o)=>this.__LEGACY_GET_DIRECTIONS_SYNC(t,n,H(w({},o),{multiDestination:!0})));f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(t,n,o)=>{let{accessible:i=!1,multiDestination:a=!1}=o||{},l=nF(this.enterpriseMode,o),u=(o==null?void 0:o.zones)||[],c={accessible:i,zones:u,smoothing:l,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}};if(a&&Array.isArray(n)){let d=Array.isArray(t)?t:[t],m=[];for(let h of n){let g=Array.isArray(h)?h:[h],x=this.directions.getDirectionsSync(d,g,c,this);if(!x){z.error("getDirections failed due to missing directions for one of the segments");return}d=g,m.push(x)}return m}else{let d=Array.isArray(t)?t:[t],m=Array.isArray(n)?n:[n];if(Array.isArray(m[0])){z.error("getDirections does not support multi-destination without multisegment option");return}d[0].id&&m[0].id&&this.Analytics.sendGetDirectionsEvent(d[0].id,m[0].id,i);try{return this.directions.getDirectionsSync(d,m,c,this)}catch(h){z.error("Unable to get directions",h);return}}});f(this,"getDirections",async(t,n,o)=>{let{accessible:i=!1}=o||{},a=nF(this.enterpriseMode,o),l=(o==null?void 0:o.zones)||[],u={accessible:i,zones:l,smoothing:a,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}},c=Array.isArray(t)?t:[t],d=Array.isArray(n)?n:[n];if(Array.isArray(d[0])){z.error("getDirections does not support multi-destination without multisegment option");return}c[0].id&&d[0].id&&this.Analytics.sendGetDirectionsEvent(c[0].id,d[0].id,i);try{return this.directions.getDirections(c,d,u,this)}catch(m){z.error("Unable to get directions",m);return}});f(this,"getDirectionsMultiDestination",async(t,n,o)=>Promise.resolve(this.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(t,n,o)));f(this,"transformImageRequest",async t=>{var o;if(this.enterpriseMode||!this.getMapDataOptions)return{url:t};if(!HM(t))return{url:t};if(WM(t))return{url:t};let n=f1(t);if(!n)return{url:t};try{let i=await((o=this.tokenManager)==null?void 0:o.getSasTokensAsync()),a=i==null?void 0:i[n.mapId];if(a==null)throw new Error("SAS token not found");let[l]=t.split("?");return{url:"".concat(l,"?").concat(a.token)}}catch(i){return z.error("Failed to append SAS token to image request. Requests for private images may fail.",i),{url:t}}});let o=(a=n==null?void 0:n.env)!=null?a:Bu();if(this.envControl=o,this.binaryBundle=n==null?void 0:n.binaryBundle,this.Analytics=new od,this.localePacksUrls=(l=n==null?void 0:n.localePacksUrls)!=null?l:{},this.mvf=t,this.outdoorViewToken=n==null?void 0:n.outdoorViewToken,this.getMapDataOptions=n==null?void 0:n.getMapDataOptions,((u=t["tileset.json"])==null?void 0:u.default)!=null&&(this.tilesets[t["tileset.json"].default.key]=t["tileset.json"].default,o.updateTileServerBaseUrl(t["tileset.json"].default.url),t["tileset.json"].others!=null))for(let h of t["tileset.json"].others)this.tilesets[h.key]=h;this.navigationFlags=(c=t["navigationFlags.json"])!=null?c:{},this.enterpriseMode=(d=n==null?void 0:n.enterprise)!=null?d:!1,this.tokenManager=n==null?void 0:n.tokenManager;let i=rA(t,this);if(this.nodesById=i.nodesById,this.spacesById=i.spacesById,this.floorsById=i.floorsById,this.floorStacksById=i.floorStacksById,this.facadesById=i.facadesById,this.facadesBySpaceId=i.facadesBySpaceId,this.connectionsById=i.connectionsById,this.objectsById=i.objectsById,this.doorsById=i.doorsById,this.pointsOfInterestById=i.poisById,this.annotationsById=i.annotationsById,this.areasById=i.areasById,this.locationProfilesById=i.locationProfilesById,this.locationCategoriesById=i.locationCategoriesById,this.locationProfilesByCategoryId=i.locationProfilesByCategoryId,this.locationCategoriesByParentId=i.locationCategoriesByParentId,this.spacesByExternalId=i.spacesByExternalId,this.nodesByExternalId=i.nodesByExternalId,this.objectsByExternalId=i.objectsByExternalId,this.floorsByExternalId=i.floorsByExternalId,this.locationProfilesByExternalId=i.locationProfilesByExternalId,this.floorStacksByExternalId=i.floorStacksByExternalId,this.poisByExternalId=i.poisByExternalId,this.doorsByExternalId=i.doorsByExternalId,this.areasByExternalId=i.areasByExternalId,this.mvfAnnotationsById=i.mvfAnnotationsById,this.mvfConnectionsById=i.mvfConnectionsById,this.mvfConnectionsByNodeId=i.mvfConnectionsByNodeId,this.mvfConnectionIdsByLatLon=i.mvfConnectionIdsByLatLon,this.mvfEntrancesById=i.mvfEntrancesById,this.mvfNodesById=i.mvfNodesById,this.mvfObstructionById=i.mvfObstructionById,this.mvfSpacesById=i.mvfSpacesById,this.mvfFloorsById=i.mvfFloorsById,this.mvfFloorStacksById=i.mvfFloorStacksById,this.mvfNodesByFloorId=i.mvfNodesByFloorId,this.mvfSpacesByFloorId=i.mvfSpacesByFloorId,this.mvfPoisByFloorId=i.mvfPoisByFloorId,this.mvfEntrancesByFloorId=i.mvfEntrancesByFloorId,this.mvfAnnotationsByFloorId=i.mvfAnnotationsByFloorId,this.mvfAreasById=i.mvfAreasById,this.doorsByNodeId=i.doorsByNodeId,this.objectEntranceNodeIdsByObstructionId=i.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=i.obstructionIdByEntranceId,this.connectionSpaceIdsByLatLon=i.connectionIdsByLatLon,this.locationProfilesByAttachedFeatureId=i.locationProfilesByAttachedFeatureId,this.entranceNodeIdsBySpaceId=i.entranceNodeIdsBySpaceId,this.spaceIdsByNodeId=i.spaceIdsByNodeId,this.objectIdsByNodeId=i.objectIdsByNodeId,this.destinationNodesIdsBySpaceId=i.destinationNodesIdsBySpaceId,this.enterpriseMode||u0()){let h=tA(t,this);if(this.locationsById=h.locationsById,this.categoriesById=h.categoriesById,this.mvfLocationsByGeometryId=h.mvfLocationsByGeometryId,this.locationIdsByNodeId=h.locationIdsByNodeId,this.connectionsByExternalId=h.connectionsByExternalId,this.locationsByExternalId=h.locationsByExternalId,this.categoriesByExternalId=h.categoriesByExternalId,h.venue.name!=null){this.venue=new N2(this,{mvfData:h.venue});let g={};for(let x in h.mvfLocationsById)g[x]=h.mvfLocationsById[x];for(let x in h.locationInstancesById)g[x]=h.locationInstancesById[x];this.languagePacks[this.venue.defaultLanguage.code]={type:"initial",optimized:{"enterprise-location":g,"enterprise-category":h.mvfCategoriesById,"floor-stack":i.mvfFloorStacksById,floor:i.mvfFloorsById}},(m=n==null?void 0:n.languagePacks)==null||m.forEach(({language:x,localePack:E})=>{this.languagePacks[x.code]=m2(E)}),this.currentLanguage=this.venue.defaultLanguage}}this.directions=new zp({nodes:t["node.geojson"],geojsonCollection:this.enterpriseMode&&t.enterprise?t.space:t.obstruction,connections:t["connection.json"],groupBy:"map",multiplicativeDistanceWeightScaling:!this.enterpriseMode,flagDeclarations:t["navigationFlags.json"]}),this.Query=new o0(this)}getEnv(){let t=this;return{get baseUri(){return t.envControl.getBaseUri()},get baseAuthUri(){return t.envControl.getBaseAuthUri()},get analyticsBaseUri(){return t.envControl.getAnalyticsBaseUri()},get tileServerUri(){return t.envControl.getTileServerUri()}}}get mapName(){return this.mvf["manifest.geojson"].features[0].properties.name}get organizationId(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.org_id)!=null?t:""}get mapCenter(){return s(this,Hp).floorId==="initializing"&&M(this,Hp,new De(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])),s(this,Hp)}get naturalBearing(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.naturalBearing)!=null?t:0}get spaces(){return s(this,Me).spaces==null&&(s(this,Me).spaces=globalThis.Object.values(this.spacesById)),s(this,Me).spaces}get objects(){return s(this,Me).objects==null&&(s(this,Me).objects=globalThis.Object.values(this.objectsById)),s(this,Me).objects}get connections(){return s(this,Me).connections==null&&(s(this,Me).connections=globalThis.Object.values(this.connectionsById)),s(this,Me).connections}get floors(){return s(this,Me).floors==null&&(s(this,Me).floors=globalThis.Object.values(this.floorsById)),s(this,Me).floors}get floorStacks(){return s(this,Me).floorStacks==null&&(s(this,Me).floorStacks=globalThis.Object.values(this.floorStacksById)),s(this,Me).floorStacks}get facades(){return s(this,Me).facades==null&&(s(this,Me).facades=globalThis.Object.values(this.facadesById)),s(this,Me).facades}get doors(){return s(this,Me).doors==null&&(s(this,Me).doors=globalThis.Object.values(this.doorsById)),s(this,Me).doors}get pointsOfInterest(){return s(this,Me).pointsOfInterest==null&&(s(this,Me).pointsOfInterest=globalThis.Object.values(this.pointsOfInterestById)),s(this,Me).pointsOfInterest}get annotations(){return s(this,Me).annotations==null&&(s(this,Me).annotations=globalThis.Object.values(this.annotationsById)),s(this,Me).annotations}get areas(){return s(this,Me).areas==null&&(s(this,Me).areas=globalThis.Object.values(this.areasById)),s(this,Me).areas}get nodes(){return s(this,Me).nodes==null&&(s(this,Me).nodes=globalThis.Object.values(this.nodesById)),s(this,Me).nodes}get locations(){return s(this,Me).locations==null&&(s(this,Me).locations=globalThis.Object.values(this.locationsById)),globalThis.Object.values(this.locationsById)}get categories(){return s(this,Me).categories==null&&(s(this,Me).categories=globalThis.Object.values(this.categoriesById)),globalThis.Object.values(this.categoriesById)}get locationProfiles(){return s(this,Me).locationProfiles==null&&(s(this,Me).locationProfiles=globalThis.Object.values(this.locationProfilesById)),s(this,Me).locationProfiles}get locationCategories(){return s(this,Me).locationCategories==null&&(s(this,Me).locationCategories=globalThis.Object.values(this.locationCategoriesById)),s(this,Me).locationCategories}get mvfFloors(){return s(this,Me).mvfFloors==null&&(s(this,Me).mvfFloors=globalThis.Object.values(this.mvfFloorsById)),s(this,Me).mvfFloors}get mvfFloorStacks(){return s(this,Me).mvfFloorStacks==null&&(s(this,Me).mvfFloorStacks=globalThis.Object.values(this.mvfFloorStacksById)),s(this,Me).mvfFloorStacks}getByType(t){switch(t){case"location-profile":return this.locationProfiles;case"location-category":return this.locationCategories;case"area":return this.areas;case"node":return this.nodes;case"space":return this.spaces;case"door":return this.doors;case"floor":return this.floors;case"floor-stack":return this.floorStacks;case"connection":return this.connections;case"object":return this.objects;case"point-of-interest":return this.pointsOfInterest;case"annotation":return this.annotations;case"enterprise-location":return this.locations;case"enterprise-category":return this.categories;case"enterprise-venue":return this.venue;case"facade":return this.facades;default:return[]}}getAllOfTypes(t,n){let o=t instanceof Set?t:new Set(t);return n!=null&&Array.isArray(n)?n.filter(i=>o.has(i.__type)):Array.from(o).flatMap(i=>this.getByType(i))}getById(t,n){let o={"location-profile":this.locationProfilesById,"location-category":this.locationCategoriesById,space:this.spacesById,floor:this.floorsById,"floor-stack":this.floorStacksById,facade:this.facadesById,node:this.nodesById,door:this.doorsById,connection:this.connectionsById,"mvf-connection":l=>Q(this,L1,oF).call(this,this.mvfConnectionsById[l]),object:this.objectsById,"point-of-interest":this.pointsOfInterestById,annotation:this.annotationsById,area:this.areasById,"enterprise-location":this.locationsById,"enterprise-category":this.categoriesById},i=l=>{let u=o[l];if(u!=null)return typeof u=="function"?u(n):u[n]},a=()=>{for(let l of Object.keys(o)){let u=i(l);if(u!=null)return u}};return t==="unknown"?a():i(t)}getByExternalId(t,n){var o,i,a,l,u,c,d,m,h,g,x,E;switch(t){case"location-profile":return(o=this.locationProfilesByExternalId[n])!=null?o:[];case"location-category":return[];case"space":return(i=this.spacesByExternalId[n])!=null?i:[];case"floor":return(a=this.floorsByExternalId[n])!=null?a:[];case"floor-stack":return(l=this.floorStacksByExternalId[n])!=null?l:[];case"node":return(u=this.nodesByExternalId[n])!=null?u:[];case"door":return(c=this.doorsByExternalId[n])!=null?c:[];case"connection":return(d=this.connectionsByExternalId[n])!=null?d:[];case"object":return(m=this.objectsByExternalId[n])!=null?m:[];case"point-of-interest":return(h=this.poisByExternalId[n])!=null?h:[];case"area":return(g=this.areasByExternalId[n])!=null?g:[];case"enterprise-location":return(x=this.locationsByExternalId[n])!=null?x:[];case"enterprise-category":return(E=this.categoriesByExternalId[n])!=null?E:[];default:return[]}}getMapDataById(t){var n,o,i,a,l,u,c,d,m,h;return(h=(m=(d=(c=(u=(l=(a=(i=(o=(n=this.spacesById[t])!=null?n:this.floorsById[t])!=null?o:this.floorStacksById[t])!=null?i:this.facadesById[t])!=null?a:this.nodesById[t])!=null?l:this.doorsById[t])!=null?u:this.connectionsById[t])!=null?c:this.objectsById[t])!=null?d:this.pointsOfInterestById[t])!=null?m:this.annotationsById[t])!=null?h:this.areasById[t]}getMVFFeatureById(t,n){switch(t){case"space":return this.mvfSpacesById[n];case"node":return this.mvfNodesById[n];case"obstruction":return this.mvfObstructionById[n];case"floor":return this.mvfFloorsById[n];case"floor-stack":return this.mvfFloorStacksById[n];case"connection":return this.mvfConnectionsById[n];case"entrance":return this.mvfEntrancesById[n];case"annotation":return this.mvfAnnotationsById[n];case"area":return this.mvfAreasById[n];default:throw new Error("Unknown MVF feature type: ".concat(t))}}getMVFFeatureByNodeId(t,n){switch(t){case"connection":return this.mvfConnectionsByNodeId[n];default:throw new Error("Unsupported MVF feature type: ".concat(t))}}getMVFFeatureByType(t){switch(t){case"floor-stack":return this.mvfFloorStacks;case"floor":return this.mvfFloors;default:throw new Error("Unsupported MVF feature type: ".concat(t))}}getPropTranslation(t,n,o,i){var u,c;if(!this.currentLanguage)return i;let{code:a}=this.currentLanguage,l=(c=(u=this.languagePacks[a])==null?void 0:u.optimized)==null?void 0:c[t];if(l){let d=l[o];if(d!=null&&d[n]!==void 0){let m=d[n];if(m!=null&&typeof m=="object"){if(typeof i=="object"&&typeof m=="object"&&!Array.isArray(m)){let h=sg(a+t+o+n.toString());if(this.propTranslationCache.has(h))return this.propTranslationCache.get(h);let g=Qf(i,m,["id"]);return this.propTranslationCache.set(h,g),g}return m}return m}}return i}findPreferredLanguage(t){if(!this.venue)return;let n=tI(this.venue,t);return(t==null?void 0:t.languageCode)!=null&&t.languageCode.toLowerCase()!==n.code.toLowerCase()&&z.warn('Language code "'.concat(t.languageCode,'" could not be found in the venue. Using "').concat(n.code,'" instead.')),n}async changeLanguage(t){var l;let n=t.toLowerCase();if(!n){z.error("Language code must be defined.");return}if(!this.currentLanguage||!this.venue){z.error("Changing the language is not supported for this map.");return}let o=this.currentLanguage.code,i=(l=this.venue)==null?void 0:l.languages.find(({code:u})=>u.toLowerCase()===n.toLowerCase());if(!i){z.warn('Language code "'.concat(n,'" could not be found in the venue.'));return}if(o===i.code)return;let a=this.languagePacks[i.code];if(!a){let u=this.localePacksUrls[i.code];if(!u){z.error('Locale pack URL not found for language code "'.concat(i.code,'".'));return}s(this,Wp)&&s(this,Wp).abort();let c=new AbortController;M(this,Wp,c);let d;try{d=await SM(u,{signal:c.signal})}catch(m){z.error('Failed to download language pack for language code "'.concat(i.code,'".'),m);return}if(!d||c.signal.aborted)return;a=m2(d),this.languagePacks[i.code]=a}this.Analytics.sendChangeLanguageEvent({fromLanguage:this.currentLanguage.code}),this.currentLanguage=i,this.publish("language-change",this.currentLanguage)}getDistance(t,n){let o=hp(t),i=hp(n);return Lo([o.longitude,o.latitude],[i.longitude,i.latitude])}async toJSONBundle({downloadLanguagePacks:t=!0}={}){var o;let n=[];if(t&&this.enterpriseMode){let i=new AbortController;for(let a of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[a.code]){let l=await Hx(this.localePacksUrls[a.code],{signal:i.signal}),u=await Xd(l);u&&n.push({language:{code:a.code,name:a.name},localePack:u})}}catch(l){z.warn("failed downloading language pack",l)}}return{type:"json",options:{enterprise:this.enterpriseMode},languagePacks:n,main:this.mvf}}async toBinaryBundle({downloadLanguagePacks:t=!0}={}){var o;if(!this.binaryBundle){z.error("binary bundle not found");return}let n=[];if(t&&this.enterpriseMode){let i=new AbortController;for(let a of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[a.code]){let l=await Hx(this.localePacksUrls[a.code],{signal:i.signal});l&&n.push({language:{code:a.code,name:a.name},localePack:l})}}catch(l){z.warn("failed downloading language pack",l)}}return{type:"binary",options:{enterprise:this.enterpriseMode},languagePacks:n,main:this.binaryBundle}}destroy(){for(let t of globalThis.Object.keys(s(this,Me)))s(this,Me)[t]=null;this.propTranslationCache.clear()}};Me=new WeakMap,L1=new WeakSet,oF=function(t){var l;let n=(l=t==null?void 0:t.nodes)==null?void 0:l[0],o=this.getById("node",n);if(o==null)return;let i=Na([o.coordinate.longitude,o.coordinate.latitude]),a=this.connectionSpaceIdsByLatLon[i];return a==null?void 0:a.map(u=>this.connectionsById[u]).find(u=>u!=null)},Hp=new WeakMap,Wp=new WeakMap;var nF=(e,r)=>{var l;let t=!e,n=r==null?void 0:r.smoothing,i=n!=null?typeof n=="object"?(l=n.enabled)!=null?l:t:n:t,a=typeof n=="object"?n.radius:void 0;return{enabled:i,radius:a!=null?a:.75}};p();p();p();globalThis.MappedinDebug||(globalThis.MappedinDebug={});globalThis.MappedinDebug.__idleCallbackInteractionState={isInteracting:!1,interactionCheckers:[],pendingCallbacks:[],registerInteractionChecker:function(e){this.interactionCheckers.push(e)},unregisterInteractionChecker:function(e){let r;for(let t=this.interactionCheckers.length-1;t>=0;t--)if(r=this.interactionCheckers[t],r===e){this.interactionCheckers.splice(t,1);break}},checkInteraction:function(){let e=!1;for(let r=0;r<this.interactionCheckers.length;r++)if(e=this.interactionCheckers[r](),e)return!0;return!1},addPendingCallback:function(e,r){this.pendingCallbacks.push({callback:e,timeoutId:r}),this.scheduleDeferredCheck()},scheduleDeferredCheck:function(){var e=this;this.checkTimeoutId||(this.checkTimeoutId=setTimeout(function r(){if(e.checkInteraction())e.checkTimeoutId=setTimeout(r,16);else{e.checkTimeoutId=null;var t=e.pendingCallbacks.slice();e.pendingCallbacks=[];let n;for(let o=0;o<t.length;o++)if(n=t[o],n&&n.callback)try{n.callback()}catch(i){}}},16))},removePendingCallback:function(e){let r;for(let t=this.pendingCallbacks.length-1;t>=0;t--)if(r=this.pendingCallbacks[t],r.timeoutId===e){this.pendingCallbacks.splice(t,1);break}}};globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var i,a;var r=performance.now(),t,n=!1,o=function(){if(!n){n=!0;try{e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(performance.now()-r))}})}catch(l){}}};return(a=(i=globalThis.MappedinDebug)==null?void 0:i.__idleCallbackInteractionState)!=null&&a.checkInteraction()?(t=Date.now()+Math.random(),globalThis.MappedinDebug.__idleCallbackInteractionState.addPendingCallback(o,t),t):(t=setTimeout(o,0),t)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){var r,t;clearTimeout(e),(t=(r=globalThis.MappedinDebug)==null?void 0:r.__idleCallbackInteractionState)==null||t.removePendingCallback(e)};p();p();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var iF="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkICAgKCgkLDhcPDg0NDhwUFREXIh4jIyEeICAlKjUtJScyKCAgLj8vMjc5PDw8JC1CRkE6RjU7PDn/2wBDAQoKCg4MDhsPDxs5JiAmOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTn/wgARCAIABAADAREAAhEBAxEB/8QAGwABAAMBAQEBAAAAAAAAAAAAAAECAwQFBgf/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAP3EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAIAAAJAFAAAAAAAAAAAAAAAAAAAAAAAAABAgAAEgCgAAAAAAAAAAAAAAAAAAAABERLSM1zM4zXMzjMoUIqCCSSS8XNC9mpoaVomharWTQAAAAAAAAAAAAAAAAEREtIoZrnGZkucUKFStQQSTFixdNDStF0TWrmiWqbJoAAAAAAAAAAAAAIgiWkZy4HNLzHLXKcxzpzmFYmRkUKFSCCSSxcuampsbR0HSdK9R1R1HTZvWll0mlAAAAAAAAAAAIiKLnLjHNLynLXKcycxzmNYmJmUKFSCAWLFy5qamxvHQvSdJ0nVHUdFm1aparWKAjNWSKAAAAARBEtYzlyXnjmOSuM4U4q4jjOM5a5k5zAyMjOqFCCCCSSS5c0jU1NzoOk6pew7TtjuO1e0646jezWr2WSaUAAAAAECIqtZco55eY464zhTirhOI5Dks5jAwMTIzqhUqQASWLFzSNTY3Og6V646zsO2O47V7DrjqNzWy9nlZ1c0LlrLEk0EQQVipRczIyMU5q5F4U8+vOPOrgThOOuU5jAxMjMzKpUggigJiSSxY0XQ1Njc6TqjtO49CX0D0T0Y7l7E6JdzU1NEvViSalBAWIqVKLSMjIxOauM4U86vPPOrz04TjrkOYwMTIzKJQqQQCKmBJJYutzQ1Njc6TrOyO475fRPRPQjuXsToXWPn6kkkEkhCkEAgggqVMjlrzzzDy7PMPPrhOQ5jBMqoVIIIAAIAJAAJJJLFzWN16TsO49CPTPUl9Q9A6o1LFiSSSSQpCwQQCCCpVMjlrzzyzy7PMPPrhOM5kwM6zKlQQAAQASAASCxY0NI3XpOw7j0I9M9SX0z0DqjU+UqpQqVIBFgEyixJYuWLFDkrzE8o8yvOONOasipBAAAAAAAAAAABJJY2OiO1fQPUj1T0pewuVKlCCqQsBIUSSSSWLlyTM5K808pPLrzziTnrEqQQAAAAAAAAAAASSWNjojtX0D1I9VfSOuND4uzMzqhQqVIALEli5c1jUuQc1vnp5pwJzVmQQAAAAAAAAAAAAAASSaHTHevpHoHTFjMyM6zKlSpABJJcsaGkamhU5q88804E5qzIIAAAAAAAAAAAAAAJJNDpjvX0j0Dqix8dVDMolSpAqCYElixc0XU0IMjlTlrIqAAAAAAAAAAAAAAAAAWNTqjqXYGZkZpUoQQRSFIsSXLroaGhBkcqctZFQAAAAAAAAAAAAAAAACxqdUdS7EngWQCAAQASACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYFSCCAACCQACSSSwKlSCAAAAAAAAAAAAAAAAAACSSxYGIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAAAAAAAAAAAAAAAAABIAJAJAJBAAIAIABAAAAJABAAAAAAAAAJBILEli5Y0LlzQ0Lly5csWLAkgFSChUoUMyhmUMyhQqVKkEEAEAAAAAAAAAkEgsSWLljQuXNDQuXLlyxYsCSAVIKFShQzKGZQzKFCpUqQe+ZmZkUKFCpUEEAAkksWLFzQ0NTU2NzY3Og3NzoNzc2NjU1NS5csSAQVKmZmZGRiYmBgYHOYGBgYGBiZGRkUMypUqQCAASSWLFi5oaGpqbG5sbnQbm50G5ubGxqampcuWJAIIKGZmZGRiYmBgYHOYGBgYGR+jmBzmBzmJiZGZQoQQSSWLmhqbGxudB0nSdJ1HSdR1HSdJ0G5qamhcsWJJJBIIIBUqVKFDIyMDA5jmOU5TlOY5TmOc5znMTEyMyhQggFixc0NTY2NzoOk6TpOo6TqOo6TpOg3NTU0LlixJJIJBAIKkFChQyMjAwOY5jlOU5jnP00yMTnOc5zAwMjMoVIJJLmhqbmx0HQdBubmxqXLkkgAAAAAAAAAAAAAEEFTMzMTEwOc5znMDAyMyhUgkkuaGpsbnQdB0G5ubGpcuSSAAAAAAAAAAAAAAQQVKGZ1gAEEEEFSCACSSxJJJIAAAAAAAAAAAAAAAAAAAAAAABBBBBUggAkkksSSSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSSSSAAAAAAAAAAAAAAAAAAQCCpBUqQVIKggAkFiSSxYksSWBIAAKFiQAAAAAAAAACCpUoUMzIyMzMzMyhQoVKkEEAgkEkklixYuXNDQ0NTQ1NC5cuWJAAAAAAAAAAIKlShQzMjIzMzMzKFChUqQQQCCQSSSWLFyxoXNDQ1NDU0LljUkkAAAAAAAAAAggggEEAgAAAAAAAAAAAAAEkgkkkkkAAAAAAAAAAgggggEAgAAAAAEgEAAAAAAEkgkkuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADyyCCCCCCCCAQASCSQWJJJJLEkkkkkgkkEgkAEgAAEAAgEAggEEEEEEEFSCCCCCCAQASCSQWJJJJLEkkkkkgkkEgEgEgAAEAAgEAggEEEEEH5AQQQQVBBAIAAJBIJJJLEkkkkliSSSSSQSSCQSAAAQAQQCCCCCCCCCpBBBBBUEEEAgAAkEgkkksSSSSSWJJJJJJBJIJBIAABABBAIIIIIIIIKg/LCAQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQAQQCACAAAACQCQSCQSASSASCQCQAAAAAAQCAQAQCAQfPgAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAgAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/xAApEAAABQUBAQACAwACAwAAAAABAgQFFQMGERQWEhNAUAAgMGCAkKCw/9oACAEBAAECAP8AwTZznOf3mc5/YZE41xVivFyM6i7C8C8C8zMzMzMyDyDyDyDwV4K7ldSuZV5VgVwqZ/SCca4qxXmcjOouwvAvEzMzMzMzMyDyDyDwV4K7ldSuRVwKgrgf88TDWMrO4VHOo61Hao7ndzvB3k7yZ5M8i8i8zMzMzMyDyDyDyV5K8keSPJHmm8U3em70nam603Mi8qotUDfk5GqZUdfUc6jrUdqjvUeDvB3kzyZ5M8i8i8zMzMzMzMg8g8leSvJHkjyR5pvFN4pu9N2pOtNzIvKqLWA39PX+/saplJlh1tRfVcKrlVdKrrVdqrvVdzu53Y7sZ2M6mdRdRdBdJSUk5SUB0B0B1K6kdSOxHam7Unek70nei7UXWi6UXKk40l9NaRWWuB8/75E41zKjraq+q41nOq6VXas7VXeq71Hc7ud2O7GdRdRdZQXSUlJSUlAdCugOpXUjqR2I7U3em70nek70nai60XSk5UnGkvItIrKoCsC0FwLgXAuBbube3ubm7uiuFcZcZaZYdZUWVl1dwruVdzrulZ0qulVzqOR3EzgZeZcZcK0Vm3t7W1tbW1tgrBYC0q0q4q8jgRxpuVJzoulB0oOlBzoOVBworqa0iwi0i0q4FwLQWAr2trZ2trb3RWiuFcZaZadbUW1l1ZwruVd0rulZ0qulVzqOR3E7gZeZeK4VorNzb29ra2tsFe2CwFpVxVxV5HAjjTcqTnRdKDpQdKDnQcqDhRXU1pFhVm/ISUnKSkrLSsrKyspJyUhvitOtrLq69Q4qHGu41nGqvqLjrDKhUDW+nv1nP+Oc+vYVArFUEVEWUl1FfQcU7imckzinX0VxFoLgXyMlJykrLS0tLS0rKSclI74rjraq6uvUuKhxruNdxqr6i46wysVA1vp79Zz/AI5z6A4VArFUEVkWUl1FfQcU7imcUzinX0VxFoLZKTlJWVlpaXl5eWlpWUB0BzBxkDr669SvUr666stqqz1xqes/j5AxahFFJXRWp1yZemX0F5HCQkpOUlZaWlpeXl5aWB2lQdAcwcZE7hWcFLgpXqF1ZbVVnUDU9Z/HyBi1CV6SuitTrky9MvoLyL5AXEXEXIXIXKSkpKSkpIHIHIHIrkVxK4yJnCsvrra6uqpPVE354GJVpKaCtOtoryuEiZxM5C5C5C5SUnJSclJSQOQORXIrkVxBxM4VV9dbXV1VJ6om/PAxKtFTQVp1tFeRwkRWitFYKvb2tra2draBUCsFgLCrSrQWitOsqqT1RN+jAxKtJTTWFWitMtMtFYKzb29ra2tnaBUCsFZVhVpVoLRWnWVFJ6om/RgYlWkpprAW73v36zn++c+gOFQKv1GoJv04GCp9Rq/T36zn++c+gOFT7fUagm/TgYKn1+3/AKEeMefHjx8/n8vl8vn8/Hjx5xj9bjHnx48fP5/L5fL5/Px48ecY/wAvOPxceQIFIKIJgSAiBAVuK2FaitINAM4MwMwMsJCQkJCQkJCwosws4tAtItQtgtot4oRSCm+Hy8ecfi48gQKQUQTAkBECArcVsK1FaQaAZwZgZgZYSEhISEhISFhRZhZxaBaRahbBbRbxQikFN8BpfMWgWozWLaLcKAUWpq62vr/DX19YEoJARAhBvK2laytRGgjORlIyEYiMJLfJbxLdJbhLbJbRLaJbJbZLbAWxzHMcxzHMcxzHMDbBrYNbJraNbRrbPbh7dPbx7fOwHYjsZ2UzMZoM0maxbRbhQCi1NXW19fX19fW1QSAiBCDeVtK1laiNBGYjKRkIxEYSW+S3iW6S3CW2S2iW0S2S2yW2AtgLY5jmOY5jmOY5gbYNbJrZNbRraPbZ7cPbp7ePb52A7EdjOymZjW4e3D26e3j2+ZgMwmYhYxY4SEhISEBjKxlYiMJGAjAS3iW9TtynblO26dtUrap2zTtmnbNO2SW2S3isRWYGkG0EAItTW1/h8Phr6+rp6AtwtQs5mI9vntw9tHtk9s1LZqWzUto9tnts9uHt09vHt8zAZhMxCxixwkJCQkIDGVjKxEYSMBGAlvEt6nblO3Kdt0rap21TtmnbNO2SWyS2yW8ViKzA1A2ggBFqa2v8Ph8NfW1dPRFuFqMzGYjW+e3D20e2T2zUtk9tHto1tCzHYj2+e3T24e3D24a3DW4Nuc5znOc4FuBbhbcLbhLcJblO3CW4S3iMRGcrYVECcKYB+cJBoCjM2maDsZ7fPbp7cPbh7cNbhrcG3Oc5znOcC3C24W3C24S3CW5TtwluEt4jERnK2FRAnCmAfnCQaAoxb/7ePl8NbU09PT1NYKHy8Y/ZePl8NbU09PT1NYKHy8Y/4Z6+g1tjb3d+Rk5SVlZWVlZSTkd8Fu3s/b6es/pvX0Gtsbe7vyMnKSkrKysrKSciC8Fu3s/YKnrP9gqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqoqsqsqoFIVwqAb8X0NQawqBVCrMrMqMoGuNUTiYf4ICT5/L4/H4fD4fH4hSCmBAAP4AgctUtYqgqkqsqsqsFIV/Hn8XHj5/H4a+traurq6mpqampqampqampqampqampqampqamrq62tr/D4/Lx5/Fx4+fx+Gvra2rq6upqampqampqamrq6upqampqampqamrq6utra/w+Py/wCgEzNTc5OTs7PT09PT8/Pz09PT07Ozk3Ng9TMxLy0rKSclJSMhIb+9vbu9u7u7u7u7u729vb2/vyEjJSUnKSstLzEzNTc5OTs7Oz09PT8/Pz09PT07Ozk5NzUzMS8tKyknJSUjISG/v727vbu7u7u7u7u9u729v78hIyUlJykrLS8x0nR9H0fR9H0XRdF0XRdD0PQ9F0XRdF0XRdF0fR9H0nSdJ0vS9L0vTdN03TdP0/T9P0/T9P0/T9P0/T9R0/T9P0/T9P0/TdN03S9L0vS9J0nSdJ0fR9H0XRdF0PRdD0PQ9D0PRdF0XRdF0XR9H0fSdJ0nS9L0vS9N03TdN0/T9P0/T9P0/T9P0/T9P1HT9P0/T9P0/T9N03TdL0vS9L0vSS8tLy0tLS0rKysrKysrKysrKystLS0vLS8vLy8vMTExMTExMzMzMTMzMzM1NTUzMzMzMzMzMzExMTExMS8vLy8vLy8tKy0tKysrKysrKysrKysrLS0tLy0vLy8vLzExMTExMTMzMzEzMzMzNTU1MzMzMzMzMzMxMTExMTEvLy8vnOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5znOc5znOc5znOc5znOc5znOc59ZznPr169evXr169evXr169evXr16znOfWc5z/9YD//xAArEAEAAgIDAQABBAICAQUAAAAAAVICYgNRYQRBEEBQUzFCIDARYICQoLD/2gAIAQEAAz8A/wDgmhCEI/nYQj+RhjH5ccflxw44YMe0dtmzZs2bNmzZs2bIsjtiwlxy45/Ljn8se0fwuPbjj8uOPy44YQxR2izZs2bNmzZs2bNkWR2xYS45cc/lhP5Y9/wEQwj8sIRD1s2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNmyLMZYZMZ/KJ/dRDCPywhjCI/LZs2bNmzZs2bNmzZs2bNmzZs2bNmzZs2bNkWYywlhP5RP/ABj9hDGGMIh69bNmzZs2bNmzZsmybJsmybJsmybJsmybJsmybJs2bNmzZs2bNmzZ7+mMsZYyj9hDGGMIj9NmzZs2bNmzZs2bJsmybJsmybJs2TZNk2TZNk2bJs2bNmzZs2bNmzZ6iWMsXr16hiwYMGDBgwYo/T169/T162bNmzZs2TZNk2T2ntPae09pSlKUpSlPae09p7T2mybJsmzZs2bNmz17+nr16hiwYOPtx9uPtx9sO2DBih69evXr1s2bNmzZsmybJsmye09p7T2lKUpSlKU9p7T2ntNk2TZNmzZs2bNmz17+vr1s2bNmzZs2bNmzZs2evXr169bNmye09p7SlKUp/wC6UpSlKe09p7etmzZs9evWzZs2bNmzZs2bNmzZs2bPXr1s9bNmye09p7SlKUp/7pSlKUp7T29bPWz169evWzZs2bNmzZs2bNmzZs2bNmzZs2evU9plM/vJhMJ7T29bNnrZ62bNmzZs2bNmzZs2bNmzZs2bNnr39J7TKZ/eTCYT3+nr162bNnrZs2bJsntNk2TZPabNmzZs2etnr39JlM/wUwmP09etmzZs2bNk2TZNk2TZNk2bNmzZs2bNnv6TKZ/gphMfp69etk9p7T2ntKUpSlKUp7T2nt69e/pMpn+GmH/j9PXr1Pae09pSySlklKU9p7T29evf0mUz/DTCY/T16lP/AHSlKU/xUpSlP/dKUpT/ABUpT/8AQllKWTJl0y6ZdMumXTLpl0y6ZJSn+QlKWTJl0y6ZdMumXTLpl0y6ZJSn/sn9xKWXTLpn0z6Z9M+mXTLplVlVlVlVlVlVlVlVlVlVlRlVlVlRlVlVlVlVlVlVlVl0z6Z9M4/DPpn0z6ZdMkp/byll0y6Z9M+mfTPpn0y6ZVZVZVZVZVZVZVZVZUZVZUZVZVZVZVZVZVZVZVZVZVZdM+mfTOPwz6Z9M+mTJlVlVlVl0yZ9M2fTPpn0z6Z9M+mbPpn0z6Z9M2fTPpl0yqyqyqyqyqyomiaJomiaJomiaJomjRo0aNGjRo0aNGjRNE0TRNE0TRNE0TRNE0ZVZVZVZVZVZVZM+mbPpn0z6Z9M+mfTNn0z6Z9M+mfTPpl0y6ZVZVZVTVlVlRNE0TRlRNE0TRNE0TRo0aNGjRo0aNGjRomiaJomiaJomiaJomqaJqyq0TRNE0TRNE0TVNE1TVNU1TRNE1TVNU0TRNE0TRNGjRo0aNGjRhWHFHTgh88Pmj8Pnj/V89HBRwf1w4f64cNMXFSHFTFxUxcVIcP9cOGkOCkPno+ej55/D55cEuKemHUIo0aNGjRo0TRNE0TRNE0TVNE0TVNE1TVNE1TRNU0TRNE0TRNGjRo0aNGjRhWHFHThh88Pnj8Pnq+ejgo4P64cP9cOKkOKkOKmLipi4aYuH+uHBSHBSHz0fPR88/h88uCXFNWHUIo0aNGjRo4ZcU9MOoRRFGjRo0aNGjRo0aNGjRo0RRhVxR04IcGP4cGP+jij/GEMI/xjCP3+M/5xhxT/AJwhwT/o4Mv9XBk4p6YdQiiKNGjRo0aNGjRo0aNGjRoijGsOKOnBi4Mfw4I/0cUf4whhH+MYR+/xn/OMOKf84Q4J/wBHBP8Ar/zxrDCsOKkOKjhq4auGrhq4auGjipDjpDGsI/k8awwrDipDio4aOGrhq4auGrho4qQ46QxrCP8A0bHcMLQ47w4rw4buCzgs4O3A4HA4XA4HA4HA4O3BZwWcN3Fdx3hhaGNoR/Dx3DC0OO8OK8OG7gs4LODtwOBwOFwOBwOBwODtwWcFnDdxXcd4YWhjaEf88UftoQh4y6ZuRyuVzOZzeudz+uf1z+uf1z+uf1z+uf1zuf1z+uf1z+uf1z+udzR25nM5o7c3rlcrlZsniOkSj9tCEPGXTNyuVy+uZzOb1z+uf1z+uf1z+uf1z+uf1z+udz+uf1z+uf1z+uf1z+ueO3O5nM5vXK5XKzZPEdMUftoYsemHTDpx9OPpxVcVXDVw1cNXDVw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDRw0cNHDVw1cNXFVxVcVXFVx9OPph0w6Yo/bQxY9MOnH04+nH04quKrhq4auGrhq4aOGjho4aOGjho4aOGkOGkOGkOGjho4aOGjho4aOGjhq4auGriq4quKriq4+nH0w6Ydf+wHgcLhcLicTjYdww7hh3DDuGPcMe4Y9ww7hh3DDuGHcONxuJxOFwuBwOB8753z2fPZ89nz3fNd893zXfPd893z3fP/Y+e757uC75/wCyHz/2Q+f+yHBd893z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDgcLhcLicTjYdww7hh3DDuGHcMe4Ydww7hh3DDuGHcONxuJxOFwuBwPnfO+d89nz2fPZ893zXfPd813z3fPd893z/2Pnu+e7gu+f8Ash8/9kPn/shwXcF3z3fPd893z3fPd893zXfNd893z2fPZ8/b5+3zvncDdu3bt03bt26bpum6bpum6bt27du3bt26bt26bpum6bpum6bpum6bt03TdN26bpum6bpum7dN03TdN03TdN03TdN03Tdum7dum7dN27dum6bpum6bpum6bpum7du3bt03bpu3bpum6bpum6bpum6bpu3TdN03bpum6bpum6bt03TdN03TdN03TdN03TdN03TduysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysysmzKzKzKybMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrMrJT+2lKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpSn9tKUpSlKUpSlKUpSlKUpSlKUpSlKUpSlKUpT/wDrA//EAB0RAAMBAAMBAQEAAAAAAAAAAAABERIwQFAgkMD/2gAIAQIBAT8A/COlKioqKioqKi+zSoqKioqL59Ro0aKyvpVlZWaNFXiVGkaNFZWV9CsrNGjRpFXepo0V8c69Zo0u1pGilfVnJWaNF+NFXNUaNFfmU0aReamkaNPzNM19VlZWaKysrK/XrKzTNGjRWaKyv+u0/8QAHREBAQACAQUAAAAAAAAAAAAAEQBAUCAQITCQwP/aAAgBAwEBPwD1NkRER07eYiIiNMRERGARERGgIiNAREZRERoCIjiYBERqiIwiI1REcCIiIiIjbkREREREfXZ//9k=";p();p();var aF=!1;function sF(){aF=!0}function uF(){return aF}var R1=class{constructor(r){f(this,"backgroundAlpha",1);f(this,"backgroundColor",new vr);f(this,"width",0);f(this,"height",0);f(this,"options",{});f(this,"renderer");f(this,"enabledLayers",new Set([0,1]));f(this,"handleWebGLContextCreationError",r=>{var t,n;(n=(t=this.options).onWebGLContextCreationError)==null||n.call(t,r)});f(this,"handleWebGLContextLost",r=>{var t,n;(n=(t=this.options).onWebGLContextLost)==null||n.call(t,r)});f(this,"handleWebGLContextRestored",r=>{var t,n;(n=(t=this.options).onWebGLContextRestored)==null||n.call(t,r)});var t,n,o,i,a;try{this.options=r,uF()?(this.renderer={setSize:()=>{},state:{reset:()=>{}},properties:{get:()=>{}},getSize:()=>({width:window.innerWidth,height:innerHeight}),getDrawingBufferSize:()=>({width:window.innerWidth,height:innerHeight}),getClearAlpha:()=>1,getClearColor:()=>new vr,autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),readRenderTargetPixelsAsync:()=>Promise.resolve([]),setRenderTarget:()=>{},setClearColor:()=>{},clear:()=>{},render:()=>{},clearStencil:()=>{},clearDepth:()=>{},domElement:document.createElement("canvas"),capabilities:{isWebGL2:!0}},this.renderer.domElement.style.width="1920px",Object.defineProperty(this.renderer.domElement,"clientWidth",{value:1920}),this.renderer.domElement.style.height="1080px",Object.defineProperty(this.renderer.domElement,"clientHeight",{value:1080})):(this.renderer=new CE({canvas:r.canvas,alpha:r.alpha||!1,stencil:!0,antialias:typeof r.antialias=="boolean"?r.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new vr((t=r.backgroundColor)!=null?t:"#ffffff"),this.backgroundAlpha=(n=r.backgroundAlpha)!=null?n:1}catch(l){z.error(l),r.onWebGLRendererError&&r.onWebGLRendererError(l)}(o=this.domElement())==null||o.addEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var r,t,n,o,i;this.renderer&&((t=(r=this.renderer).dispose)==null||t.call(r)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(o=this.domElement())==null||o.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(i=this.domElement())==null||i.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}render(r,t){if(this.renderer){this.renderer.state.reset(),t.layers.disableAll();for(let n of this.enabledLayers.values())t.layers.enable(n);this.renderer.clearStencil(),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(r,t),this.renderer.clearDepth(),t.layers.disableAll(),t.layers.enable(Ro.ALWAYS_ON_TOP_PATHS),this.renderer.render(r,t),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(r,t){y.env.NODE_ENV==="test"||!this.renderer||(this.width=r,this.height=t,this.renderer.setSize(r,t,!1))}setBackgroundColor(r,t){this.backgroundColor=r,this.backgroundAlpha=t}domElement(){var r;return(r=this.renderer)==null?void 0:r.domElement}};p();p();var lF='"use strict";(()=>{var Ya=Object.defineProperty,fl=Object.defineProperties;var pl=Object.getOwnPropertyDescriptors;var qa=Object.getOwnPropertySymbols;var gl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable;var Mr=(e,r,n)=>r in e?Ya(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,m=(e,r)=>{for(var n in r||(r={}))gl.call(r,n)&&Mr(e,n,r[n]);if(qa)for(var n of qa(r))vl.call(r,n)&&Mr(e,n,r[n]);return e},z=(e,r)=>fl(e,pl(r));var _e=(e,r)=>{for(var n in r)Ya(e,n,{get:r[n],enumerable:!0})};var M=(e,r,n)=>Mr(e,typeof r!="symbol"?r+"":r,n);function Qa(e,r){return r.x+r.w<e.x+e.w&&r.x>e.x&&r.y>e.y&&r.y+r.h<e.y+e.h}function Ha(e,r){let[n,i]=r;return n>=e.x&&n<=e.x+e.w&&i>=e.y&&i<=e.y+e.h}function eu(e,r){let n=r.x,i=r.y,t=r.x+r.w,o=r.y+r.h,u=e.x,l=e.y,c=e.x+e.w,a=e.y+e.h;return n<c&&u<t&&i<a&&l<o}function ue(e,r){for(let n=0;n<r.length;n++)e.push(r[n])}var E=class{constructor(r,n,i,t,o){M(this,"x");M(this,"y");M(this,"w");M(this,"h");M(this,"userData");this.userData=typeof o>"u"?null:o,this.x=r,this.y=n,this.w=i,this.h=t}contains(r){return r===this?!1:Qa(this,r)}intersects(r){return eu(this,r)}intersectsPoint(r){return Ha(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var Me=class e{constructor(r,n){M(this,"topLeft");M(this,"topRight");M(this,"bottomLeft");M(this,"bottomRight");M(this,"divided",!1);M(this,"boundary");M(this,"capacity",16);M(this,"objects",[]);M(this,"parent");this.parent=n,this.boundary=r}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:r,y:n,w:i,h:t}=this.boundary;this.topLeft=new e(new E(r,n,i/2,t/2),this),this.topRight=new e(new E(r+i/2,n,i/2,t/2),this),this.bottomLeft=new e(new E(r,n+t/2,i/2,t/2),this),this.bottomRight=new e(new E(r+i/2,n+t/2,i/2,t/2),this),this.divided=!0}queryRect(r){let n=[];if(this.boundary.intersects(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryRect(r)),ue(n,this.topRight.queryRect(r)),ue(n,this.bottomLeft.queryRect(r)),ue(n,this.bottomRight.queryRect(r))),n}queryPoint(r){let n=[];if(this.boundary.intersectsPoint(r))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryPoint(r)),ue(n,this.topRight.queryPoint(r)),ue(n,this.bottomLeft.queryPoint(r)),ue(n,this.bottomRight.queryPoint(r))),n}insert(r){return(this.parent?!this.boundary.contains(r):!this.boundary.intersects(r))?!1:this.objects.length<this.capacity?(this.objects.push(r),!0):(this.divided||this.subdivide(),(this.topLeft.insert(r)||this.topRight.insert(r)||this.bottomLeft.insert(r)||this.bottomRight.insert(r))===!1&&this.objects.push(r),!0)}drawObjects(r){this.objects.forEach(n=>n.draw(r)),this.divided&&(this.topLeft.drawObjects(r),this.topRight.drawObjects(r),this.bottomLeft.drawObjects(r),this.bottomRight.drawObjects(r))}draw(r){r.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(r),this.topRight.draw(r),this.bottomLeft.draw(r),this.bottomRight.draw(r)),r.strokeStyle="black",r.lineWidth=4,r.stroke()}};var Fe={};_e(Fe,{$brand:()=>Pt,$input:()=>lo,$output:()=>co,NEVER:()=>Br,TimePrecision:()=>fo,ZodAny:()=>Oc,ZodArray:()=>Zc,ZodBase64:()=>Ua,ZodBase64URL:()=>Na,ZodBigInt:()=>Ot,ZodBigIntFormat:()=>Ta,ZodBoolean:()=>jt,ZodCIDRv4:()=>Oa,ZodCIDRv6:()=>Pa,ZodCUID:()=>xa,ZodCUID2:()=>ka,ZodCatch:()=>Qc,ZodCodec:()=>Ba,ZodCustom:()=>Ar,ZodCustomStringFormat:()=>wt,ZodDate:()=>Dr,ZodDefault:()=>Kc,ZodDiscriminatedUnion:()=>Dc,ZodE164:()=>Za,ZodEmail:()=>ba,ZodEmoji:()=>_a,ZodEnum:()=>zt,ZodError:()=>Bd,ZodFile:()=>Jc,ZodFirstPartyTypeKind:()=>Ka,ZodFunction:()=>ul,ZodGUID:()=>Or,ZodIPv4:()=>Sa,ZodIPv6:()=>ja,ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,ZodIntersection:()=>Tc,ZodIssueCode:()=>rf,ZodJWT:()=>Da,ZodKSUID:()=>wa,ZodLazy:()=>il,ZodLiteral:()=>Fc,ZodMap:()=>Cc,ZodNaN:()=>el,ZodNanoID:()=>ya,ZodNever:()=>Uc,ZodNonOptional:()=>Ja,ZodNull:()=>Sc,ZodNullable:()=>Bc,ZodNumber:()=>St,ZodNumberFormat:()=>Ve,ZodObject:()=>Er,ZodOptional:()=>Fa,ZodPipe:()=>Ma,ZodPrefault:()=>Wc,ZodPromise:()=>al,ZodReadonly:()=>tl,ZodRealError:()=>X,ZodRecord:()=>La,ZodSet:()=>Vc,ZodString:()=>It,ZodStringFormat:()=>A,ZodSuccess:()=>Yc,ZodSymbol:()=>Ic,ZodTemplateLiteral:()=>nl,ZodTransform:()=>Mc,ZodTuple:()=>Ac,ZodType:()=>U,ZodULID:()=>za,ZodURL:()=>Zr,ZodUUID:()=>de,ZodUndefined:()=>wc,ZodUnion:()=>Aa,ZodUnknown:()=>Pc,ZodVoid:()=>Nc,ZodXID:()=>Ia,_ZodString:()=>$a,_default:()=>Gc,_function:()=>Xm,any:()=>Om,array:()=>Tr,base64:()=>mm,base64url:()=>fm,bigint:()=>zm,boolean:()=>zc,catch:()=>Hc,check:()=>qm,cidrv4:()=>sm,cidrv6:()=>dm,clone:()=>K,codec:()=>Km,coerce:()=>Rr,config:()=>L,core:()=>ae,cuid:()=>nm,cuid2:()=>im,custom:()=>Ym,date:()=>Um,decode:()=>la,decodeAsync:()=>da,discriminatedUnion:()=>Em,e164:()=>pm,email:()=>Gd,emoji:()=>tm,encode:()=>ca,encodeAsync:()=>sa,endsWith:()=>vt,enum:()=>Ca,file:()=>Fm,flattenError:()=>He,float32:()=>_m,float64:()=>ym,formatError:()=>et,function:()=>Xm,getErrorMap:()=>of,globalRegistry:()=>oe,gt:()=>le,gte:()=>W,guid:()=>Wd,hash:()=>bm,hex:()=>$m,hostname:()=>hm,httpUrl:()=>em,includes:()=>pt,instanceof:()=>Qm,int:()=>ha,int32:()=>xm,int64:()=>Im,intersection:()=>Ec,ipv4:()=>cm,ipv6:()=>lm,iso:()=>kt,json:()=>ef,jwt:()=>gm,keyof:()=>Nm,ksuid:()=>um,lazy:()=>ol,length:()=>Re,literal:()=>Vm,locales:()=>ze,looseObject:()=>Tm,lowercase:()=>mt,lt:()=>ce,lte:()=>H,map:()=>Rm,maxLength:()=>Ae,maxSize:()=>Ee,mime:()=>ht,minLength:()=>$e,minSize:()=>we,multipleOf:()=>Ie,nan:()=>Bm,nanoid:()=>rm,nativeEnum:()=>Cm,negative:()=>Fo,never:()=>Ea,nonnegative:()=>Mo,nonoptional:()=>qc,nonpositive:()=>Jo,normalize:()=>$t,null:()=>jc,nullable:()=>Ur,nullish:()=>Jm,number:()=>kc,object:()=>Zm,optional:()=>Pr,overwrite:()=>se,parse:()=>ia,parseAsync:()=>oa,partialRecord:()=>Am,pipe:()=>Nr,positive:()=>Vo,prefault:()=>Xc,preprocess:()=>tf,prettifyError:()=>rn,promise:()=>Wm,property:()=>Bo,readonly:()=>rl,record:()=>Lc,refine:()=>cl,regex:()=>dt,regexes:()=>Q,registry:()=>ir,safeDecode:()=>fa,safeDecodeAsync:()=>ga,safeEncode:()=>ma,safeEncodeAsync:()=>pa,safeParse:()=>aa,safeParseAsync:()=>ua,set:()=>Lm,setErrorMap:()=>nf,size:()=>st,startsWith:()=>gt,strictObject:()=>Dm,string:()=>va,stringFormat:()=>vm,stringbool:()=>Hm,success:()=>Mm,superRefine:()=>ll,symbol:()=>Sm,templateLiteral:()=>Gm,toJSONSchema:()=>Qo,toLowerCase:()=>_t,toUpperCase:()=>yt,transform:()=>Va,treeifyError:()=>tn,trim:()=>bt,tuple:()=>Rc,uint32:()=>km,uint64:()=>wm,ulid:()=>om,undefined:()=>jm,union:()=>Ra,unknown:()=>Ce,uppercase:()=>ft,url:()=>Hd,util:()=>_,uuid:()=>Xd,uuidv4:()=>qd,uuidv6:()=>Yd,uuidv7:()=>Qd,void:()=>Pm,xid:()=>am});var ae={};_e(ae,{$ZodAny:()=>Ui,$ZodArray:()=>Ei,$ZodAsyncError:()=>te,$ZodBase64:()=>yi,$ZodBase64URL:()=>xi,$ZodBigInt:()=>Qt,$ZodBigIntFormat:()=>Si,$ZodBoolean:()=>it,$ZodCIDRv4:()=>$i,$ZodCIDRv6:()=>bi,$ZodCUID:()=>ui,$ZodCUID2:()=>ci,$ZodCatch:()=>Hi,$ZodCheck:()=>R,$ZodCheckBigIntFormat:()=>An,$ZodCheckEndsWith:()=>Xn,$ZodCheckGreaterThan:()=>Bt,$ZodCheckIncludes:()=>Gn,$ZodCheckLengthEquals:()=>Jn,$ZodCheckLessThan:()=>Mt,$ZodCheckLowerCase:()=>Bn,$ZodCheckMaxLength:()=>Vn,$ZodCheckMaxSize:()=>Rn,$ZodCheckMimeType:()=>Yn,$ZodCheckMinLength:()=>Fn,$ZodCheckMinSize:()=>Ln,$ZodCheckMultipleOf:()=>Tn,$ZodCheckNumberFormat:()=>En,$ZodCheckOverwrite:()=>Qn,$ZodCheckProperty:()=>qn,$ZodCheckRegex:()=>Mn,$ZodCheckSizeEquals:()=>Cn,$ZodCheckStartsWith:()=>Wn,$ZodCheckStringFormat:()=>De,$ZodCheckUpperCase:()=>Kn,$ZodCodec:()=>ot,$ZodCustom:()=>uo,$ZodCustomStringFormat:()=>Ii,$ZodDate:()=>Ti,$ZodDefault:()=>Xi,$ZodDiscriminatedUnion:()=>Ri,$ZodE164:()=>ki,$ZodEmail:()=>ni,$ZodEmoji:()=>oi,$ZodEncodeError:()=>me,$ZodEnum:()=>Ji,$ZodError:()=>Qe,$ZodFile:()=>Bi,$ZodFunction:()=>io,$ZodGUID:()=>ti,$ZodIPv4:()=>vi,$ZodIPv6:()=>hi,$ZodISODate:()=>fi,$ZodISODateTime:()=>mi,$ZodISODuration:()=>gi,$ZodISOTime:()=>pi,$ZodIntersection:()=>Li,$ZodJWT:()=>zi,$ZodKSUID:()=>di,$ZodLazy:()=>ao,$ZodLiteral:()=>Mi,$ZodMap:()=>Vi,$ZodNaN:()=>eo,$ZodNanoID:()=>ai,$ZodNever:()=>Zi,$ZodNonOptional:()=>Yi,$ZodNull:()=>Pi,$ZodNullable:()=>Wi,$ZodNumber:()=>Yt,$ZodNumberFormat:()=>wi,$ZodObject:()=>wu,$ZodObjectJIT:()=>Ai,$ZodOptional:()=>Gi,$ZodPipe:()=>to,$ZodPrefault:()=>qi,$ZodPromise:()=>oo,$ZodReadonly:()=>ro,$ZodRealError:()=>G,$ZodRecord:()=>Ci,$ZodRegistry:()=>Te,$ZodSet:()=>Fi,$ZodString:()=>ke,$ZodStringFormat:()=>T,$ZodSuccess:()=>Qi,$ZodSymbol:()=>ji,$ZodTemplateLiteral:()=>no,$ZodTransform:()=>Ki,$ZodTuple:()=>er,$ZodType:()=>O,$ZodULID:()=>li,$ZodURL:()=>ii,$ZodUUID:()=>ri,$ZodUndefined:()=>Oi,$ZodUnion:()=>Ht,$ZodUnknown:()=>Ni,$ZodVoid:()=>Di,$ZodXID:()=>si,$brand:()=>Pt,$constructor:()=>d,$input:()=>lo,$output:()=>co,Doc:()=>nt,JSONSchema:()=>Ho,JSONSchemaGenerator:()=>xt,NEVER:()=>Br,TimePrecision:()=>fo,_any:()=>Do,_array:()=>Ko,_base64:()=>yr,_base64url:()=>xr,_bigint:()=>So,_boolean:()=>Io,_catch:()=>Rd,_check:()=>_c,_cidrv4:()=>br,_cidrv6:()=>_r,_coercedBigint:()=>jo,_coercedBoolean:()=>wo,_coercedDate:()=>Lo,_coercedNumber:()=>bo,_coercedString:()=>mo,_cuid:()=>mr,_cuid2:()=>fr,_custom:()=>Wo,_date:()=>Ro,_decode:()=>Et,_decodeAsync:()=>Rt,_default:()=>Td,_discriminatedUnion:()=>kd,_e164:()=>kr,_email:()=>or,_emoji:()=>sr,_encode:()=>Tt,_encodeAsync:()=>At,_endsWith:()=>vt,_enum:()=>Od,_file:()=>Go,_float32:()=>yo,_float64:()=>xo,_gt:()=>le,_gte:()=>W,_guid:()=>ct,_includes:()=>pt,_int:()=>_o,_int32:()=>ko,_int64:()=>Oo,_intersection:()=>zd,_ipv4:()=>hr,_ipv6:()=>$r,_isoDate:()=>go,_isoDateTime:()=>po,_isoDuration:()=>ho,_isoTime:()=>vo,_jwt:()=>zr,_ksuid:()=>vr,_lazy:()=>Fd,_length:()=>Re,_literal:()=>Ud,_lowercase:()=>mt,_lt:()=>ce,_lte:()=>H,_map:()=>Sd,_max:()=>H,_maxLength:()=>Ae,_maxSize:()=>Ee,_mime:()=>ht,_min:()=>W,_minLength:()=>$e,_minSize:()=>we,_multipleOf:()=>Ie,_nan:()=>Co,_nanoid:()=>dr,_nativeEnum:()=>Pd,_negative:()=>Fo,_never:()=>Eo,_nonnegative:()=>Mo,_nonoptional:()=>Ed,_nonpositive:()=>Jo,_normalize:()=>$t,_null:()=>Zo,_nullable:()=>Dd,_number:()=>$o,_optional:()=>Zd,_overwrite:()=>se,_parse:()=>Pe,_parseAsync:()=>Ue,_pipe:()=>Ld,_positive:()=>Vo,_promise:()=>Jd,_property:()=>Bo,_readonly:()=>Cd,_record:()=>wd,_refine:()=>Xo,_regex:()=>dt,_safeDecode:()=>Ct,_safeDecodeAsync:()=>Ft,_safeEncode:()=>Lt,_safeEncodeAsync:()=>Vt,_safeParse:()=>Ne,_safeParseAsync:()=>Ze,_set:()=>jd,_size:()=>st,_startsWith:()=>gt,_string:()=>so,_stringFormat:()=>Le,_stringbool:()=>Yo,_success:()=>Ad,_superRefine:()=>qo,_symbol:()=>Uo,_templateLiteral:()=>Vd,_toLowerCase:()=>_t,_toUpperCase:()=>yt,_transform:()=>Nd,_trim:()=>bt,_tuple:()=>Id,_uint32:()=>zo,_uint64:()=>Po,_ulid:()=>pr,_undefined:()=>No,_union:()=>xd,_unknown:()=>To,_uppercase:()=>ft,_url:()=>lt,_uuid:()=>ar,_uuidv4:()=>ur,_uuidv6:()=>cr,_uuidv7:()=>lr,_void:()=>Ao,_xid:()=>gr,clone:()=>K,config:()=>L,decode:()=>Ml,decodeAsync:()=>Kl,encode:()=>Jl,encodeAsync:()=>Bl,flattenError:()=>He,formatError:()=>et,globalConfig:()=>Be,globalRegistry:()=>oe,isValidBase64:()=>_i,isValidBase64URL:()=>xu,isValidJWT:()=>ku,locales:()=>ze,parse:()=>Zt,parseAsync:()=>Dt,prettifyError:()=>rn,regexes:()=>Q,registry:()=>ir,safeDecode:()=>Wl,safeDecodeAsync:()=>ql,safeEncode:()=>Gl,safeEncodeAsync:()=>Xl,safeParse:()=>nn,safeParseAsync:()=>on,toDotPath:()=>ou,toJSONSchema:()=>Qo,treeifyError:()=>tn,util:()=>_,version:()=>Hn});var Br=Object.freeze({status:"aborted"});function d(e,r,n){var l;function i(c,a){var v,f;var s;Object.defineProperty(c,"_zod",{value:(v=c._zod)!=null?v:{},enumerable:!1}),(f=(s=c._zod).traits)!=null||(s.traits=new Set),c._zod.traits.add(e),r(c,a);for(let h in u.prototype)h in c||Object.defineProperty(c,h,{value:u.prototype[h].bind(c)});c._zod.constr=u,c._zod.def=a}let t=(l=n==null?void 0:n.Parent)!=null?l:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function u(c){var v;var a;let s=n!=null&&n.Parent?new o:this;i(s,c),(v=(a=s._zod).deferred)!=null||(a.deferred=[]);for(let f of s._zod.deferred)f();return s}return Object.defineProperty(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:c=>{var a,s;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(s=(a=c==null?void 0:c._zod)==null?void 0:a.traits)==null?void 0:s.has(e)}}),Object.defineProperty(u,"name",{value:e}),u}var Pt=Symbol("zod_brand"),te=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},me=class extends Error{constructor(r){super("Encountered unidirectional transform during encode: ".concat(r)),this.name="ZodEncodeError"}},Be={};function L(e){return e&&Object.assign(Be,e),Be}var _={};_e(_,{BIGINT_FORMAT_RANGES:()=>en,Class:()=>Gr,NUMBER_FORMAT_RANGES:()=>Hr,aborted:()=>he,allowsEval:()=>Xr,assert:()=>yl,assertEqual:()=>hl,assertIs:()=>bl,assertNever:()=>_l,assertNotEqual:()=>$l,assignProp:()=>pe,base64ToUint8Array:()=>ru,base64urlToUint8Array:()=>Rl,cached:()=>je,captureStackTrace:()=>Nt,cleanEnum:()=>Al,cleanRegex:()=>We,clone:()=>K,cloneDef:()=>kl,createTransparentProxy:()=>Ol,defineLazy:()=>Z,esc:()=>Ut,escapeRegex:()=>ie,extend:()=>Nl,finalizeIssue:()=>Y,floatSafeRemainder:()=>Wr,getElementAtPath:()=>zl,getEnumValues:()=>Ge,getLengthableOrigin:()=>Ye,getParsedType:()=>jl,getSizableOrigin:()=>qe,hexToUint8Array:()=>Cl,isObject:()=>ye,isPlainObject:()=>ve,issue:()=>Oe,joinValues:()=>p,jsonStringifyReplacer:()=>Se,merge:()=>Dl,mergeDefs:()=>ge,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>Sl,objectClone:()=>xl,omit:()=>Ul,optionalKeys:()=>Qr,partial:()=>Tl,pick:()=>Pl,prefixIssues:()=>q,primitiveTypes:()=>Yr,promiseAllObject:()=>Il,propertyKeyTypes:()=>Xe,randomString:()=>wl,required:()=>El,safeExtend:()=>Zl,shallowClone:()=>qr,stringifyPrimitive:()=>b,uint8ArrayToBase64:()=>nu,uint8ArrayToBase64url:()=>Ll,uint8ArrayToHex:()=>Vl,unwrapMessage:()=>Ke});function hl(e){return e}function $l(e){return e}function bl(e){}function _l(e){throw new Error}function yl(e){}function Ge(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function p(e,r="|"){return e.map(n=>b(n)).join(r)}function Se(e,r){return typeof r=="bigint"?r.toString():r}function je(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(e){return e==null}function We(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Wr(e,r){let n=(e.toString().split(".")[1]||"").length,i=r.toString(),t=(i.split(".")[1]||"").length;if(t===0&&/\\d?e-\\d?/.test(i)){let c=i.match(/\\d?e-(\\d?)/);c!=null&&c[1]&&(t=Number.parseInt(c[1]))}let o=n>t?n:t,u=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(r.toFixed(o).replace(".",""));return u%l/10**o}var tu=Symbol("evaluating");function Z(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==tu)return i===void 0&&(i=tu,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function xl(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pe(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ge(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function kl(e){return ge(e._zod.def)}function zl(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function Il(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<r.length;o++)t[r[o]]=i[o];return t})}function wl(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function Ut(e){return JSON.stringify(e)}var Nt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xr=je(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let r=Function;return new r(""),!0}catch(r){return!1}});function ve(e){if(ye(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(ye(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function qr(e){return ve(e)?m({},e):Array.isArray(e)?[...e]:e}function Sl(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var jl=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error("Unknown data type: ".concat(r))}},Xe=new Set(["string","number","symbol"]),Yr=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ie(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function K(e,r,n){let i=new e._zod.constr(r!=null?r:e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function y(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?z(m({},r),{error:()=>r.error}):r}function Ol(e){let r;return new Proxy({},{get(n,i,t){return r!=null||(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r!=null||(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r!=null||(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r!=null||(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r!=null||(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r!=null||(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r!=null||(r=e()),Reflect.defineProperty(r,i,t)}})}function b(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?\'"\'.concat(e,\'"\'):"".concat(e)}function Qr(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var Hr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},en={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Pl(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t={};for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&(t[o]=n.shape[o])}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Ul(e,r){let n=e._zod.def,i=ge(e._zod.def,{get shape(){let t=m({},e._zod.def.shape);for(let o in r){if(!(o in n.shape))throw new Error(\'Unrecognized key: "\'.concat(o,\'"\'));r[o]&&delete t[o]}return pe(this,"shape",t),t},checks:[]});return K(e,i)}function Nl(e,r){if(!ve(r))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let t=ge(e._zod.def,{get shape(){let o=m(m({},e._zod.def.shape),r);return pe(this,"shape",o),o},checks:[]});return K(e,t)}function Zl(e,r){if(!ve(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=z(m({},e._zod.def),{get shape(){let i=m(m({},e._zod.def.shape),r);return pe(this,"shape",i),i},checks:e._zod.def.checks});return K(e,n)}function Dl(e,r){let n=ge(e._zod.def,{get shape(){let i=m(m({},e._zod.def.shape),r._zod.def.shape);return pe(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return K(e,n)}function Tl(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in t))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=e?new e({type:"optional",innerType:t[u]}):t[u])}else for(let u in t)o[u]=e?new e({type:"optional",innerType:t[u]}):t[u];return pe(this,"shape",o),o},checks:[]});return K(r,i)}function El(e,r,n){let i=ge(r._zod.def,{get shape(){let t=r._zod.def.shape,o=m({},t);if(n)for(let u in n){if(!(u in o))throw new Error(\'Unrecognized key: "\'.concat(u,\'"\'));n[u]&&(o[u]=new e({type:"nonoptional",innerType:t[u]}))}else for(let u in t)o[u]=new e({type:"nonoptional",innerType:t[u]});return pe(this,"shape",o),o},checks:[]});return K(r,i)}function he(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function q(e,r){return r.map(n=>{var t;var i;return(t=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function Ke(e){return typeof e=="string"?e:e==null?void 0:e.message}function Y(e,r,n){var t,o,u,l,c,a,s,v,f,h,x;let i=z(m({},e),{path:(t=e.path)!=null?t:[]});if(!e.message){let S=(x=(h=(v=(a=Ke((l=(u=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:u.error)==null?void 0:l.call(u,e)))!=null?a:Ke((c=r==null?void 0:r.error)==null?void 0:c.call(r,e)))!=null?v:Ke((s=n.customError)==null?void 0:s.call(n,e)))!=null?h:Ke((f=n.localeError)==null?void 0:f.call(n,e)))!=null?x:"Invalid input";i.message=S}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function qe(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ye(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Oe(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:m({},r)}function Al(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function ru(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}function nu(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function Rl(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return ru(r+n)}function Ll(e){return nu(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function Cl(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let i=0;i<r.length;i+=2)n[i/2]=Number.parseInt(r.slice(i,i+2),16);return n}function Vl(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}var Gr=class{constructor(...r){}};var iu=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Se,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qe=d("$ZodError",iu),G=d("$ZodError",iu,{Parent:Error});function He(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function et(e,r=n=>n.message){let n={_errors:[]},i=t=>{for(let o of t.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(u=>i({issues:u}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let u=n,l=0;for(;l<o.path.length;){let c=o.path[l];l===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],l++}}};return i(e),n}function tn(e,r=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var c,a,s,v;var u,l;for(let f of t.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(h=>i({issues:h},f.path));else if(f.code==="invalid_key")i({issues:f.issues},f.path);else if(f.code==="invalid_element")i({issues:f.issues},f.path);else{let h=[...o,...f.path];if(h.length===0){n.errors.push(r(f));continue}let x=n,S=0;for(;S<h.length;){let I=h[S],C=S===h.length-1;typeof I=="string"?((c=x.properties)!=null||(x.properties={}),(a=(u=x.properties)[I])!=null||(u[I]={errors:[]}),x=x.properties[I]):((s=x.items)!=null||(x.items=[]),(v=(l=x.items)[I])!=null||(l[I]={errors:[]}),x=x.items[I]),C&&x.errors.push(r(f)),S++}}};return i(e),n}function ou(e){let r=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push("[".concat(i,"]")):typeof i=="symbol"?r.push("[".concat(JSON.stringify(String(i)),"]")):/[^\\w$]/.test(i)?r.push("[".concat(JSON.stringify(i),"]")):(r.length&&r.push("."),r.push(i));return r.join("")}function rn(e){var i;let r=[],n=[...e.issues].sort((t,o)=>{var u,l;return((u=t.path)!=null?u:[]).length-((l=o.path)!=null?l:[]).length});for(let t of n)r.push("\\u2716 ".concat(t.message)),(i=t.path)!=null&&i.length&&r.push(" \\u2192 at ".concat(ou(t.path)));return r.join("\\n")}var Pe=e=>(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!1}):{async:!1},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new te;if(u.issues.length){let c=new((l=t==null?void 0:t.Err)!=null?l:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Zt=Pe(G),Ue=e=>async(r,n,i,t)=>{var l;let o=i?Object.assign(i,{async:!0}):{async:!0},u=r._zod.run({value:n,issues:[]},o);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new((l=t==null?void 0:t.Err)!=null?l:e)(u.issues.map(a=>Y(a,o,L())));throw Nt(c,t==null?void 0:t.callee),c}return u.value},Dt=Ue(G),Ne=e=>(r,n,i)=>{let t=i?z(m({},i),{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new te;return o.issues.length?{success:!1,error:new(e!=null?e:Qe)(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},nn=Ne(G),Ze=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(u=>Y(u,t,L())))}:{success:!0,data:o.value}},on=Ze(G),Tt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pe(e)(r,n,t)},Jl=Tt(G),Et=e=>(r,n,i)=>Pe(e)(r,n,i),Ml=Et(G),At=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ue(e)(r,n,t)},Bl=At(G),Rt=e=>async(r,n,i)=>Ue(e)(r,n,i),Kl=Rt(G),Lt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ne(e)(r,n,t)},Gl=Lt(G),Ct=e=>(r,n,i)=>Ne(e)(r,n,i),Wl=Ct(G),Vt=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ze(e)(r,n,t)},Xl=Vt(G),Ft=e=>async(r,n,i)=>Ze(e)(r,n,i),ql=Ft(G);var Q={};_e(Q,{base64:()=>_n,base64url:()=>Jt,bigint:()=>Sn,boolean:()=>Pn,browserEmail:()=>is,cidrv4:()=>$n,cidrv6:()=>bn,cuid:()=>an,cuid2:()=>un,date:()=>kn,datetime:()=>In,domain:()=>as,duration:()=>mn,e164:()=>xn,email:()=>pn,emoji:()=>gn,extendedDuration:()=>Yl,guid:()=>fn,hex:()=>us,hostname:()=>yn,html5Email:()=>ts,idnEmail:()=>ns,integer:()=>jn,ipv4:()=>vn,ipv6:()=>hn,ksuid:()=>sn,lowercase:()=>Zn,md5_base64:()=>ls,md5_base64url:()=>ss,md5_hex:()=>cs,nanoid:()=>dn,null:()=>Un,number:()=>On,rfc5322Email:()=>rs,sha1_base64:()=>ms,sha1_base64url:()=>fs,sha1_hex:()=>ds,sha256_base64:()=>gs,sha256_base64url:()=>vs,sha256_hex:()=>ps,sha384_base64:()=>$s,sha384_base64url:()=>bs,sha384_hex:()=>hs,sha512_base64:()=>ys,sha512_base64url:()=>xs,sha512_hex:()=>_s,string:()=>wn,time:()=>zn,ulid:()=>cn,undefined:()=>Nn,unicodeEmail:()=>au,uppercase:()=>Dn,uuid:()=>xe,uuid4:()=>Ql,uuid6:()=>Hl,uuid7:()=>es,xid:()=>ln});var an=/^[cC][^\\s-]{8,}$/,un=/^[0-9a-z]+$/,cn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ln=/^[0-9a-vA-V]{20}$/,sn=/^[A-Za-z0-9]{27}$/,dn=/^[a-zA-Z0-9_-]{21}$/,mn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Yl=/^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/,fn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xe=e=>e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(e,"[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$")):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ql=xe(4),Hl=xe(6),es=xe(7),pn=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,ts=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rs=/^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,au=new RegExp(\'^[^\\\\s@"]{1,64}@[^\\\\s@]{1,255}$\',"u"),ns=au,is=/^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,os="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$";function gn(){return new RegExp(os,"u")}var vn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,bn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_n=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jt=/^[A-Za-z0-9_-]*$/,yn=/^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/,as=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/,xn=/^\\+(?:[0-9]){6,14}[0-9]$/,uu="(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))",kn=new RegExp("^".concat(uu,"$"));function cu(e){let r="(?:[01]\\\\d|2[0-3]):[0-5]\\\\d";return typeof e.precision=="number"?e.precision===-1?"".concat(r):e.precision===0?"".concat(r,":[0-5]\\\\d"):"".concat(r,":[0-5]\\\\d\\\\.\\\\d{").concat(e.precision,"}"):"".concat(r,"(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?")}function zn(e){return new RegExp("^".concat(cu(e),"$"))}function In(e){let r=cu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)");let i="".concat(r,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(uu,"T(?:").concat(i,")$"))}var wn=e=>{var n,i;let r=e?"[\\\\s\\\\S]{".concat((n=e==null?void 0:e.minimum)!=null?n:0,",").concat((i=e==null?void 0:e.maximum)!=null?i:"","}"):"[\\\\s\\\\S]*";return new RegExp("^".concat(r,"$"))},Sn=/^-?\\d+n?$/,jn=/^-?\\d+$/,On=/^-?\\d+(?:\\.\\d+)?/,Pn=/^(?:true|false)$/i,Un=/^null$/i;var Nn=/^undefined$/i;var Zn=/^[^A-Z]*$/,Dn=/^[^a-z]*$/,us=/^[0-9a-fA-F]*$/;function tt(e,r){return new RegExp("^[A-Za-z0-9+/]{".concat(e,"}").concat(r,"$"))}function rt(e){return new RegExp("^[A-Za-z0-9_-]{".concat(e,"}$"))}var cs=/^[0-9a-fA-F]{32}$/,ls=tt(22,"=="),ss=rt(22),ds=/^[0-9a-fA-F]{40}$/,ms=tt(27,"="),fs=rt(27),ps=/^[0-9a-fA-F]{64}$/,gs=tt(43,"="),vs=rt(43),hs=/^[0-9a-fA-F]{96}$/,$s=tt(64,""),bs=rt(64),_s=/^[0-9a-fA-F]{128}$/,ys=tt(86,"=="),xs=rt(86);var R=d("$ZodCheck",(e,r)=>{var i,t;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=r,(t=(n=e._zod).onattach)!=null||(n.onattach=[])}),su={number:"number",bigint:"bigint",object:"date"},Mt=d("$ZodCheckLessThan",(e,r)=>{R.init(e,r);let n=su[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.maximum:t.exclusiveMaximum)!=null?u:Number.POSITIVE_INFINITY;r.value<o&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Bt=d("$ZodCheckGreaterThan",(e,r)=>{R.init(e,r);let n=su[typeof r.value];e._zod.onattach.push(i=>{var u;let t=i._zod.bag,o=(u=r.inclusive?t.minimum:t.exclusiveMinimum)!=null?u:Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Tn=d("$ZodCheckMultipleOf",(e,r)=>{R.init(e,r),e._zod.onattach.push(n=>{var t;var i;(t=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Wr(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),En=d("$ZodCheckNumberFormat",(e,r)=>{var u;R.init(e,r),r.format=r.format||"float64";let n=(u=r.format)==null?void 0:u.includes("int"),i=n?"int":"number",[t,o]=Hr[r.format];e._zod.onattach.push(l=>{let c=l._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o,n&&(c.pattern=jn)}),e._zod.check=l=>{let c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort}):l.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort});return}}c<t&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),c>o&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),An=d("$ZodCheckBigIntFormat",(e,r)=>{R.init(e,r);let[n,i]=en[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Rn=d("$ZodCheckMaxSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;o.size<=r.maximum||t.issues.push({origin:qe(o),code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Ln=d("$ZodCheckMinSize",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;o.size>=r.minimum||t.issues.push({origin:qe(o),code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Cn=d("$ZodCheckSizeEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.size,o.maximum=r.size,o.size=r.size}),e._zod.check=t=>{let o=t.value,u=o.size;if(u===r.size)return;let l=u>r.size;t.issues.push(z(m({origin:qe(o)},l?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Vn=d("$ZodCheckMaxLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.maximum)!=null?u:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;if(o.length<=r.maximum)return;let l=Ye(o);t.issues.push({origin:l,code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Fn=d("$ZodCheckMinLength",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var u;let o=(u=t._zod.bag.minimum)!=null?u:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;if(o.length>=r.minimum)return;let l=Ye(o);t.issues.push({origin:l,code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Jn=d("$ZodCheckLengthEquals",(e,r)=>{var i;var n;R.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.length,o.maximum=r.length,o.length=r.length}),e._zod.check=t=>{let o=t.value,u=o.length;if(u===r.length)return;let l=Ye(o),c=u>r.length;t.issues.push(z(m({origin:l},c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),De=d("$ZodCheckStringFormat",(e,r)=>{var t,o;var n,i;R.init(e,r),e._zod.onattach.push(u=>{var c;let l=u._zod.bag;l.format=r.format,r.pattern&&((c=l.patterns)!=null||(l.patterns=new Set),l.patterns.add(r.pattern))}),r.pattern?(t=(n=e._zod).check)!=null||(n.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push(z(m({origin:"string",code:"invalid_format",format:r.format,input:u.value},r.pattern?{pattern:r.pattern.toString()}:{}),{inst:e,continue:!r.abort}))}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),Mn=d("$ZodCheckRegex",(e,r)=>{De.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Bn=d("$ZodCheckLowerCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Zn),De.init(e,r)}),Kn=d("$ZodCheckUpperCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Dn),De.init(e,r)}),Gn=d("$ZodCheckIncludes",(e,r)=>{R.init(e,r);let n=ie(r.includes),i=new RegExp(typeof r.position=="number"?"^.{".concat(r.position,"}").concat(n):n);r.pattern=i,e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Wn=d("$ZodCheckStartsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp("^".concat(ie(r.prefix),".*"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.startsWith(r.prefix)||t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:t.value,inst:e,continue:!r.abort})}}),Xn=d("$ZodCheckEndsWith",(e,r)=>{var i;R.init(e,r);let n=new RegExp(".*".concat(ie(r.suffix),"$"));(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var u;let o=t._zod.bag;(u=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.endsWith(r.suffix)||t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:t.value,inst:e,continue:!r.abort})}});function lu(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues))}var qn=d("$ZodCheckProperty",(e,r)=>{R.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>lu(t,n,r.property));lu(i,n,r.property)}}),Yn=d("$ZodCheckMimeType",(e,r)=>{R.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Qn=d("$ZodCheckOverwrite",(e,r)=>{R.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var nt=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split("\\n").filter(u=>u),t=Math.min(...i.map(u=>u.length-u.trimStart().length)),o=i.map(u=>u.slice(t)).map(u=>" ".repeat(this.indent*2)+u);for(let u of o)this.content.push(u)}compile(){var o;let r=Function,n=this==null?void 0:this.args,t=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(u=>" ".concat(u))];return new r(...n,t.join("\\n"))}};var Hn={major:4,minor:1,patch:12};var O=d("$ZodType",(e,r)=>{var t,o,u;var n;e!=null||(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Hn;let i=[...(t=e._zod.def.checks)!=null?t:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let l of i)for(let c of l._zod.onattach)c(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(u=e._zod.deferred)==null||u.push(()=>{e._zod.run=e._zod.parse});else{let l=(a,s,v)=>{let f=he(a),h;for(let x of s){if(x._zod.def.when){if(!x._zod.def.when(a))continue}else if(f)continue;let S=a.issues.length,I=x._zod.check(a);if(I instanceof Promise&&(v==null?void 0:v.async)===!1)throw new te;if(h||I instanceof Promise)h=(h!=null?h:Promise.resolve()).then(async()=>{await I,a.issues.length!==S&&(f||(f=he(a,S)))});else{if(a.issues.length===S)continue;f||(f=he(a,S))}}return h?h.then(()=>a):a},c=(a,s,v)=>{if(he(a))return a.aborted=!0,a;let f=l(s,i,v);if(f instanceof Promise){if(v.async===!1)throw new te;return f.then(h=>e._zod.parse(h,v))}return e._zod.parse(f,v)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let f=e._zod.parse({value:a.value,issues:[]},z(m({},s),{skipChecks:!0}));return f instanceof Promise?f.then(h=>c(h,a,s)):c(f,a,s)}let v=e._zod.parse(a,s);if(v instanceof Promise){if(s.async===!1)throw new te;return v.then(f=>l(f,i,s))}return l(v,i,s)}}e["~standard"]={validate:l=>{var c;try{let a=nn(e,l);return a.success?{value:a.data}:{issues:(c=a.error)==null?void 0:c.issues}}catch(a){return on(e,l).then(s=>{var v;return s.success?{value:s.data}:{issues:(v=s.error)==null?void 0:v.issues}})}},vendor:"zod",version:1}}),ke=d("$ZodString",(e,r)=>{var n,i,t;O.init(e,r),e._zod.pattern=(t=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?t:wn(e._zod.bag),e._zod.parse=(o,u)=>{if(r.coerce)try{o.value=String(o.value)}catch(l){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),T=d("$ZodStringFormat",(e,r)=>{De.init(e,r),ke.init(e,r)}),ti=d("$ZodGUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=fn),T.init(e,r)}),ri=d("$ZodUUID",(e,r)=>{var n,i;if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(\'Invalid UUID version: "\'.concat(r.version,\'"\'));(n=r.pattern)!=null||(r.pattern=xe(o))}else(i=r.pattern)!=null||(r.pattern=xe());T.init(e,r)}),ni=d("$ZodEmail",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=pn),T.init(e,r)}),ii=d("$ZodURL",(e,r)=>{T.init(e,r),e._zod.check=n=>{try{let i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:yn.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),oi=d("$ZodEmoji",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=gn()),T.init(e,r)}),ai=d("$ZodNanoID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=dn),T.init(e,r)}),ui=d("$ZodCUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=an),T.init(e,r)}),ci=d("$ZodCUID2",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=un),T.init(e,r)}),li=d("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=cn),T.init(e,r)}),si=d("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ln),T.init(e,r)}),di=d("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=sn),T.init(e,r)}),mi=d("$ZodISODateTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=In(r)),T.init(e,r)}),fi=d("$ZodISODate",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=kn),T.init(e,r)}),pi=d("$ZodISOTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=zn(r)),T.init(e,r)}),gi=d("$ZodISODuration",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=mn),T.init(e,r)}),vi=d("$ZodIPv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=vn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv4"})}),hi=d("$ZodIPv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=hn),T.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv6"}),e._zod.check=i=>{try{new URL("http://[".concat(i.value,"]"))}catch(t){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}}),$i=d("$ZodCIDRv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=$n),T.init(e,r)}),bi=d("$ZodCIDRv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=bn),T.init(e,r),e._zod.check=i=>{let t=i.value.split("/");try{if(t.length!==2)throw new Error;let[o,u]=t;if(!u)throw new Error;let l=Number(u);if("".concat(l)!==u)throw new Error;if(l<0||l>128)throw new Error;new URL("http://[".concat(o,"]"))}catch(o){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function _i(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(r){return!1}}var yi=d("$ZodBase64",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=_n),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64"}),e._zod.check=i=>{_i(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function xu(e){if(!Jt.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return _i(n)}var xi=d("$ZodBase64URL",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Jt),T.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64url"}),e._zod.check=i=>{xu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),ki=d("$ZodE164",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=xn),T.init(e,r)});function ku(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch(n){return!1}}var zi=d("$ZodJWT",(e,r)=>{T.init(e,r),e._zod.check=n=>{ku(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Ii=d("$ZodCustomStringFormat",(e,r)=>{T.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),Yt=d("$ZodNumber",(e,r)=>{var n;O.init(e,r),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:On,e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=Number(i.value)}catch(l){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push(m({expected:"number",code:"invalid_type",input:o,inst:e},u?{received:u}:{})),i}}),wi=d("$ZodNumber",(e,r)=>{En.init(e,r),Yt.init(e,r)}),it=d("$ZodBoolean",(e,r)=>{O.init(e,r),e._zod.pattern=Pn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch(o){}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Qt=d("$ZodBigInt",(e,r)=>{O.init(e,r),e._zod.pattern=Sn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch(t){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Si=d("$ZodBigInt",(e,r)=>{An.init(e,r),Qt.init(e,r)}),ji=d("$ZodSymbol",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),Oi=d("$ZodUndefined",(e,r)=>{O.init(e,r),e._zod.pattern=Nn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),Pi=d("$ZodNull",(e,r)=>{O.init(e,r),e._zod.pattern=Un,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),Ui=d("$ZodAny",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Ni=d("$ZodUnknown",(e,r)=>{O.init(e,r),e._zod.parse=n=>n}),Zi=d("$ZodNever",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Di=d("$ZodVoid",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),Ti=d("$ZodDate",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(l){}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push(z(m({expected:"date",code:"invalid_type",input:t},o?{received:"Invalid Date"}:{}),{inst:e})),n}});function mu(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ei=d("$ZodArray",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let o=[];for(let u=0;u<t.length;u++){let l=t[u],c=r.element._zod.run({value:l,issues:[]},i);c instanceof Promise?o.push(c.then(a=>mu(a,n,u))):mu(c,n,u)}return o.length?Promise.all(o).then(()=>n):n}});function qt(e,r,n,i){e.issues.length&&r.issues.push(...q(n,e.issues)),e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function zu(e){var i,t,o,u;let r=Object.keys(e.shape);for(let l of r)if(!((u=(o=(t=(i=e.shape)==null?void 0:i[l])==null?void 0:t._zod)==null?void 0:o.traits)!=null&&u.has("$ZodType")))throw new Error(\'Invalid element at key "\'.concat(l,\'": expected a Zod schema\'));let n=Qr(e.shape);return z(m({},e),{keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)})}function Iu(e,r,n,i,t,o){let u=[],l=t.keySet,c=t.catchall._zod,a=c.def.type;for(let s of Object.keys(r)){if(l.has(s))continue;if(a==="never"){u.push(s);continue}let v=c.run({value:r[s],issues:[]},i);v instanceof Promise?e.push(v.then(f=>qt(f,n,s,r))):qt(v,n,s,r)}return u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:r,inst:o}),e.length?Promise.all(e).then(()=>n):n}var wu=d("$ZodObject",(e,r)=>{O.init(e,r);let n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){let l=r.shape;Object.defineProperty(r,"shape",{get:()=>{let c=m({},l);return Object.defineProperty(r,"shape",{value:c}),c}})}let i=je(()=>zu(r));Z(e._zod,"propValues",()=>{var a;let l=r.shape,c={};for(let s in l){let v=l[s]._zod;if(v.values){(a=c[s])!=null||(c[s]=new Set);for(let f of v.values)c[s].add(f)}}return c});let t=ye,o=r.catchall,u;e._zod.parse=(l,c)=>{u!=null||(u=i.value);let a=l.value;if(!t(a))return l.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),l;l.value={};let s=[],v=u.shape;for(let f of u.keys){let x=v[f]._zod.run({value:a[f],issues:[]},c);x instanceof Promise?s.push(x.then(S=>qt(S,l,f,a))):qt(x,l,f,a)}return o?Iu(s,a,l,c,i.value,e):s.length?Promise.all(s).then(()=>l):l}}),Ai=d("$ZodObjectJIT",(e,r)=>{wu.init(e,r);let n=e._zod.parse,i=je(()=>zu(r)),t=f=>{let h=new nt(["shape","payload","ctx"]),x=i.value,S=g=>{let $=Ut(g);return"shape[".concat($,"]._zod.run({ value: input[").concat($,"], issues: [] }, ctx)")};h.write("const input = payload.value;");let I=Object.create(null),C=0;for(let g of x.keys)I[g]="key_".concat(C++);h.write("const newResult = {};");for(let g of x.keys){let $=I[g],k=Ut(g);h.write("const ".concat($," = ").concat(S(g),";")),h.write("\\n if (".concat($,".issues.length) {\\n payload.issues = payload.issues.concat(").concat($,".issues.map(iss => ({\\n ...iss,\\n path: iss.path ? [").concat(k,", ...iss.path] : [").concat(k,"]\\n })));\\n }\\n \\n \\n if (").concat($,".value === undefined) {\\n if (").concat(k," in input) {\\n newResult[").concat(k,"] = undefined;\\n }\\n } else {\\n newResult[").concat(k,"] = ").concat($,".value;\\n }\\n \\n "))}h.write("payload.value = newResult;"),h.write("return payload;");let j=h.compile();return(g,$)=>j(f,g,$)},o,u=ye,l=!Be.jitless,a=l&&Xr.value,s=r.catchall,v;e._zod.parse=(f,h)=>{v!=null||(v=i.value);let x=f.value;return u(x)?l&&a&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(o||(o=t(r.shape)),f=o(f,h),s?Iu([],x,f,h,v,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),f)}});function fu(e,r,n,i){for(let o of e)if(o.issues.length===0)return r.value=o.value,r;let t=e.filter(o=>!he(o));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(u=>Y(u,i,L())))}),r)}var Ht=d("$ZodUnion",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),Z(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(o=>o._zod.pattern);return new RegExp("^(".concat(t.map(o=>We(o.source)).join("|"),")$"))}});let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,o)=>{if(n)return i(t,o);let u=!1,l=[];for(let c of r.options){let a=c._zod.run({value:t.value,issues:[]},o);if(a instanceof Promise)l.push(a),u=!0;else{if(a.issues.length===0)return a;l.push(a)}}return u?Promise.all(l).then(c=>fu(c,t,e,o)):fu(l,t,e,o)}}),Ri=d("$ZodDiscriminatedUnion",(e,r)=>{Ht.init(e,r);let n=e._zod.parse;Z(e._zod,"propValues",()=>{let t={};for(let o of r.options){let u=o._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(o),\'"\'));for(let[l,c]of Object.entries(u)){t[l]||(t[l]=new Set);for(let a of c)t[l].add(a)}}return t});let i=je(()=>{var u;let t=r.options,o=new Map;for(let l of t){let c=(u=l._zod.propValues)==null?void 0:u[r.discriminator];if(!c||c.size===0)throw new Error(\'Invalid discriminated union option at index "\'.concat(r.options.indexOf(l),\'"\'));for(let a of c){if(o.has(a))throw new Error(\'Duplicate discriminator value "\'.concat(String(a),\'"\'));o.set(a,l)}}return o});e._zod.parse=(t,o)=>{let u=t.value;if(!ye(u))return t.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),t;let l=i.value.get(u==null?void 0:u[r.discriminator]);return l?l._zod.run(t,o):r.unionFallback?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:u,path:[r.discriminator],inst:e}),t)}}),Li=d("$ZodIntersection",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),u=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||u instanceof Promise?Promise.all([o,u]).then(([c,a])=>pu(n,c,a)):pu(n,o,u)}});function ei(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(ve(e)&&ve(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t=m(m({},e),r);for(let o of i){let u=ei(e[o],r[o]);if(!u.valid)return{valid:!1,mergeErrorPath:[o,...u.mergeErrorPath]};t[o]=u.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],o=r[i],u=ei(t,o);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};n.push(u.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pu(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),he(e))return e;let i=ei(r.value,n.value);if(!i.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(i.mergeErrorPath)));return e.value=i.data,e}var er=d("$ZodTuple",(e,r)=>{O.init(e,r);let n=r.items,i=n.length-[...n].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,o)=>{let u=t.value;if(!Array.isArray(u))return t.issues.push({input:u,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];let l=[];if(!r.rest){let a=u.length>n.length,s=u.length<i-1;if(a||s)return t.issues.push(z(m({},a?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}),{input:u,inst:e,origin:"array"})),t}let c=-1;for(let a of n){if(c++,c>=u.length&&c>=i)continue;let s=a._zod.run({value:u[c],issues:[]},o);s instanceof Promise?l.push(s.then(v=>Kt(v,t,c))):Kt(s,t,c)}if(r.rest){let a=u.slice(n.length);for(let s of a){c++;let v=r.rest._zod.run({value:s,issues:[]},o);v instanceof Promise?l.push(v.then(f=>Kt(f,t,c))):Kt(v,t,c)}}return l.length?Promise.all(l).then(()=>t):t}});function Kt(e,r,n){e.issues.length&&r.issues.push(...q(n,e.issues)),r.value[n]=e.value}var Ci=d("$ZodRecord",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!ve(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[];if(r.keyType._zod.values){let u=r.keyType._zod.values;n.value={};for(let c of u)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let a=r.valueType._zod.run({value:t[c],issues:[]},i);a instanceof Promise?o.push(a.then(s=>{s.issues.length&&n.issues.push(...q(c,s.issues)),n.value[c]=s.value})):(a.issues.length&&n.issues.push(...q(c,a.issues)),n.value[c]=a.value)}let l;for(let c in t)u.has(c)||(l=l!=null?l:[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(let u of Reflect.ownKeys(t)){if(u==="__proto__")continue;let l=r.keyType._zod.run({value:u,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(a=>Y(a,i,L())),input:u,path:[u],inst:e}),n.value[l.value]=l.value;continue}let c=r.valueType._zod.run({value:t[u],issues:[]},i);c instanceof Promise?o.push(c.then(a=>{a.issues.length&&n.issues.push(...q(u,a.issues)),n.value[l.value]=a.value})):(c.issues.length&&n.issues.push(...q(u,c.issues)),n.value[l.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Vi=d("$ZodMap",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let o=[];n.value=new Map;for(let[u,l]of t){let c=r.keyType._zod.run({value:u,issues:[]},i),a=r.valueType._zod.run({value:l,issues:[]},i);c instanceof Promise||a instanceof Promise?o.push(Promise.all([c,a]).then(([s,v])=>{gu(s,v,n,u,t,e,i)})):gu(c,a,n,u,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function gu(e,r,n,i,t,o,u){e.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:e.issues.map(l=>Y(l,u,L()))})),r.issues.length&&(Xe.has(typeof i)?n.issues.push(...q(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(l=>Y(l,u,L()))})),n.value.set(e.value,r.value)}var Fi=d("$ZodSet",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let u of t){let l=r.valueType._zod.run({value:u,issues:[]},i);l instanceof Promise?o.push(l.then(c=>vu(c,n))):vu(l,n)}return o.length?Promise.all(o).then(()=>n):n}});function vu(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Ji=d("$ZodEnum",(e,r)=>{O.init(e,r);let n=Ge(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp("^(".concat(n.filter(t=>Xe.has(typeof t)).map(t=>typeof t=="string"?ie(t):t.toString()).join("|"),")$")),e._zod.parse=(t,o)=>{let u=t.value;return i.has(u)||t.issues.push({code:"invalid_value",values:n,input:u,inst:e}),t}}),Mi=d("$ZodLiteral",(e,r)=>{if(O.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp("^(".concat(r.values.map(n=>typeof n=="string"?ie(n):n?ie(n.toString()):String(n)).join("|"),")$")),e._zod.parse=(n,i)=>{let t=n.value;return e._zod.values.has(t)||n.issues.push({code:"invalid_value",values:r.values,input:t,inst:e}),n}}),Bi=d("$ZodFile",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Ki=d("$ZodTransform",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(u=>(n.value=u,n));if(t instanceof Promise)throw new te;return n.value=t,n}});function hu(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var Gi=d("$ZodOptional",(e,r)=>{O.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),")?$")):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>hu(o,n.value)):hu(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Wi=d("$ZodNullable",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp("^(".concat(We(n.source),"|null)$")):void 0}),Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),Xi=d("$ZodDefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>$u(o,r)):$u(t,r)}});function $u(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var qi=d("$ZodPrefault",(e,r)=>{O.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Yi=d("$ZodNonOptional",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>bu(o,e)):bu(t,e)}});function bu(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Qi=d("$ZodSuccess",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Hi=d("$ZodCatch",(e,r)=>{O.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:o.issues.map(u=>Y(u,i,L()))},input:n.value})),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue(z(m({},n),{error:{issues:t.issues.map(o=>Y(o,i,L()))},input:n.value})),n.issues=[]),n)}}),eo=d("$ZodNaN",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),to=d("$ZodPipe",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Gt(u,r.in,i)):Gt(o,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>Gt(o,r.out,i)):Gt(t,r.out,i)}});function Gt(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var ot=d("$ZodCodec",(e,r)=>{O.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=r.in._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}else{let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(u=>Wt(u,r,i)):Wt(o,r,i)}}});function Wt(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let t=r.transform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.out,n)):Xt(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(o=>Xt(e,o,r.in,n)):Xt(e,t,r.in,n)}}function Xt(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var ro=d("$ZodReadonly",(e,r)=>{O.init(e,r),Z(e._zod,"propValues",()=>r.innerType._zod.propValues),Z(e._zod,"values",()=>r.innerType._zod.values),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(_u):_u(t)}});function _u(e){return e.value=Object.freeze(e.value),e}var no=d("$ZodTemplateLiteral",(e,r)=>{O.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error("Invalid template literal part, no pattern found: ".concat([...i._zod.traits].shift()));let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error("Invalid template literal part: ".concat(i._zod.traits));let o=t.startsWith("^")?1:0,u=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,u))}else if(i===null||Yr.has(typeof i))n.push(ie("".concat(i)));else throw new Error("Invalid template literal part: ".concat(i));e._zod.pattern=new RegExp("^".concat(n.join(""),"$")),e._zod.parse=(i,t)=>{var o;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:(o=r.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),i)}}),io=d("$ZodFunction",(e,r)=>(O.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let t=e._def.input?Zt(e._def.input,i):i,o=Reflect.apply(n,this,t);return e._def.output?Zt(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await Dt(e._def.input,i):i,o=await Reflect.apply(n,this,t);return e._def.output?await Dt(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new er({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),oo=d("$ZodPromise",(e,r)=>{O.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),ao=d("$ZodLazy",(e,r)=>{O.init(e,r),Z(e._zod,"innerType",()=>r.getter()),Z(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Z(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Z(e._zod,"optin",()=>{var n;return(n=e._zod.innerType._zod.optin)!=null?n:void 0}),Z(e._zod,"optout",()=>{var n;return(n=e._zod.innerType._zod.optout)!=null?n:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),uo=d("$ZodCustom",(e,r)=>{R.init(e,r),O.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(o=>yu(o,n,i,e));yu(t,n,i,e)}});function yu(e,r,n,i){var t;if(!e){let o={code:"custom",input:n,inst:i,path:[...(t=i._zod.def.path)!=null?t:[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),r.issues.push(Oe(o))}}var ze={};_e(ze,{ar:()=>Su,az:()=>ju,be:()=>Pu,bg:()=>Uu,ca:()=>Nu,cs:()=>Zu,da:()=>Du,de:()=>Tu,en:()=>tr,eo:()=>Eu,es:()=>Au,fa:()=>Ru,fi:()=>Lu,fr:()=>Cu,frCA:()=>Vu,he:()=>Fu,hu:()=>Ju,id:()=>Mu,is:()=>Bu,it:()=>Ku,ja:()=>Gu,ka:()=>Wu,kh:()=>Xu,km:()=>rr,ko:()=>qu,lt:()=>Qu,mk:()=>Hu,ms:()=>ec,nl:()=>tc,no:()=>rc,ota:()=>nc,pl:()=>oc,ps:()=>ic,pt:()=>ac,ru:()=>cc,sl:()=>lc,sv:()=>sc,ta:()=>dc,th:()=>mc,tr:()=>fc,ua:()=>pc,uk:()=>nr,ur:()=>gc,vi:()=>vc,yo:()=>bc,zhCN:()=>hc,zhTW:()=>$c});var zs=()=>{let e={string:{unit:"\\u062D\\u0631\\u0641",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},file:{unit:"\\u0628\\u0627\\u064A\\u062A",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},array:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"},set:{unit:"\\u0639\\u0646\\u0635\\u0631",verb:"\\u0623\\u0646 \\u064A\\u062D\\u0648\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0645\\u062F\\u062E\\u0644",email:"\\u0628\\u0631\\u064A\\u062F \\u0625\\u0644\\u0643\\u062A\\u0631\\u0648\\u0646\\u064A",url:"\\u0631\\u0627\\u0628\\u0637",emoji:"\\u0625\\u064A\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0648\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",date:"\\u062A\\u0627\\u0631\\u064A\\u062E \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",time:"\\u0648\\u0642\\u062A \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",duration:"\\u0645\\u062F\\u0629 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 ISO",ipv4:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv4",ipv6:"\\u0639\\u0646\\u0648\\u0627\\u0646 IPv6",cidrv4:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv4",cidrv6:"\\u0645\\u062F\\u0649 \\u0639\\u0646\\u0627\\u0648\\u064A\\u0646 \\u0628\\u0635\\u064A\\u063A\\u0629 IPv6",base64:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64-encoded",base64url:"\\u0646\\u064E\\u0635 \\u0628\\u062A\\u0631\\u0645\\u064A\\u0632 base64url-encoded",json_string:"\\u0646\\u064E\\u0635 \\u0639\\u0644\\u0649 \\u0647\\u064A\\u0626\\u0629 JSON",e164:"\\u0631\\u0642\\u0645 \\u0647\\u0627\\u062A\\u0641 \\u0628\\u0645\\u0639\\u064A\\u0627\\u0631 E.164",jwt:"JWT",template_literal:"\\u0645\\u062F\\u062E\\u0644"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(t.expected,"\\u060C \\u0648\\u0644\\u0643\\u0646 \\u062A\\u0645 \\u0625\\u062F\\u062E\\u0627\\u0644 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0645\\u062F\\u062E\\u0644\\u0627\\u062A \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644\\u0629: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0625\\u062F\\u062E\\u0627\\u0644 ".concat(b(t.values[0])):"\\u0627\\u062E\\u062A\\u064A\\u0627\\u0631 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062A\\u0648\\u0642\\u0639 \\u0627\\u0646\\u062A\\u0642\\u0627\\u0621 \\u0623\\u062D\\u062F \\u0647\\u0630\\u0647 \\u0627\\u0644\\u062E\\u064A\\u0627\\u0631\\u0627\\u062A: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?" \\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((o=t.origin)!=null?o:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"):"\\u0623\\u0643\\u0628\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0623\\u0646 \\u062A\\u0643\\u0648\\u0646 ".concat((l=t.origin)!=null?l:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u0623\\u0635\\u063A\\u0631 \\u0645\\u0646 \\u0627\\u0644\\u0644\\u0627\\u0632\\u0645: \\u064A\\u0641\\u062A\\u0631\\u0636 \\u0644\\u0640 ".concat(t.origin," \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0628\\u062F\\u0623 \\u0628\\u0640 "\'.concat(t.prefix,\'"\'):a.format==="ends_with"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0646\\u062A\\u0647\\u064A \\u0628\\u0640 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u062A\\u0636\\u0645\\u0651\\u064E\\u0646 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u0646\\u064E\\u0635 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0637\\u0627\\u0628\\u0642 \\u0627\\u0644\\u0646\\u0645\\u0637 ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644")}case"not_multiple_of":return"\\u0631\\u0642\\u0645 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644: \\u064A\\u062C\\u0628 \\u0623\\u0646 \\u064A\\u0643\\u0648\\u0646 \\u0645\\u0646 \\u0645\\u0636\\u0627\\u0639\\u0641\\u0627\\u062A ".concat(t.divisor);case"unrecognized_keys":return"\\u0645\\u0639\\u0631\\u0641".concat(t.keys.length>1?"\\u0627\\u062A":""," \\u063A\\u0631\\u064A\\u0628").concat(t.keys.length>1?"\\u0629":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"\\u0645\\u0639\\u0631\\u0641 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);case"invalid_union":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644";case"invalid_element":return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644 \\u0641\\u064A ".concat(t.origin);default:return"\\u0645\\u062F\\u062E\\u0644 \\u063A\\u064A\\u0631 \\u0645\\u0642\\u0628\\u0648\\u0644"}}};function Su(){return{localeError:zs()}}var Is=()=>{let e={string:{unit:"simvol",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"element",verb:"olmal\\u0131d\\u0131r"},set:{unit:"element",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(t.expected,", daxil olan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Yanl\\u0131\\u015F d\\u0259y\\u0259r: g\\xF6zl\\u0259nil\\u0259n ".concat(b(t.values[0])):"Yanl\\u0131\\u015F se\\xE7im: a\\u015Fa\\u011F\\u0131dak\\u0131lardan biri olmal\\u0131d\\u0131r: ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((o=t.origin)!=null?o:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"element"):"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((l=t.origin)!=null?l:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.prefix,\'" il\\u0259 ba\\u015Flamal\\u0131d\\u0131r\'):a.format==="ends_with"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.suffix,\'" il\\u0259 bitm\\u0259lidir\'):a.format==="includes"?\'Yanl\\u0131\\u015F m\\u0259tn: "\'.concat(a.includes,\'" daxil olmal\\u0131d\\u0131r\'):a.format==="regex"?"Yanl\\u0131\\u015F m\\u0259tn: ".concat(a.pattern," \\u015Fablonuna uy\\u011Fun olmal\\u0131d\\u0131r"):"Yanl\\u0131\\u015F ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Yanl\\u0131\\u015F \\u0259d\\u0259d: ".concat(t.divisor," il\\u0259 b\\xF6l\\xFCn\\u0259 bil\\u0259n olmal\\u0131d\\u0131r");case"unrecognized_keys":return"Tan\\u0131nmayan a\\xE7ar".concat(t.keys.length>1?"lar":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F a\\xE7ar");case"invalid_union":return"Yanl\\u0131\\u015F d\\u0259y\\u0259r";case"invalid_element":return"".concat(t.origin," daxilind\\u0259 yanl\\u0131\\u015F d\\u0259y\\u0259r");default:return"Yanl\\u0131\\u015F d\\u0259y\\u0259r"}}};function ju(){return{localeError:Is()}}function Ou(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var ws=()=>{let e={string:{unit:{one:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B",few:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u044B",many:"\\u0441\\u0456\\u043C\\u0432\\u0430\\u043B\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u044B",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u044B",many:"\\u0431\\u0430\\u0439\\u0442\\u0430\\u045E"},verb:"\\u043C\\u0435\\u0446\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u043B\\u0456\\u043A";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0456\\u045E";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0443\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0430\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0456 \\u0447\\u0430\\u0441",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0447\\u0430\\u0441",duration:"ISO \\u043F\\u0440\\u0430\\u0446\\u044F\\u0433\\u043B\\u0430\\u0441\\u0446\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0430\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0430\\u0441",cidrv4:"IPv4 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u044B\\u044F\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64",base64url:"\\u0440\\u0430\\u0434\\u043E\\u043A \\u0443 \\u0444\\u0430\\u0440\\u043C\\u0430\\u0446\\u0435 base64url",json_string:"JSON \\u0440\\u0430\\u0434\\u043E\\u043A",e164:"\\u043D\\u0443\\u043C\\u0430\\u0440 E.164",jwt:"JWT",template_literal:"\\u0443\\u0432\\u043E\\u0434"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F ".concat(t.expected,", \\u0430\\u0442\\u0440\\u044B\\u043C\\u0430\\u043D\\u0430 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0432\\u0430\\u0440\\u044B\\u044F\\u043D\\u0442: \\u0447\\u0430\\u043A\\u0430\\u045E\\u0441\\u044F \\u0430\\u0434\\u0437\\u0456\\u043D \\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),v=Ou(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u0432\\u044F\\u043B\\u0456\\u043A\\u0456: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435"," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),v=Ou(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 ").concat(a.verb," ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u0430 \\u043C\\u0430\\u043B\\u044B: \\u0447\\u0430\\u043A\\u0430\\u043B\\u0430\\u0441\\u044F, \\u0448\\u0442\\u043E ".concat(t.origin," \\u043F\\u0430\\u0432\\u0456\\u043D\\u043D\\u0430 \\u0431\\u044B\\u0446\\u044C ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u043F\\u0430\\u0447\\u044B\\u043D\\u0430\\u0446\\u0446\\u0430 \\u0437 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0432\\u0430\\u0446\\u0446\\u0430 \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0437\\u043C\\u044F\\u0448\\u0447\\u0430\\u0446\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u0440\\u0430\\u0434\\u043E\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0430\\u0434\\u043F\\u0430\\u0432\\u044F\\u0434\\u0430\\u0446\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B ".concat((l=i[c.format])!=null?l:t.format)}case"not_multiple_of":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043B\\u0456\\u043A: \\u043F\\u0430\\u0432\\u0456\\u043D\\u0435\\u043D \\u0431\\u044B\\u0446\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u0430\\u0437\\u043D\\u0430\\u043D\\u044B ".concat(t.keys.length>1?"\\u043A\\u043B\\u044E\\u0447\\u044B":"\\u043A\\u043B\\u044E\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434";case"invalid_element":return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u0430\\u0435 \\u0437\\u043D\\u0430\\u0447\\u044D\\u043D\\u043D\\u0435 \\u045E ".concat(t.origin);default:return"\\u041D\\u044F\\u043F\\u0440\\u0430\\u0432\\u0456\\u043B\\u044C\\u043D\\u044B \\u045E\\u0432\\u043E\\u0434"}}};function Pu(){return{localeError:ws()}}var Ss=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(e))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},js=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",verb:"\\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u0432\\u0445\\u043E\\u0434",email:"\\u0438\\u043C\\u0435\\u0439\\u043B \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0436\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u043F\\u0440\\u043E\\u0434\\u044A\\u043B\\u0436\\u0438\\u0442\\u0435\\u043B\\u043D\\u043E\\u0441\\u0442",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"base64-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",base64url:"base64url-\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D \\u043D\\u0438\\u0437",json_string:"JSON \\u043D\\u0438\\u0437",e164:"E.164 \\u043D\\u043E\\u043C\\u0435\\u0440",jwt:"JWT",template_literal:"\\u0432\\u0445\\u043E\\u0434"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(i.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D ").concat(Ss(i.input));case"invalid_value":return i.values.length===1?"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D ".concat(b(i.values[0])):"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u044F: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430\\u043D\\u043E \\u0435\\u0434\\u043D\\u043E \\u043E\\u0442 ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((t=i.origin)!=null?t:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430"):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u0433\\u043E\\u043B\\u044F\\u043C\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat((u=i.origin)!=null?u:"\\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442"," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0441\\u044A\\u0434\\u044A\\u0440\\u0436\\u0430 ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\u0422\\u0432\\u044A\\u0440\\u0434\\u0435 \\u043C\\u0430\\u043B\\u043A\\u043E: \\u043E\\u0447\\u0430\\u043A\\u0432\\u0430 \\u0441\\u0435 ".concat(i.origin," \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;if(c.format==="starts_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u0432\\u0430 \\u0441 "\'.concat(c.prefix,\'"\');if(c.format==="ends_with")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u044A\\u0440\\u0448\\u0432\\u0430 \\u0441 "\'.concat(c.suffix,\'"\');if(c.format==="includes")return\'\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0432\\u0430 "\'.concat(c.includes,\'"\');if(c.format==="regex")return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043D\\u0438\\u0437: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0441\\u044A\\u0432\\u043F\\u0430\\u0434\\u0430 \\u0441 ".concat(c.pattern);let a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D";return c.format==="emoji"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="datetime"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="date"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),c.format==="time"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E"),c.format==="duration"&&(a="\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430"),"".concat(a," ").concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u043E \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0442\\u0440\\u044F\\u0431\\u0432\\u0430 \\u0434\\u0430 \\u0431\\u044A\\u0434\\u0435 \\u043A\\u0440\\u0430\\u0442\\u043D\\u043E \\u043D\\u0430 ".concat(i.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0437\\u043F\\u043E\\u0437\\u043D\\u0430\\u0442".concat(i.keys.length>1?"\\u0438":""," \\u043A\\u043B\\u044E\\u0447").concat(i.keys.length>1?"\\u043E\\u0432\\u0435":"",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(i.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u043D\\u0430 \\u0441\\u0442\\u043E\\u0439\\u043D\\u043E\\u0441\\u0442 \\u0432 ".concat(i.origin);default:return"\\u041D\\u0435\\u0432\\u0430\\u043B\\u0438\\u0434\\u0435\\u043D \\u0432\\u0445\\u043E\\u0434"}}};function Uu(){return{localeError:js()}}var Os=()=>{let e={string:{unit:"car\\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entrada",email:"adre\\xE7a electr\\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\\xE7a IPv4",ipv6:"adre\\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Tipus inv\\xE0lid: s\'esperava ".concat(t.expected,", s\'ha rebut ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Valor inv\\xE0lid: s\'esperava ".concat(b(t.values[0])):"Opci\\xF3 inv\\xE0lida: s\'esperava una de ".concat(p(t.values," o "));case"too_big":{let a=t.inclusive?"com a m\\xE0xim":"menys de",s=r(t.origin);return s?"Massa gran: s\'esperava que ".concat((o=t.origin)!=null?o:"el valor"," contingu\\xE9s ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"):"Massa gran: s\'esperava que ".concat((l=t.origin)!=null?l:"el valor"," fos ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"com a m\\xEDnim":"m\\xE9s de",s=r(t.origin);return s?"Massa petit: s\'esperava que ".concat(t.origin," contingu\\xE9s ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"Massa petit: s\'esperava que ".concat(t.origin," fos ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Format inv\\xE0lid: ha de comen\\xE7ar amb "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?"Format inv\\xE0lid: ha d\'acabar amb \\"".concat(a.suffix,\'"\'):a.format==="includes"?"Format inv\\xE0lid: ha d\'incloure \\"".concat(a.includes,\'"\'):a.format==="regex"?"Format inv\\xE0lid: ha de coincidir amb el patr\\xF3 ".concat(a.pattern):"Format inv\\xE0lid per a ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE0lid: ha de ser m\\xFAltiple de ".concat(t.divisor);case"unrecognized_keys":return"Clau".concat(t.keys.length>1?"s":""," no reconeguda").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Clau inv\\xE0lida a ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE0lida";case"invalid_element":return"Element inv\\xE0lid a ".concat(t.origin);default:return"Entrada inv\\xE0lida"}}};function Nu(){return{localeError:Os()}}var Ps=()=>{let e={string:{unit:"znak\\u016F",verb:"m\\xEDt"},file:{unit:"bajt\\u016F",verb:"m\\xEDt"},array:{unit:"prvk\\u016F",verb:"m\\xEDt"},set:{unit:"prvk\\u016F",verb:"m\\xEDt"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u010D\\xEDslo";case"string":return"\\u0159et\\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regul\\xE1rn\\xED v\\xFDraz",email:"e-mailov\\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \\u010Das ve form\\xE1tu ISO",date:"datum ve form\\xE1tu ISO",time:"\\u010Das ve form\\xE1tu ISO",duration:"doba trv\\xE1n\\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64",base64url:"\\u0159et\\u011Bzec zak\\xF3dovan\\xFD ve form\\xE1tu base64url",json_string:"\\u0159et\\u011Bzec ve form\\xE1tu JSON",e164:"\\u010D\\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(t.expected,", obdr\\u017Eeno ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neplatn\\xFD vstup: o\\u010Dek\\xE1v\\xE1no ".concat(b(t.values[0])):"Neplatn\\xE1 mo\\u017Enost: o\\u010Dek\\xE1v\\xE1na jedna z hodnot ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((o=t.origin)!=null?o:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 velk\\xE1: ".concat((l=t.origin)!=null?l:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((c=t.origin)!=null?c:"hodnota"," mus\\xED m\\xEDt ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"prvk\\u016F"):"Hodnota je p\\u0159\\xEDli\\u0161 mal\\xE1: ".concat((s=t.origin)!=null?s:"hodnota"," mus\\xED b\\xFDt ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED za\\u010D\\xEDnat na "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED kon\\u010Dit na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED obsahovat "\'.concat(f.includes,\'"\'):f.format==="regex"?"Neplatn\\xFD \\u0159et\\u011Bzec: mus\\xED odpov\\xEDdat vzoru ".concat(f.pattern):"Neplatn\\xFD form\\xE1t ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Neplatn\\xE9 \\u010D\\xEDslo: mus\\xED b\\xFDt n\\xE1sobkem ".concat(t.divisor);case"unrecognized_keys":return"Nezn\\xE1m\\xE9 kl\\xED\\u010De: ".concat(p(t.keys,", "));case"invalid_key":return"Neplatn\\xFD kl\\xED\\u010D v ".concat(t.origin);case"invalid_union":return"Neplatn\\xFD vstup";case"invalid_element":return"Neplatn\\xE1 hodnota v ".concat(t.origin);default:return"Neplatn\\xFD vstup"}}};function Zu(){return{localeError:Ps()}}var Us=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},r={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\\xE6t",file:"fil"};function n(u){var l;return(l=e[u])!=null?l:null}function i(u){var l;return(l=r[u])!=null?l:u}let t=u=>{let l=typeof u;switch(l){case"number":return Number.isNaN(u)?"NaN":"tal";case"object":return Array.isArray(u)?"liste":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype&&u.constructor?u.constructor.name:"objekt"}return l},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\\xE6t",date:"ISO-dato",time:"ISO-klokkesl\\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return u=>{var l,c;switch(u.code){case"invalid_type":return"Ugyldigt input: forventede ".concat(i(u.expected),", fik ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Ugyldig v\\xE6rdi: forventede ".concat(b(u.values[0])):"Ugyldigt valg: forventede en af f\\xF8lgende ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",s=n(u.origin),v=i(u.origin);return s?"For stor: forventede ".concat(v!=null?v:"value"," ").concat(s.verb," ").concat(a," ").concat(u.maximum.toString()," ").concat((l=s.unit)!=null?l:"elementer"):"For stor: forventede ".concat(v!=null?v:"value"," havde ").concat(a," ").concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",s=n(u.origin),v=i(u.origin);return s?"For lille: forventede ".concat(v," ").concat(s.verb," ").concat(a," ").concat(u.minimum.toString()," ").concat(s.unit):"For lille: forventede ".concat(v," havde ").concat(a," ").concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Ugyldig streng: skal starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: skal ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: skal indeholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: skal matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"Ugyldigt tal: skal v\\xE6re deleligt med ".concat(u.divisor);case"unrecognized_keys":return"".concat(u.keys.length>1?"Ukendte n\\xF8gler":"Ukendt n\\xF8gle",": ").concat(p(u.keys,", "));case"invalid_key":return"Ugyldig n\\xF8gle i ".concat(u.origin);case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return"Ugyldig v\\xE6rdi i ".concat(u.origin);default:return"Ugyldigt input"}}};function Du(){return{localeError:Us()}}var Ns=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ung\\xFCltige Eingabe: erwartet ".concat(t.expected,", erhalten ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ung\\xFCltige Eingabe: erwartet ".concat(b(t.values[0])):"Ung\\xFCltige Option: erwartet eine von ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Zu gro\\xDF: erwartet, dass ".concat((o=t.origin)!=null?o:"Wert"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"Elemente"," hat"):"Zu gro\\xDF: erwartet, dass ".concat((l=t.origin)!=null?l:"Wert"," ").concat(a).concat(t.maximum.toString()," ist")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," hat"):"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ist")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ung\\xFCltiger String: muss mit "\'.concat(a.suffix,\'" enden\'):a.format==="includes"?\'Ung\\xFCltiger String: muss "\'.concat(a.includes,\'" enthalten\'):a.format==="regex"?"Ung\\xFCltiger String: muss dem Muster ".concat(a.pattern," entsprechen"):"Ung\\xFCltig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ung\\xFCltige Zahl: muss ein Vielfaches von ".concat(t.divisor," sein");case"unrecognized_keys":return"".concat(t.keys.length>1?"Unbekannte Schl\\xFCssel":"Unbekannter Schl\\xFCssel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ung\\xFCltiger Schl\\xFCssel in ".concat(t.origin);case"invalid_union":return"Ung\\xFCltige Eingabe";case"invalid_element":return"Ung\\xFCltiger Wert in ".concat(t.origin);default:return"Ung\\xFCltige Eingabe"}}};function Tu(){return{localeError:Ns()}}var Zs=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Ds=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Invalid input: expected ".concat(i.expected,", received ").concat(Zs(i.input));case"invalid_value":return i.values.length===1?"Invalid input: expected ".concat(b(i.values[0])):"Invalid option: expected one of ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Too big: expected ".concat((t=i.origin)!=null?t:"value"," to have ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elements"):"Too big: expected ".concat((u=i.origin)!=null?u:"value"," to be ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Too small: expected ".concat(i.origin," to have ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Too small: expected ".concat(i.origin," to be ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Invalid string: must start with "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Invalid string: must end with "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Invalid string: must include "\'.concat(c.includes,\'"\'):c.format==="regex"?"Invalid string: must match pattern ".concat(c.pattern):"Invalid ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Invalid number: must be a multiple of ".concat(i.divisor);case"unrecognized_keys":return"Unrecognized key".concat(i.keys.length>1?"s":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Invalid key in ".concat(i.origin);case"invalid_union":return"Invalid input";case"invalid_element":return"Invalid value in ".concat(i.origin);default:return"Invalid input"}}};function tr(){return{localeError:Ds()}}var Ts=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Es=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Nevalida enigo: atendi\\u011Dis ".concat(i.expected,", ricevi\\u011Dis ").concat(Ts(i.input));case"invalid_value":return i.values.length===1?"Nevalida enigo: atendi\\u011Dis ".concat(b(i.values[0])):"Nevalida opcio: atendi\\u011Dis unu el ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Tro granda: atendi\\u011Dis ke ".concat((t=i.origin)!=null?t:"valoro"," havu ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"elementojn"):"Tro granda: atendi\\u011Dis ke ".concat((u=i.origin)!=null?u:"valoro"," havu ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," havu ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Tro malgranda: atendi\\u011Dis ke ".concat(i.origin," estu ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Nevalida karaktraro: devas komenci\\u011Di per "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Nevalida karaktraro: devas fini\\u011Di per "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Nevalida karaktraro: devas inkluzivi "\'.concat(c.includes,\'"\'):c.format==="regex"?"Nevalida karaktraro: devas kongrui kun la modelo ".concat(c.pattern):"Nevalida ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Nevalida nombro: devas esti oblo de ".concat(i.divisor);case"unrecognized_keys":return"Nekonata".concat(i.keys.length>1?"j":""," \\u015Dlosilo").concat(i.keys.length>1?"j":"",": ").concat(p(i.keys,", "));case"invalid_key":return"Nevalida \\u015Dlosilo en ".concat(i.origin);case"invalid_union":return"Nevalida enigo";case"invalid_element":return"Nevalida valoro en ".concat(i.origin);default:return"Nevalida enigo"}}};function Eu(){return{localeError:Es()}}var As=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},r={string:"texto",number:"n\\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\\xFAmero grande",symbol:"s\\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\\xF3n",union:"uni\\xF3n",literal:"literal",promise:"promesa",void:"vac\\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(u){var l;return(l=e[u])!=null?l:null}function i(u){var l;return(l=r[u])!=null?l:u}let t=u=>{let l=typeof u;switch(l){case"number":return Number.isNaN(u)?"NaN":"number";case"object":return Array.isArray(u)?"array":u===null?"null":Object.getPrototypeOf(u)!==Object.prototype?u.constructor.name:"object"}return l},o={regex:"entrada",email:"direcci\\xF3n de correo electr\\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\\xF3n ISO",ipv4:"direcci\\xF3n IPv4",ipv6:"direcci\\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return u=>{var l,c;switch(u.code){case"invalid_type":return"Entrada inv\\xE1lida: se esperaba ".concat(i(u.expected),", recibido ").concat(i(t(u.input)));case"invalid_value":return u.values.length===1?"Entrada inv\\xE1lida: se esperaba ".concat(b(u.values[0])):"Opci\\xF3n inv\\xE1lida: se esperaba una de ".concat(p(u.values,"|"));case"too_big":{let a=u.inclusive?"<=":"<",s=n(u.origin),v=i(u.origin);return s?"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," tuviera ").concat(a).concat(u.maximum.toString()," ").concat((l=s.unit)!=null?l:"elementos"):"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," fuera ").concat(a).concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",s=n(u.origin),v=i(u.origin);return s?"Demasiado peque\\xF1o: se esperaba que ".concat(v," tuviera ").concat(a).concat(u.minimum.toString()," ").concat(s.unit):"Demasiado peque\\xF1o: se esperaba que ".concat(v," fuera ").concat(a).concat(u.minimum.toString())}case"invalid_format":{let a=u;return a.format==="starts_with"?\'Cadena inv\\xE1lida: debe comenzar con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cadena inv\\xE1lida: debe terminar en "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cadena inv\\xE1lida: debe incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cadena inv\\xE1lida: debe coincidir con el patr\\xF3n ".concat(a.pattern):"Inv\\xE1lido ".concat((c=o[a.format])!=null?c:u.format)}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: debe ser m\\xFAltiplo de ".concat(u.divisor);case"unrecognized_keys":return"Llave".concat(u.keys.length>1?"s":""," desconocida").concat(u.keys.length>1?"s":"",": ").concat(p(u.keys,", "));case"invalid_key":return"Llave inv\\xE1lida en ".concat(i(u.origin));case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido en ".concat(i(u.origin));default:return"Entrada inv\\xE1lida"}}};function Au(){return{localeError:As()}}var Rs=()=>{let e={string:{unit:"\\u06A9\\u0627\\u0631\\u0627\\u06A9\\u062A\\u0631",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},file:{unit:"\\u0628\\u0627\\u06CC\\u062A",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},array:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"},set:{unit:"\\u0622\\u06CC\\u062A\\u0645",verb:"\\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u0627\\u06CC\\u0647";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u06CC",email:"\\u0622\\u062F\\u0631\\u0633 \\u0627\\u06CC\\u0645\\u06CC\\u0644",url:"URL",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0648 \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",date:"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u0627\\u06CC\\u0632\\u0648",time:"\\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",duration:"\\u0645\\u062F\\u062A \\u0632\\u0645\\u0627\\u0646 \\u0627\\u06CC\\u0632\\u0648",ipv4:"IPv4 \\u0622\\u062F\\u0631\\u0633",ipv6:"IPv6 \\u0622\\u062F\\u0631\\u0633",cidrv4:"IPv4 \\u062F\\u0627\\u0645\\u0646\\u0647",cidrv6:"IPv6 \\u062F\\u0627\\u0645\\u0646\\u0647",base64:"base64-encoded \\u0631\\u0634\\u062A\\u0647",base64url:"base64url-encoded \\u0631\\u0634\\u062A\\u0647",json_string:"JSON \\u0631\\u0634\\u062A\\u0647",e164:"E.164 \\u0639\\u062F\\u062F",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u06CC"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(t.expected," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F\\u060C ").concat(n(t.input)," \\u062F\\u0631\\u06CC\\u0627\\u0641\\u062A \\u0634\\u062F");case"invalid_value":return t.values.length===1?"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A ".concat(b(t.values[0])," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F"):"\\u06AF\\u0632\\u06CC\\u0646\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0645\\u06CC\\u200C\\u0628\\u0627\\u06CC\\u0633\\u062A \\u06CC\\u06A9\\u06CC \\u0627\\u0632 ".concat(p(t.values,"|")," \\u0645\\u06CC\\u200C\\u0628\\u0648\\u062F");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((o=t.origin)!=null?o:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((l=t.origin)!=null?l:"\\u0645\\u0642\\u062F\\u0627\\u0631"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0628\\u0627\\u0634\\u062F")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.prefix,\'" \\u0634\\u0631\\u0648\\u0639 \\u0634\\u0648\\u062F\'):a.format==="ends_with"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 "\'.concat(a.suffix,\'" \\u062A\\u0645\\u0627\\u0645 \\u0634\\u0648\\u062F\'):a.format==="includes"?\'\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0634\\u0627\\u0645\\u0644 "\'.concat(a.includes,\'" \\u0628\\u0627\\u0634\\u062F\'):a.format==="regex"?"\\u0631\\u0634\\u062A\\u0647 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0628\\u0627 \\u0627\\u0644\\u06AF\\u0648\\u06CC ".concat(a.pattern," \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u062F\\u0627\\u0634\\u062A\\u0647 \\u0628\\u0627\\u0634\\u062F"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631")}case"not_multiple_of":return"\\u0639\\u062F\\u062F \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631: \\u0628\\u0627\\u06CC\\u062F \\u0645\\u0636\\u0631\\u0628 ".concat(t.divisor," \\u0628\\u0627\\u0634\\u062F");case"unrecognized_keys":return"\\u06A9\\u0644\\u06CC\\u062F".concat(t.keys.length>1?"\\u0647\\u0627\\u06CC":""," \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633: ").concat(p(t.keys,", "));case"invalid_key":return"\\u06A9\\u0644\\u06CC\\u062F \\u0646\\u0627\\u0634\\u0646\\u0627\\u0633 \\u062F\\u0631 ".concat(t.origin);case"invalid_union":return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631";case"invalid_element":return"\\u0645\\u0642\\u062F\\u0627\\u0631 \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631 \\u062F\\u0631 ".concat(t.origin);default:return"\\u0648\\u0631\\u0648\\u062F\\u06CC \\u0646\\u0627\\u0645\\u0639\\u062A\\u0628\\u0631"}}};function Ru(){return{localeError:Rs()}}var Ls=()=>{let e={string:{unit:"merkki\\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4n"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"s\\xE4\\xE4nn\\xF6llinen lauseke",email:"s\\xE4hk\\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\\xE4iv\\xE4m\\xE4\\xE4r\\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{var o;switch(t.code){case"invalid_type":return"Virheellinen tyyppi: odotettiin ".concat(t.expected,", oli ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Virheellinen sy\\xF6te: t\\xE4ytyy olla ".concat(b(t.values[0])):"Virheellinen valinta: t\\xE4ytyy olla yksi seuraavista: ".concat(p(t.values,"|"));case"too_big":{let u=t.inclusive?"<=":"<",l=r(t.origin);return l?"Liian suuri: ".concat(l.subject," t\\xE4ytyy olla ").concat(u).concat(t.maximum.toString()," ").concat(l.unit).trim():"Liian suuri: arvon t\\xE4ytyy olla ".concat(u).concat(t.maximum.toString())}case"too_small":{let u=t.inclusive?">=":">",l=r(t.origin);return l?"Liian pieni: ".concat(l.subject," t\\xE4ytyy olla ").concat(u).concat(t.minimum.toString()," ").concat(l.unit).trim():"Liian pieni: arvon t\\xE4ytyy olla ".concat(u).concat(t.minimum.toString())}case"invalid_format":{let u=t;return u.format==="starts_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy alkaa "\'.concat(u.prefix,\'"\'):u.format==="ends_with"?\'Virheellinen sy\\xF6te: t\\xE4ytyy loppua "\'.concat(u.suffix,\'"\'):u.format==="includes"?\'Virheellinen sy\\xF6te: t\\xE4ytyy sis\\xE4lt\\xE4\\xE4 "\'.concat(u.includes,\'"\'):u.format==="regex"?"Virheellinen sy\\xF6te: t\\xE4ytyy vastata s\\xE4\\xE4nn\\xF6llist\\xE4 lauseketta ".concat(u.pattern):"Virheellinen ".concat((o=i[u.format])!=null?o:t.format)}case"not_multiple_of":return"Virheellinen luku: t\\xE4ytyy olla luvun ".concat(t.divisor," monikerta");case"unrecognized_keys":return"".concat(t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain",": ").concat(p(t.keys,", "));case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\\xF6te"}}};function Lu(){return{localeError:Ls()}}var Cs=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : ".concat(t.expected," attendu, ").concat(n(t.input)," re\\xE7u");case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : ".concat(b(t.values[0])," attendu"):"Option invalide : une valeur parmi ".concat(p(t.values,"|")," attendue");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Trop grand : ".concat((o=t.origin)!=null?o:"valeur"," doit ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\xE9l\\xE9ment(s)"):"Trop grand : ".concat((l=t.origin)!=null?l:"valeur"," doit \\xEAtre ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Trop petit : ".concat(t.origin," doit ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Trop petit : ".concat(t.origin," doit \\xEAtre ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(a.includes,\'"\'):a.format==="regex"?"Cha\\xEEne invalide : doit correspondre au mod\\xE8le ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Cu(){return{localeError:Cs()}}var Vs=()=>{let e={string:{unit:"caract\\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\\xE9l\\xE9ments",verb:"avoir"},set:{unit:"\\xE9l\\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\\xEEne encod\\xE9e en base64",base64url:"cha\\xEEne encod\\xE9e en base64url",json_string:"cha\\xEEne JSON",e164:"num\\xE9ro E.164",jwt:"JWT",template_literal:"entr\\xE9e"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"Entr\\xE9e invalide : attendu ".concat(t.expected,", re\\xE7u ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entr\\xE9e invalide : attendu ".concat(b(t.values[0])):"Option invalide : attendu l\'une des valeurs suivantes ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"\\u2264":"<",a=r(t.origin);return a?"Trop grand : attendu que ".concat((o=t.origin)!=null?o:"la valeur"," ait ").concat(c).concat(t.maximum.toString()," ").concat(a.unit):"Trop grand : attendu que ".concat((u=t.origin)!=null?u:"la valeur"," soit ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?"\\u2265":">",a=r(t.origin);return a?"Trop petit : attendu que ".concat(t.origin," ait ").concat(c).concat(t.minimum.toString()," ").concat(a.unit):"Trop petit : attendu que ".concat(t.origin," soit ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'Cha\\xEEne invalide : doit commencer par "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'Cha\\xEEne invalide : doit se terminer par "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'Cha\\xEEne invalide : doit inclure "\'.concat(c.includes,\'"\'):c.format==="regex"?"Cha\\xEEne invalide : doit correspondre au motif ".concat(c.pattern):"".concat((l=i[c.format])!=null?l:t.format," invalide")}case"not_multiple_of":return"Nombre invalide : doit \\xEAtre un multiple de ".concat(t.divisor);case"unrecognized_keys":return"Cl\\xE9".concat(t.keys.length>1?"s":""," non reconnue").concat(t.keys.length>1?"s":""," : ").concat(p(t.keys,", "));case"invalid_key":return"Cl\\xE9 invalide dans ".concat(t.origin);case"invalid_union":return"Entr\\xE9e invalide";case"invalid_element":return"Valeur invalide dans ".concat(t.origin);default:return"Entr\\xE9e invalide"}}};function Vu(){return{localeError:Vs()}}var Fs=()=>{let e={string:{unit:"\\u05D0\\u05D5\\u05EA\\u05D9\\u05D5\\u05EA",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},file:{unit:"\\u05D1\\u05D9\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},array:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"},set:{unit:"\\u05E4\\u05E8\\u05D9\\u05D8\\u05D9\\u05DD",verb:"\\u05DC\\u05DB\\u05DC\\u05D5\\u05DC"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u05E7\\u05DC\\u05D8",email:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05D0\\u05D9\\u05DE\\u05D9\\u05D9\\u05DC",url:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA \\u05E8\\u05E9\\u05EA",emoji:"\\u05D0\\u05D9\\u05DE\\u05D5\\u05D2\'\\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA \\u05D5\\u05D6\\u05DE\\u05DF ISO",date:"\\u05EA\\u05D0\\u05E8\\u05D9\\u05DA ISO",time:"\\u05D6\\u05DE\\u05DF ISO",duration:"\\u05DE\\u05E9\\u05DA \\u05D6\\u05DE\\u05DF ISO",ipv4:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv4",ipv6:"\\u05DB\\u05EA\\u05D5\\u05D1\\u05EA IPv6",cidrv4:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv4",cidrv6:"\\u05D8\\u05D5\\u05D5\\u05D7 IPv6",base64:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64",base64url:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05D1\\u05D1\\u05E1\\u05D9\\u05E1 64 \\u05DC\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA \\u05E8\\u05E9\\u05EA",json_string:"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA JSON",e164:"\\u05DE\\u05E1\\u05E4\\u05E8 E.164",jwt:"JWT",template_literal:"\\u05E7\\u05DC\\u05D8"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(t.expected,", \\u05D4\\u05EA\\u05E7\\u05D1\\u05DC ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA ".concat(b(t.values[0])):"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05E6\\u05E8\\u05D9\\u05DA \\u05D0\\u05D7\\u05EA \\u05DE\\u05D4\\u05D0\\u05E4\\u05E9\\u05E8\\u05D5\\u05D9\\u05D5\\u05EA ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((o=t.origin)!=null?o:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"):"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((l=t.origin)!=null?l:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u05E7\\u05D8\\u05DF \\u05DE\\u05D3\\u05D9: ".concat(t.origin," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D7\\u05D9\\u05DC \\u05D1"\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05E1\\u05EA\\u05D9\\u05D9\\u05DD \\u05D1 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05DB\\u05DC\\u05D5\\u05DC "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u05DE\\u05D7\\u05E8\\u05D5\\u05D6\\u05EA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05E0\\u05D4: \\u05D7\\u05D9\\u05D9\\u05D1\\u05EA \\u05DC\\u05D4\\u05EA\\u05D0\\u05D9\\u05DD \\u05DC\\u05EA\\u05D1\\u05E0\\u05D9\\u05EA ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF")}case"not_multiple_of":return"\\u05DE\\u05E1\\u05E4\\u05E8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF: \\u05D7\\u05D9\\u05D9\\u05D1 \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA \\u05DE\\u05DB\\u05E4\\u05DC\\u05D4 \\u05E9\\u05DC ".concat(t.divisor);case"unrecognized_keys":return"\\u05DE\\u05E4\\u05EA\\u05D7".concat(t.keys.length>1?"\\u05D5\\u05EA":""," \\u05DC\\u05D0 \\u05DE\\u05D6\\u05D5\\u05D4").concat(t.keys.length>1?"\\u05D9\\u05DD":"\\u05D4",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u05DE\\u05E4\\u05EA\\u05D7 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);case"invalid_union":return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF";case"invalid_element":return"\\u05E2\\u05E8\\u05DA \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF \\u05D1".concat(t.origin);default:return"\\u05E7\\u05DC\\u05D8 \\u05DC\\u05D0 \\u05EA\\u05E7\\u05D9\\u05DF"}}};function Fu(){return{localeError:Fs()}}var Js=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"sz\\xE1m";case"object":{if(Array.isArray(t))return"t\\xF6mb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"bemenet",email:"email c\\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\\u0151b\\xE9lyeg",date:"ISO d\\xE1tum",time:"ISO id\\u0151",duration:"ISO id\\u0151intervallum",ipv4:"IPv4 c\\xEDm",ipv6:"IPv6 c\\xEDm",cidrv4:"IPv4 tartom\\xE1ny",cidrv6:"IPv6 tartom\\xE1ny",base64:"base64-k\\xF3dolt string",base64url:"base64url-k\\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\\xE1m",jwt:"JWT",template_literal:"bemenet"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(t.expected,", a kapott \\xE9rt\\xE9k ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xC9rv\\xE9nytelen bemenet: a v\\xE1rt \\xE9rt\\xE9k ".concat(b(t.values[0])):"\\xC9rv\\xE9nytelen opci\\xF3: valamelyik \\xE9rt\\xE9k v\\xE1rt ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"T\\xFAl nagy: ".concat((o=t.origin)!=null?o:"\\xE9rt\\xE9k"," m\\xE9rete t\\xFAl nagy ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elem"):"T\\xFAl nagy: a bemeneti \\xE9rt\\xE9k ".concat((l=t.origin)!=null?l:"\\xE9rt\\xE9k"," t\\xFAl nagy: ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," m\\xE9rete t\\xFAl kicsi ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," t\\xFAl kicsi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.prefix,\'" \\xE9rt\\xE9kkel kell kezd\\u0151dnie\'):a.format==="ends_with"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.suffix,\'" \\xE9rt\\xE9kkel kell v\\xE9gz\\u0151dnie\'):a.format==="includes"?\'\\xC9rv\\xE9nytelen string: "\'.concat(a.includes,\'" \\xE9rt\\xE9ket kell tartalmaznia\'):a.format==="regex"?"\\xC9rv\\xE9nytelen string: ".concat(a.pattern," mint\\xE1nak kell megfelelnie"):"\\xC9rv\\xE9nytelen ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\xC9rv\\xE9nytelen sz\\xE1m: ".concat(t.divisor," t\\xF6bbsz\\xF6r\\xF6s\\xE9nek kell lennie");case"unrecognized_keys":return"Ismeretlen kulcs".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\xC9rv\\xE9nytelen kulcs ".concat(t.origin);case"invalid_union":return"\\xC9rv\\xE9nytelen bemenet";case"invalid_element":return"\\xC9rv\\xE9nytelen \\xE9rt\\xE9k: ".concat(t.origin);default:return"\\xC9rv\\xE9nytelen bemenet"}}};function Ju(){return{localeError:Js()}}var Ms=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input tidak valid: diharapkan ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak valid: diharapkan ".concat(b(t.values[0])):"Pilihan tidak valid: diharapkan salah satu dari ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Terlalu besar: diharapkan ".concat((o=t.origin)!=null?o:"value"," memiliki ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elemen"):"Terlalu besar: diharapkan ".concat((l=t.origin)!=null?l:"value"," menjadi ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Terlalu kecil: diharapkan ".concat(t.origin," memiliki ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Terlalu kecil: diharapkan ".concat(t.origin," menjadi ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak valid: harus dimulai dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak valid: harus berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak valid: harus menyertakan "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak valid: harus sesuai pola ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak valid")}case"not_multiple_of":return"Angka tidak valid: harus kelipatan dari ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak valid di ".concat(t.origin);case"invalid_union":return"Input tidak valid";case"invalid_element":return"Nilai tidak valid di ".concat(t.origin);default:return"Input tidak valid"}}};function Mu(){return{localeError:Ms()}}var Bs=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"n\\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Ks=()=>{let e={string:{unit:"stafi",verb:"a\\xF0 hafa"},file:{unit:"b\\xE6ti",verb:"a\\xF0 hafa"},array:{unit:"hluti",verb:"a\\xF0 hafa"},set:{unit:"hluti",verb:"a\\xF0 hafa"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"gildi",email:"netfang",url:"vefsl\\xF3\\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\\xEDmi",date:"ISO dagsetning",time:"ISO t\\xEDmi",duration:"ISO t\\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(Bs(i.input)," \\xFEar sem \\xE1 a\\xF0 vera ").concat(i.expected);case"invalid_value":return i.values.length===1?"Rangt gildi: gert r\\xE1\\xF0 fyrir ".concat(b(i.values[0])):"\\xD3gilt val: m\\xE1 vera eitt af eftirfarandi ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((t=i.origin)!=null?t:"gildi"," hafi ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"hluti"):"Of st\\xF3rt: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat((u=i.origin)!=null?u:"gildi"," s\\xE9 ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," hafi ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"Of l\\xEDti\\xF0: gert er r\\xE1\\xF0 fyrir a\\xF0 ".concat(i.origin," s\\xE9 ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 byrja \\xE1 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 enda \\xE1 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\xD3gildur strengur: ver\\xF0ur a\\xF0 innihalda "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\xD3gildur strengur: ver\\xF0ur a\\xF0 fylgja mynstri ".concat(c.pattern):"Rangt ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"R\\xF6ng tala: ver\\xF0ur a\\xF0 vera margfeldi af ".concat(i.divisor);case"unrecognized_keys":return"\\xD3\\xFEekkt ".concat(i.keys.length>1?"ir lyklar":"ur lykill",": ").concat(p(i.keys,", "));case"invalid_key":return"Rangur lykill \\xED ".concat(i.origin);case"invalid_union":return"Rangt gildi";case"invalid_element":return"Rangt gildi \\xED ".concat(i.origin);default:return"Rangt gildi"}}};function Bu(){return{localeError:Ks()}}var Gs=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input non valido: atteso ".concat(t.expected,", ricevuto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input non valido: atteso ".concat(b(t.values[0])):"Opzione non valida: atteso uno tra ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Troppo grande: ".concat((o=t.origin)!=null?o:"valore"," deve avere ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementi"):"Troppo grande: ".concat((l=t.origin)!=null?l:"valore"," deve essere ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Troppo piccolo: ".concat(t.origin," deve avere ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Troppo piccolo: ".concat(t.origin," deve essere ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Stringa non valida: deve iniziare con "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Stringa non valida: deve terminare con "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Stringa non valida: deve includere "\'.concat(a.includes,\'"\'):a.format==="regex"?"Stringa non valida: deve corrispondere al pattern ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Numero non valido: deve essere un multiplo di ".concat(t.divisor);case"unrecognized_keys":return"Chiav".concat(t.keys.length>1?"i":"e"," non riconosciut").concat(t.keys.length>1?"e":"a",": ").concat(p(t.keys,", "));case"invalid_key":return"Chiave non valida in ".concat(t.origin);case"invalid_union":return"Input non valido";case"invalid_element":return"Valore non valido in ".concat(t.origin);default:return"Input non valido"}}};function Ku(){return{localeError:Gs()}}var Ws=()=>{let e={string:{unit:"\\u6587\\u5B57",verb:"\\u3067\\u3042\\u308B"},file:{unit:"\\u30D0\\u30A4\\u30C8",verb:"\\u3067\\u3042\\u308B"},array:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"},set:{unit:"\\u8981\\u7D20",verb:"\\u3067\\u3042\\u308B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u6570\\u5024";case"object":{if(Array.isArray(t))return"\\u914D\\u5217";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u5165\\u529B\\u5024",email:"\\u30E1\\u30FC\\u30EB\\u30A2\\u30C9\\u30EC\\u30B9",url:"URL",emoji:"\\u7D75\\u6587\\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u6642",date:"ISO\\u65E5\\u4ED8",time:"ISO\\u6642\\u523B",duration:"ISO\\u671F\\u9593",ipv4:"IPv4\\u30A2\\u30C9\\u30EC\\u30B9",ipv6:"IPv6\\u30A2\\u30C9\\u30EC\\u30B9",cidrv4:"IPv4\\u7BC4\\u56F2",cidrv6:"IPv6\\u7BC4\\u56F2",base64:"base64\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",base64url:"base64url\\u30A8\\u30F3\\u30B3\\u30FC\\u30C9\\u6587\\u5B57\\u5217",json_string:"JSON\\u6587\\u5B57\\u5217",e164:"E.164\\u756A\\u53F7",jwt:"JWT",template_literal:"\\u5165\\u529B\\u5024"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(t.expected,"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F\\u304C\\u3001").concat(n(t.input),"\\u304C\\u5165\\u529B\\u3055\\u308C\\u307E\\u3057\\u305F");case"invalid_value":return t.values.length===1?"\\u7121\\u52B9\\u306A\\u5165\\u529B: ".concat(b(t.values[0]),"\\u304C\\u671F\\u5F85\\u3055\\u308C\\u307E\\u3057\\u305F"):"\\u7121\\u52B9\\u306A\\u9078\\u629E: ".concat(p(t.values,"\\u3001"),"\\u306E\\u3044\\u305A\\u308C\\u304B\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"too_big":{let a=t.inclusive?"\\u4EE5\\u4E0B\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5C0F\\u3055\\u3044",s=r(t.origin);return s?"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((o=t.origin)!=null?o:"\\u5024","\\u306F").concat(t.maximum.toString()).concat((u=s.unit)!=null?u:"\\u8981\\u7D20").concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((l=t.origin)!=null?l:"\\u5024","\\u306F").concat(t.maximum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"too_small":{let a=t.inclusive?"\\u4EE5\\u4E0A\\u3067\\u3042\\u308B":"\\u3088\\u308A\\u5927\\u304D\\u3044",s=r(t.origin);return s?"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(s.unit).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.prefix,\'"\\u3067\\u59CB\\u307E\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="ends_with"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.suffix,\'"\\u3067\\u7D42\\u308F\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="includes"?\'\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: "\'.concat(a.includes,\'"\\u3092\\u542B\\u3080\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059\'):a.format==="regex"?"\\u7121\\u52B9\\u306A\\u6587\\u5B57\\u5217: \\u30D1\\u30BF\\u30FC\\u30F3".concat(a.pattern,"\\u306B\\u4E00\\u81F4\\u3059\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u7121\\u52B9\\u306A".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u52B9\\u306A\\u6570\\u5024: ".concat(t.divisor,"\\u306E\\u500D\\u6570\\u3067\\u3042\\u308B\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059");case"unrecognized_keys":return"\\u8A8D\\u8B58\\u3055\\u308C\\u3066\\u3044\\u306A\\u3044\\u30AD\\u30FC".concat(t.keys.length>1?"\\u7FA4":"",": ").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u30AD\\u30FC");case"invalid_union":return"\\u7121\\u52B9\\u306A\\u5165\\u529B";case"invalid_element":return"".concat(t.origin,"\\u5185\\u306E\\u7121\\u52B9\\u306A\\u5024");default:return"\\u7121\\u52B9\\u306A\\u5165\\u529B"}}};function Gu(){return{localeError:Ws()}}var Xs=e=>{var i;let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"\\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8";case"object":{if(Array.isArray(e))return"\\u10DB\\u10D0\\u10E1\\u10D8\\u10D5\\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return(i={string:"\\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",boolean:"\\u10D1\\u10E3\\u10DA\\u10D4\\u10D0\\u10DC\\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\\u10E4\\u10E3\\u10DC\\u10E5\\u10EA\\u10D8\\u10D0"}[r])!=null?i:r},qs=()=>{let e={string:{unit:"\\u10E1\\u10D8\\u10DB\\u10D1\\u10DD\\u10DA\\u10DD",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},file:{unit:"\\u10D1\\u10D0\\u10D8\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},array:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"},set:{unit:"\\u10D4\\u10DA\\u10D4\\u10DB\\u10D4\\u10DC\\u10E2\\u10D8",verb:"\\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0",email:"\\u10D4\\u10DA-\\u10E4\\u10DD\\u10E1\\u10E2\\u10D8\\u10E1 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",url:"URL",emoji:"\\u10D4\\u10DB\\u10DD\\u10EF\\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8-\\u10D3\\u10E0\\u10DD",date:"\\u10D7\\u10D0\\u10E0\\u10D8\\u10E6\\u10D8",time:"\\u10D3\\u10E0\\u10DD",duration:"\\u10EE\\u10D0\\u10DC\\u10D2\\u10E0\\u10EB\\u10DA\\u10D8\\u10D5\\u10DD\\u10D1\\u10D0",ipv4:"IPv4 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",ipv6:"IPv6 \\u10DB\\u10D8\\u10E1\\u10D0\\u10DB\\u10D0\\u10E0\\u10D7\\u10D8",cidrv4:"IPv4 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",cidrv6:"IPv6 \\u10D3\\u10D8\\u10D0\\u10DE\\u10D0\\u10D6\\u10DD\\u10DC\\u10D8",base64:"base64-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",base64url:"base64url-\\u10D9\\u10DD\\u10D3\\u10D8\\u10E0\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",json_string:"JSON \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8",e164:"E.164 \\u10DC\\u10DD\\u10DB\\u10D4\\u10E0\\u10D8",jwt:"JWT",template_literal:"\\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"};return i=>{var t,o,u;switch(i.code){case"invalid_type":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.expected,", \\u10DB\\u10D8\\u10E6\\u10D4\\u10D1\\u10E3\\u10DA\\u10D8 ").concat(Xs(i.input));case"invalid_value":return i.values.length===1?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(b(i.values[0])):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D5\\u10D0\\u10E0\\u10D8\\u10D0\\u10DC\\u10E2\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8\\u10D0 \\u10D4\\u10E0\\u10D7-\\u10D4\\u10E0\\u10D7\\u10D8 ".concat(p(i.values,"|"),"-\\u10D3\\u10D0\\u10DC");case"too_big":{let l=i.inclusive?"<=":"<",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((t=i.origin)!=null?t:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," ").concat(c.verb," ").concat(l).concat(i.maximum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10D3\\u10D8\\u10D3\\u10D8: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat((o=i.origin)!=null?o:"\\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0"," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(l).concat(i.maximum.toString())}case"too_small":{let l=i.inclusive?">=":">",c=r(i.origin);return c?"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," ").concat(c.verb," ").concat(l).concat(i.minimum.toString()," ").concat(c.unit):"\\u10D6\\u10D4\\u10D3\\u10DB\\u10D4\\u10E2\\u10D0\\u10D3 \\u10DE\\u10D0\\u10E2\\u10D0\\u10E0\\u10D0: \\u10DB\\u10DD\\u10E1\\u10D0\\u10DA\\u10DD\\u10D3\\u10DC\\u10D4\\u10DA\\u10D8 ".concat(i.origin," \\u10D8\\u10E7\\u10DD\\u10E1 ").concat(l).concat(i.minimum.toString())}case"invalid_format":{let l=i;return l.format==="starts_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10EC\\u10E7\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(l.prefix,\'"-\\u10D8\\u10D7\'):l.format==="ends_with"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10DB\\u10D7\\u10D0\\u10D5\\u10E0\\u10D3\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 "\'.concat(l.suffix,\'"-\\u10D8\\u10D7\'):l.format==="includes"?\'\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D8\\u10EA\\u10D0\\u10D5\\u10D3\\u10D4\\u10E1 "\'.concat(l.includes,\'"-\\u10E1\'):l.format==="regex"?"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E1\\u10E2\\u10E0\\u10D8\\u10DC\\u10D2\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10E8\\u10D4\\u10D4\\u10E1\\u10D0\\u10D1\\u10D0\\u10DB\\u10D4\\u10D1\\u10DD\\u10D3\\u10D4\\u10E1 \\u10E8\\u10D0\\u10D1\\u10DA\\u10DD\\u10DC\\u10E1 ".concat(l.pattern):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 ".concat((u=n[l.format])!=null?u:i.format)}case"not_multiple_of":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E0\\u10D8\\u10EA\\u10EE\\u10D5\\u10D8: \\u10E3\\u10DC\\u10D3\\u10D0 \\u10D8\\u10E7\\u10DD\\u10E1 ".concat(i.divisor,"-\\u10D8\\u10E1 \\u10EF\\u10D4\\u10E0\\u10D0\\u10D3\\u10D8");case"unrecognized_keys":return"\\u10E3\\u10EA\\u10DC\\u10DD\\u10D1\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1".concat(i.keys.length>1?"\\u10D4\\u10D1\\u10D8":"\\u10D8",": ").concat(p(i.keys,", "));case"invalid_key":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10D2\\u10D0\\u10E1\\u10D0\\u10E6\\u10D4\\u10D1\\u10D8 ".concat(i.origin,"-\\u10E8\\u10D8");case"invalid_union":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0";case"invalid_element":return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10DB\\u10DC\\u10D8\\u10E8\\u10D5\\u10DC\\u10D4\\u10DA\\u10DD\\u10D1\\u10D0 ".concat(i.origin,"-\\u10E8\\u10D8");default:return"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 \\u10E8\\u10D4\\u10E7\\u10D5\\u10D0\\u10DC\\u10D0"}}};function Wu(){return{localeError:qs()}}var Ys=()=>{let e={string:{unit:"\\u178F\\u17BD\\u17A2\\u1780\\u17D2\\u179F\\u179A",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},file:{unit:"\\u1794\\u17C3",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},array:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"},set:{unit:"\\u1792\\u17B6\\u178F\\u17BB",verb:"\\u1782\\u17BD\\u179A\\u1798\\u17B6\\u1793"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u1798\\u17B7\\u1793\\u1798\\u17C2\\u1793\\u1787\\u17B6\\u179B\\u17C1\\u1781 (NaN)":"\\u179B\\u17C1\\u1781";case"object":{if(Array.isArray(t))return"\\u17A2\\u17B6\\u179A\\u17C1 (Array)";if(t===null)return"\\u1782\\u17D2\\u1798\\u17B6\\u1793\\u178F\\u1798\\u17D2\\u179B\\u17C3 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B",email:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793\\u17A2\\u17CA\\u17B8\\u1798\\u17C2\\u179B",url:"URL",emoji:"\\u179F\\u1789\\u17D2\\u1789\\u17B6\\u17A2\\u17B6\\u179A\\u1798\\u17D2\\u1798\\u178E\\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 \\u1793\\u17B7\\u1784\\u1798\\u17C9\\u17C4\\u1784 ISO",date:"\\u1780\\u17B6\\u179B\\u1794\\u179A\\u17B7\\u1785\\u17D2\\u1786\\u17C1\\u1791 ISO",time:"\\u1798\\u17C9\\u17C4\\u1784 ISO",duration:"\\u179A\\u1799\\u17C8\\u1796\\u17C1\\u179B ISO",ipv4:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",ipv6:"\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",cidrv4:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv4",cidrv6:"\\u178A\\u17C2\\u1793\\u17A2\\u17B6\\u179F\\u1799\\u178A\\u17D2\\u178B\\u17B6\\u1793 IPv6",base64:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64",base64url:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u17A2\\u17CA\\u17B7\\u1780\\u17BC\\u178A base64url",json_string:"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A JSON",e164:"\\u179B\\u17C1\\u1781 E.164",jwt:"JWT",template_literal:"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.expected," \\u1794\\u17C9\\u17BB\\u1793\\u17D2\\u178F\\u17C2\\u1791\\u1791\\u17BD\\u179B\\u1794\\u17B6\\u1793 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1794\\u1789\\u17D2\\u1785\\u17BC\\u179B\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(b(t.values[0])):"\\u1787\\u1798\\u17D2\\u179A\\u17BE\\u179F\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1787\\u17B6\\u1798\\u17BD\\u1799\\u1780\\u17D2\\u1793\\u17BB\\u1784\\u1785\\u17C6\\u178E\\u17C4\\u1798 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((o=t.origin)!=null?o:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u1792\\u17B6\\u178F\\u17BB"):"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((l=t.origin)!=null?l:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u178F\\u17BC\\u1785\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat(t.origin," ").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1785\\u17B6\\u1794\\u17CB\\u1795\\u17D2\\u178F\\u17BE\\u1798\\u178A\\u17C4\\u1799 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1794\\u1789\\u17D2\\u1785\\u1794\\u17CB\\u178A\\u17C4\\u1799 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1798\\u17B6\\u1793 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u1781\\u17D2\\u179F\\u17C2\\u17A2\\u1780\\u17D2\\u179F\\u179A\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1795\\u17D2\\u1782\\u17BC\\u1795\\u17D2\\u1782\\u1784\\u1793\\u17B9\\u1784\\u1791\\u1798\\u17D2\\u179A\\u1784\\u17CB\\u178A\\u17C2\\u179B\\u1794\\u17B6\\u1793\\u1780\\u17C6\\u178E\\u178F\\u17CB ".concat(a.pattern):"\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u179B\\u17C1\\u1781\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u178F\\u17C2\\u1787\\u17B6\\u1796\\u17A0\\u17BB\\u1782\\u17BB\\u178E\\u1793\\u17C3 ".concat(t.divisor);case"unrecognized_keys":return"\\u179A\\u1780\\u1783\\u17BE\\u1789\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u179F\\u17D2\\u1782\\u17B6\\u179B\\u17CB\\u17D6 ".concat(p(t.keys,", "));case"invalid_key":return"\\u179F\\u17C4\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);case"invalid_union":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C";case"invalid_element":return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1793\\u17C5\\u1780\\u17D2\\u1793\\u17BB\\u1784 ".concat(t.origin);default:return"\\u1791\\u17B7\\u1793\\u17D2\\u1793\\u1793\\u17D0\\u1799\\u1798\\u17B7\\u1793\\u178F\\u17D2\\u179A\\u17B9\\u1798\\u178F\\u17D2\\u179A\\u17BC\\u179C"}}};function rr(){return{localeError:Ys()}}function Xu(){return rr()}var Qs=()=>{let e={string:{unit:"\\uBB38\\uC790",verb:"to have"},file:{unit:"\\uBC14\\uC774\\uD2B8",verb:"to have"},array:{unit:"\\uAC1C",verb:"to have"},set:{unit:"\\uAC1C",verb:"to have"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\uC785\\uB825",email:"\\uC774\\uBA54\\uC77C \\uC8FC\\uC18C",url:"URL",emoji:"\\uC774\\uBAA8\\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\uB0A0\\uC9DC\\uC2DC\\uAC04",date:"ISO \\uB0A0\\uC9DC",time:"ISO \\uC2DC\\uAC04",duration:"ISO \\uAE30\\uAC04",ipv4:"IPv4 \\uC8FC\\uC18C",ipv6:"IPv6 \\uC8FC\\uC18C",cidrv4:"IPv4 \\uBC94\\uC704",cidrv6:"IPv6 \\uBC94\\uC704",base64:"base64 \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",base64url:"base64url \\uC778\\uCF54\\uB529 \\uBB38\\uC790\\uC5F4",json_string:"JSON \\uBB38\\uC790\\uC5F4",e164:"E.164 \\uBC88\\uD638",jwt:"JWT",template_literal:"\\uC785\\uB825"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uC608\\uC0C1 \\uD0C0\\uC785\\uC740 ".concat(t.expected,", \\uBC1B\\uC740 \\uD0C0\\uC785\\uC740 ").concat(n(t.input),"\\uC785\\uB2C8\\uB2E4");case"invalid_value":return t.values.length===1?"\\uC798\\uBABB\\uB41C \\uC785\\uB825: \\uAC12\\uC740 ".concat(b(t.values[0])," \\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C \\uC635\\uC158: ".concat(p(t.values,"\\uB610\\uB294 ")," \\uC911 \\uD558\\uB098\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"too_big":{let f=t.inclusive?"\\uC774\\uD558":"\\uBBF8\\uB9CC",h=f==="\\uBBF8\\uB9CC"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(o=x==null?void 0:x.unit)!=null?o:"\\uC694\\uC18C";return x?"".concat((u=t.origin)!=null?u:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()).concat(S," ").concat(f).concat(h):"".concat((l=t.origin)!=null?l:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uD07D\\uB2C8\\uB2E4: ").concat(t.maximum.toString()," ").concat(f).concat(h)}case"too_small":{let f=t.inclusive?"\\uC774\\uC0C1":"\\uCD08\\uACFC",h=f==="\\uC774\\uC0C1"?"\\uC774\\uC5B4\\uC57C \\uD569\\uB2C8\\uB2E4":"\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4",x=r(t.origin),S=(c=x==null?void 0:x.unit)!=null?c:"\\uC694\\uC18C";return x?"".concat((a=t.origin)!=null?a:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()).concat(S," ").concat(f).concat(h):"".concat((s=t.origin)!=null?s:"\\uAC12","\\uC774 \\uB108\\uBB34 \\uC791\\uC2B5\\uB2C8\\uB2E4: ").concat(t.minimum.toString()," ").concat(f).concat(h)}case"invalid_format":{let f=t;return f.format==="starts_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.prefix,\'"(\\uC73C)\\uB85C \\uC2DC\\uC791\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="ends_with"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.suffix,\'"(\\uC73C)\\uB85C \\uB05D\\uB098\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="includes"?\'\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: "\'.concat(f.includes,\'"\\uC744(\\uB97C) \\uD3EC\\uD568\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4\'):f.format==="regex"?"\\uC798\\uBABB\\uB41C \\uBB38\\uC790\\uC5F4: \\uC815\\uADDC\\uC2DD ".concat(f.pattern," \\uD328\\uD134\\uACFC \\uC77C\\uCE58\\uD574\\uC57C \\uD569\\uB2C8\\uB2E4"):"\\uC798\\uBABB\\uB41C ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"\\uC798\\uBABB\\uB41C \\uC22B\\uC790: ".concat(t.divisor,"\\uC758 \\uBC30\\uC218\\uC5EC\\uC57C \\uD569\\uB2C8\\uB2E4");case"unrecognized_keys":return"\\uC778\\uC2DD\\uD560 \\uC218 \\uC5C6\\uB294 \\uD0A4: ".concat(p(t.keys,", "));case"invalid_key":return"\\uC798\\uBABB\\uB41C \\uD0A4: ".concat(t.origin);case"invalid_union":return"\\uC798\\uBABB\\uB41C \\uC785\\uB825";case"invalid_element":return"\\uC798\\uBABB\\uB41C \\uAC12: ".concat(t.origin);default:return"\\uC798\\uBABB\\uB41C \\uC785\\uB825"}}};function qu(){return{localeError:Qs()}}var Hs=e=>ut(typeof e,e),ut=(e,r=void 0)=>{switch(e){case"number":return Number.isNaN(r)?"NaN":"skai\\u010Dius";case"bigint":return"sveikasis skai\\u010Dius";case"string":return"eilut\\u0117";case"boolean":return"login\\u0117 reik\\u0161m\\u0117";case"undefined":case"void":return"neapibr\\u0117\\u017Eta reik\\u0161m\\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return r===void 0?"ne\\u017Einomas objektas":r===null?"nulin\\u0117 reik\\u0161m\\u0117":Array.isArray(r)?"masyvas":Object.getPrototypeOf(r)!==Object.prototype&&r.constructor?r.constructor.name:"objektas";case"null":return"nulin\\u0117 reik\\u0161m\\u0117"}return e},at=e=>e.charAt(0).toUpperCase()+e.slice(1);function Yu(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var ed=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne ilgesn\\u0117 kaip",notInclusive:"turi b\\u016Bti trumpesn\\u0117 kaip"},bigger:{inclusive:"turi b\\u016Bti ne trumpesn\\u0117 kaip",notInclusive:"turi b\\u016Bti ilgesn\\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\\u0173"},verb:{smaller:{inclusive:"turi b\\u016Bti ne didesnis kaip",notInclusive:"turi b\\u016Bti ma\\u017Eesnis kaip"},bigger:{inclusive:"turi b\\u016Bti ne ma\\u017Eesnis kaip",notInclusive:"turi b\\u016Bti didesnis kaip"}}},array:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}},set:{unit:{one:"element\\u0105",few:"elementus",many:"element\\u0173"},verb:{smaller:{inclusive:"turi tur\\u0117ti ne daugiau kaip",notInclusive:"turi tur\\u0117ti ma\\u017Eiau kaip"},bigger:{inclusive:"turi tur\\u0117ti ne ma\\u017Eiau kaip",notInclusive:"turi tur\\u0117ti daugiau kaip"}}}};function r(i,t,o,u){var c;let l=(c=e[i])!=null?c:null;return l===null?l:{unit:l.unit[t],verb:l.verb[u][o?"inclusive":"notInclusive"]}}let n={regex:"\\u012Fvestis",email:"el. pa\\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\\u017Ekoduota eilut\\u0117",base64url:"base64url u\\u017Ekoduota eilut\\u0117",json_string:"JSON eilut\\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\\u012Fvestis"};return i=>{var t,o,u,l,c,a,s,v,f,h;switch(i.code){case"invalid_type":return"Gautas tipas ".concat(Hs(i.input),", o tik\\u0117tasi - ").concat(ut(i.expected));case"invalid_value":return i.values.length===1?"Privalo b\\u016Bti ".concat(b(i.values[0])):"Privalo b\\u016Bti vienas i\\u0161 ".concat(p(i.values,"|")," pasirinkim\\u0173");case"too_big":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.maximum)),(t=i.inclusive)!=null?t:!1,"smaller");if(S!=null&&S.verb)return"".concat(at((o=x!=null?x:i.origin)!=null?o:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.maximum.toString()," ").concat((u=S.unit)!=null?u:"element\\u0173");let I=i.inclusive?"ne didesnis kaip":"ma\\u017Eesnis kaip";return"".concat(at((l=x!=null?x:i.origin)!=null?l:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.maximum.toString()," ").concat(S==null?void 0:S.unit)}case"too_small":{let x=ut(i.origin),S=r(i.origin,Yu(Number(i.minimum)),(c=i.inclusive)!=null?c:!1,"bigger");if(S!=null&&S.verb)return"".concat(at((a=x!=null?x:i.origin)!=null?a:"reik\\u0161m\\u0117")," ").concat(S.verb," ").concat(i.minimum.toString()," ").concat((s=S.unit)!=null?s:"element\\u0173");let I=i.inclusive?"ne ma\\u017Eesnis kaip":"didesnis kaip";return"".concat(at((v=x!=null?x:i.origin)!=null?v:"reik\\u0161m\\u0117")," turi b\\u016Bti ").concat(I," ").concat(i.minimum.toString()," ").concat(S==null?void 0:S.unit)}case"invalid_format":{let x=i;return x.format==="starts_with"?\'Eilut\\u0117 privalo prasid\\u0117ti "\'.concat(x.prefix,\'"\'):x.format==="ends_with"?\'Eilut\\u0117 privalo pasibaigti "\'.concat(x.suffix,\'"\'):x.format==="includes"?\'Eilut\\u0117 privalo \\u012Ftraukti "\'.concat(x.includes,\'"\'):x.format==="regex"?"Eilut\\u0117 privalo atitikti ".concat(x.pattern):"Neteisingas ".concat((f=n[x.format])!=null?f:i.format)}case"not_multiple_of":return"Skai\\u010Dius privalo b\\u016Bti ".concat(i.divisor," kartotinis.");case"unrecognized_keys":return"Neatpa\\u017Eint".concat(i.keys.length>1?"i":"as"," rakt").concat(i.keys.length>1?"ai":"as",": ").concat(p(i.keys,", "));case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \\u012Fvestis";case"invalid_element":{let x=ut(i.origin);return"".concat(at((h=x!=null?x:i.origin)!=null?h:"reik\\u0161m\\u0117")," turi klaiding\\u0105 \\u012Fvest\\u012F")}default:return"Klaidinga \\u012Fvestis"}}};function Qu(){return{localeError:ed()}}var td=()=>{let e={string:{unit:"\\u0437\\u043D\\u0430\\u0446\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},file:{unit:"\\u0431\\u0430\\u0458\\u0442\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},array:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"},set:{unit:"\\u0441\\u0442\\u0430\\u0432\\u043A\\u0438",verb:"\\u0434\\u0430 \\u0438\\u043C\\u0430\\u0430\\u0442"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0431\\u0440\\u043E\\u0458";case"object":{if(Array.isArray(t))return"\\u043D\\u0438\\u0437\\u0430";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u043D\\u0435\\u0441",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u043D\\u0430 \\u0435-\\u043F\\u043E\\u0448\\u0442\\u0430",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u045F\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C \\u0438 \\u0432\\u0440\\u0435\\u043C\\u0435",date:"ISO \\u0434\\u0430\\u0442\\u0443\\u043C",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435",duration:"ISO \\u0432\\u0440\\u0435\\u043C\\u0435\\u0442\\u0440\\u0430\\u0435\\u045A\\u0435",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441\\u0430",cidrv4:"IPv4 \\u043E\\u043F\\u0441\\u0435\\u0433",cidrv6:"IPv6 \\u043E\\u043F\\u0441\\u0435\\u0433",base64:"base64-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",base64url:"base64url-\\u0435\\u043D\\u043A\\u043E\\u0434\\u0438\\u0440\\u0430\\u043D\\u0430 \\u043D\\u0438\\u0437\\u0430",json_string:"JSON \\u043D\\u0438\\u0437\\u0430",e164:"E.164 \\u0431\\u0440\\u043E\\u0458",jwt:"JWT",template_literal:"\\u0432\\u043D\\u0435\\u0441"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.expected,", \\u043F\\u0440\\u0438\\u043C\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Invalid input: expected ".concat(b(t.values[0])):"\\u0413\\u0440\\u0435\\u0448\\u0430\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0438\\u0458\\u0430: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 \\u0435\\u0434\\u043D\\u0430 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((o=t.origin)!=null?o:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0438"):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u0433\\u043E\\u043B\\u0435\\u043C: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat((l=t.origin)!=null?l:"\\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442\\u0430"," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0438\\u043C\\u0430 ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u041F\\u0440\\u0435\\u043C\\u043D\\u043E\\u0433\\u0443 \\u043C\\u0430\\u043B: \\u0441\\u0435 \\u043E\\u0447\\u0435\\u043A\\u0443\\u0432\\u0430 ".concat(t.origin," \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u043F\\u043E\\u0447\\u043D\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0437\\u0430\\u0432\\u0440\\u0448\\u0443\\u0432\\u0430 \\u0441\\u043E "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0432\\u043A\\u043B\\u0443\\u0447\\u0443\\u0432\\u0430 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u0432\\u0430\\u0436\\u0435\\u0447\\u043A\\u0430 \\u043D\\u0438\\u0437\\u0430: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u043E\\u0434\\u0433\\u043E\\u0430\\u0440\\u0430 \\u043D\\u0430 \\u043F\\u0430\\u0442\\u0435\\u0440\\u043D\\u043E\\u0442 ".concat(a.pattern):"Invalid ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0431\\u0440\\u043E\\u0458: \\u043C\\u043E\\u0440\\u0430 \\u0434\\u0430 \\u0431\\u0438\\u0434\\u0435 \\u0434\\u0435\\u043B\\u0438\\u0432 \\u0441\\u043E ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D\\u0438 \\u043A\\u043B\\u0443\\u0447\\u0435\\u0432\\u0438":"\\u041D\\u0435\\u043F\\u0440\\u0435\\u043F\\u043E\\u0437\\u043D\\u0430\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u043A\\u043B\\u0443\\u0447 \\u0432\\u043E ".concat(t.origin);case"invalid_union":return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441";case"invalid_element":return"\\u0413\\u0440\\u0435\\u0448\\u043D\\u0430 \\u0432\\u0440\\u0435\\u0434\\u043D\\u043E\\u0441\\u0442 \\u0432\\u043E ".concat(t.origin);default:return"\\u0413\\u0440\\u0435\\u0448\\u0435\\u043D \\u0432\\u043D\\u0435\\u0441"}}};function Hu(){return{localeError:td()}}var rd=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Input tidak sah: dijangka ".concat(t.expected,", diterima ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Input tidak sah: dijangka ".concat(b(t.values[0])):"Pilihan tidak sah: dijangka salah satu daripada ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Terlalu besar: dijangka ".concat((o=t.origin)!=null?o:"nilai"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elemen"):"Terlalu besar: dijangka ".concat((l=t.origin)!=null?l:"nilai"," adalah ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Terlalu kecil: dijangka ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Terlalu kecil: dijangka ".concat(t.origin," adalah ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'String tidak sah: mesti bermula dengan "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'String tidak sah: mesti berakhir dengan "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'String tidak sah: mesti mengandungi "\'.concat(a.includes,\'"\'):a.format==="regex"?"String tidak sah: mesti sepadan dengan corak ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," tidak sah")}case"not_multiple_of":return"Nombor tidak sah: perlu gandaan ".concat(t.divisor);case"unrecognized_keys":return"Kunci tidak dikenali: ".concat(p(t.keys,", "));case"invalid_key":return"Kunci tidak sah dalam ".concat(t.origin);case"invalid_union":return"Input tidak sah";case"invalid_element":return"Nilai tidak sah dalam ".concat(t.origin);default:return"Input tidak sah"}}};function ec(){return{localeError:rd()}}var nd=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ongeldige invoer: verwacht ".concat(t.expected,", ontving ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ongeldige invoer: verwacht ".concat(b(t.values[0])):"Ongeldige optie: verwacht \\xE9\\xE9n van ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Te lang: verwacht dat ".concat((o=t.origin)!=null?o:"waarde"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementen"," bevat"):"Te lang: verwacht dat ".concat((l=t.origin)!=null?l:"waarde"," ").concat(a).concat(t.maximum.toString()," is")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," bevat"):"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," is")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ongeldige tekst: moet met "\'.concat(a.prefix,\'" beginnen\'):a.format==="ends_with"?\'Ongeldige tekst: moet op "\'.concat(a.suffix,\'" eindigen\'):a.format==="includes"?\'Ongeldige tekst: moet "\'.concat(a.includes,\'" bevatten\'):a.format==="regex"?"Ongeldige tekst: moet overeenkomen met patroon ".concat(a.pattern):"Ongeldig: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ongeldig getal: moet een veelvoud van ".concat(t.divisor," zijn");case"unrecognized_keys":return"Onbekende key".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Ongeldige key in ".concat(t.origin);case"invalid_union":return"Ongeldige invoer";case"invalid_element":return"Ongeldige waarde in ".concat(t.origin);default:return"Ongeldige invoer"}}};function tc(){return{localeError:nd()}}var id=()=>{let e={string:{unit:"tegn",verb:"\\xE5 ha"},file:{unit:"bytes",verb:"\\xE5 ha"},array:{unit:"elementer",verb:"\\xE5 inneholde"},set:{unit:"elementer",verb:"\\xE5 inneholde"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\\xE5de",ipv6:"IPv6-omr\\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Ugyldig input: forventet ".concat(t.expected,", fikk ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ugyldig verdi: forventet ".concat(b(t.values[0])):"Ugyldig valg: forventet en av ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"For stor(t): forventet ".concat((o=t.origin)!=null?o:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementer"):"For stor(t): forventet ".concat((l=t.origin)!=null?l:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Ugyldig streng: m\\xE5 starte med "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Ugyldig streng: m\\xE5 ende med "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Ugyldig streng: m\\xE5 inneholde "\'.concat(a.includes,\'"\'):a.format==="regex"?"Ugyldig streng: m\\xE5 matche m\\xF8nsteret ".concat(a.pattern):"Ugyldig ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Ugyldig tall: m\\xE5 v\\xE6re et multiplum av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ukjente n\\xF8kler":"Ukjent n\\xF8kkel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ugyldig n\\xF8kkel i ".concat(t.origin);case"invalid_union":return"Ugyldig input";case"invalid_element":return"Ugyldig verdi i ".concat(t.origin);default:return"Ugyldig input"}}};function rc(){return{localeError:id()}}var od=()=>{let e={string:{unit:"harf",verb:"olmal\\u0131d\\u0131r"},file:{unit:"bayt",verb:"olmal\\u0131d\\u0131r"},array:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"},set:{unit:"unsur",verb:"olmal\\u0131d\\u0131r"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"giren",email:"epostag\\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\\xE2m\\u0131",date:"ISO tarihi",time:"ISO zaman\\u0131",duration:"ISO m\\xFCddeti",ipv4:"IPv4 ni\\u015F\\xE2n\\u0131",ipv6:"IPv6 ni\\u015F\\xE2n\\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\\u015Fifreli metin",base64url:"base64url-\\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"giren"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"F\\xE2sit giren: umulan ".concat(t.expected,", al\\u0131nan ").concat(n(t.input));case"invalid_value":return t.values.length===1?"F\\xE2sit giren: umulan ".concat(b(t.values[0])):"F\\xE2sit tercih: m\\xFBteberler ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Fazla b\\xFCy\\xFCk: ".concat((o=t.origin)!=null?o:"value",", ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elements"," sahip olmal\\u0131yd\\u0131."):"Fazla b\\xFCy\\xFCk: ".concat((l=t.origin)!=null?l:"value",", ").concat(a).concat(t.maximum.toString()," olmal\\u0131yd\\u0131.")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," sahip olmal\\u0131yd\\u0131."):"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," olmal\\u0131yd\\u0131.")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'F\\xE2sit metin: "\'.concat(a.prefix,\'" ile ba\\u015Flamal\\u0131.\'):a.format==="ends_with"?\'F\\xE2sit metin: "\'.concat(a.suffix,\'" ile bitmeli.\'):a.format==="includes"?\'F\\xE2sit metin: "\'.concat(a.includes,\'" ihtiv\\xE2 etmeli.\'):a.format==="regex"?"F\\xE2sit metin: ".concat(a.pattern," nak\\u015F\\u0131na uymal\\u0131."):"F\\xE2sit ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"F\\xE2sit say\\u0131: ".concat(t.divisor," kat\\u0131 olmal\\u0131yd\\u0131.");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar ".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan anahtar var.");case"invalid_union":return"Giren tan\\u0131namad\\u0131.";case"invalid_element":return"".concat(t.origin," i\\xE7in tan\\u0131nmayan k\\u0131ymet var.");default:return"K\\u0131ymet tan\\u0131namad\\u0131."}}};function nc(){return{localeError:od()}}var ad=()=>{let e={string:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},file:{unit:"\\u0628\\u0627\\u06CC\\u067C\\u0633",verb:"\\u0648\\u0644\\u0631\\u064A"},array:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"},set:{unit:"\\u062A\\u0648\\u06A9\\u064A",verb:"\\u0648\\u0644\\u0631\\u064A"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0639\\u062F\\u062F";case"object":{if(Array.isArray(t))return"\\u0627\\u0631\\u06D0";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0648\\u0631\\u0648\\u062F\\u064A",email:"\\u0628\\u0631\\u06CC\\u069A\\u0646\\u0627\\u0644\\u06CC\\u06A9",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0646\\u06CC\\u067C\\u0647 \\u0627\\u0648 \\u0648\\u062E\\u062A",date:"\\u0646\\u06D0\\u067C\\u0647",time:"\\u0648\\u062E\\u062A",duration:"\\u0645\\u0648\\u062F\\u0647",ipv4:"\\u062F IPv4 \\u067E\\u062A\\u0647",ipv6:"\\u062F IPv6 \\u067E\\u062A\\u0647",cidrv4:"\\u062F IPv4 \\u0633\\u0627\\u062D\\u0647",cidrv6:"\\u062F IPv6 \\u0633\\u0627\\u062D\\u0647",base64:"base64-encoded \\u0645\\u062A\\u0646",base64url:"base64url-encoded \\u0645\\u062A\\u0646",json_string:"JSON \\u0645\\u062A\\u0646",e164:"\\u062F E.164 \\u0634\\u0645\\u06D0\\u0631\\u0647",jwt:"JWT",template_literal:"\\u0648\\u0631\\u0648\\u062F\\u064A"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(t.expected," \\u0648\\u0627\\u06CC, \\u0645\\u06AB\\u0631 ").concat(n(t.input)," \\u062A\\u0631\\u0644\\u0627\\u0633\\u0647 \\u0634\\u0648");case"invalid_value":return t.values.length===1?"\\u0646\\u0627\\u0633\\u0645 \\u0648\\u0631\\u0648\\u062F\\u064A: \\u0628\\u0627\\u06CC\\u062F ".concat(b(t.values[0])," \\u0648\\u0627\\u06CC"):"\\u0646\\u0627\\u0633\\u0645 \\u0627\\u0646\\u062A\\u062E\\u0627\\u0628: \\u0628\\u0627\\u06CC\\u062F \\u06CC\\u0648 \\u0644\\u0647 ".concat(p(t.values,"|")," \\u0685\\u062E\\u0647 \\u0648\\u0627\\u06CC");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((o=t.origin)!=null?o:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631\\u0648\\u0646\\u0647"," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((l=t.origin)!=null?l:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0648\\u064A")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," \\u0648\\u064A")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.prefix,\'" \\u0633\\u0631\\u0647 \\u067E\\u06CC\\u0644 \\u0634\\u064A\'):a.format==="ends_with"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F "\'.concat(a.suffix,\'" \\u0633\\u0631\\u0647 \\u067E\\u0627\\u06CC \\u062A\\u0647 \\u0648\\u0631\\u0633\\u064A\\u0696\\u064A\'):a.format==="includes"?\'\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F "\'.concat(a.includes,\'" \\u0648\\u0644\\u0631\\u064A\'):a.format==="regex"?"\\u0646\\u0627\\u0633\\u0645 \\u0645\\u062A\\u0646: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(a.pattern," \\u0633\\u0631\\u0647 \\u0645\\u0637\\u0627\\u0628\\u0642\\u062A \\u0648\\u0644\\u0631\\u064A"):"".concat((c=i[a.format])!=null?c:t.format," \\u0646\\u0627\\u0633\\u0645 \\u062F\\u06CC")}case"not_multiple_of":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u062F\\u062F: \\u0628\\u0627\\u06CC\\u062F \\u062F ".concat(t.divisor," \\u0645\\u0636\\u0631\\u0628 \\u0648\\u064A");case"unrecognized_keys":return"\\u0646\\u0627\\u0633\\u0645 ".concat(t.keys.length>1?"\\u06A9\\u0644\\u06CC\\u0689\\u0648\\u0646\\u0647":"\\u06A9\\u0644\\u06CC\\u0689",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u0646\\u0627\\u0633\\u0645 \\u06A9\\u0644\\u06CC\\u0689 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");case"invalid_union":return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A";case"invalid_element":return"\\u0646\\u0627\\u0633\\u0645 \\u0639\\u0646\\u0635\\u0631 \\u067E\\u0647 ".concat(t.origin," \\u06A9\\u06D0");default:return"\\u0646\\u0627\\u0633\\u0645\\u0647 \\u0648\\u0631\\u0648\\u062F\\u064A"}}};function ic(){return{localeError:ad()}}var ud=()=>{let e={string:{unit:"znak\\xF3w",verb:"mie\\u0107"},file:{unit:"bajt\\xF3w",verb:"mie\\u0107"},array:{unit:"element\\xF3w",verb:"mie\\u0107"},set:{unit:"element\\xF3w",verb:"mie\\u0107"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"wyra\\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\\u0105g znak\\xF3w zakodowany w formacie base64",base64url:"ci\\u0105g znak\\xF3w zakodowany w formacie base64url",json_string:"ci\\u0105g znak\\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\\u015Bcie"};return t=>{var o,u,l,c,a,s,v;switch(t.code){case"invalid_type":return"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(t.expected,", otrzymano ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Nieprawid\\u0142owe dane wej\\u015Bciowe: oczekiwano ".concat(b(t.values[0])):"Nieprawid\\u0142owa opcja: oczekiwano jednej z warto\\u015Bci ".concat(p(t.values,"|"));case"too_big":{let f=t.inclusive?"<=":"<",h=r(t.origin);return h?"Za du\\u017Ca warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((o=t.origin)!=null?o:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.maximum.toString()," ").concat((u=h.unit)!=null?u:"element\\xF3w"):"Zbyt du\\u017C(y/a/e): oczekiwano, \\u017Ce ".concat((l=t.origin)!=null?l:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.maximum.toString())}case"too_small":{let f=t.inclusive?">=":">",h=r(t.origin);return h?"Za ma\\u0142a warto\\u015B\\u0107: oczekiwano, \\u017Ce ".concat((c=t.origin)!=null?c:"warto\\u015B\\u0107"," b\\u0119dzie mie\\u0107 ").concat(f).concat(t.minimum.toString()," ").concat((a=h.unit)!=null?a:"element\\xF3w"):"Zbyt ma\\u0142(y/a/e): oczekiwano, \\u017Ce ".concat((s=t.origin)!=null?s:"warto\\u015B\\u0107"," b\\u0119dzie wynosi\\u0107 ").concat(f).concat(t.minimum.toString())}case"invalid_format":{let f=t;return f.format==="starts_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zaczyna\\u0107 si\\u0119 od "\'.concat(f.prefix,\'"\'):f.format==="ends_with"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi ko\\u0144czy\\u0107 si\\u0119 na "\'.concat(f.suffix,\'"\'):f.format==="includes"?\'Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi zawiera\\u0107 "\'.concat(f.includes,\'"\'):f.format==="regex"?"Nieprawid\\u0142owy ci\\u0105g znak\\xF3w: musi odpowiada\\u0107 wzorcowi ".concat(f.pattern):"Nieprawid\\u0142ow(y/a/e) ".concat((v=i[f.format])!=null?v:t.format)}case"not_multiple_of":return"Nieprawid\\u0142owa liczba: musi by\\u0107 wielokrotno\\u015Bci\\u0105 ".concat(t.divisor);case"unrecognized_keys":return"Nierozpoznane klucze".concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Nieprawid\\u0142owy klucz w ".concat(t.origin);case"invalid_union":return"Nieprawid\\u0142owe dane wej\\u015Bciowe";case"invalid_element":return"Nieprawid\\u0142owa warto\\u015B\\u0107 w ".concat(t.origin);default:return"Nieprawid\\u0142owe dane wej\\u015Bciowe"}}};function oc(){return{localeError:ud()}}var cd=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\xFAmero";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"padr\\xE3o",email:"endere\\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\\xE7\\xE3o ISO",ipv4:"endere\\xE7o IPv4",ipv6:"endere\\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Tipo inv\\xE1lido: esperado ".concat(t.expected,", recebido ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Entrada inv\\xE1lida: esperado ".concat(b(t.values[0])):"Op\\xE7\\xE3o inv\\xE1lida: esperada uma das ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Muito grande: esperado que ".concat((o=t.origin)!=null?o:"valor"," tivesse ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementos"):"Muito grande: esperado que ".concat((l=t.origin)!=null?l:"valor"," fosse ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Muito pequeno: esperado que ".concat(t.origin," tivesse ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Muito pequeno: esperado que ".concat(t.origin," fosse ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Texto inv\\xE1lido: deve come\\xE7ar com "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Texto inv\\xE1lido: deve terminar com "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Texto inv\\xE1lido: deve incluir "\'.concat(a.includes,\'"\'):a.format==="regex"?"Texto inv\\xE1lido: deve corresponder ao padr\\xE3o ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," inv\\xE1lido")}case"not_multiple_of":return"N\\xFAmero inv\\xE1lido: deve ser m\\xFAltiplo de ".concat(t.divisor);case"unrecognized_keys":return"Chave".concat(t.keys.length>1?"s":""," desconhecida").concat(t.keys.length>1?"s":"",": ").concat(p(t.keys,", "));case"invalid_key":return"Chave inv\\xE1lida em ".concat(t.origin);case"invalid_union":return"Entrada inv\\xE1lida";case"invalid_element":return"Valor inv\\xE1lido em ".concat(t.origin);default:return"Campo inv\\xE1lido"}}};function ac(){return{localeError:cd()}}function uc(e,r,n,i){let t=Math.abs(e),o=t%10,u=t%100;return u>=11&&u<=19?i:o===1?r:o>=2&&o<=4?n:i}var ld=()=>{let e={string:{unit:{one:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B",few:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0430",many:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},file:{unit:{one:"\\u0431\\u0430\\u0439\\u0442",few:"\\u0431\\u0430\\u0439\\u0442\\u0430",many:"\\u0431\\u0430\\u0439\\u0442"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},array:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"},set:{unit:{one:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442",few:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0430",many:"\\u044D\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u043E\\u0432"},verb:"\\u0438\\u043C\\u0435\\u0442\\u044C"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0432\\u043E\\u0434",email:"email \\u0430\\u0434\\u0440\\u0435\\u0441",url:"URL",emoji:"\\u044D\\u043C\\u043E\\u0434\\u0437\\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0434\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F",date:"ISO \\u0434\\u0430\\u0442\\u0430",time:"ISO \\u0432\\u0440\\u0435\\u043C\\u044F",duration:"ISO \\u0434\\u043B\\u0438\\u0442\\u0435\\u043B\\u044C\\u043D\\u043E\\u0441\\u0442\\u044C",ipv4:"IPv4 \\u0430\\u0434\\u0440\\u0435\\u0441",ipv6:"IPv6 \\u0430\\u0434\\u0440\\u0435\\u0441",cidrv4:"IPv4 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",cidrv6:"IPv6 \\u0434\\u0438\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D",base64:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64",base64url:"\\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0432 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0435 base64url",json_string:"JSON \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0432\\u043E\\u0434"};return t=>{var o,u,l;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(t.expected,", \\u043F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0432\\u043E\\u0434: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C ".concat(b(t.values[0])):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0432\\u0430\\u0440\\u0438\\u0430\\u043D\\u0442: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C \\u043E\\u0434\\u043D\\u043E \\u0438\\u0437 ".concat(p(t.values,"|"));case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),v=uc(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.maximum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u0431\\u043E\\u043B\\u044C\\u0448\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat((u=t.origin)!=null?u:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435"," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.maximum.toString())}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),v=uc(s,a.unit.one,a.unit.few,a.unit.many);return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C ").concat(c).concat(t.minimum.toString()," ").concat(v)}return"\\u0421\\u043B\\u0438\\u0448\\u043A\\u043E\\u043C \\u043C\\u0430\\u043B\\u0435\\u043D\\u044C\\u043A\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435: \\u043E\\u0436\\u0438\\u0434\\u0430\\u043B\\u043E\\u0441\\u044C, \\u0447\\u0442\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435\\u0442 ").concat(c).concat(t.minimum.toString())}case"invalid_format":{let c=t;return c.format==="starts_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u043D\\u0430\\u0447\\u0438\\u043D\\u0430\\u0442\\u044C\\u0441\\u044F \\u0441 "\'.concat(c.prefix,\'"\'):c.format==="ends_with"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0437\\u0430\\u043A\\u0430\\u043D\\u0447\\u0438\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043D\\u0430 "\'.concat(c.suffix,\'"\'):c.format==="includes"?\'\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u0434\\u0435\\u0440\\u0436\\u0430\\u0442\\u044C "\'.concat(c.includes,\'"\'):c.format==="regex"?"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430: \\u0434\\u043E\\u043B\\u0436\\u043D\\u0430 \\u0441\\u043E\\u043E\\u0442\\u0432\\u0435\\u0442\\u0441\\u0442\\u0432\\u043E\\u0432\\u0430\\u0442\\u044C \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(c.pattern):"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 ".concat((l=i[c.format])!=null?l:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u0434\\u043E\\u043B\\u0436\\u043D\\u043E \\u0431\\u044B\\u0442\\u044C \\u043A\\u0440\\u0430\\u0442\\u043D\\u044B\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u0430\\u0441\\u043F\\u043E\\u0437\\u043D\\u0430\\u043D\\u043D".concat(t.keys.length>1?"\\u044B\\u0435":"\\u044B\\u0439"," \\u043A\\u043B\\u044E\\u0447").concat(t.keys.length>1?"\\u0438":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0432 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435";case"invalid_element":return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u043E\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u0435 \\u0432 ".concat(t.origin);default:return"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0435 \\u0432\\u0445\\u043E\\u0434\\u043D\\u044B\\u0435 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435"}}};function cc(){return{localeError:ld()}}var sd=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0161tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"vnos",email:"e-po\\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \\u010Das",date:"ISO datum",time:"ISO \\u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \\u0161tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"Neveljaven vnos: pri\\u010Dakovano ".concat(t.expected,", prejeto ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Neveljaven vnos: pri\\u010Dakovano ".concat(b(t.values[0])):"Neveljavna mo\\u017Enost: pri\\u010Dakovano eno izmed ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Preveliko: pri\\u010Dakovano, da bo ".concat((o=t.origin)!=null?o:"vrednost"," imelo ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"elementov"):"Preveliko: pri\\u010Dakovano, da bo ".concat((l=t.origin)!=null?l:"vrednost"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," imelo ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Neveljaven niz: mora se za\\u010Deti z "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Neveljaven niz: mora se kon\\u010Dati z "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Neveljaven niz: mora vsebovati "\'.concat(a.includes,\'"\'):a.format==="regex"?"Neveljaven niz: mora ustrezati vzorcu ".concat(a.pattern):"Neveljaven ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"Neveljavno \\u0161tevilo: mora biti ve\\u010Dkratnik ".concat(t.divisor);case"unrecognized_keys":return"Neprepoznan".concat(t.keys.length>1?"i klju\\u010Di":" klju\\u010D",": ").concat(p(t.keys,", "));case"invalid_key":return"Neveljaven klju\\u010D v ".concat(t.origin);case"invalid_union":return"Neveljaven vnos";case"invalid_element":return"Neveljavna vrednost v ".concat(t.origin);default:return"Neveljaven vnos"}}};function lc(){return{localeError:sd()}}var dd=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\\xE5lla"},set:{unit:"objekt",verb:"att inneh\\xE5lla"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"regulj\\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\\xE4ng",base64url:"base64url-kodad str\\xE4ng",json_string:"JSON-str\\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return t=>{var o,u,l,c,a,s,v,f;switch(t.code){case"invalid_type":return"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(t.expected,", fick ").concat(n(t.input));case"invalid_value":return t.values.length===1?"Ogiltig inmatning: f\\xF6rv\\xE4ntat ".concat(b(t.values[0])):"Ogiltigt val: f\\xF6rv\\xE4ntade en av ".concat(p(t.values,"|"));case"too_big":{let h=t.inclusive?"<=":"<",x=r(t.origin);return x?"F\\xF6r stor(t): f\\xF6rv\\xE4ntade ".concat((o=t.origin)!=null?o:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString()," ").concat((u=x.unit)!=null?u:"element"):"F\\xF6r stor(t): f\\xF6rv\\xE4ntat ".concat((l=t.origin)!=null?l:"v\\xE4rdet"," att ha ").concat(h).concat(t.maximum.toString())}case"too_small":{let h=t.inclusive?">=":">",x=r(t.origin);return x?"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((c=t.origin)!=null?c:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString()," ").concat(x.unit):"F\\xF6r lite(t): f\\xF6rv\\xE4ntade ".concat((a=t.origin)!=null?a:"v\\xE4rdet"," att ha ").concat(h).concat(t.minimum.toString())}case"invalid_format":{let h=t;return h.format==="starts_with"?\'Ogiltig str\\xE4ng: m\\xE5ste b\\xF6rja med "\'.concat(h.prefix,\'"\'):h.format==="ends_with"?\'Ogiltig str\\xE4ng: m\\xE5ste sluta med "\'.concat(h.suffix,\'"\'):h.format==="includes"?\'Ogiltig str\\xE4ng: m\\xE5ste inneh\\xE5lla "\'.concat(h.includes,\'"\'):h.format==="regex"?\'Ogiltig str\\xE4ng: m\\xE5ste matcha m\\xF6nstret "\'.concat(h.pattern,\'"\'):"Ogiltig(t) ".concat((s=i[h.format])!=null?s:t.format)}case"not_multiple_of":return"Ogiltigt tal: m\\xE5ste vara en multipel av ".concat(t.divisor);case"unrecognized_keys":return"".concat(t.keys.length>1?"Ok\\xE4nda nycklar":"Ok\\xE4nd nyckel",": ").concat(p(t.keys,", "));case"invalid_key":return"Ogiltig nyckel i ".concat((v=t.origin)!=null?v:"v\\xE4rdet");case"invalid_union":return"Ogiltig input";case"invalid_element":return"Ogiltigt v\\xE4rde i ".concat((f=t.origin)!=null?f:"v\\xE4rdet");default:return"Ogiltig input"}}};function sc(){return{localeError:dd()}}var md=()=>{let e={string:{unit:"\\u0B8E\\u0BB4\\u0BC1\\u0BA4\\u0BCD\\u0BA4\\u0BC1\\u0B95\\u0BCD\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},file:{unit:"\\u0BAA\\u0BC8\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},array:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"},set:{unit:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD",verb:"\\u0B95\\u0BCA\\u0BA3\\u0BCD\\u0B9F\\u0BBF\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0B8E\\u0BA3\\u0BCD \\u0B85\\u0BB2\\u0BCD\\u0BB2\\u0BBE\\u0BA4\\u0BA4\\u0BC1":"\\u0B8E\\u0BA3\\u0BCD";case"object":{if(Array.isArray(t))return"\\u0B85\\u0BA3\\u0BBF";if(t===null)return"\\u0BB5\\u0BC6\\u0BB1\\u0BC1\\u0BAE\\u0BC8";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1",email:"\\u0BAE\\u0BBF\\u0BA9\\u0BCD\\u0BA9\\u0B9E\\u0BCD\\u0B9A\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",date:"ISO \\u0BA4\\u0BC7\\u0BA4\\u0BBF",time:"ISO \\u0BA8\\u0BC7\\u0BB0\\u0BAE\\u0BCD",duration:"ISO \\u0B95\\u0BBE\\u0BB2 \\u0B85\\u0BB3\\u0BB5\\u0BC1",ipv4:"IPv4 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",ipv6:"IPv6 \\u0BAE\\u0BC1\\u0B95\\u0BB5\\u0BB0\\u0BBF",cidrv4:"IPv4 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",cidrv6:"IPv6 \\u0BB5\\u0BB0\\u0BAE\\u0BCD\\u0BAA\\u0BC1",base64:"base64-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",base64url:"base64url-encoded \\u0B9A\\u0BB0\\u0BAE\\u0BCD",json_string:"JSON \\u0B9A\\u0BB0\\u0BAE\\u0BCD",e164:"E.164 \\u0B8E\\u0BA3\\u0BCD",jwt:"JWT",template_literal:"input"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.expected,", \\u0BAA\\u0BC6\\u0BB1\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(b(t.values[0])):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0BB0\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BAE\\u0BCD: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(p(t.values,"|")," \\u0B87\\u0BB2\\u0BCD \\u0B92\\u0BA9\\u0BCD\\u0BB1\\u0BC1");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((o=t.origin)!=null?o:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0B89\\u0BB1\\u0BC1\\u0BAA\\u0BCD\\u0BAA\\u0BC1\\u0B95\\u0BB3\\u0BCD"," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95 \\u0BAA\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat((l=t.origin)!=null?l:"\\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1"," ").concat(a).concat(t.maximum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BAE\\u0BBF\\u0B95\\u0B9A\\u0BCD \\u0B9A\\u0BBF\\u0BB1\\u0BBF\\u0BAF\\u0BA4\\u0BC1: \\u0B8E\\u0BA4\\u0BBF\\u0BB0\\u0BCD\\u0BAA\\u0BBE\\u0BB0\\u0BCD\\u0B95\\u0BCD\\u0B95\\u0BAA\\u0BCD\\u0BAA\\u0B9F\\u0BCD\\u0B9F\\u0BA4\\u0BC1 ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," \\u0B86\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.prefix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BCA\\u0B9F\\u0B99\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="ends_with"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.suffix,\'" \\u0B87\\u0BB2\\u0BCD \\u0BAE\\u0BC1\\u0B9F\\u0BBF\\u0BB5\\u0B9F\\u0BC8\\u0BAF \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="includes"?\'\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: "\'.concat(a.includes,\'" \\u0B90 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0B9F\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD\'):a.format==="regex"?"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B9A\\u0BB0\\u0BAE\\u0BCD: ".concat(a.pattern," \\u0BAE\\u0BC1\\u0BB1\\u0BC8\\u0BAA\\u0BBE\\u0B9F\\u0BCD\\u0B9F\\u0BC1\\u0B9F\\u0BA9\\u0BCD \\u0BAA\\u0BCA\\u0BB0\\u0BC1\\u0BA8\\u0BCD\\u0BA4 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD"):"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B8E\\u0BA3\\u0BCD: ".concat(t.divisor," \\u0B87\\u0BA9\\u0BCD \\u0BAA\\u0BB2\\u0BAE\\u0BBE\\u0B95 \\u0B87\\u0BB0\\u0BC1\\u0B95\\u0BCD\\u0B95 \\u0BB5\\u0BC7\\u0BA3\\u0BCD\\u0B9F\\u0BC1\\u0BAE\\u0BCD");case"unrecognized_keys":return"\\u0B85\\u0B9F\\u0BC8\\u0BAF\\u0BBE\\u0BB3\\u0BAE\\u0BCD \\u0BA4\\u0BC6\\u0BB0\\u0BBF\\u0BAF\\u0BBE\\u0BA4 \\u0BB5\\u0BBF\\u0B9A\\u0BC8".concat(t.keys.length>1?"\\u0B95\\u0BB3\\u0BCD":"",": ").concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BB5\\u0BBF\\u0B9A\\u0BC8");case"invalid_union":return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1";case"invalid_element":return"".concat(t.origin," \\u0B87\\u0BB2\\u0BCD \\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0BAE\\u0BA4\\u0BBF\\u0BAA\\u0BCD\\u0BAA\\u0BC1");default:return"\\u0BA4\\u0BB5\\u0BB1\\u0BBE\\u0BA9 \\u0B89\\u0BB3\\u0BCD\\u0BB3\\u0BC0\\u0B9F\\u0BC1"}}};function dc(){return{localeError:md()}}var fd=()=>{let e={string:{unit:"\\u0E15\\u0E31\\u0E27\\u0E2D\\u0E31\\u0E01\\u0E29\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},file:{unit:"\\u0E44\\u0E1A\\u0E15\\u0E4C",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},array:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"},set:{unit:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23",verb:"\\u0E04\\u0E27\\u0E23\\u0E21\\u0E35"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u0E44\\u0E21\\u0E48\\u0E43\\u0E0A\\u0E48\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02 (NaN)":"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02";case"object":{if(Array.isArray(t))return"\\u0E2D\\u0E32\\u0E23\\u0E4C\\u0E40\\u0E23\\u0E22\\u0E4C (Array)";if(t===null)return"\\u0E44\\u0E21\\u0E48\\u0E21\\u0E35\\u0E04\\u0E48\\u0E32 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19",email:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48\\u0E2D\\u0E35\\u0E40\\u0E21\\u0E25",url:"URL",emoji:"\\u0E2D\\u0E34\\u0E42\\u0E21\\u0E08\\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",date:"\\u0E27\\u0E31\\u0E19\\u0E17\\u0E35\\u0E48\\u0E41\\u0E1A\\u0E1A ISO",time:"\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",duration:"\\u0E0A\\u0E48\\u0E27\\u0E07\\u0E40\\u0E27\\u0E25\\u0E32\\u0E41\\u0E1A\\u0E1A ISO",ipv4:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv4",ipv6:"\\u0E17\\u0E35\\u0E48\\u0E2D\\u0E22\\u0E39\\u0E48 IPv6",cidrv4:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv4",cidrv6:"\\u0E0A\\u0E48\\u0E27\\u0E07 IP \\u0E41\\u0E1A\\u0E1A IPv6",base64:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64",base64url:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A Base64 \\u0E2A\\u0E33\\u0E2B\\u0E23\\u0E31\\u0E1A URL",json_string:"\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E41\\u0E1A\\u0E1A JSON",e164:"\\u0E40\\u0E1A\\u0E2D\\u0E23\\u0E4C\\u0E42\\u0E17\\u0E23\\u0E28\\u0E31\\u0E1E\\u0E17\\u0E4C\\u0E23\\u0E30\\u0E2B\\u0E27\\u0E48\\u0E32\\u0E07\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E17\\u0E28 (E.164)",jwt:"\\u0E42\\u0E17\\u0E40\\u0E04\\u0E19 JWT",template_literal:"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E17\\u0E35\\u0E48\\u0E1B\\u0E49\\u0E2D\\u0E19"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0E1B\\u0E23\\u0E30\\u0E40\\u0E20\\u0E17\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(t.expected," \\u0E41\\u0E15\\u0E48\\u0E44\\u0E14\\u0E49\\u0E23\\u0E31\\u0E1A ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0E04\\u0E48\\u0E32\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19 ".concat(b(t.values[0])):"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E37\\u0E2D\\u0E01\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E04\\u0E27\\u0E23\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E2B\\u0E19\\u0E36\\u0E48\\u0E07\\u0E43\\u0E19 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"\\u0E44\\u0E21\\u0E48\\u0E40\\u0E01\\u0E34\\u0E19":"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32",s=r(t.origin);return s?"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((o=t.origin)!=null?o:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23"):"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((l=t.origin)!=null?l:"\\u0E04\\u0E48\\u0E32"," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"\\u0E2D\\u0E22\\u0E48\\u0E32\\u0E07\\u0E19\\u0E49\\u0E2D\\u0E22":"\\u0E21\\u0E32\\u0E01\\u0E01\\u0E27\\u0E48\\u0E32",s=r(t.origin);return s?"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString()," ").concat(s.unit):"\\u0E19\\u0E49\\u0E2D\\u0E22\\u0E01\\u0E27\\u0E48\\u0E32\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat(t.origin," \\u0E04\\u0E27\\u0E23\\u0E21\\u0E35").concat(a," ").concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E02\\u0E36\\u0E49\\u0E19\\u0E15\\u0E49\\u0E19\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E25\\u0E07\\u0E17\\u0E49\\u0E32\\u0E22\\u0E14\\u0E49\\u0E27\\u0E22 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E21\\u0E35 "\'.concat(a.includes,\'" \\u0E2D\\u0E22\\u0E39\\u0E48\\u0E43\\u0E19\\u0E02\\u0E49\\u0E2D\\u0E04\\u0E27\\u0E32\\u0E21\'):a.format==="regex"?"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14 ".concat(a.pattern):"\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u0E15\\u0E31\\u0E27\\u0E40\\u0E25\\u0E02\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E15\\u0E49\\u0E2D\\u0E07\\u0E40\\u0E1B\\u0E47\\u0E19\\u0E08\\u0E33\\u0E19\\u0E27\\u0E19\\u0E17\\u0E35\\u0E48\\u0E2B\\u0E32\\u0E23\\u0E14\\u0E49\\u0E27\\u0E22 ".concat(t.divisor," \\u0E44\\u0E14\\u0E49\\u0E25\\u0E07\\u0E15\\u0E31\\u0E27");case"unrecognized_keys":return"\\u0E1E\\u0E1A\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E17\\u0E35\\u0E48\\u0E44\\u0E21\\u0E48\\u0E23\\u0E39\\u0E49\\u0E08\\u0E31\\u0E01: ".concat(p(t.keys,", "));case"invalid_key":return"\\u0E04\\u0E35\\u0E22\\u0E4C\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);case"invalid_union":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07: \\u0E44\\u0E21\\u0E48\\u0E15\\u0E23\\u0E07\\u0E01\\u0E31\\u0E1A\\u0E23\\u0E39\\u0E1B\\u0E41\\u0E1A\\u0E1A\\u0E22\\u0E39\\u0E40\\u0E19\\u0E35\\u0E22\\u0E19\\u0E17\\u0E35\\u0E48\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14\\u0E44\\u0E27\\u0E49";case"invalid_element":return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07\\u0E43\\u0E19 ".concat(t.origin);default:return"\\u0E02\\u0E49\\u0E2D\\u0E21\\u0E39\\u0E25\\u0E44\\u0E21\\u0E48\\u0E16\\u0E39\\u0E01\\u0E15\\u0E49\\u0E2D\\u0E07"}}};function mc(){return{localeError:fd()}}var pd=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},gd=()=>{let e={string:{unit:"karakter",verb:"olmal\\u0131"},file:{unit:"bayt",verb:"olmal\\u0131"},array:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"},set:{unit:"\\xF6\\u011Fe",verb:"olmal\\u0131"}};function r(i){var t;return(t=e[i])!=null?t:null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\\u0131\\u011F\\u0131",cidrv6:"IPv6 aral\\u0131\\u011F\\u0131",base64:"base64 ile \\u015Fifrelenmi\\u015F metin",base64url:"base64url ile \\u015Fifrelenmi\\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\\u0131s\\u0131",jwt:"JWT",template_literal:"\\u015Eablon dizesi"};return i=>{var t,o,u,l;switch(i.code){case"invalid_type":return"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(i.expected,", al\\u0131nan ").concat(pd(i.input));case"invalid_value":return i.values.length===1?"Ge\\xE7ersiz de\\u011Fer: beklenen ".concat(b(i.values[0])):"Ge\\xE7ersiz se\\xE7enek: a\\u015Fa\\u011F\\u0131dakilerden biri olmal\\u0131: ".concat(p(i.values,"|"));case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((t=i.origin)!=null?t:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString()," ").concat((o=a.unit)!=null?o:"\\xF6\\u011Fe"):"\\xC7ok b\\xFCy\\xFCk: beklenen ".concat((u=i.origin)!=null?u:"de\\u011Fer"," ").concat(c).concat(i.maximum.toString())}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString()," ").concat(a.unit):"\\xC7ok k\\xFC\\xE7\\xFCk: beklenen ".concat(i.origin," ").concat(c).concat(i.minimum.toString())}case"invalid_format":{let c=i;return c.format==="starts_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.prefix,\'" ile ba\\u015Flamal\\u0131\'):c.format==="ends_with"?\'Ge\\xE7ersiz metin: "\'.concat(c.suffix,\'" ile bitmeli\'):c.format==="includes"?\'Ge\\xE7ersiz metin: "\'.concat(c.includes,\'" i\\xE7ermeli\'):c.format==="regex"?"Ge\\xE7ersiz metin: ".concat(c.pattern," desenine uymal\\u0131"):"Ge\\xE7ersiz ".concat((l=n[c.format])!=null?l:i.format)}case"not_multiple_of":return"Ge\\xE7ersiz say\\u0131: ".concat(i.divisor," ile tam b\\xF6l\\xFCnebilmeli");case"unrecognized_keys":return"Tan\\u0131nmayan anahtar".concat(i.keys.length>1?"lar":"",": ").concat(p(i.keys,", "));case"invalid_key":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz anahtar");case"invalid_union":return"Ge\\xE7ersiz de\\u011Fer";case"invalid_element":return"".concat(i.origin," i\\xE7inde ge\\xE7ersiz de\\u011Fer");default:return"Ge\\xE7ersiz de\\u011Fer"}}};function fc(){return{localeError:gd()}}var vd=()=>{let e={string:{unit:"\\u0441\\u0438\\u043C\\u0432\\u043E\\u043B\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},file:{unit:"\\u0431\\u0430\\u0439\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},array:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"},set:{unit:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432",verb:"\\u043C\\u0430\\u0442\\u0438\\u043C\\u0435"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0447\\u0438\\u0441\\u043B\\u043E";case"object":{if(Array.isArray(t))return"\\u043C\\u0430\\u0441\\u0438\\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456",email:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 \\u0435\\u043B\\u0435\\u043A\\u0442\\u0440\\u043E\\u043D\\u043D\\u043E\\u0457 \\u043F\\u043E\\u0448\\u0442\\u0438",url:"URL",emoji:"\\u0435\\u043C\\u043E\\u0434\\u0437\\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\u0434\\u0430\\u0442\\u0430 \\u0442\\u0430 \\u0447\\u0430\\u0441 ISO",date:"\\u0434\\u0430\\u0442\\u0430 ISO",time:"\\u0447\\u0430\\u0441 ISO",duration:"\\u0442\\u0440\\u0438\\u0432\\u0430\\u043B\\u0456\\u0441\\u0442\\u044C ISO",ipv4:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv4",ipv6:"\\u0430\\u0434\\u0440\\u0435\\u0441\\u0430 IPv6",cidrv4:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv4",cidrv6:"\\u0434\\u0456\\u0430\\u043F\\u0430\\u0437\\u043E\\u043D IPv6",base64:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64",base64url:"\\u0440\\u044F\\u0434\\u043E\\u043A \\u0443 \\u043A\\u043E\\u0434\\u0443\\u0432\\u0430\\u043D\\u043D\\u0456 base64url",json_string:"\\u0440\\u044F\\u0434\\u043E\\u043A JSON",e164:"\\u043D\\u043E\\u043C\\u0435\\u0440 E.164",jwt:"JWT",template_literal:"\\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(t.expected,", \\u043E\\u0442\\u0440\\u0438\\u043C\\u0430\\u043D\\u043E ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F ".concat(b(t.values[0])):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0430 \\u043E\\u043F\\u0446\\u0456\\u044F: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F \\u043E\\u0434\\u043D\\u0435 \\u0437 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((o=t.origin)!=null?o:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0435\\u043B\\u0435\\u043C\\u0435\\u043D\\u0442\\u0456\\u0432"):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u0432\\u0435\\u043B\\u0438\\u043A\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat((l=t.origin)!=null?l:"\\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F"," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u0417\\u0430\\u043D\\u0430\\u0434\\u0442\\u043E \\u043C\\u0430\\u043B\\u0435: \\u043E\\u0447\\u0456\\u043A\\u0443\\u0454\\u0442\\u044C\\u0441\\u044F, \\u0449\\u043E ".concat(t.origin," \\u0431\\u0443\\u0434\\u0435 ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043F\\u043E\\u0447\\u0438\\u043D\\u0430\\u0442\\u0438\\u0441\\u044F \\u0437 "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0437\\u0430\\u043A\\u0456\\u043D\\u0447\\u0443\\u0432\\u0430\\u0442\\u0438\\u0441\\u044F \\u043D\\u0430 "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u043C\\u0456\\u0441\\u0442\\u0438\\u0442\\u0438 "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u0440\\u044F\\u0434\\u043E\\u043A: \\u043F\\u043E\\u0432\\u0438\\u043D\\u0435\\u043D \\u0432\\u0456\\u0434\\u043F\\u043E\\u0432\\u0456\\u0434\\u0430\\u0442\\u0438 \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0443 ".concat(a.pattern):"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E: \\u043F\\u043E\\u0432\\u0438\\u043D\\u043D\\u043E \\u0431\\u0443\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0442\\u043D\\u0438\\u043C ".concat(t.divisor);case"unrecognized_keys":return"\\u041D\\u0435\\u0440\\u043E\\u0437\\u043F\\u0456\\u0437\\u043D\\u0430\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447".concat(t.keys.length>1?"\\u0456":"",": ").concat(p(t.keys,", "));case"invalid_key":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0438\\u0439 \\u043A\\u043B\\u044E\\u0447 \\u0443 ".concat(t.origin);case"invalid_union":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456";case"invalid_element":return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0435 \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u043D\\u044F \\u0443 ".concat(t.origin);default:return"\\u041D\\u0435\\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u044C\\u043D\\u0456 \\u0432\\u0445\\u0456\\u0434\\u043D\\u0456 \\u0434\\u0430\\u043D\\u0456"}}};function nr(){return{localeError:vd()}}function pc(){return nr()}var hd=()=>{let e={string:{unit:"\\u062D\\u0631\\u0648\\u0641",verb:"\\u06C1\\u0648\\u0646\\u0627"},file:{unit:"\\u0628\\u0627\\u0626\\u0679\\u0633",verb:"\\u06C1\\u0648\\u0646\\u0627"},array:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"},set:{unit:"\\u0622\\u0626\\u0679\\u0645\\u0632",verb:"\\u06C1\\u0648\\u0646\\u0627"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\\u0646\\u0645\\u0628\\u0631";case"object":{if(Array.isArray(t))return"\\u0622\\u0631\\u06D2";if(t===null)return"\\u0646\\u0644";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0627\\u0646 \\u067E\\u0679",email:"\\u0627\\u06CC \\u0645\\u06CC\\u0644 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",url:"\\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644",emoji:"\\u0627\\u06CC\\u0645\\u0648\\u062C\\u06CC",uuid:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",uuidv4:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 4",uuidv6:"\\u06CC\\u0648 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC \\u0648\\u06CC 6",nanoid:"\\u0646\\u06CC\\u0646\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",guid:"\\u062C\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",cuid2:"\\u0633\\u06CC \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC 2",ulid:"\\u06CC\\u0648 \\u0627\\u06CC\\u0644 \\u0622\\u0626\\u06CC \\u0688\\u06CC",xid:"\\u0627\\u06CC\\u06A9\\u0633 \\u0622\\u0626\\u06CC \\u0688\\u06CC",ksuid:"\\u06A9\\u06D2 \\u0627\\u06CC\\u0633 \\u06CC\\u0648 \\u0622\\u0626\\u06CC \\u0688\\u06CC",datetime:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0688\\u06CC\\u0679 \\u0679\\u0627\\u0626\\u0645",date:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u062A\\u0627\\u0631\\u06CC\\u062E",time:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0648\\u0642\\u062A",duration:"\\u0622\\u0626\\u06CC \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0645\\u062F\\u062A",ipv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",ipv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0627\\u06CC\\u0688\\u0631\\u06CC\\u0633",cidrv4:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 4 \\u0631\\u06CC\\u0646\\u062C",cidrv6:"\\u0622\\u0626\\u06CC \\u067E\\u06CC \\u0648\\u06CC 6 \\u0631\\u06CC\\u0646\\u062C",base64:"\\u0628\\u06CC\\u0633 64 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",base64url:"\\u0628\\u06CC\\u0633 64 \\u06CC\\u0648 \\u0622\\u0631 \\u0627\\u06CC\\u0644 \\u0627\\u0646 \\u06A9\\u0648\\u0688\\u0688 \\u0633\\u0679\\u0631\\u0646\\u06AF",json_string:"\\u062C\\u06D2 \\u0627\\u06CC\\u0633 \\u0627\\u0648 \\u0627\\u06CC\\u0646 \\u0633\\u0679\\u0631\\u0646\\u06AF",e164:"\\u0627\\u06CC 164 \\u0646\\u0645\\u0628\\u0631",jwt:"\\u062C\\u06D2 \\u0688\\u0628\\u0644\\u06CC\\u0648 \\u0679\\u06CC",template_literal:"\\u0627\\u0646 \\u067E\\u0679"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(t.expected," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627\\u060C ").concat(n(t.input)," \\u0645\\u0648\\u0635\\u0648\\u0644 \\u06C1\\u0648\\u0627");case"invalid_value":return t.values.length===1?"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679: ".concat(b(t.values[0])," \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627"):"\\u063A\\u0644\\u0637 \\u0622\\u067E\\u0634\\u0646: ".concat(p(t.values,"|")," \\u0645\\u06CC\\u06BA \\u0633\\u06D2 \\u0627\\u06CC\\u06A9 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627");case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((o=t.origin)!=null?o:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u06D2 ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u0639\\u0646\\u0627\\u0635\\u0631"," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0628\\u0691\\u0627: ".concat((l=t.origin)!=null?l:"\\u0648\\u06CC\\u0644\\u06CC\\u0648"," \\u06A9\\u0627 ").concat(a).concat(t.maximum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u06D2 ").concat(a).concat(t.minimum.toString()," ").concat(s.unit," \\u06C1\\u0648\\u0646\\u06D2 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u06D2"):"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u0627 ").concat(a).concat(t.minimum.toString()," \\u06C1\\u0648\\u0646\\u0627 \\u0645\\u062A\\u0648\\u0642\\u0639 \\u062A\\u06BE\\u0627")}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.prefix,\'" \\u0633\\u06D2 \\u0634\\u0631\\u0648\\u0639 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="ends_with"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.suffix,\'" \\u067E\\u0631 \\u062E\\u062A\\u0645 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="includes"?\'\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: "\'.concat(a.includes,\'" \\u0634\\u0627\\u0645\\u0644 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2\'):a.format==="regex"?"\\u063A\\u0644\\u0637 \\u0633\\u0679\\u0631\\u0646\\u06AF: \\u067E\\u06CC\\u0679\\u0631\\u0646 ".concat(a.pattern," \\u0633\\u06D2 \\u0645\\u06CC\\u0686 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2"):"\\u063A\\u0644\\u0637 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u063A\\u0644\\u0637 \\u0646\\u0645\\u0628\\u0631: ".concat(t.divisor," \\u06A9\\u0627 \\u0645\\u0636\\u0627\\u0639\\u0641 \\u06C1\\u0648\\u0646\\u0627 \\u0686\\u0627\\u06C1\\u06CC\\u06D2");case"unrecognized_keys":return"\\u063A\\u06CC\\u0631 \\u062A\\u0633\\u0644\\u06CC\\u0645 \\u0634\\u062F\\u06C1 \\u06A9\\u06CC".concat(t.keys.length>1?"\\u0632":"",": ").concat(p(t.keys,"\\u060C "));case"invalid_key":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u06A9\\u06CC");case"invalid_union":return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679";case"invalid_element":return"".concat(t.origin," \\u0645\\u06CC\\u06BA \\u063A\\u0644\\u0637 \\u0648\\u06CC\\u0644\\u06CC\\u0648");default:return"\\u063A\\u0644\\u0637 \\u0627\\u0646 \\u067E\\u0679"}}};function gc(){return{localeError:hd()}}var $d=()=>{let e={string:{unit:"k\\xFD t\\u1EF1",verb:"c\\xF3"},file:{unit:"byte",verb:"c\\xF3"},array:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"},set:{unit:"ph\\u1EA7n t\\u1EED",verb:"c\\xF3"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"s\\u1ED1";case"object":{if(Array.isArray(t))return"m\\u1EA3ng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u0111\\u1EA7u v\\xE0o",email:"\\u0111\\u1ECBa ch\\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\\xE0y gi\\u1EDD ISO",date:"ng\\xE0y ISO",time:"gi\\u1EDD ISO",duration:"kho\\u1EA3ng th\\u1EDDi gian ISO",ipv4:"\\u0111\\u1ECBa ch\\u1EC9 IPv4",ipv6:"\\u0111\\u1ECBa ch\\u1EC9 IPv6",cidrv4:"d\\u1EA3i IPv4",cidrv6:"d\\u1EA3i IPv6",base64:"chu\\u1ED7i m\\xE3 h\\xF3a base64",base64url:"chu\\u1ED7i m\\xE3 h\\xF3a base64url",json_string:"chu\\u1ED7i JSON",e164:"s\\u1ED1 E.164",jwt:"JWT",template_literal:"\\u0111\\u1EA7u v\\xE0o"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(t.expected,", nh\\u1EADn \\u0111\\u01B0\\u1EE3c ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i ".concat(b(t.values[0])):"T\\xF9y ch\\u1ECDn kh\\xF4ng h\\u1EE3p l\\u1EC7: mong \\u0111\\u1EE3i m\\u1ED9t trong c\\xE1c gi\\xE1 tr\\u1ECB ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((o=t.origin)!=null?o:"gi\\xE1 tr\\u1ECB"," ").concat(s.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"ph\\u1EA7n t\\u1EED"):"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((l=t.origin)!=null?l:"gi\\xE1 tr\\u1ECB"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(s.verb," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i b\\u1EAFt \\u0111\\u1EA7u b\\u1EB1ng "\'.concat(a.prefix,\'"\'):a.format==="ends_with"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i k\\u1EBFt th\\xFAc b\\u1EB1ng "\'.concat(a.suffix,\'"\'):a.format==="includes"?\'Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i bao g\\u1ED3m "\'.concat(a.includes,\'"\'):a.format==="regex"?"Chu\\u1ED7i kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i kh\\u1EDBp v\\u1EDBi m\\u1EABu ".concat(a.pattern):"".concat((c=i[a.format])!=null?c:t.format," kh\\xF4ng h\\u1EE3p l\\u1EC7")}case"not_multiple_of":return"S\\u1ED1 kh\\xF4ng h\\u1EE3p l\\u1EC7: ph\\u1EA3i l\\xE0 b\\u1ED9i s\\u1ED1 c\\u1EE7a ".concat(t.divisor);case"unrecognized_keys":return"Kh\\xF3a kh\\xF4ng \\u0111\\u01B0\\u1EE3c nh\\u1EADn d\\u1EA1ng: ".concat(p(t.keys,", "));case"invalid_key":return"Kh\\xF3a kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);case"invalid_union":return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7";case"invalid_element":return"Gi\\xE1 tr\\u1ECB kh\\xF4ng h\\u1EE3p l\\u1EC7 trong ".concat(t.origin);default:return"\\u0110\\u1EA7u v\\xE0o kh\\xF4ng h\\u1EE3p l\\u1EC7"}}};function vc(){return{localeError:$d()}}var bd=()=>{let e={string:{unit:"\\u5B57\\u7B26",verb:"\\u5305\\u542B"},file:{unit:"\\u5B57\\u8282",verb:"\\u5305\\u542B"},array:{unit:"\\u9879",verb:"\\u5305\\u542B"},set:{unit:"\\u9879",verb:"\\u5305\\u542B"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\\u975E\\u6570\\u5B57(NaN)":"\\u6570\\u5B57";case"object":{if(Array.isArray(t))return"\\u6570\\u7EC4";if(t===null)return"\\u7A7A\\u503C(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F93\\u5165",email:"\\u7535\\u5B50\\u90AE\\u4EF6",url:"URL",emoji:"\\u8868\\u60C5\\u7B26\\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\\u65E5\\u671F\\u65F6\\u95F4",date:"ISO\\u65E5\\u671F",time:"ISO\\u65F6\\u95F4",duration:"ISO\\u65F6\\u957F",ipv4:"IPv4\\u5730\\u5740",ipv6:"IPv6\\u5730\\u5740",cidrv4:"IPv4\\u7F51\\u6BB5",cidrv6:"IPv6\\u7F51\\u6BB5",base64:"base64\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",base64url:"base64url\\u7F16\\u7801\\u5B57\\u7B26\\u4E32",json_string:"JSON\\u5B57\\u7B26\\u4E32",e164:"E.164\\u53F7\\u7801",jwt:"JWT",template_literal:"\\u8F93\\u5165"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(t.expected,"\\uFF0C\\u5B9E\\u9645\\u63A5\\u6536 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u65E0\\u6548\\u8F93\\u5165\\uFF1A\\u671F\\u671B ".concat(b(t.values[0])):"\\u65E0\\u6548\\u9009\\u9879\\uFF1A\\u671F\\u671B\\u4EE5\\u4E0B\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((o=t.origin)!=null?o:"\\u503C"," ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u4E2A\\u5143\\u7D20"):"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((l=t.origin)!=null?l:"\\u503C"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.prefix,\'" \\u5F00\\u5934\'):a.format==="ends_with"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u4EE5 "\'.concat(a.suffix,\'" \\u7ED3\\u5C3E\'):a.format==="includes"?\'\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u65E0\\u6548\\u5B57\\u7B26\\u4E32\\uFF1A\\u5FC5\\u987B\\u6EE1\\u8DB3\\u6B63\\u5219\\u8868\\u8FBE\\u5F0F ".concat(a.pattern):"\\u65E0\\u6548".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u65E0\\u6548\\u6570\\u5B57\\uFF1A\\u5FC5\\u987B\\u662F ".concat(t.divisor," \\u7684\\u500D\\u6570");case"unrecognized_keys":return"\\u51FA\\u73B0\\u672A\\u77E5\\u7684\\u952E(key): ".concat(p(t.keys,", "));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u7684\\u952E(key)\\u65E0\\u6548");case"invalid_union":return"\\u65E0\\u6548\\u8F93\\u5165";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u5305\\u542B\\u65E0\\u6548\\u503C(value)");default:return"\\u65E0\\u6548\\u8F93\\u5165"}}};function hc(){return{localeError:bd()}}var _d=()=>{let e={string:{unit:"\\u5B57\\u5143",verb:"\\u64C1\\u6709"},file:{unit:"\\u4F4D\\u5143\\u7D44",verb:"\\u64C1\\u6709"},array:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"},set:{unit:"\\u9805\\u76EE",verb:"\\u64C1\\u6709"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u8F38\\u5165",email:"\\u90F5\\u4EF6\\u5730\\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \\u65E5\\u671F\\u6642\\u9593",date:"ISO \\u65E5\\u671F",time:"ISO \\u6642\\u9593",duration:"ISO \\u671F\\u9593",ipv4:"IPv4 \\u4F4D\\u5740",ipv6:"IPv6 \\u4F4D\\u5740",cidrv4:"IPv4 \\u7BC4\\u570D",cidrv6:"IPv6 \\u7BC4\\u570D",base64:"base64 \\u7DE8\\u78BC\\u5B57\\u4E32",base64url:"base64url \\u7DE8\\u78BC\\u5B57\\u4E32",json_string:"JSON \\u5B57\\u4E32",e164:"E.164 \\u6578\\u503C",jwt:"JWT",template_literal:"\\u8F38\\u5165"};return t=>{var o,u,l,c;switch(t.code){case"invalid_type":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(t.expected,"\\uFF0C\\u4F46\\u6536\\u5230 ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C\\uFF1A\\u9810\\u671F\\u70BA ".concat(b(t.values[0])):"\\u7121\\u6548\\u7684\\u9078\\u9805\\uFF1A\\u9810\\u671F\\u70BA\\u4EE5\\u4E0B\\u5176\\u4E2D\\u4E4B\\u4E00 ".concat(p(t.values,"|"));case"too_big":{let a=t.inclusive?"<=":"<",s=r(t.origin);return s?"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((o=t.origin)!=null?o:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString()," ").concat((u=s.unit)!=null?u:"\\u500B\\u5143\\u7D20"):"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((l=t.origin)!=null?l:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",s=r(t.origin);return s?"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString()," ").concat(s.unit):"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString())}case"invalid_format":{let a=t;return a.format==="starts_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.prefix,\'" \\u958B\\u982D\'):a.format==="ends_with"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u4EE5 "\'.concat(a.suffix,\'" \\u7D50\\u5C3E\'):a.format==="includes"?\'\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u5305\\u542B "\'.concat(a.includes,\'"\'):a.format==="regex"?"\\u7121\\u6548\\u7684\\u5B57\\u4E32\\uFF1A\\u5FC5\\u9808\\u7B26\\u5408\\u683C\\u5F0F ".concat(a.pattern):"\\u7121\\u6548\\u7684 ".concat((c=i[a.format])!=null?c:t.format)}case"not_multiple_of":return"\\u7121\\u6548\\u7684\\u6578\\u5B57\\uFF1A\\u5FC5\\u9808\\u70BA ".concat(t.divisor," \\u7684\\u500D\\u6578");case"unrecognized_keys":return"\\u7121\\u6CD5\\u8B58\\u5225\\u7684\\u9375\\u503C".concat(t.keys.length>1?"\\u5011":"","\\uFF1A").concat(p(t.keys,"\\u3001"));case"invalid_key":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u9375\\u503C");case"invalid_union":return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C";case"invalid_element":return"".concat(t.origin," \\u4E2D\\u6709\\u7121\\u6548\\u7684\\u503C");default:return"\\u7121\\u6548\\u7684\\u8F38\\u5165\\u503C"}}};function $c(){return{localeError:_d()}}var yd=()=>{let e={string:{unit:"\\xE0mi",verb:"n\\xED"},file:{unit:"bytes",verb:"n\\xED"},array:{unit:"nkan",verb:"n\\xED"},set:{unit:"nkan",verb:"n\\xED"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\\u1ECD\\u0301mb\\xE0";case"object":{if(Array.isArray(t))return"akop\\u1ECD";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9",email:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC \\xECm\\u1EB9\\u0301l\\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\\xE0k\\xF3k\\xF2 ISO",date:"\\u1ECDj\\u1ECD\\u0301 ISO",time:"\\xE0k\\xF3k\\xF2 ISO",duration:"\\xE0k\\xF3k\\xF2 t\\xF3 p\\xE9 ISO",ipv4:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv4",ipv6:"\\xE0d\\xEDr\\u1EB9\\u0301s\\xEC IPv6",cidrv4:"\\xE0gb\\xE8gb\\xE8 IPv4",cidrv6:"\\xE0gb\\xE8gb\\xE8 IPv6",base64:"\\u1ECD\\u0300r\\u1ECD\\u0300 t\\xED a k\\u1ECD\\u0301 n\\xED base64",base64url:"\\u1ECD\\u0300r\\u1ECD\\u0300 base64url",json_string:"\\u1ECD\\u0300r\\u1ECD\\u0300 JSON",e164:"n\\u1ECD\\u0301mb\\xE0 E.164",jwt:"JWT",template_literal:"\\u1EB9\\u0300r\\u1ECD \\xECb\\xE1w\\u1ECDl\\xE9"};return t=>{var o,u;switch(t.code){case"invalid_type":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(t.expected,", \\xE0m\\u1ECD\\u0300 a r\\xED ").concat(n(t.input));case"invalid_value":return t.values.length===1?"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e: a n\\xED l\\xE1ti fi ".concat(b(t.values[0])):"\\xC0\\u1E63\\xE0y\\xE0n a\\u1E63\\xEC\\u1E63e: yan \\u1ECD\\u0300kan l\\xE1ra ".concat(p(t.values,"|"));case"too_big":{let l=t.inclusive?"<=":"<",c=r(t.origin);return c?"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat((o=t.origin)!=null?o:"iye"," ").concat(c.verb," ").concat(l).concat(t.maximum," ").concat(c.unit):"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(l).concat(t.maximum)}case"too_small":{let l=t.inclusive?">=":">",c=r(t.origin);return c?"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 p\\xE9 ".concat(t.origin," ").concat(c.verb," ").concat(l).concat(t.minimum," ").concat(c.unit):"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(l).concat(t.minimum)}case"invalid_format":{let l=t;return l.format==="starts_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\u1EB9\\u0300r\\u1EB9\\u0300 p\\u1EB9\\u0300l\\xFA "\'.concat(l.prefix,\'"\'):l.format==="ends_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 par\\xED p\\u1EB9\\u0300l\\xFA "\'.concat(l.suffix,\'"\'):l.format==="includes"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 n\\xED "\'.concat(l.includes,\'"\'):l.format==="regex"?"\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\xE1 \\xE0p\\u1EB9\\u1EB9r\\u1EB9 mu ".concat(l.pattern):"A\\u1E63\\xEC\\u1E63e: ".concat((u=i[l.format])!=null?u:t.format)}case"not_multiple_of":return"N\\u1ECD\\u0301mb\\xE0 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 j\\u1EB9\\u0301 \\xE8y\\xE0 p\\xEDp\\xEDn ti ".concat(t.divisor);case"unrecognized_keys":return"B\\u1ECDt\\xECn\\xEC \\xE0\\xECm\\u1ECD\\u0300: ".concat(p(t.keys,", "));case"invalid_key":return"B\\u1ECDt\\xECn\\xEC a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);case"invalid_union":return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e";case"invalid_element":return"Iye a\\u1E63\\xEC\\u1E63e n\\xEDn\\xFA ".concat(t.origin);default:return"\\xCCb\\xE1w\\u1ECDl\\xE9 a\\u1E63\\xEC\\u1E63e"}}};function bc(){return{localeError:yd()}}var co=Symbol("ZodOutput"),lo=Symbol("ZodInput"),Te=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];if(this._map.set(r,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error("ID ".concat(i.id," already exists in the registry"));this._idmap.set(i.id,r)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){var i;let n=r._zod.parent;if(n){let t=m({},(i=this.get(n))!=null?i:{});delete t.id;let o=m(m({},t),this._map.get(r));return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function ir(){return new Te}var oe=ir();function so(e,r){return new e(m({type:"string"},y(r)))}function mo(e,r){return new e(m({type:"string",coerce:!0},y(r)))}function or(e,r){return new e(m({type:"string",format:"email",check:"string_format",abort:!1},y(r)))}function ct(e,r){return new e(m({type:"string",format:"guid",check:"string_format",abort:!1},y(r)))}function ar(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1},y(r)))}function ur(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},y(r)))}function cr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},y(r)))}function lr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},y(r)))}function lt(e,r){return new e(m({type:"string",format:"url",check:"string_format",abort:!1},y(r)))}function sr(e,r){return new e(m({type:"string",format:"emoji",check:"string_format",abort:!1},y(r)))}function dr(e,r){return new e(m({type:"string",format:"nanoid",check:"string_format",abort:!1},y(r)))}function mr(e,r){return new e(m({type:"string",format:"cuid",check:"string_format",abort:!1},y(r)))}function fr(e,r){return new e(m({type:"string",format:"cuid2",check:"string_format",abort:!1},y(r)))}function pr(e,r){return new e(m({type:"string",format:"ulid",check:"string_format",abort:!1},y(r)))}function gr(e,r){return new e(m({type:"string",format:"xid",check:"string_format",abort:!1},y(r)))}function vr(e,r){return new e(m({type:"string",format:"ksuid",check:"string_format",abort:!1},y(r)))}function hr(e,r){return new e(m({type:"string",format:"ipv4",check:"string_format",abort:!1},y(r)))}function $r(e,r){return new e(m({type:"string",format:"ipv6",check:"string_format",abort:!1},y(r)))}function br(e,r){return new e(m({type:"string",format:"cidrv4",check:"string_format",abort:!1},y(r)))}function _r(e,r){return new e(m({type:"string",format:"cidrv6",check:"string_format",abort:!1},y(r)))}function yr(e,r){return new e(m({type:"string",format:"base64",check:"string_format",abort:!1},y(r)))}function xr(e,r){return new e(m({type:"string",format:"base64url",check:"string_format",abort:!1},y(r)))}function kr(e,r){return new e(m({type:"string",format:"e164",check:"string_format",abort:!1},y(r)))}function zr(e,r){return new e(m({type:"string",format:"jwt",check:"string_format",abort:!1},y(r)))}var fo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function po(e,r){return new e(m({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},y(r)))}function go(e,r){return new e(m({type:"string",format:"date",check:"string_format"},y(r)))}function vo(e,r){return new e(m({type:"string",format:"time",check:"string_format",precision:null},y(r)))}function ho(e,r){return new e(m({type:"string",format:"duration",check:"string_format"},y(r)))}function $o(e,r){return new e(m({type:"number",checks:[]},y(r)))}function bo(e,r){return new e(m({type:"number",coerce:!0,checks:[]},y(r)))}function _o(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"safeint"},y(r)))}function yo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float32"},y(r)))}function xo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"float64"},y(r)))}function ko(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"int32"},y(r)))}function zo(e,r){return new e(m({type:"number",check:"number_format",abort:!1,format:"uint32"},y(r)))}function Io(e,r){return new e(m({type:"boolean"},y(r)))}function wo(e,r){return new e(m({type:"boolean",coerce:!0},y(r)))}function So(e,r){return new e(m({type:"bigint"},y(r)))}function jo(e,r){return new e(m({type:"bigint",coerce:!0},y(r)))}function Oo(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},y(r)))}function Po(e,r){return new e(m({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},y(r)))}function Uo(e,r){return new e(m({type:"symbol"},y(r)))}function No(e,r){return new e(m({type:"undefined"},y(r)))}function Zo(e,r){return new e(m({type:"null"},y(r)))}function Do(e){return new e({type:"any"})}function To(e){return new e({type:"unknown"})}function Eo(e,r){return new e(m({type:"never"},y(r)))}function Ao(e,r){return new e(m({type:"void"},y(r)))}function Ro(e,r){return new e(m({type:"date"},y(r)))}function Lo(e,r){return new e(m({type:"date",coerce:!0},y(r)))}function Co(e,r){return new e(m({type:"nan"},y(r)))}function ce(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!1}))}function H(e,r){return new Mt(z(m({check:"less_than"},y(r)),{value:e,inclusive:!0}))}function le(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!1}))}function W(e,r){return new Bt(z(m({check:"greater_than"},y(r)),{value:e,inclusive:!0}))}function Vo(e){return le(0,e)}function Fo(e){return ce(0,e)}function Jo(e){return H(0,e)}function Mo(e){return W(0,e)}function Ie(e,r){return new Tn(z(m({check:"multiple_of"},y(r)),{value:e}))}function Ee(e,r){return new Rn(z(m({check:"max_size"},y(r)),{maximum:e}))}function we(e,r){return new Ln(z(m({check:"min_size"},y(r)),{minimum:e}))}function st(e,r){return new Cn(z(m({check:"size_equals"},y(r)),{size:e}))}function Ae(e,r){return new Vn(z(m({check:"max_length"},y(r)),{maximum:e}))}function $e(e,r){return new Fn(z(m({check:"min_length"},y(r)),{minimum:e}))}function Re(e,r){return new Jn(z(m({check:"length_equals"},y(r)),{length:e}))}function dt(e,r){return new Mn(z(m({check:"string_format",format:"regex"},y(r)),{pattern:e}))}function mt(e){return new Bn(m({check:"string_format",format:"lowercase"},y(e)))}function ft(e){return new Kn(m({check:"string_format",format:"uppercase"},y(e)))}function pt(e,r){return new Gn(z(m({check:"string_format",format:"includes"},y(r)),{includes:e}))}function gt(e,r){return new Wn(z(m({check:"string_format",format:"starts_with"},y(r)),{prefix:e}))}function vt(e,r){return new Xn(z(m({check:"string_format",format:"ends_with"},y(r)),{suffix:e}))}function Bo(e,r,n){return new qn(m({check:"property",property:e,schema:r},y(n)))}function ht(e,r){return new Yn(m({check:"mime_type",mime:e},y(r)))}function se(e){return new Qn({check:"overwrite",tx:e})}function $t(e){return se(r=>r.normalize(e))}function bt(){return se(e=>e.trim())}function _t(){return se(e=>e.toLowerCase())}function yt(){return se(e=>e.toUpperCase())}function Ko(e,r,n){return new e(m({type:"array",element:r},y(n)))}function xd(e,r,n){return new e(m({type:"union",options:r},y(n)))}function kd(e,r,n,i){return new e(m({type:"union",options:n,discriminator:r},y(i)))}function zd(e,r,n){return new e({type:"intersection",left:r,right:n})}function Id(e,r,n,i){let t=n instanceof O,o=t?i:n,u=t?n:null;return new e(m({type:"tuple",items:r,rest:u},y(o)))}function wd(e,r,n,i){return new e(m({type:"record",keyType:r,valueType:n},y(i)))}function Sd(e,r,n,i){return new e(m({type:"map",keyType:r,valueType:n},y(i)))}function jd(e,r,n){return new e(m({type:"set",valueType:r},y(n)))}function Od(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e(m({type:"enum",entries:i},y(n)))}function Pd(e,r,n){return new e(m({type:"enum",entries:r},y(n)))}function Ud(e,r,n){return new e(m({type:"literal",values:Array.isArray(r)?r:[r]},y(n)))}function Go(e,r){return new e(m({type:"file"},y(r)))}function Nd(e,r){return new e({type:"transform",transform:r})}function Zd(e,r){return new e({type:"optional",innerType:r})}function Dd(e,r){return new e({type:"nullable",innerType:r})}function Td(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():qr(n)}})}function Ed(e,r,n){return new e(m({type:"nonoptional",innerType:r},y(n)))}function Ad(e,r){return new e({type:"success",innerType:r})}function Rd(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Ld(e,r,n){return new e({type:"pipe",in:r,out:n})}function Cd(e,r){return new e({type:"readonly",innerType:r})}function Vd(e,r,n){return new e(m({type:"template_literal",parts:r},y(n)))}function Fd(e,r){return new e({type:"lazy",getter:r})}function Jd(e,r){return new e({type:"promise",innerType:r})}function Wo(e,r,n){var o;let i=y(n);return(o=i.abort)!=null||(i.abort=!0),new e(m({type:"custom",check:"custom",fn:r},i))}function Xo(e,r,n){return new e(m({type:"custom",check:"custom",fn:r},y(n)))}function qo(e){let r=_c(n=>(n.addIssue=i=>{var t,o,u,l;if(typeof i=="string")n.issues.push(Oe(i,n.value,r._zod.def));else{let c=i;c.fatal&&(c.continue=!1),(t=c.code)!=null||(c.code="custom"),(o=c.input)!=null||(c.input=n.value),(u=c.inst)!=null||(c.inst=r),(l=c.continue)!=null||(c.continue=!r._zod.def.abort),n.issues.push(Oe(c))}},e(n.value,n)));return r}function _c(e,r){let n=new R(m({check:"custom"},y(r)));return n._zod.check=e,n}function Yo(e,r){var h,x,S,I,C;let n=y(r),i=(h=n.truthy)!=null?h:["true","1","yes","on","y","enabled"],t=(x=n.falsy)!=null?x:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(j=>typeof j=="string"?j.toLowerCase():j),t=t.map(j=>typeof j=="string"?j.toLowerCase():j));let o=new Set(i),u=new Set(t),l=(S=e.Codec)!=null?S:ot,c=(I=e.Boolean)!=null?I:it,a=(C=e.String)!=null?C:ke,s=new a({type:"string",error:n.error}),v=new c({type:"boolean",error:n.error}),f=new l({type:"pipe",in:s,out:v,transform:(j,g)=>{let $=j;return n.case!=="sensitive"&&($=$.toLowerCase()),o.has($)?!0:u.has($)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...u],input:g.value,inst:f,continue:!1}),{})},reverseTransform:(j,g)=>j===!0?i[0]||"true":t[0]||"false",error:n.error});return f}function Le(e,r,n,i={}){let t=y(i),o=m(z(m({},y(i)),{check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:l=>n.test(l)}),t);return n instanceof RegExp&&(o.pattern=n),new e(o)}var xt=class{constructor(r){var n,i,t,o,u;this.counter=0,this.metadataRegistry=(n=r==null?void 0:r.metadata)!=null?n:oe,this.target=(i=r==null?void 0:r.target)!=null?i:"draft-2020-12",this.unrepresentable=(t=r==null?void 0:r.unrepresentable)!=null?t:"throw",this.override=(o=r==null?void 0:r.override)!=null?o:()=>{},this.io=(u=r==null?void 0:r.io)!=null?u:"output",this.seen=new Map}process(r,n={path:[],schemaPath:[]}){var v,f,h,x,S;var i;let t=r._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},u=this.seen.get(r);if(u)return u.count++,n.schemaPath.includes(r)&&(u.cycle=n.path),u.schema;let l={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,l);let c=(f=(v=r._zod).toJSONSchema)==null?void 0:f.call(v);if(c)l.schema=c;else{let I=z(m({},n),{schemaPath:[...n.schemaPath,r],path:n.path}),C=r._zod.parent;if(C)l.ref=C,this.process(C,I),this.seen.get(C).isParent=!0;else{let j=l.schema;switch(t.type){case"string":{let g=j;g.type="string";let{minimum:$,maximum:k,format:N,patterns:P,contentEncoding:w}=r._zod.bag;if(typeof $=="number"&&(g.minLength=$),typeof k=="number"&&(g.maxLength=k),N&&(g.format=(h=o[N])!=null?h:N,g.format===""&&delete g.format),w&&(g.contentEncoding=w),P&&P.size>0){let D=[...P];D.length===1?g.pattern=D[0].source:D.length>1&&(l.schema.allOf=[...D.map(B=>z(m({},this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{}),{pattern:B.source}))])}break}case"number":{let g=j,{minimum:$,maximum:k,format:N,multipleOf:P,exclusiveMaximum:w,exclusiveMinimum:D}=r._zod.bag;typeof N=="string"&&N.includes("int")?g.type="integer":g.type="number",typeof D=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.minimum=D,g.exclusiveMinimum=!0):g.exclusiveMinimum=D),typeof $=="number"&&(g.minimum=$,typeof D=="number"&&this.target!=="draft-4"&&(D>=$?delete g.minimum:delete g.exclusiveMinimum)),typeof w=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.maximum=w,g.exclusiveMaximum=!0):g.exclusiveMaximum=w),typeof k=="number"&&(g.maximum=k,typeof w=="number"&&this.target!=="draft-4"&&(w<=k?delete g.maximum:delete g.exclusiveMaximum)),typeof P=="number"&&(g.multipleOf=P);break}case"boolean":{let g=j;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(j.type="string",j.nullable=!0,j.enum=[null]):j.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{j.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=j,{minimum:$,maximum:k}=r._zod.bag;typeof $=="number"&&(g.minItems=$),typeof k=="number"&&(g.maxItems=k),g.type="array",g.items=this.process(t.element,z(m({},I),{path:[...I.path,"items"]}));break}case"object":{let g=j;g.type="object",g.properties={};let $=t.shape;for(let P in $)g.properties[P]=this.process($[P],z(m({},I),{path:[...I.path,"properties",P]}));let k=new Set(Object.keys($)),N=new Set([...k].filter(P=>{let w=t.shape[P]._zod;return this.io==="input"?w.optin===void 0:w.optout===void 0}));N.size>0&&(g.required=Array.from(N)),((x=t.catchall)==null?void 0:x._zod.def.type)==="never"?g.additionalProperties=!1:t.catchall?t.catchall&&(g.additionalProperties=this.process(t.catchall,z(m({},I),{path:[...I.path,"additionalProperties"]}))):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=j,$=t.options.map((k,N)=>this.process(k,z(m({},I),{path:[...I.path,"anyOf",N]})));g.anyOf=$;break}case"intersection":{let g=j,$=this.process(t.left,z(m({},I),{path:[...I.path,"allOf",0]})),k=this.process(t.right,z(m({},I),{path:[...I.path,"allOf",1]})),N=w=>"allOf"in w&&Object.keys(w).length===1,P=[...N($)?$.allOf:[$],...N(k)?k.allOf:[k]];g.allOf=P;break}case"tuple":{let g=j;g.type="array";let $=this.target==="draft-2020-12"?"prefixItems":"items",k=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",N=t.items.map((B,V)=>this.process(B,z(m({},I),{path:[...I.path,$,V]}))),P=t.rest?this.process(t.rest,z(m({},I),{path:[...I.path,k,...this.target==="openapi-3.0"?[t.items.length]:[]]})):null;this.target==="draft-2020-12"?(g.prefixItems=N,P&&(g.items=P)):this.target==="openapi-3.0"?(g.items={anyOf:N},P&&g.items.anyOf.push(P),g.minItems=N.length,P||(g.maxItems=N.length)):(g.items=N,P&&(g.additionalItems=P));let{minimum:w,maximum:D}=r._zod.bag;typeof w=="number"&&(g.minItems=w),typeof D=="number"&&(g.maxItems=D);break}case"record":{let g=j;g.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(g.propertyNames=this.process(t.keyType,z(m({},I),{path:[...I.path,"propertyNames"]}))),g.additionalProperties=this.process(t.valueType,z(m({},I),{path:[...I.path,"additionalProperties"]}));break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=j,$=Ge(t.entries);$.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),g.enum=$;break}case"literal":{let g=j,$=[];for(let k of t.values)if(k===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");$.push(Number(k))}else $.push(k);if($.length!==0)if($.length===1){let k=$[0];g.type=k===null?"null":typeof k,this.target==="draft-4"||this.target==="openapi-3.0"?g.enum=[k]:g.const=k}else $.every(k=>typeof k=="number")&&(g.type="number"),$.every(k=>typeof k=="string")&&(g.type="string"),$.every(k=>typeof k=="boolean")&&(g.type="string"),$.every(k=>k===null)&&(g.type="null"),g.enum=$;break}case"file":{let g=j,$={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:N,mime:P}=r._zod.bag;k!==void 0&&($.minLength=k),N!==void 0&&($.maxLength=N),P?P.length===1?($.contentMediaType=P[0],Object.assign(g,$)):g.anyOf=P.map(w=>z(m({},$),{contentMediaType:w})):Object.assign(g,$);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(t.innerType,I);this.target==="openapi-3.0"?(l.ref=t.innerType,j.nullable=!0):j.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,I),l.ref=t.innerType;break}case"success":{let g=j;g.type="boolean";break}case"default":{this.process(t.innerType,I),l.ref=t.innerType,j.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,I),l.ref=t.innerType,this.io==="input"&&(j._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,I),l.ref=t.innerType;let g;try{g=t.catchValue(void 0)}catch($){throw new Error("Dynamic catch values are not supported in JSON Schema")}j.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=j,$=r._zod.pattern;if(!$)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=$.source;break}case"pipe":{let g=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(g,I),l.ref=g;break}case"readonly":{this.process(t.innerType,I),l.ref=t.innerType,j.readOnly=!0;break}case"promise":{this.process(t.innerType,I),l.ref=t.innerType;break}case"optional":{this.process(t.innerType,I),l.ref=t.innerType;break}case"lazy":{let g=r._zod.innerType;this.process(g,I),l.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let a=this.metadataRegistry.get(r);return a&&Object.assign(l.schema,a),this.io==="input"&&J(r)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((S=(i=l.schema).default)!=null||(i.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(r).schema}emit(r,n){var s,v,f,h,x,S,I,C,j,g;let i={cycles:(s=n==null?void 0:n.cycles)!=null?s:"ref",reused:(v=n==null?void 0:n.reused)!=null?v:"inline",external:(f=n==null?void 0:n.external)!=null?f:void 0},t=this.seen.get(r);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=$=>{var D,B,V,re,F;let k=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let ne=(D=i.external.registry.get($[0]))==null?void 0:D.id,Je=(B=i.external.uri)!=null?B:Vr=>Vr;if(ne)return{ref:Je(ne)};let ee=(re=(V=$[1].defId)!=null?V:$[1].schema.id)!=null?re:"schema".concat(this.counter++);return $[1].defId=ee,{defId:ee,ref:"".concat(Je("__shared"),"#/").concat(k,"/").concat(ee)}}if($[1]===t)return{ref:"#"};let P="".concat("#","/").concat(k,"/"),w=(F=$[1].schema.id)!=null?F:"__schema".concat(this.counter++);return{defId:w,ref:P+w}},u=$=>{if($[1].schema.$ref)return;let k=$[1],{ref:N,defId:P}=o($);k.def=m({},k.schema),P&&(k.defId=P);let w=k.schema;for(let D in w)delete w[D];w.$ref=N};if(i.cycles==="throw")for(let $ of this.seen.entries()){let k=$[1];if(k.cycle)throw new Error("Cycle detected: "+"#/".concat((h=k.cycle)==null?void 0:h.join("/"),"/<root>")+\'\\n\\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.\')}for(let $ of this.seen.entries()){let k=$[1];if(r===$[0]){u($);continue}if(i.external){let P=(x=i.external.registry.get($[0]))==null?void 0:x.id;if(r!==$[0]&&P){u($);continue}}if((S=this.metadataRegistry.get($[0]))==null?void 0:S.id){u($);continue}if(k.cycle){u($);continue}if(k.count>1&&i.reused==="ref"){u($);continue}}let l=($,k)=>{var B,V,re;let N=this.seen.get($),P=(B=N.def)!=null?B:N.schema,w=m({},P);if(N.ref===null)return;let D=N.ref;if(N.ref=null,D){l(D,k);let F=this.seen.get(D).schema;F.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?(P.allOf=(V=P.allOf)!=null?V:[],P.allOf.push(F)):(Object.assign(P,F),Object.assign(P,w))}N.isParent||this.override({zodSchema:$,jsonSchema:P,path:(re=N.path)!=null?re:[]})};for(let $ of[...this.seen.entries()].reverse())l($[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn("Invalid target: ".concat(this.target)),(I=i.external)!=null&&I.uri){let $=(C=i.external.registry.get(r))==null?void 0:C.id;if(!$)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri($)}Object.assign(c,t.def);let a=(g=(j=i.external)==null?void 0:j.defs)!=null?g:{};for(let $ of this.seen.entries()){let k=$[1];k.def&&k.defId&&(a[k.defId]=k.def)}i.external||Object.keys(a).length>0&&(this.target==="draft-2020-12"?c.$defs=a:c.definitions=a);try{return JSON.parse(JSON.stringify(c))}catch($){throw new Error("Error converting schema to JSON.")}}};function Qo(e,r){if(e instanceof Te){let i=new xt(r),t={};for(let l of e._idmap.entries()){let[c,a]=l;i.process(a)}let o={},u={registry:e,uri:r==null?void 0:r.uri,defs:t};for(let l of e._idmap.entries()){let[c,a]=l;o[c]=i.emit(a,z(m({},r),{external:u}))}if(Object.keys(t).length>0){let l=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:t}}return{schemas:o}}let n=new xt(r);return n.process(e),n.emit(e,r)}function J(e,r){let n=r!=null?r:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return J(t.element,n);case"object":{for(let o in t.shape)if(J(t.shape[o],n))return!0;return!1}case"union":{for(let o of t.options)if(J(o,n))return!0;return!1}case"intersection":return J(t.left,n)||J(t.right,n);case"tuple":{for(let o of t.items)if(J(o,n))return!0;return!!(t.rest&&J(t.rest,n))}case"record":return J(t.keyType,n)||J(t.valueType,n);case"map":return J(t.keyType,n)||J(t.valueType,n);case"set":return J(t.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return J(t.innerType,n);case"lazy":return J(t.getter(),n);case"default":return J(t.innerType,n);case"prefault":return J(t.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return J(t.in,n)||J(t.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error("Unknown schema type: ".concat(t.type))}var Ho={};var kt={};_e(kt,{ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,date:()=>ta,datetime:()=>ea,duration:()=>na,time:()=>ra});var Ir=d("ZodISODateTime",(e,r)=>{mi.init(e,r),A.init(e,r)});function ea(e){return po(Ir,e)}var wr=d("ZodISODate",(e,r)=>{fi.init(e,r),A.init(e,r)});function ta(e){return go(wr,e)}var Sr=d("ZodISOTime",(e,r)=>{pi.init(e,r),A.init(e,r)});function ra(e){return vo(Sr,e)}var jr=d("ZodISODuration",(e,r)=>{gi.init(e,r),A.init(e,r)});function na(e){return ho(jr,e)}var xc=(e,r)=>{Qe.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>et(e,n)},flatten:{value:n=>He(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Se,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Se,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bd=d("ZodError",xc),X=d("ZodError",xc,{Parent:Error});var ia=Pe(X),oa=Ue(X),aa=Ne(X),ua=Ze(X),ca=Tt(X),la=Et(X),sa=At(X),da=Rt(X),ma=Lt(X),fa=Ct(X),pa=Vt(X),ga=Ft(X);var U=d("ZodType",(e,r)=>(O.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>{var i;return e.clone(_.mergeDefs(r,{checks:[...(i=r.checks)!=null?i:[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}))},e.clone=(n,i)=>K(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>ia(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>aa(e,n,i),e.parseAsync=async(n,i)=>oa(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ua(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>ca(e,n,i),e.decode=(n,i)=>la(e,n,i),e.encodeAsync=async(n,i)=>sa(e,n,i),e.decodeAsync=async(n,i)=>da(e,n,i),e.safeEncode=(n,i)=>ma(e,n,i),e.safeDecode=(n,i)=>fa(e,n,i),e.safeEncodeAsync=async(n,i)=>pa(e,n,i),e.safeDecodeAsync=async(n,i)=>ga(e,n,i),e.refine=(n,i)=>e.check(cl(n,i)),e.superRefine=n=>e.check(ll(n)),e.overwrite=n=>e.check(se(n)),e.optional=()=>Pr(e),e.nullable=()=>Ur(e),e.nullish=()=>Pr(Ur(e)),e.nonoptional=n=>qc(e,n),e.array=()=>Tr(e),e.or=n=>Ra([e,n]),e.and=n=>Ec(e,n),e.transform=n=>Nr(e,Va(n)),e.default=n=>Gc(e,n),e.prefault=n=>Xc(e,n),e.catch=n=>Hc(e,n),e.pipe=n=>Nr(e,n),e.readonly=()=>rl(e),e.describe=n=>{let i=e.clone();return oe.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=oe.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return oe.get(e);let i=e.clone();return oe.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$a=d("_ZodString",(e,r)=>{var i,t,o;ke.init(e,r),U.init(e,r);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(t=n.minimum)!=null?t:null,e.maxLength=(o=n.maximum)!=null?o:null,e.regex=(...u)=>e.check(dt(...u)),e.includes=(...u)=>e.check(pt(...u)),e.startsWith=(...u)=>e.check(gt(...u)),e.endsWith=(...u)=>e.check(vt(...u)),e.min=(...u)=>e.check($e(...u)),e.max=(...u)=>e.check(Ae(...u)),e.length=(...u)=>e.check(Re(...u)),e.nonempty=(...u)=>e.check($e(1,...u)),e.lowercase=u=>e.check(mt(u)),e.uppercase=u=>e.check(ft(u)),e.trim=()=>e.check(bt()),e.normalize=(...u)=>e.check($t(...u)),e.toLowerCase=()=>e.check(_t()),e.toUpperCase=()=>e.check(yt())}),It=d("ZodString",(e,r)=>{ke.init(e,r),$a.init(e,r),e.email=n=>e.check(or(ba,n)),e.url=n=>e.check(lt(Zr,n)),e.jwt=n=>e.check(zr(Da,n)),e.emoji=n=>e.check(sr(_a,n)),e.guid=n=>e.check(ct(Or,n)),e.uuid=n=>e.check(ar(de,n)),e.uuidv4=n=>e.check(ur(de,n)),e.uuidv6=n=>e.check(cr(de,n)),e.uuidv7=n=>e.check(lr(de,n)),e.nanoid=n=>e.check(dr(ya,n)),e.guid=n=>e.check(ct(Or,n)),e.cuid=n=>e.check(mr(xa,n)),e.cuid2=n=>e.check(fr(ka,n)),e.ulid=n=>e.check(pr(za,n)),e.base64=n=>e.check(yr(Ua,n)),e.base64url=n=>e.check(xr(Na,n)),e.xid=n=>e.check(gr(Ia,n)),e.ksuid=n=>e.check(vr(wa,n)),e.ipv4=n=>e.check(hr(Sa,n)),e.ipv6=n=>e.check($r(ja,n)),e.cidrv4=n=>e.check(br(Oa,n)),e.cidrv6=n=>e.check(_r(Pa,n)),e.e164=n=>e.check(kr(Za,n)),e.datetime=n=>e.check(ea(n)),e.date=n=>e.check(ta(n)),e.time=n=>e.check(ra(n)),e.duration=n=>e.check(na(n))});function va(e){return so(It,e)}var A=d("ZodStringFormat",(e,r)=>{T.init(e,r),$a.init(e,r)}),ba=d("ZodEmail",(e,r)=>{ni.init(e,r),A.init(e,r)});function Gd(e){return or(ba,e)}var Or=d("ZodGUID",(e,r)=>{ti.init(e,r),A.init(e,r)});function Wd(e){return ct(Or,e)}var de=d("ZodUUID",(e,r)=>{ri.init(e,r),A.init(e,r)});function Xd(e){return ar(de,e)}function qd(e){return ur(de,e)}function Yd(e){return cr(de,e)}function Qd(e){return lr(de,e)}var Zr=d("ZodURL",(e,r)=>{ii.init(e,r),A.init(e,r)});function Hd(e){return lt(Zr,e)}function em(e){return lt(Zr,m({protocol:/^https?$/,hostname:Q.domain},_.normalizeParams(e)))}var _a=d("ZodEmoji",(e,r)=>{oi.init(e,r),A.init(e,r)});function tm(e){return sr(_a,e)}var ya=d("ZodNanoID",(e,r)=>{ai.init(e,r),A.init(e,r)});function rm(e){return dr(ya,e)}var xa=d("ZodCUID",(e,r)=>{ui.init(e,r),A.init(e,r)});function nm(e){return mr(xa,e)}var ka=d("ZodCUID2",(e,r)=>{ci.init(e,r),A.init(e,r)});function im(e){return fr(ka,e)}var za=d("ZodULID",(e,r)=>{li.init(e,r),A.init(e,r)});function om(e){return pr(za,e)}var Ia=d("ZodXID",(e,r)=>{si.init(e,r),A.init(e,r)});function am(e){return gr(Ia,e)}var wa=d("ZodKSUID",(e,r)=>{di.init(e,r),A.init(e,r)});function um(e){return vr(wa,e)}var Sa=d("ZodIPv4",(e,r)=>{vi.init(e,r),A.init(e,r)});function cm(e){return hr(Sa,e)}var ja=d("ZodIPv6",(e,r)=>{hi.init(e,r),A.init(e,r)});function lm(e){return $r(ja,e)}var Oa=d("ZodCIDRv4",(e,r)=>{$i.init(e,r),A.init(e,r)});function sm(e){return br(Oa,e)}var Pa=d("ZodCIDRv6",(e,r)=>{bi.init(e,r),A.init(e,r)});function dm(e){return _r(Pa,e)}var Ua=d("ZodBase64",(e,r)=>{yi.init(e,r),A.init(e,r)});function mm(e){return yr(Ua,e)}var Na=d("ZodBase64URL",(e,r)=>{xi.init(e,r),A.init(e,r)});function fm(e){return xr(Na,e)}var Za=d("ZodE164",(e,r)=>{ki.init(e,r),A.init(e,r)});function pm(e){return kr(Za,e)}var Da=d("ZodJWT",(e,r)=>{zi.init(e,r),A.init(e,r)});function gm(e){return zr(Da,e)}var wt=d("ZodCustomStringFormat",(e,r)=>{Ii.init(e,r),A.init(e,r)});function vm(e,r,n={}){return Le(wt,e,r,n)}function hm(e){return Le(wt,"hostname",Q.hostname,e)}function $m(e){return Le(wt,"hex",Q.hex,e)}function bm(e,r){var o;let n=(o=r==null?void 0:r.enc)!=null?o:"hex",i="".concat(e,"_").concat(n),t=Q[i];if(!t)throw new Error("Unrecognized hash format: ".concat(i));return Le(wt,i,t,r)}var St=d("ZodNumber",(e,r)=>{var i,t,o,u,l,c,a,s,v;Yt.init(e,r),U.init(e,r),e.gt=(f,h)=>e.check(le(f,h)),e.gte=(f,h)=>e.check(W(f,h)),e.min=(f,h)=>e.check(W(f,h)),e.lt=(f,h)=>e.check(ce(f,h)),e.lte=(f,h)=>e.check(H(f,h)),e.max=(f,h)=>e.check(H(f,h)),e.int=f=>e.check(ha(f)),e.safe=f=>e.check(ha(f)),e.positive=f=>e.check(le(0,f)),e.nonnegative=f=>e.check(W(0,f)),e.negative=f=>e.check(ce(0,f)),e.nonpositive=f=>e.check(H(0,f)),e.multipleOf=(f,h)=>e.check(Ie(f,h)),e.step=(f,h)=>e.check(Ie(f,h)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(o=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(t=n.exclusiveMinimum)!=null?t:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(c=Math.min((u=n.maximum)!=null?u:Number.POSITIVE_INFINITY,(l=n.exclusiveMaximum)!=null?l:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((a=n.format)!=null?a:"").includes("int")||Number.isSafeInteger((s=n.multipleOf)!=null?s:.5),e.isFinite=!0,e.format=(v=n.format)!=null?v:null});function kc(e){return $o(St,e)}var Ve=d("ZodNumberFormat",(e,r)=>{wi.init(e,r),St.init(e,r)});function ha(e){return _o(Ve,e)}function _m(e){return yo(Ve,e)}function ym(e){return xo(Ve,e)}function xm(e){return ko(Ve,e)}function km(e){return zo(Ve,e)}var jt=d("ZodBoolean",(e,r)=>{it.init(e,r),U.init(e,r)});function zc(e){return Io(jt,e)}var Ot=d("ZodBigInt",(e,r)=>{var i,t,o;Qt.init(e,r),U.init(e,r),e.gte=(u,l)=>e.check(W(u,l)),e.min=(u,l)=>e.check(W(u,l)),e.gt=(u,l)=>e.check(le(u,l)),e.gte=(u,l)=>e.check(W(u,l)),e.min=(u,l)=>e.check(W(u,l)),e.lt=(u,l)=>e.check(ce(u,l)),e.lte=(u,l)=>e.check(H(u,l)),e.max=(u,l)=>e.check(H(u,l)),e.positive=u=>e.check(le(BigInt(0),u)),e.negative=u=>e.check(ce(BigInt(0),u)),e.nonpositive=u=>e.check(H(BigInt(0),u)),e.nonnegative=u=>e.check(W(BigInt(0),u)),e.multipleOf=(u,l)=>e.check(Ie(u,l));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(t=n.maximum)!=null?t:null,e.format=(o=n.format)!=null?o:null});function zm(e){return So(Ot,e)}var Ta=d("ZodBigIntFormat",(e,r)=>{Si.init(e,r),Ot.init(e,r)});function Im(e){return Oo(Ta,e)}function wm(e){return Po(Ta,e)}var Ic=d("ZodSymbol",(e,r)=>{ji.init(e,r),U.init(e,r)});function Sm(e){return Uo(Ic,e)}var wc=d("ZodUndefined",(e,r)=>{Oi.init(e,r),U.init(e,r)});function jm(e){return No(wc,e)}var Sc=d("ZodNull",(e,r)=>{Pi.init(e,r),U.init(e,r)});function jc(e){return Zo(Sc,e)}var Oc=d("ZodAny",(e,r)=>{Ui.init(e,r),U.init(e,r)});function Om(){return Do(Oc)}var Pc=d("ZodUnknown",(e,r)=>{Ni.init(e,r),U.init(e,r)});function Ce(){return To(Pc)}var Uc=d("ZodNever",(e,r)=>{Zi.init(e,r),U.init(e,r)});function Ea(e){return Eo(Uc,e)}var Nc=d("ZodVoid",(e,r)=>{Di.init(e,r),U.init(e,r)});function Pm(e){return Ao(Nc,e)}var Dr=d("ZodDate",(e,r)=>{Ti.init(e,r),U.init(e,r),e.min=(i,t)=>e.check(W(i,t)),e.max=(i,t)=>e.check(H(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Um(e){return Ro(Dr,e)}var Zc=d("ZodArray",(e,r)=>{Ei.init(e,r),U.init(e,r),e.element=r.element,e.min=(n,i)=>e.check($e(n,i)),e.nonempty=n=>e.check($e(1,n)),e.max=(n,i)=>e.check(Ae(n,i)),e.length=(n,i)=>e.check(Re(n,i)),e.unwrap=()=>e.element});function Tr(e,r){return Ko(Zc,e,r)}function Nm(e){let r=e._zod.def.shape;return Ca(Object.keys(r))}var Er=d("ZodObject",(e,r)=>{Ai.init(e,r),U.init(e,r),_.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Ca(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(z(m({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.loose=()=>e.clone(z(m({},e._zod.def),{catchall:Ce()})),e.strict=()=>e.clone(z(m({},e._zod.def),{catchall:Ea()})),e.strip=()=>e.clone(z(m({},e._zod.def),{catchall:void 0})),e.extend=n=>_.extend(e,n),e.safeExtend=n=>_.safeExtend(e,n),e.merge=n=>_.merge(e,n),e.pick=n=>_.pick(e,n),e.omit=n=>_.omit(e,n),e.partial=(...n)=>_.partial(Fa,e,n[0]),e.required=(...n)=>_.required(Ja,e,n[0])});function Zm(e,r){let n=m({type:"object",shape:e!=null?e:{}},_.normalizeParams(r));return new Er(n)}function Dm(e,r){return new Er(m({type:"object",shape:e,catchall:Ea()},_.normalizeParams(r)))}function Tm(e,r){return new Er(m({type:"object",shape:e,catchall:Ce()},_.normalizeParams(r)))}var Aa=d("ZodUnion",(e,r)=>{Ht.init(e,r),U.init(e,r),e.options=r.options});function Ra(e,r){return new Aa(m({type:"union",options:e},_.normalizeParams(r)))}var Dc=d("ZodDiscriminatedUnion",(e,r)=>{Aa.init(e,r),Ri.init(e,r)});function Em(e,r,n){return new Dc(m({type:"union",options:r,discriminator:e},_.normalizeParams(n)))}var Tc=d("ZodIntersection",(e,r)=>{Li.init(e,r),U.init(e,r)});function Ec(e,r){return new Tc({type:"intersection",left:e,right:r})}var Ac=d("ZodTuple",(e,r)=>{er.init(e,r),U.init(e,r),e.rest=n=>e.clone(z(m({},e._zod.def),{rest:n}))});function Rc(e,r,n){let i=r instanceof O,t=i?n:r,o=i?r:null;return new Ac(m({type:"tuple",items:e,rest:o},_.normalizeParams(t)))}var La=d("ZodRecord",(e,r)=>{Ci.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Lc(e,r,n){return new La(m({type:"record",keyType:e,valueType:r},_.normalizeParams(n)))}function Am(e,r,n){let i=K(e);return i._zod.values=void 0,new La(m({type:"record",keyType:i,valueType:r},_.normalizeParams(n)))}var Cc=d("ZodMap",(e,r)=>{Vi.init(e,r),U.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Rm(e,r,n){return new Cc(m({type:"map",keyType:e,valueType:r},_.normalizeParams(n)))}var Vc=d("ZodSet",(e,r)=>{Fi.init(e,r),U.init(e,r),e.min=(...n)=>e.check(we(...n)),e.nonempty=n=>e.check(we(1,n)),e.max=(...n)=>e.check(Ee(...n)),e.size=(...n)=>e.check(st(...n))});function Lm(e,r){return new Vc(m({type:"set",valueType:e},_.normalizeParams(r)))}var zt=d("ZodEnum",(e,r)=>{Ji.init(e,r),U.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let o={};for(let u of i)if(n.has(u))o[u]=r.entries[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))},e.exclude=(i,t)=>{let o=m({},r.entries);for(let u of i)if(n.has(u))delete o[u];else throw new Error("Key ".concat(u," not found in enum"));return new zt(z(m(z(m({},r),{checks:[]}),_.normalizeParams(t)),{entries:o}))}});function Ca(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new zt(m({type:"enum",entries:n},_.normalizeParams(r)))}function Cm(e,r){return new zt(m({type:"enum",entries:e},_.normalizeParams(r)))}var Fc=d("ZodLiteral",(e,r)=>{Mi.init(e,r),U.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Vm(e,r){return new Fc(m({type:"literal",values:Array.isArray(e)?e:[e]},_.normalizeParams(r)))}var Jc=d("ZodFile",(e,r)=>{Bi.init(e,r),U.init(e,r),e.min=(n,i)=>e.check(we(n,i)),e.max=(n,i)=>e.check(Ee(n,i)),e.mime=(n,i)=>e.check(ht(Array.isArray(n)?n:[n],i))});function Fm(e){return Go(Jc,e)}var Mc=d("ZodTransform",(e,r)=>{Ki.init(e,r),U.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(e.constructor.name);n.addIssue=o=>{var u,l,c;if(typeof o=="string")n.issues.push(_.issue(o,n.value,r));else{let a=o;a.fatal&&(a.continue=!1),(u=a.code)!=null||(a.code="custom"),(l=a.input)!=null||(a.input=n.value),(c=a.inst)!=null||(a.inst=e),n.issues.push(_.issue(a))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n)):(n.value=t,n)}});function Va(e){return new Mc({type:"transform",transform:e})}var Fa=d("ZodOptional",(e,r)=>{Gi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Pr(e){return new Fa({type:"optional",innerType:e})}var Bc=d("ZodNullable",(e,r)=>{Wi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Ur(e){return new Bc({type:"nullable",innerType:e})}function Jm(e){return Pr(Ur(e))}var Kc=d("ZodDefault",(e,r)=>{Xi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gc(e,r){return new Kc({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Wc=d("ZodPrefault",(e,r)=>{qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Xc(e,r){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():_.shallowClone(r)}})}var Ja=d("ZodNonOptional",(e,r)=>{Yi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qc(e,r){return new Ja(m({type:"nonoptional",innerType:e},_.normalizeParams(r)))}var Yc=d("ZodSuccess",(e,r)=>{Qi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e){return new Yc({type:"success",innerType:e})}var Qc=d("ZodCatch",(e,r)=>{Hi.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hc(e,r){return new Qc({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var el=d("ZodNaN",(e,r)=>{eo.init(e,r),U.init(e,r)});function Bm(e){return Co(el,e)}var Ma=d("ZodPipe",(e,r)=>{to.init(e,r),U.init(e,r),e.in=r.in,e.out=r.out});function Nr(e,r){return new Ma({type:"pipe",in:e,out:r})}var Ba=d("ZodCodec",(e,r)=>{Ma.init(e,r),ot.init(e,r)});function Km(e,r,n){return new Ba({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var tl=d("ZodReadonly",(e,r)=>{ro.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function rl(e){return new tl({type:"readonly",innerType:e})}var nl=d("ZodTemplateLiteral",(e,r)=>{no.init(e,r),U.init(e,r)});function Gm(e,r){return new nl(m({type:"template_literal",parts:e},_.normalizeParams(r)))}var il=d("ZodLazy",(e,r)=>{ao.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.getter()});function ol(e){return new il({type:"lazy",getter:e})}var al=d("ZodPromise",(e,r)=>{oo.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Wm(e){return new al({type:"promise",innerType:e})}var ul=d("ZodFunction",(e,r)=>{io.init(e,r),U.init(e,r)});function Xm(e){var r,n;return new ul({type:"function",input:Array.isArray(e==null?void 0:e.input)?Rc(e==null?void 0:e.input):(r=e==null?void 0:e.input)!=null?r:Tr(Ce()),output:(n=e==null?void 0:e.output)!=null?n:Ce()})}var Ar=d("ZodCustom",(e,r)=>{uo.init(e,r),U.init(e,r)});function qm(e){let r=new R({check:"custom"});return r._zod.check=e,r}function Ym(e,r){return Wo(Ar,e!=null?e:()=>!0,r)}function cl(e,r={}){return Xo(Ar,e,r)}function ll(e){return qo(e)}function Qm(e,r={error:"Input not instance of ".concat(e.name)}){let n=new Ar(m({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0},_.normalizeParams(r)));return n._zod.bag.Class=e,n}var Hm=(...e)=>Yo({Codec:Ba,Boolean:jt,String:It},...e);function ef(e){let r=ol(()=>Ra([va(e),kc(),zc(),jc(),Tr(r),Lc(va(),r)]));return r}function tf(e,r){return Nr(Va(e),r)}var rf={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nf(e){L({customError:e})}function of(){return L().customError}var Ka;Ka||(Ka={});var Rr={};_e(Rr,{bigint:()=>lf,boolean:()=>cf,date:()=>sf,number:()=>uf,string:()=>af});function af(e){return mo(It,e)}function uf(e){return bo(St,e)}function cf(e){return wo(jt,e)}function lf(e){return jo(Ot,e)}function sf(e){return Lo(Dr,e)}L(tr());var bv=Fe.union([Fe.enum(["low","medium","high","always-visible"]),Fe.number()]);var Lr=5;var df=9,be=200,Cr=10;function sl(e,r,n,i,t,o,u="-1"){var N,P;let l=1/0,c=1/0,a=-1/0,s=-1/0,v=new E(-Cr,0,5,n),f=new E(-Cr,0,r,5),h=new E(r-5,0,r+Cr,n),x=new E(0,n-5,r,n+Cr),S=mf(r,n,i,t,o),I=[v,f,h,x],C=new E(-be,-be,r+be*2,n+be*2);for(let w of e){let D,B;for(let V=0;V<w.bboxes.length;V++){if(w.bboxes[V]==null||(D=w.bboxes[V].boundingBox,B=w.bboxes[V].index,w.lockedToStrategyIndex!==-1&&B!==w.lockedToStrategyIndex))continue;let[re,F,ne,Je]=D,[ee,Vr,Ga,ml]=[w.y-re,w.y+F,w.x-ne,w.x+Je],Fr=Ga,Jr=ee,Wa=ml-Ga,Xa=Vr-ee;l=Math.min(l,Fr)-be,c=Math.min(c,Jr)-be,a=Math.max(a,Fr+Wa)+be,s=Math.max(s,Jr+Xa)+be,w.bboxes[V].boundingRect=new E(Fr,Jr,Wa,Xa)}}let j=new Me(new E(l,c,a-l,s-c)),g={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},$=0;for(let w=0;w<e.length;w++){let D=e[w];((P=(N=D.bboxes)==null?void 0:N[0])==null?void 0:P.index)===df&&(g.staticColliders.push(D.bboxes[0].boundingRect),j.insert(D.bboxes[0].boundingRect),$++)}e=e.slice($,e.length);let k;for(let w=0;w<e.length;w++)if(k=e[w],g.colliders[w]=[-1,0],k.enabledAndVisible){let[D,B,V]=[1/0,-1,void 0];for(let{index:re,boundingRect:F}of k.bboxes){if(F==null)continue;let ne=[];if(ne=j.queryRect(F).filter(ee=>F.intersects(ee)),k.shouldCollideWithScreenEdges&&I.forEach(ee=>{F.intersects(ee)&&ne.push(ee)}),F.intersects(S)){g.colliders[w]=[-1,0,F];break}if(ne.length<=D&&(V=F,B=re,D=ne.length),ne.length===0){j.insert(F),g.colliders[w]=[re,C.contains(F)?0:1,F];break}}k.rank===Lr&&V!=null&&(j.insert(V),g.colliders[w]=[B,C.contains(V)?0:1,V])}else g.colliders[w]=[-1,0];return g}function mf(e,r,n,i,t){switch(t){case"top-left":return new E(0,0,n,i);case"top-right":return new E(e-n,0,n,i);case"bottom-left":return new E(0,r-i,n,i);case"bottom-right":return new E(e-n,r-i,n,i);case"center":return new E((e-n)/2,(r-i)/2,n,i);case"top":return new E((e-n)/2,0,n,i);case"bottom":return new E((e-n)/2,r-i,n,i);case"left":return new E(0,(r-i)/2,n,i);case"right":return new E(e-n,(r-i)/2,n,i);default:return new E(0,r-i,n,i)}}function dl(e){let r=e[0].map(n=>{let i=n[0].map(t=>({index:t[4],boundingBox:[t[0],t[1],t[2],t[3]]}));return{enabledAndVisible:n[1]===1,rank:n[2]===1?Lr:0,x:n[3],y:n[4],shouldCollideWithScreenEdges:n[5]===1,bboxes:i,lockedToStrategyIndex:n[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:r,devicePixelRatio:e[1]}}self.onmessage=e=>{let r=dl(e.data);self.postMessage(sl(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId))};})();\n';p();p();p();p();p();function cF(e,r){return r.x+r.w<e.x+e.w&&r.x>e.x&&r.y>e.y&&r.y+r.h<e.y+e.h}p();function dF(e,r){let[t,n]=r;return t>=e.x&&t<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}p();function pF(e,r){let t=r.x,n=r.y,o=r.x+r.w,i=r.y+r.h,a=e.x,l=e.y,u=e.x+e.w,c=e.y+e.h;return t<u&&a<o&&n<c&&l<i}p();function Vs(e,r){for(let t=0;t<r.length;t++)e.push(r[t])}p();var Ke=class{constructor(r,t,n,o,i){f(this,"x");f(this,"y");f(this,"w");f(this,"h");f(this,"userData");this.userData=typeof i>"u"?null:i,this.x=r,this.y=t,this.w=n,this.h=o}contains(r){return r===this?!1:cF(this,r)}intersects(r){return pF(this,r)}intersectsPoint(r){return dF(this,r)}draw(r){r.fillStyle="rgba(123,222,26, 0.8)",r.fillRect(this.x,this.y,this.w,this.h)}};var ci=class e{constructor(r,t){f(this,"topLeft");f(this,"topRight");f(this,"bottomLeft");f(this,"bottomRight");f(this,"divided",!1);f(this,"boundary");f(this,"capacity",16);f(this,"objects",[]);f(this,"parent");this.parent=t,this.boundary=r}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:r,y:t,w:n,h:o}=this.boundary;this.topLeft=new e(new Ke(r,t,n/2,o/2),this),this.topRight=new e(new Ke(r+n/2,t,n/2,o/2),this),this.bottomLeft=new e(new Ke(r,t+o/2,n/2,o/2),this),this.bottomRight=new e(new Ke(r+n/2,t+o/2,n/2,o/2),this),this.divided=!0}queryRect(r){let t=[];if(this.boundary.intersects(r))t.push(...this.objects);else return[];return this.divided&&(Vs(t,this.topLeft.queryRect(r)),Vs(t,this.topRight.queryRect(r)),Vs(t,this.bottomLeft.queryRect(r)),Vs(t,this.bottomRight.queryRect(r))),t}queryPoint(r){let t=[];if(this.boundary.intersectsPoint(r))t.push(...this.objects);else return[];return this.divided&&(Vs(t,this.topLeft.queryPoint(r)),Vs(t,this.topRight.queryPoint(r)),Vs(t,this.bottomLeft.queryPoint(r)),Vs(t,this.bottomRight.queryPoint(r))),t}insert(r){return(this.parent?!this.boundary.contains(r):!this.boundary.intersects(r))?!1:this.objects.length<this.capacity?(this.objects.push(r),!0):(this.divided||this.subdivide(),(this.topLeft.insert(r)||this.topRight.insert(r)||this.bottomLeft.insert(r)||this.bottomRight.insert(r))===!1&&this.objects.push(r),!0)}drawObjects(r){this.objects.forEach(t=>t.draw(r)),this.divided&&(this.topLeft.drawObjects(r),this.topRight.drawObjects(r),this.bottomLeft.drawObjects(r),this.bottomRight.drawObjects(r))}draw(r){r.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(r),this.topRight.draw(r),this.bottomLeft.draw(r),this.bottomRight.draw(r)),r.strokeStyle="black",r.lineWidth=4,r.stroke()}};p();function mF(e,r,t){let n,o,i,a=null,l=0;t||(t={});let u=function(){l=t.leading===!1?0:Date.now(),a=null,i=e.apply(n,o),a||(n=o=null)};return function(){let c=Date.now();!l&&t.leading===!1&&(l=c);let d=r-(c-l);return n=globalThis,o=arguments,d<=0||d>r?(a&&(clearTimeout(a),a=null),l=c,i=e.apply(n,o),a||(n=o=null)):!a&&t.trailing!==!1&&(a=setTimeout(u,d)),i}}function fF(e){let r=e[0].map(t=>{let n=t[0].map(o=>({index:o[4],boundingBox:[o[0],o[1],o[2],o[3]]}));return{enabledAndVisible:t[1]===1,rank:t[2]===1?Jc:0,x:t[3],y:t[4],shouldCollideWithScreenEdges:t[5]===1,bboxes:n,lockedToStrategyIndex:t[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:r,devicePixelRatio:e[1]}}p();var rI=9,Wu=200,N1=10;function hF(e,r,t,n,o,i,a="-1"){var F,P;let l=1/0,u=1/0,c=-1/0,d=-1/0,m=new Ke(-N1,0,5,t),h=new Ke(-N1,0,r,5),g=new Ke(r-5,0,r+N1,t),x=new Ke(0,t-5,r,t+N1),E=QZ(r,t,n,o,i),v=[m,h,g,x],I=new Ke(-Wu,-Wu,r+Wu*2,t+Wu*2);for(let O of e){let _,G;for(let L=0;L<O.bboxes.length;L++){if(O.bboxes[L]==null||(_=O.bboxes[L].boundingBox,G=O.bboxes[L].index,O.lockedToStrategyIndex!==-1&&G!==O.lockedToStrategyIndex))continue;let[q,$,K,X]=_,[V,Y,ee,oe]=[O.y-q,O.y+$,O.x-K,O.x+X],le=ee,ve=V,he=oe-ee,de=Y-V;l=Math.min(l,le)-Wu,u=Math.min(u,ve)-Wu,c=Math.max(c,le+he)+Wu,d=Math.max(d,ve+de)+Wu,O.bboxes[L].boundingRect=new Ke(le,ve,he,de)}}let C=new ci(new Ke(l,u,c-l,d-u)),S={msgId:a,colliders:new Array(e.length),staticColliders:[],debug:[]},T=0;for(let O=0;O<e.length;O++){let _=e[O];((P=(F=_.bboxes)==null?void 0:F[0])==null?void 0:P.index)===rI&&(S.staticColliders.push(_.bboxes[0].boundingRect),C.insert(_.bboxes[0].boundingRect),T++)}e=e.slice(T,e.length);let A;for(let O=0;O<e.length;O++)if(A=e[O],S.colliders[O]=[-1,0],A.enabledAndVisible){let[_,G,L]=[1/0,-1,void 0];for(let{index:q,boundingRect:$}of A.bboxes){if($==null)continue;let K=[];if(K=C.queryRect($).filter(V=>$.intersects(V)),A.shouldCollideWithScreenEdges&&v.forEach(V=>{$.intersects(V)&&K.push(V)}),$.intersects(E)){S.colliders[O]=[-1,0,$];break}if(K.length<=_&&(L=$,G=q,_=K.length),K.length===0){C.insert($),S.colliders[O]=[q,I.contains($)?0:1,$];break}}A.rank===Jc&&L!=null&&(C.insert(L),S.colliders[O]=[G,I.contains(L)?0:1,L])}else S.colliders[O]=[-1,0];return S}function QZ(e,r,t,n,o){switch(o){case"top-left":return new Ke(0,0,t,n);case"top-right":return new Ke(e-t,0,t,n);case"bottom-left":return new Ke(0,r-n,t,n);case"bottom-right":return new Ke(e-t,r-n,t,n);case"center":return new Ke((e-t)/2,(r-n)/2,t,n);case"top":return new Ke((e-t)/2,0,t,n);case"bottom":return new Ke((e-t)/2,r-n,t,n);case"left":return new Ke(0,(r-n)/2,t,n);case"right":return new Ke(e-t,(r-n)/2,t,n);default:return new Ke(0,r-n,t,n)}}p();var l0=class{constructor(){f(this,"onerror",()=>{});f(this,"onmessage",()=>{});f(this,"postMessage",r=>{let t=fF(r);this.onmessage({data:hF(t.colliders,t.totalWidth,t.totalHeight,t.watermarkWidth,t.watermarkHeight,t.watermarkPosition,t.msgId)})});f(this,"terminate",()=>{})}};var qp=!1,eH=150,j1=class extends Ge{constructor(t,n,o=!0){super();f(this,"worker");f(this,"debugContext");f(this,"debugCanvas");f(this,"collidersDirty",!0);f(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);f(this,"visibleCollidersQTree",new ci(new Ke(0,0,0,0)));f(this,"interactiveCollidersQTree",new ci(new Ke(0,0,0,0)));f(this,"coreState");f(this,"postMessage");f(this,"showCollisionBoxes",()=>{qp=!0,this.debugCanvas.style.display="block"});f(this,"hideCollisionBoxes",()=>{qp=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"});f(this,"currentMsgId","");f(this,"working",!1);f(this,"_postMessage",()=>{this.worker.postMessage(this.packedMessage)});f(this,"componentArray",[]);f(this,"update",(t,n,o="bottom-left",i=!1,a=[])=>{let l=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let d;for(let m of this.coreState.geometry2DIdsInScene){let h=this.coreState.geometry2DMap.get(m);h&&(d=h.components[0],this.componentArray.push(d))}this.resize(t,n,o),this.collidersDirty=!1,l=!0}else l=this.componentArray.some(d=>d.collisionDirty===!0);l&&this.componentArray.sort((d,m)=>m.rank-d.rank);let u=0;for(let d of a)this.packedMessage[0][u]==null&&(this.packedMessage[0][u]=[]),this.packedMessage[0][u][0]==null&&(this.packedMessage[0][u][0]=[]),this.packedMessage[0][u][0]=[[d.h/2,d.h/2,d.w/2,d.w/2,rI]],this.packedMessage[0][u][1]=1,this.packedMessage[0][u][2]=1,this.packedMessage[0][u][3]=d.x,this.packedMessage[0][u][4]=d.y,this.packedMessage[0][u][5]=0,this.packedMessage[0][u][6]=-1,u++;let c=0;for(;u<this.componentArray.length+a.length;){if(this.packedMessage){let d=this.componentArray[c].toPackedMessage(i&&!l);this.packedMessage[0][u]==null&&(this.packedMessage[0][u]=[]),this.packedMessage[0][u][0]==null&&(this.packedMessage[0][u][0]=[]),this.packedMessage[0][u][0]=d.bboxes,this.packedMessage[0][u][1]=d.enabled&&this.componentArray[c].visible&&!this.componentArray[c].isOccluded?1:0,this.packedMessage[0][u][2]=d.rank===Jc?1:0,this.packedMessage[0][u][3]=d.x,this.packedMessage[0][u][4]=d.y,this.packedMessage[0][u][5]=d.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][u][6]=d.lockedToStrategyIndex}u++,c++}this.working||this.postMessage()});f(this,"resolve",t=>{if(this.working=!1,this.collidersDirty||!t.data)return;let n=t.data.colliders,o=-1,i,a,l,u=new Ke(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new ci(u),this.interactiveCollidersQTree=new ci(u),qp)for(let c of t.data.staticColliders)this.visibleCollidersQTree.insert(new Ke(c.x,c.y,c.w,c.h));for(let c=0;c<this.componentArray.length;c++){let d=this.componentArray[c];n[c]!=null&&(o=n[c][0],i=n[c][2],d.offscreen=n[c][1]===1,o!==-1&&i!=null?(l=new Ke(i.x,i.y,i.w,i.h,{entityId:d.id}),this.visibleCollidersQTree.insert(l),a=this.coreState.geometry2DMap.get(d.id),(a==null?void 0:a.components[1])!=null&&this.interactiveCollidersQTree.insert(l),(d.canShow===!1||d.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in d&&(d.visibilityNeedsUpdate="show"),o!==-1&&o!==d.currentStrategyIndex&&(d.activeBoundingBox=l,d.onStrategySelected(o))):((d.canShow===!0||d.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in d&&(d.visibilityNeedsUpdate="hide"),o!==-1&&o!==d.currentStrategyIndex&&d.onStrategySelected(o)))}qp&&this.drawDebug(),this.publish("visibility-changed")});f(this,"drawDebug",()=>{qp&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))});f(this,"destroy",()=>{this.worker.terminate()});this.worker=o===!1?new l0:fc!==""?new Worker(fc):new Worker(URL.createObjectURL(new Blob([lF],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new l0,this.worker.onmessage=i=>this.resolve(i)},this.coreState=n,this.debugCanvas=t,this.debugContext=t.getContext("2d"),this.worker.onmessage=i=>this.resolve(i),this.postMessage=mF(this._postMessage,eH,!1),qp?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(t,n,o){this.packedMessage[6]=o,this.packedMessage[5]=n,this.packedMessage[4]=t,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};p();p();p();p();var U1=class{constructor(r){f(this,"type");f(this,"event");this.type=0,this.event=r}get timestamp(){return this.event.timeStamp}},z1=class{constructor(){f(this,"taps",[])}add(r){this.lastPointerDown&&r.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(r)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var r;return this.isSingleTap&&((r=this.lastPointerDown)==null?void 0:r.type)===1}get isSingleTapWithOneFinger(){var r;return this.isSingleTap&&((r=this.lastPointerDown)==null?void 0:r.type)===0}get isDoubleTapWithOneFinger(){var r,t;return this.isDoubleTap&&((r=this.taps[0])==null?void 0:r.type)===0&&((t=this.taps[1])==null?void 0:t.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(r){this.taps=this.taps.filter(t=>r-t.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};p();function oI(e){let r=new Set;for(let t of e){let n=t.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!r.has(n.parent);)n=n.parent,n instanceof Pr&&n.type==="group-container"&&n.visible&&n.components[0]&&r.add(n)}return Array.from(r)}var c0=class extends Ge{constructor(t,n,o,i,a){super();f(this,"raycaster",new fa);f(this,"state",{hovered3DEntity:void 0,hovered2DEntities:new Set,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});f(this,"coreState");f(this,"camera");f(this,"worldPlane");f(this,"_quadtree",new ci(new Ke(0,0,0,0)));f(this,"_container");f(this,"lastPointerEvent");f(this,"cursor","grab");f(this,"touchesCount",0);f(this,"isUserInteracting");f(this,"hasTouched",!1);f(this,"onPointerMove",JE(t=>{t&&(t.preventDefault(),this.updateInteractionStateIfPanning(t),(t.pointerType!=="touch"||t.pointerType===void 0&&this.hasTouched)&&this.handleHover(t),this.handleCursor())},y.env.NODE_ENV==="test"?0:16,{leading:!0}));f(this,"tapsControl",new z1);f(this,"onPointerDown",t=>{t.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:t.timeStamp,clientX:t.clientX-this.coreState.containerOffset[0],clientY:t.clientY-this.coreState.containerOffset[1]},this.lastPointerEvent=t,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),t.pointerType==="touch"&&(this.tapsControl.add(new U1(t)),this.touchesCount=Math.max(0,this.touchesCount+1)))});f(this,"clickTimeout");f(this,"onPointerUp",t=>{this.tapsControl.discardOutsideOfWaitWindow(t.timeStamp),this.lastPointerEvent=t,this.touchesCount=Math.max(0,this.touchesCount-1),this.touchesCount===0&&(this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)),this.updateInteractionStateIfPanning(t);let{mouseDownStart:n}=this.state.interaction;!n||this.state.interaction.distanceFromMouseDown==null||(Date.now()<n.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(t.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",t),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(t),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",t),this.flush()):this.handleClick(t)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())});f(this,"dirty3D",!0);f(this,"cachedHitBoxes",{entities:[]});f(this,"ndcPoint",new qe);f(this,"debugPanel");this.isUserInteracting=a,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=o,this._container=t,this.coreState=n,this.worldPlane=i,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMove,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(t){this._quadtree=t}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let t=this.state.hovered3DEntity.components[2];t&&(t.dirty=!0)}}getThreeDIntersectsFromXY(t){this.raycaster.setFromCamera(t,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(i=>{var a,l;return((a=i.object)==null?void 0:a.name)==="worldPlane"||((l=i.object)==null?void 0:l.visible)}),o=n.findIndex(i=>{var a;return((a=i.object)==null?void 0:a.name)==="worldPlane"});return o!==-1&&n.push(n.splice(o,1)[0]),n}getGroupContainerIntersectsFromXY(t){let n=this.getThreeDIntersectsFromXY(t),o;return n!=null&&n.length>0&&(o=oI(n)),o}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(t){let n=t||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserInteracting())return;let{entity3D:o,entity2D:i,position:a,groupContainers:l}=this.intersect(n);(this.detect3DEntityHover(o)||this.detect2DEntityHover(i)||this.detect3DContainerHover(l))&&(this.state.hovered3DEntity=o,this.state.lastHover=o,this.state.hovered2DEntities=new Set(i.map(u=>u.id)),this.state.hovered3DContainers=l,this.publish("hover",{entity2D:i,entity3D:this.state.hovered3DEntity,position:a,groupContainers:l})),this.handleCursor()}handleCursor(){var a;let t=!!(this.state.hovered3DEntity&&((a=this.state.hovered3DEntity)!=null&&a.components[2])||this.state.hovered2DEntities.size>0),n=!!this.state.interaction.mouseDownStart,o=this.state.interaction.isPanning,i=nH(t,o,n);this.cursor!==i&&(this.cursor=i,i==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(t){if(t.length!==this.state.hovered2DEntities.size)return!0;for(let n=0;n<t.length;n++)if(!this.state.hovered2DEntities.has(t[n].id))return!0;return!1}handleClick(t){let n=this.intersect(t);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:t.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let t;for(let n of this.coreState.geometry3DIdsInScene)t=this.coreState.geometry3DMap.get(n),((t==null?void 0:t.type)==="geometry"||(t==null?void 0:t.type)==="model"||(t==null?void 0:t.type)==="path"||(t==null?void 0:t.type)==="custom-geometry")&&t.components[0].mesh&&!this.cachedHitBoxes.entities.includes(t.components[0].mesh)&&this.cachedHitBoxes.entities.push(t.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(t){var T,A,F,P,O;let{clientX:n,clientY:o}=t,i=n-this.coreState.containerOffset[0],a=o-this.coreState.containerOffset[1],l=[i,a],c=this._quadtree.queryPoint(l).filter(_=>_.intersectsPoint(l));this.ndcPoint.x=i/this._container.clientWidth*2-1,this.ndcPoint.y=-(a/this._container.clientHeight)*2+1;let d=this.getThreeDIntersectsFromXY(this.ndcPoint),m=(T=d[0])==null?void 0:T.point,h=[],g=[],x=d.filter(_=>_.object.name!=="worldPlane");for(let _ of x)_.object instanceof Ze&&_.object.material.depthTest===!1?h.push(_):g.push(_);let E=(F=(A=h[0])!=null?A:g[0])!=null?F:void 0,v,I;if(E!=null){if(v=iH(E.object,this.coreState.geometry3DMap),!v){let _=(P=E==null?void 0:E.instanceId)!=null?P:E==null?void 0:E.batchId;v=_!=null&&(E!=null&&E.object.userData.entities)?this.coreState.geometry3DMap.get(E==null?void 0:E.object.userData.entities[_]):this.coreState.geometry3DMap.get(E==null?void 0:E.object.userData.entityId)}v!=null&&v.components[2]&&(I=v)}let C=oI(x),S=[];for(let _ of c)if(((O=_==null?void 0:_.userData)==null?void 0:O.entityId)==="watermark")S.push({id:"watermark"});else{let G=this.coreState.geometry2DMap.get(_==null?void 0:_.userData.entityId);G&&S.push(G)}return aH(S),{entity2D:S,entity3D:I,position:m,groupContainers:C.length>0?C:void 0}}detect3DEntityHover(t){return this.state.lastHover!==t&&(this.state.lastHover&&bF(this.state.lastHover,!1,this.coreState),t&&bF(t,!0,this.coreState)),this.state.hovered3DEntity!==t}detect3DContainerHover(t){return!SE(this.state.hovered3DContainers,t)}updateInteractionStateIfPanning(t){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(t.clientX-this.coreState.containerOffset[0]-this.state.interaction.mouseDownStart.clientX,2)+Math.pow(t.clientY-this.coreState.containerOffset[1]-this.state.interaction.mouseDownStart.clientY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.worldPlane],!1)}destroy(){this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMove,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let t=document.createElement("div");t.style.position="absolute",t.style.top="0",t.style.right="0",t.style.backgroundColor="white",t.style.padding="10px",document.body.append(t),t.id="interaction-debug-panel",this.debugPanel=t,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",n=>{var o,i,a;this.queueDebugMessage("CLICK \n3D: ".concat((o=n.entity3D)==null?void 0:o.id," \n2D: ").concat((i=n.entity2D)==null?void 0:i.map(l=>l.id).join(", ")," \nPos: ").concat((a=n.position)==null?void 0:a.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var o,i,a;this.queueDebugMessage("HOVER \n3D: ".concat((o=n.entity3D)==null?void 0:o.id," \n2D: ").concat((i=n.entity2D)==null?void 0:i.map(l=>l.id).join(", ")," \nPos: ").concat((a=n.position)==null?void 0:a.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(t,n){var i;let o=document.createElement("pre");o.style.maxWidth="300px",o.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",o.style.backgroundColor=n,o.textContent=t,(i=this.debugPanel)==null||i.prepend(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>{o.remove()},500)},2500)}getCursor(){return this.cursor}};function bF(e,r,t){var a;let n=e.components[2];n&&n.hover!==!0&&(n.hover=r?"user-interaction":!1,n.dirty=!0);let o=(a=e.components[0].textMesh)==null?void 0:a.userData.entityId;if(!o)return;let i=t.geometry3DMap.get(o);(i==null?void 0:i.type)==="text3d"&&(i.components[1].hoverByPolygon=r,i.components[1].dirty=!0)}function nH(e,r,t){return r?"grabbing":e?"pointer":t?"grabbing":"grab"}function oH(e){let r=e;for(;r!=null&&r.parent;){if(r instanceof yu)return;if(r.userData.isSingleModel)return r;r=r.parent}}function iH(e,r){let t=oH(e);return t?r.get(t.userData.entityId):void 0}function aH(e){if(e.length<=1)return;let r=[],t=[];for(let o=0;o<e.length;o++){let i=e[o];i.type==="marker"?r.push(i):t.push(i)}if(r.length>1){let o,i;r.sort((a,l)=>{o=a.components[0],i=l.components[0];let u=o.projection.y,c=i.projection.y;return u!==c?c-u:o.markerContainer.compareDocumentPosition(i.markerContainer)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})}if(t.length>1){let o=[];for(let i=0;i<t.length;i++){let a=t[i],l=a.components[0];o.push({entity:a,y:l.projection.y,idx:i})}o.sort((i,a)=>i.y!==a.y?a.y-i.y:a.idx-i.idx);for(let i=0;i<o.length;i++)t[i]=o[i].entity}let n=0;for(let o=0;o<r.length;o++)e[n++]=r[o];for(let o=0;o<t.length;o++)e[n++]=t[o]}p();p();var hc,qu,G1,Ku,vF,p0,$1,xF,IF,m0,V1,f0,h0,Z1,d0=class{constructor(r){D(this,Ku);D(this,hc,null);D(this,qu);f(this,"getCurrentSceneGLTF",async r=>{let t=w({onlyVisible:!0,binary:!0,light:!0,scale:1},r),n=await Q(this,Ku,vF).call(this),o=s(this,G1).call(this,t),i=await n.parseAsync(o,{trs:!1,maxTextureSize:1/0,onlyVisible:t.onlyVisible,binary:t.binary,scale:t.scale}),a;if(i instanceof ArrayBuffer)a=new Blob([i],{type:"application/octet-stream"});else{let l=JSON.stringify(i,null,2);a=new Blob([l],{type:"text/plain"})}return a});D(this,G1,r=>{let{scale:t,light:n,onlyVisible:o}=r,i=new yu,a=new Tr().setFromObject(s(this,qu).geometryScene);if(s(this,p0).call(this,s(this,qu).geometryScene,i,o),n){let l=new ig(16777215,.3*Math.PI);l.position.set(0,Math.max(a.max.x,a.max.y)*t*.5,a.max.y*t*4),l.lookAt(0,0,-1),l.target.position.set(0,0,-1),l.add(l.target),i.add(l)}return i});D(this,p0,(r,t,n)=>{r.material&&(r instanceof rg?Q(this,Ku,xF).call(this,r).forEach(o=>t.add(o)):r instanceof km&&t.add(Q(this,Ku,IF).call(this,r))),r.children.forEach(o=>{(!n||o.visible)&&s(this,p0).call(this,o,t,n)})});D(this,$1,(r,t,n)=>{let o=new Bm({color:new vr(r),metalness:0});return o.opacity=t,o.transparent=n,o});D(this,m0,r=>{let{geometry:t,material:n,position:o,rotation:i,quaternion:a,scale:l}=r;if(!(t!=null&&t.isBufferGeometry))return r;let u=t.attributes.position,c=t.attributes.normal,d=t.attributes.uv;return s(this,V1).call(this,u,c),s(this,h0).call(this,o,l,i,a),d&&s(this,Z1).call(this,d),n!=null&&n.map&&t.type==="PlaneGeometry"&&(r.side=as),r});D(this,V1,(r,t)=>{let n=new be,o=new be;for(let i=0;i<r.count;i++)n.fromBufferAttribute(r,i),s(this,f0).call(this,n),r.setXYZ(i,n.x,n.y,n.z),t&&(o.fromBufferAttribute(t,i),s(this,f0).call(this,o),t.setXYZ(i,o.x,o.y,o.z))});D(this,f0,r=>{let t=r.y;r.y=r.z,r.z=-t});D(this,h0,(r,t,n,o)=>{let i=r.y;r.y=r.z,r.z=-i;let a=t.y;if(t.y=t.z,t.z=a,n instanceof Zc)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let l=o.y;o.set(o.x,o.z,-l,o.w)}});D(this,Z1,r=>{for(let t=0;t<r.count;t++){let n=r.getX(t),o=r.getY(t);r.setXY(t,n,o)}});M(this,qu,r)}destroy(){M(this,hc,null)}};hc=new WeakMap,qu=new WeakMap,G1=new WeakMap,Ku=new WeakSet,vF=async function(){if(!s(this,hc)){let{GLTFExporter:r}=await import("./GLTFExporter-ZVF3Y5DX.js");M(this,hc,new r)}return s(this,hc)},p0=new WeakMap,$1=new WeakMap,xF=function(r){var a,l;let t=[],o=((a=r.userData)!=null&&a.entities?Object.values((l=r.userData)==null?void 0:l.entities):[]).map(u=>s(this,qu).geometry3DMap.get(u)),i=new Map;return o.forEach(u=>{var g;if(!u||!(u instanceof Mt))return;let c=u.components[1],d=u.components[2];if(!c.visible||c instanceof xa&&c.opacity===0||c instanceof Gm||c instanceof fg)return;let m=d!=null&&d.hover?c.hoverColor||s(this,qu).hoverColor:c.color,h="".concat(m,"-").concat(c.opacity,"-").concat(Number(c.visible));i.has(h)||i.set(h,[]),(g=i.get(h))==null||g.push(u)}),i.forEach((u,c)=>{let[d,m,h]=c.split("-"),g=u.reduce((I,C)=>{if(C.type==="custom-geometry")return I;let S=C.components[0];return"geometry"in S&&S.geometry instanceof Qh&&I.push(S.geometry),I},[]);if(g.length===0){z.error("No geometries found for batched mesh");return}let x=s(this,$1).call(this,d,Number(m),r.material.transparent),E=No(g,!0);if(!E){z.error("No merged geometry found for batched mesh");return}let v=new Ze(E,x);v.position.copy(r.position),v.rotation.copy(r.rotation),v.scale.copy(r.scale),v.visible=!!h,s(this,h0).call(this,v.position,v.scale,v.rotation,v.quaternion),t.push(s(this,m0).call(this,v))}),t},IF=function(r){let t=r.geometry.clone(),n=r.material,o=new Fr({color:n.color,side:as});o.opacity=n.opacity,o.transparent=n.transparent;let i=new km(t,o);return i.position.copy(r.position),i.rotation.copy(r.rotation),i.scale.copy(r.scale),i.visible=r.visible,s(this,m0).call(this,i)},m0=new WeakMap,V1=new WeakMap,f0=new WeakMap,h0=new WeakMap,Z1=new WeakMap;p();p();var sH="gray",uH=.1,g0=100,iI=new va.ClipperOffset;function lH(e,r){iI.Clear(),r/=2;let t=e.map(o=>({X:o.x*g0,Y:o.y*g0}));iI.AddPath(t,va.JoinType.jtMiter,va.EndType.etClosedPolygon);let n=new va.Paths;return iI.Execute(n,r*g0),n.length?n.map(i=>i.map(a=>({x:a.X/g0,y:a.Y/g0}))):[e]}function W1(e,r,t){var g,x,E,v,I;let{color:n=sH,opacity:o=1,altitude:i=0,height:a=uH}=t||{};Array.isArray(o)&&(o=1);let l={min:{x:1/0,y:1/0,z:i},max:{x:-1/0,y:-1/0,z:a+i},center:{x:0,y:0,z:(a+i)/2}},c=e.geometry.coordinates[0].map(C=>{let S=r(C[1],C[0]);return l.min.x=Math.min(l.min.x,S.x),l.min.y=Math.min(l.min.y,S.y),l.max.x=Math.max(l.max.x,S.x),l.max.y=Math.max(l.max.y,S.y),S});((x=(g=e.properties)==null?void 0:g.style)==null?void 0:x.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((E=e.properties)==null?void 0:E.image)!=null?c=lH(c,((I=(v=e.properties)==null?void 0:v.style)==null?void 0:I.edgeOffset)||0):c=[c];let d=[];for(let C of c){let S=new Wc;S.moveTo(C[0].x,C[0].y),C.slice(1).forEach(P=>S.lineTo(P.x,P.y)),S.lineTo(C[0].x,C[0].y);let T=e.geometry.coordinates.slice(1);S.holes=T.map(P=>{let O=P.map(G=>r(G[1],G[0])),_=new Hc;return _.moveTo(O[0].x,O[0].y),O.slice(1).forEach(G=>_.lineTo(G.x,G.y)),_.lineTo(O[0].x,O[0].y),_});let A=Um(t==null?void 0:t.bevel,a),F=new qc(S,A);F.userData={style:{color:n,opacity:o},usedBevelSettings:A},d.push(F)}if(d.length===1)return d[0];let m=No(d);d.forEach(C=>C.dispose());let h=Um(t==null?void 0:t.bevel,a);return m.userData={style:{color:n,opacity:o},usedBevelSettings:h,_split:!0},m}p();var cH="gray",dH=.1;function q1(e,r,t){let{color:n=cH,opacity:o=1,altitude:i=0,height:a=dH}=t||{};Array.isArray(o)&&(o=1);let l={min:{x:1/0,y:1/0,z:i},max:{x:-1/0,y:-1/0,z:a+i}},u=Um(t==null?void 0:t.bevel,a),c=[];e.geometry.coordinates.forEach(m=>{let h=new Wc,g=m[0].map(v=>{let I=r(v[1],v[0]);return l.min.x=Math.min(l.min.x,I.x),l.min.y=Math.min(l.min.y,I.y),l.max.x=Math.max(l.max.x,I.x),l.max.y=Math.max(l.max.y,I.y),I});h.moveTo(g[0].x,g[0].y),g.slice(1).forEach(v=>h.lineTo(v.x,v.y)),h.lineTo(g[0].x,g[0].y);let x=m.slice(1);h.holes=x.map(v=>{let I=v.map(S=>r(S[1],S[0])),C=new Hc;return C.moveTo(I[0].x,I[0].y),I.slice(1).forEach(S=>C.lineTo(S.x,S.y)),C.lineTo(I[0].x,I[0].y),C});let E=new qc(h,u);c.push(E)});let d=No(c);return c.forEach(m=>m.dispose()),d.translate(0,0,i||0),d.userData={style:{color:n,opacity:o},usedBevelSettings:u},d}p();var jn=100,pH=.22,mH=.01;function EF(e,r,t={}){let{width:n=pH,height:o=mH,color:i="gray",opacity:a=1,altitude:l=0}=t,u={min:{x:1/0,y:1/0,z:l},max:{x:-1/0,y:-1/0,z:l+o}},c={bevelEnabled:!1,depth:o},d=new va.ClipperOffset,m=e.geometry.coordinates.map(E=>E.map(v=>r(v[1],v[0])));d.AddPaths(m.map(E=>E.map(v=>({X:v.x*jn,Y:v.y*jn}))),va.JoinType.jsMiter,va.EndType.etOpenRound);let h=new va.PolyTree;d.Execute(h,n/2*jn);let g=[];for(let E of h.m_AllPolys){let v=new Wc;if(E.IsHole())continue;u.min.x=Math.min(u.min.x,E.m_polygon[0].X),u.min.y=Math.min(u.min.y,E.m_polygon[0].Y),u.max.x=Math.max(u.max.x,E.m_polygon[0].X),u.max.y=Math.max(u.max.y,E.m_polygon[0].Y);let I=E.m_polygon;v.moveTo(I[0].X/jn,I[0].Y/jn),I.slice(1).forEach(C=>v.lineTo(C.X/jn,C.Y/jn)),v.lineTo(I[0].X/jn,I[0].Y/jn),v.holes=E.m_Childs.map(C=>{let S=new Hc,T=C.m_polygon;return S.moveTo(T[0].X/jn,T[0].Y/jn),T.slice(1).forEach(A=>S.lineTo(A.X/jn,A.Y/jn)),S.lineTo(T[0].X/jn,T[0].Y/jn),S}),g.push(new qc(v,c))}let x=No(g);return x.translate(0,0,l||0),x.userData={style:{color:i,opacity:a}},d.Clear(),x}p();p();import{z as K1}from"zod";var Kp=K1.object({type:K1.enum(["Point"]),coordinates:K1.array(K1.number()).min(2).max(3)});import{z as $t}from"zod";var aI=$t.object({rotation:$t.array($t.number()).length(3).optional(),altitude:$t.number().optional(),scale:$t.array($t.number()).length(3).optional(),interactive:$t.boolean().optional(),verticalOffset:$t.number().optional(),id:$t.union([$t.number(),$t.string()]).optional()}),fH=$t.object({type:$t.enum(["Feature"]),geometry:Kp,properties:aI}),hH=$t.object({type:$t.enum(["FeatureCollection"]),features:$t.array(fH)}),sI=$t.object({color:$t.string()}),gH=$t.object({url:$t.string(),color:$t.string().optional(),opacity:$t.number().optional(),material:$t.record($t.string(),sI).optional()});function SF(e,r,t){$t.union([$t.number(),$t.string()]).parse(e),hH.parse(r),gH.parse(t)}var y0,b0,v0,Jp,Hi,Ju=class{constructor(r){f(this,"mesh");f(this,"type","model");f(this,"positionDirty",!0);f(this,"outline");f(this,"geometry");f(this,"material");f(this,"feature");f(this,"instanceIndex",-1);D(this,y0,!0);f(this,"color",new vr);f(this,"clippingPlane");f(this,"position",new be);D(this,b0,0);D(this,v0,1);D(this,Jp,Ro.GEOMETRY);D(this,Hi,!1);this.feature=r}get visible(){var r,t;return(t=(r=this.mesh)==null?void 0:r.visible)!=null?t:s(this,y0)}set visible(r){M(this,y0,r),this.mesh&&(this.mesh.visible=r)}setOpacity(){}setColor(){}get modelScene(){var r;return this.clippingPlane?(r=this.mesh)==null?void 0:r.children.find(t=>t.name!=="hole-fill-mesh"):this.mesh}get altitude(){return s(this,b0)}set altitude(r){this.modelScene&&(this.modelScene.position.z=r,M(this,b0,r))}getRotation(){return this.modelScene?[this.modelScene.rotation.x,this.modelScene.rotation.y,this.modelScene.rotation.z]:void 0}setRotation(r){this.modelScene&&this.modelScene.rotation.set(ut.degToRad(r[0]),ut.degToRad(r[1]),ut.degToRad(r[2]))}getScale(){return this.modelScene?[this.modelScene.scale.x,this.modelScene.scale.y,this.modelScene.scale.z]:void 0}setScale(r){var t;this.modelScene&&((t=this.modelScene)==null||t.scale.set(r[0],r[1],r[2]))}get opacity(){return s(this,v0)}set opacity(r){var t,n,o;if(this.mesh){if(this.mesh.children[0]instanceof ma){for(let i of this.mesh.children)if(i instanceof ma){((t=i.userData)==null?void 0:t.originalOpacity)===void 0&&(i.userData.originalOpacity=i.material.opacity);let a=yl(r,0,(n=i.userData)==null?void 0:n.originalOpacity,0,1);i.material.opacity=a,i.material.transparent=a<1,i.material.needsUpdate=!0}}else(o=this.mesh)==null||o.traverse(i=>{i instanceof Ze&&i.material&&(Array.isArray(i.material)?i.material.forEach(a=>{CF(a,r)}):CF(i.material,r))});M(this,v0,r)}}get renderOrder(){return s(this,Jp)}set renderOrder(r){var t;if(!(!this.mesh||r===s(this,Jp)))if(M(this,Jp,r),this.mesh.children[0]instanceof ma){this.mesh.renderOrder=r;for(let n of this.mesh.children)n instanceof ma&&(n.material.depthWrite=!s(this,Hi),n.material.depthTest=!s(this,Hi),n.material.needsUpdate=!0)}else(t=this.mesh)==null||t.traverse(n=>{n instanceof Ze&&n.material&&(n.renderOrder=r,Array.isArray(n.material)?n.material.forEach(o=>{o.depthWrite=!s(this,Hi),o.depthTest=!s(this,Hi),o.needsUpdate=!0}):(n.material.depthWrite=!s(this,Hi),n.material.depthTest=!s(this,Hi),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,Hi)}set visibleThroughGeometry(r){M(this,Hi,r)}};y0=new WeakMap,b0=new WeakMap,v0=new WeakMap,Jp=new WeakMap,Hi=new WeakMap;function CF(e,r){e.opacity!==r&&(r===1?(e.opacity=1,e.transparent=!1):(e.opacity=r,e.transparent=!0),e.needsUpdate=!0)}p();function J1(e){var l,u;let r=e.components[0],t=e.components[1];t.opacity!=null&&t.opacity!==r.opacity&&(r.opacity=t.opacity);let n=t.material,o=t.color;if(n||o){let c=yH(o,n);(l=r.mesh)==null||l.traverse(d=>{d instanceof Ze&&d.material&&(Array.isArray(d.material)?d.material.forEach(m=>{c[m.name]?(m.color.set(c[m.name].color),m.vertexColors=!1):m.color.set(o)}):c[d.material.name]?(d.material.color.set(c[d.material.name].color),d.material.vertexColors=!1):d.material.color.set(o))})}let i=(u=r.feature.geometry.coordinates[2])!=null?u:0,a=t.verticalOffset+i;r.altitude!==a&&(r.altitude=a),t.visible!==r.visible&&(r.visible=t.visible),t.rotation&&r.setRotation(t.rotation),t.scale&&r.setScale(t.scale),t.visibleThroughGeometry!==r.visibleThroughGeometry&&(r.visibleThroughGeometry=t.visibleThroughGeometry)}function yH(e,r){let t={};if(r)for(let n in r)r[n].color&&(t[n]={color:r[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let o of n)t[o]||(t[o]={color:e})}return t}function DF(e,r){var a,l;let t=e.components[0],o=(a=e.components[1].verticalOffset)!=null?a:0,i=t.feature.geometry.coordinates.slice();i[2]=((l=i[2])!=null?l:0)+o,t.mesh?t.mesh.position.copy(r(i)):t.position.copy(r(i))}function Hs(e){return e instanceof xr?e.material:null}function TF(e){return e.side===Pm?"back":e.side===fl?"front":"double"}function wF(e,r){e.side=r==="back"?Pm:r==="front"?fl:as}function bH(e){let{opacity:r,texture:t,topTexture:n}=e;return"".concat(r).concat(t||"").concat(n||"")}var Y1=class extends Ge{constructor(t,n){super();f(this,"state");f(this,"convertTo3DMapPosition");f(this,"loader");f(this,"optimizePromise",[]);this.state=t,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:t}=await import("./GLTFLoader-3QTALUTA.js");return this.loader=new t,this.loader}createEntityFromFeature(t,n,o){var d,m,h,g;let i=new xr(n),a=(d=n==null?void 0:n.properties)==null?void 0:d.bevel,l=o&&"bevel"in o?o.bevel:void 0,u;l?u=w(w({},a),l):a&&(u=a);let c=new Mt(i,new xa(H(w({},o),{url:(h=(m=n.properties)==null?void 0:m.image)==null?void 0:h.path,bevel:u})));return o!=null&&o.outline&&(c.components[3]=new fC(yC(o.color))),o!=null&&o.focusable&&(c.components[4]=new $m),((g=n.properties)==null?void 0:g.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?c.components[6]=new vl(n.properties.textures.find(x=>x.face==="side"),n.properties.textures.find(x=>x.face==="top")):(o!=null&&"texture"in o&&o.texture!=null||o!=null&&"topTexture"in o&&o.topTexture!=null)&&(c.components[6]=new vl(o.texture,o.topTexture)),c.id=t,c}createModelFromFeature(t,n,o){let i=new Ju(n),a=w({},o);n.properties.verticalOffset!=null&&(a.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(a.rotation=n.properties.rotation),n.properties.scale!=null&&(a.scale=n.properties.scale);let l=new fg(a),u=new Mt(i,l);return u.id=t,u}populateEntityMesh(t,n){let o=t.components[0];o.geometry=n,o.batchedProps={range:{start:0,count:1/0,indexCount:1/0,indexStart:0,vertexCount:1/0,vertexStart:0,reservedVertexCount:1/0,reservedIndexCount:1/0},geometryId:-1,positionCount:n.attributes.position.count},o.currentHeight=t.components[1].height,o.dirty=!1}async populateModelGroup(t,n,o){let i=new mo,a=new Zc,l=new Xh,u=new be,c=new vu,d=await this.getGLTFLoader(),m=new Promise(h=>{let g=E=>{"entities3D"in o.userData&&(o.userData.entities3D.size>1?E.scene.traverse(v=>{let I=v;if("isMesh"in I&&I.isMesh===!0){let C=new ma(I.geometry,I.material,t.size);C.userData={entities:{}},c.add(C),o.add(c)}}):(E.scene.traverse(v=>{"isMesh"in v&&v.isMesh===!0&&(v.position.set(0,0,0),v.rotation.set(0,0,0),v.scale.set(1,1,1),v.updateMatrix())}),c.add(E.scene),o.add(c),c.userData.isSingleModel=!0,c.userData.entityId=t.values().next().value,c.userData.type="model")),h()};if(n.trimStart().startsWith("{")||n.startsWith("data:")&&n.includes("application/json")){let E=n.startsWith("data:")?atob(n.split(",")[1]):n;d.parse(E,"",g)}else d.load(n,g)});return this.optimizePromise.push(m.then(()=>{var x,E,v,I,C,S,T,A,F,P,O,_;let h=0,g;for(let G of t.values()){if(g=this.state.geometry3DMap.get(G),!g||(g==null?void 0:g.type)!=="model")continue;let L=g.components[0],q=g.components[1],$=g.components[0].feature;L.mesh=c,L.instanceIndex=h,J1(g),g.components[1].dirty=!1;let{x:K,y:X}=this.convertTo3DMapPosition($.geometry.coordinates[1],$.geometry.coordinates[0],0);L.position.set(K,X,L.altitude),a.set(ut.degToRad((E=(x=q.rotation)==null?void 0:x[0])!=null?E:rd[0]),ut.degToRad((I=(v=q.rotation)==null?void 0:v[1])!=null?I:rd[1]),ut.degToRad((S=(C=q.rotation)==null?void 0:C[2])!=null?S:rd[2])),u.set((A=(T=q.scale)==null?void 0:T[0])!=null?A:td[0],(P=(F=q.scale)==null?void 0:F[1])!=null?P:td[1],(_=(O=q.scale)==null?void 0:O[2])!=null?_:td[2]),l.setFromEuler(a),i.compose(L.position,l,u),c.children.forEach(V=>{!g||(g==null?void 0:g.type)!=="model"||!(V instanceof ma)||(V.setMatrixAt(h,i),V.userData.entities[h]=g.id)}),L.mesh.userData.isSingleModel&&(L.mesh.matrix.copy(i),L.mesh.matrix.decompose(L.mesh.position,L.mesh.quaternion,L.mesh.scale)),h++}this.publish("model-loaded")})),c}populateEntityGroup(t){var l;let n,o,i,a;for(let u of t.values())a=this.state.geometry3DMap.get(u),a.components[0]instanceof xr&&(o=a.components[0].feature,i=a.components[1],o.geometry.type==="Polygon"?(n=W1(o,this.convertTo3DMapPosition,i),(l=o.properties)!=null&&l.textures&&o.properties.textures.length>0&&bC(n,o.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(a,n)):o.geometry.type==="MultiPolygon"?(n=q1(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="LineString"?(n=jC(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)):o.geometry.type==="MultiLineString"&&(n=EF(o,this.convertTo3DMapPosition,i),this.populateEntityMesh(a,n)));return t}update(){var t;for(let n of this.state.geometryGroupIdsToLoad.values()){let o=this.state.geometry3DMap.get(n);if(o instanceof Ti&&o.userData.dirty){if(o.userData.modelURL)o.userData.modelURL&&(this.populateModelGroup(o.userData.entities3D,o.userData.modelURL,o),o.userData.dirty=!1);else try{this.populateEntityGroup(o.userData.entities3D)}catch(l){z.warn(l)}let i,a={};for(let l of o.userData.entities3D.values()){i=this.state.geometry3DMap.get(l);let u=i==null?void 0:i.components[0];if((i==null?void 0:i.type)==="geometry"){let c=i.components[1],d=bH(c);a[d]===void 0&&(a[d]={style:c,entities:[]}),a[d].entities.push(i)}else u&&"mesh"in u&&u.mesh&&((t=u.mesh)==null?void 0:t.parent)!==o&&o.add(u.mesh)}for(let l in a){let u=gC(a[l].entities,a[l].style);o.add(u)}for(let l of o.userData.entities3D.values())if(i=this.state.geometry3DMap.get(l),i!=null&&i.entities2D.size>0)for(let u of i.entities2D.values())u&&(i.attach(u),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),o.userData.dirty=!1}}return Promise.resolve()}};p();var X1=class{constructor(r,t){f(this,"state");f(this,"dirty",!0);f(this,"domTree");this.state=r,this.domTree=t}update(){if(this.dirty){let r;for(let t of Array.from(this.domTree.children))if(r=this.state.geometry2DMap.get(t.userData.entityId),r){let n=r.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(t.userData.entityId))&&this.domTree.removeChild(t)}else this.domTree.removeChild(t);for(let t of this.state.geometry2DIdsInScene)if(r=this.state.geometry2DMap.get(t),r){let n=r.components[0];n instanceof cs&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:r.id},this.domTree.appendChild(n.markerContainer),n.updateDimensionsIfZeroWidthHeight())}this.dirty=!1}}};p();var Q1=class{constructor(r,t){f(this,"state");f(this,"project");this.state=r,this.project=t}update(){let r,t=0,n=0,o,i;for(let a of this.state.geometry2DIdsInScene)if(r=this.state.geometry2DMap.get(a),r){i=r.components[0];let l=r.attachedTo?this.state.geometry3DMap.get(r.attachedTo):void 0;if(l instanceof Mt)if(this.state.geometry3DIdsInScene.has(l.id)){o=l.components[1],i=r.components[0],(o.dirty||r.components[0].attachedDirty)&&(t=o.height,n=o.altitude,r.setAltitude(t+n));let u=o.visible;i.visible!==u&&(i.visible=u)}else i.visible===!0&&(i.visible=!1);this.project(r.components[0].projection,r.position),r.components[0].attachedDirty=!1}}};p();p();p();var vH=function(){let r,t;return n=>{if((!t||!t)&&(r=document.createElement("canvas"),r.width=500*n,r.height=500*n,r.style.width="500px",r.style.height="500px",t=r.getContext("2d")),!t)throw new Error("Could not get 2D context");return{measureCanvas:r,measureCanvasContext:t}}}(),MF=({text:e,size:r,maxWidth:t,pixelRatio:n,maxLines:o=2,lineHeight:i=1.2,options:a={strokeText:!0}})=>{let l="bold ".concat(r*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:u}=vH(n);u.font=l;let c=[],d=e.split(" "),m=0,h=0,g=0;for(;h<d.length;){let I=d[h];if(m===o&&m>0){c[m-1]+="...";break}if(c[m]==null&&(c[m]=I,h++),d.length===1){c[m]=I;break}if(d[h]==null)break;let{width:C}=u.measureText(c[m]+" "+d[h]);C<=t*n?(c[m]+=" "+d[h],h++):m++}c.forEach(I=>{let{width:C}=u.measureText(I);g=Math.max(C,g)});let x=r*n*i,E=c.length*x;return{maxWidth:g,maxHeight:E,lines:c.length,draw:(I,C,S)=>{c.length===1?(a.strokeText&&I.strokeText(c[0],C,S),I.fillText(c[0],C,S)):(a.strokeText&&(I.strokeText(c[0],C,S-x/2),I.strokeText(c[1],C,S+x/2)),I.fillText(c[0],C,S-x/2),I.fillText(c[1],C,S+x/2))}}};p();function AF(e){let r=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?r.src="data:image/svg+xml;base64,".concat(btoa(e)):r.src=e),r}var e4=class extends Ge{constructor(t,n,o){super();f(this,"dirty",!1);f(this,"state");f(this,"colliderContext");f(this,"colliderCanvas");f(this,"transformRequestFunc");f(this,"transformRequest",async t=>this.transformRequestFunc?await this.transformRequestFunc(t):{url:t});f(this,"pinCache",{});f(this,"imageCache",{});f(this,"imagePromiseCache",{});f(this,"imageDimensionsCache",{});f(this,"textCache",{});f(this,"update",t=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let o,i,a,l,u,c,d;for(let m of this.state.geometry2DIdsInScene)if(d=this.state.geometry2DMap.get(m),d!=null&&(c=d.components[0],c instanceof ls&&!d.disposed)){if(u=c.appearance.iconVisible,c.appearance.icon!=null&&u!=null){let g=typeof u=="boolean"?u:t>=u;g!==c.iconVisible&&(c.iconVisible=g,c.dirty=!0)}if((c.pinDirty||c.dirty||this.dirty)&&c.calculatePinSize(),i={active:c.appearance.pinColor,inactive:c.appearance.pinColorInactive},a={active:c.appearance.pinOutlineColor,inactive:c.appearance.pinOutlineColorInactive},l=ga(c.pinSize,2),o="".concat(i.active,"-").concat(i.inactive,"-").concat(a.active,"-").concat(a.inactive,"-").concat(l,"-").concat(c.iconVisible),c.labelCacheId=o,(!this.pinCache[o]||this.dirty)&&(this.prepare(c,o,this.colliderContext),c.dirty=!0),(c.appearance.icon&&(!c.imageHash||c.pinDirty)||this.dirty)&&this.cacheImage(c),this.textCache[c.id]==null||c.textDirty||this.dirty){c.dirty=!0,this.textCache[c.id]={};let{textDrawFn:g,width:x,height:E}=this.processText(c.text,c.appearance.textSize,c.appearance.maxWidth,c.appearance.maxLines,c.appearance.lineHeight);["left","center","right"].forEach(v=>{this.textCache[c.id][v]=this.textToCanvas(g,c.appearance.textSize,v,x,E,c.appearance.textColor,c.appearance.textOutlineColor)}),c.dimensions={width:Math.ceil(x/n),height:Math.ceil(E/n)}}let h=1;if(c.appearance.iconScale)if(typeof c.appearance.iconScale=="number")h=c.appearance.iconScale;else{let{on:g,input:x,output:E,easing:v}=c.appearance.iconScale;g==="zoom-level"?h=lC(OE(t,x,E,v!=null?v:"linear")):z.warn("Unsupported interpolation property: ".concat(g))}c.recomputeCurrentStrategy(c.iconVisible?h:1),c.canShow&&c.visible&&(c.enabled||c.visibilityNeedsUpdate!==!1)&&this.draw(c,o,this.colliderContext),c.textDirty=!1,c.pinDirty=!1}this.dirty=!1});f(this,"processText",(t,n,o,i,a)=>{let l=this.state.pixelRatio,{draw:u,maxWidth:c,maxHeight:d}=MF({text:t,size:n,pixelRatio:l,maxWidth:o,maxLines:i,lineHeight:a});return{textDrawFn:u,width:c+2.5*l*2,height:d+2.5*l*2}});f(this,"textToCanvas",(t,n,o,i,a,l,u)=>{let c=this.state.pixelRatio,d,m=i,h=a;window.OffscreenCanvas!=null&&!YE()?d=new OffscreenCanvas(m,h):(d=document.createElement("canvas"),d.width=m,d.height=h,d.style.width=m+"px",d.style.height=h+"px");let g=d.getContext("2d",{willReadFrequently:!0});if(!g)return;let x=2.5*c;g.textAlign=o,g.font="bold ".concat(n*c,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),g.textBaseline="middle",g.lineJoin="miter",g.miterLimit=2,g.strokeStyle="white",g.lineWidth=x,g.fillStyle=l,g.strokeStyle=u;let E=o==="left"?x/2:o==="center"?m/2:m-x/2;return t(g,E,(h+x/2)/2),d});f(this,"cacheImage",t=>{if(!t.appearance.icon)return;let n=nC(t.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(o=>{this.transformRequest(t.appearance.icon).then(i=>{let a=AF(i.url);a.onload=()=>{this.imageCache[n]=a,this.publish("img:loaded"),o(a)}})})),t.imageHash!==n&&(t.imageHash=n,this.imagePromiseCache[n].then(()=>{t.dirty=!0}))});f(this,"createPinCanvas",(t,n,o,i,a=1)=>{let l,u=this.state.pixelRatio,c=t.totalPinSize*2*u*a;window.OffscreenCanvas!=null?l=new OffscreenCanvas(c,c):(l=document.createElement("canvas"),l.width=c,l.height=c,l.style.width=c/u+"px",l.style.height=c/u+"px");let d=l.getContext("2d");return d.shadowColor="rgba(0,0,0,0.3)",d.shadowOffsetY=2*u,d.shadowBlur=5*u,d.beginPath(),d.arc(c/2,c/2,(n/2+2.5*u/2)*a,0,2*Math.PI),d.fillStyle=o,d.fill(),d.beginPath(),d.arc(c/2,c/2,n/2*a,0,2*Math.PI),d.shadowColor="transparent",d.fillStyle=i,d.fill(),l});f(this,"prepare",(t,n,o)=>{let i=this.state.pixelRatio;o.lineWidth=4*i;let a=typeof t.appearance.iconScale=="number"?[t.appearance.iconScale]:t.appearance.iconScale==null?[]:t.appearance.iconScale.output,l=a.length>0?Math.max(...a):void 0,u=this.createPinCanvas(t,t.pinSize,t.appearance.pinOutlineColor,t.appearance.pinColor,l),c=this.createPinCanvas(t,3.5*i,t.appearance.pinOutlineColorInactive,t.appearance.pinColorInactive,l);this.pinCache[n]=[u,c]});this.state=t,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=o}draw(t,n,o){var d;if(!t.canShow||!t.visible)return;o.save(),o.globalAlpha=t.currentOpacity;let i=this.state.pixelRatio,a=t.projection.x*i,l=t.projection.y*i,u=t.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],c=t.style.pinVisibility===1?t.scaledPinSize*i:t.totalPinSize*i;if(t.style.pinVisibility!==0&&o.drawImage(u,a-c,l-c,c*2,c*2),t.appearance.icon&&t.iconVisible&&t.imageHash&&t.appearance.iconSize&&this.imageCache[t.imageHash]&&t.style.pinVisibility===1){let m=this.imageCache[t.imageHash],h=(t.scaledPinSize-t.scaledIconPadding)*i,g=t.appearance.iconFit,x=h,E=h,v="".concat(t.imageHash,"_").concat(g);if(this.imageDimensionsCache[v])x=this.imageDimensionsCache[v].width,E=this.imageDimensionsCache[v].height;else{let I=m.width*i,C=m.height*i;if(g==="contain"){let S=Math.sqrt(I**2+C**2),T=h/S;x=I*T,E=C*T}if(g==="cover"){let S=h/I,T=h/C,A=Math.max(S,T);x=I*A,E=C*A}}o.save(),o.beginPath(),o.arc(a,l,h/2,0,2*Math.PI),o.closePath(),((d=t==null?void 0:t.appearance)==null?void 0:d.iconOverflow)!=="visible"&&o.clip(),o.drawImage(m,a-x/2,l-E/2,x,E),o.restore()}t.style.textLabelVisible&&t.style.textAlign!=null&&t.style.left!=null&&t.style.top!=null&&o.drawImage(this.textCache[t.id][t.style.textAlign],a+t.style.left*i,l+t.style.top*i),o.restore()}};p();function SH(e,r){let t=e.components[2],n=e.components[1];return t!=null&&t.hover?[n.hoverColor||r,n.hoverColor||r]:[n.color,n.topColor||n.color]}var t4=class{constructor(r,t){f(this,"state");f(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=t,this.state=r}determineTextureVisiblity(r,t,n){let o=Hs(r);((o==null?void 0:o.texture)!=null||(o==null?void 0:o.topTexture)!=null)&&(n!=null&&n.hover&&o.texturesVisible?o.hideTextures(r.instanceIndex):o.texturesVisible||o.showTextures(r.instanceIndex),t.texture==null&&o.removeSideTexture(r.instanceIndex),t.topTexture==null&&o.removeTopTexture(r.instanceIndex))}update(){var o,i,a,l,u,c,d,m,h,g,x,E,v,I,C,S,T,A,F,P,O;let r,t,n;for(let _ of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(_),n&&(n.type==="geometry"||n.type==="custom-geometry")&&((o=n.components[1])!=null&&o.dirty||(i=n.components[2])!=null&&i.dirty)){let G=n.components[0],L=n.components[1];t=n.components[2];let q=SH(n,this.state.hoverColor);G.setColor(q[0],q[1]);let $=Hs(G);if(L.visible!==G.visible&&(G.visible=L.visible,G instanceof xr&&G.textMesh)){let X=this.state.geometry3DMap.get(G.textMesh.userData.entityId);(X==null?void 0:X.type)==="text3d"&&X.components[0].polygonEntityId!=null&&(X.components[0].visible=L.visible)}L.altitude!==G.altitude&&(G.altitude=L.altitude);let K=L.opacity*Qc(n);if(K!==G.opacity&&(G.opacity=K),L.renderOrder!==G.renderOrder&&(G.renderOrder=L.renderOrder),$&&L.side!==TF($)&&wF($,L.side),G instanceof xr&&L.shading!=null&&(((a=L.shading)==null?void 0:a.start)!==((l=Hs(G))==null?void 0:l.getGradientShading().start)||((u=L.shading)==null?void 0:u.end)!==((c=Hs(G))==null?void 0:c.getGradientShading().end)||((d=L.shading)==null?void 0:d.intensity)!==((m=Hs(G))==null?void 0:m.getGradientShading().intensity))&&((C=Hs(G))==null||C.setGradientShading((g=(h=L.shading)==null?void 0:h.start)!=null?g:0,(E=(x=L.shading)==null?void 0:x.end)!=null?E:0,(I=(v=L.shading)==null?void 0:v.intensity)!=null?I:0)),L.dirty=!1,G instanceof xr){let X=n.components[6];X instanceof vl&&this.determineTextureVisiblity(G,X,t)}n.components[2]&&(n.components[2].dirty=!1)}else if((n==null?void 0:n.type)==="model")n.components[1].dirty&&(J1(n),n.components[1].dirty=!1),n.components[0].positionDirty&&(DF(n,this.convertTo3DMapPosition),n.components[0].positionDirty=!1);else if((n==null?void 0:n.type)==="image"&&((S=n.components[1])!=null&&S.dirty)){r=n.components[0];let G=n.components[1];G.visible!==r.visible&&(r.visible=G.visible),G.dirty=!1}else if((n==null?void 0:n.type)==="text3d"&&((T=n.components[1])!=null&&T.dirty)&&n.components[0].polygonEntityId!=null){r=n.components[0];let G=n.components[1];G.visible!=null&&G.visible!==r.visible&&(r.visible=G.visible);let{textMesh:L}=r;if(L){Object.assign(L,G.getState());let q=(A=G.hoverColor)!=null?A:this.state.text3dHoverColor;L.color=G.hoverByPolygon?q:(F=G.color)!=null?F:ed.color,L.outlineColor=G.hoverByPolygon?q:(P=G.outlineColor)!=null?P:ed.outlineColor,L.strokeColor=G.hoverByPolygon?q:(O=G.strokeColor)!=null?O:ed.strokeColor}G.dirty=!1}}};p();var r4=class extends Ge{constructor(t){super();f(this,"state");f(this,"animating",new Map);f(this,"isAnimating",!1);f(this,"startTime",-1);f(this,"showDuration",300);f(this,"hideDuration",250);f(this,"update",()=>{var o;this.animating.clear();let t,n;for(let i of this.state.geometry2DIdsInScene)t=this.state.geometry2DMap.get(i),t&&(n=t.components[0],n instanceof ls&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(o=n.appearance.opacity)!=null?o:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")});f(this,"playAnimations");this.state=t,this.playAnimations=this._playAnimations}_playAnimations(){let t=performance.now();for(let[n,[o,i]]of this.animating.entries()){let a=i===1?this.showDuration:this.hideDuration,l=(t-this.startTime)/a;n.currentOpacity=yl(l,0,1,o,i,i===0?AE:FE),t-this.startTime>=a&&(i===1?n.canShow=!0:i===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};p();var n4=class extends Ge{constructor(t,n,o,i,a,l,u){super();f(this,"state");f(this,"renderer");f(this,"mode");f(this,"scene");f(this,"cameraObject");f(this,"viewCamera");f(this,"systems");f(this,"needs2DRecompute",!1);f(this,"twoDdirty",!0);f(this,"threeDdirty",!0);f(this,"frameId",null);f(this,"twoDFrameId",null);f(this,"animationFrameId",null);f(this,"nextFrame",null);f(this,"updateEntitiesFrameId",null);f(this,"update",(t=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(t){let o=this.commitRenderState();return this.paint(),o}else return this.frameId?Promise.resolve():new Promise((o,i)=>{this.frameId=requestAnimationFrame(()=>{var a,l;return((a=this.renderer)==null?void 0:a.renderer)==null?o():this.mode==="standalone"?(l=this.commitRenderState())==null?void 0:l.then(()=>{this.paint(),o()}).catch(u=>{i(u)}):o()})})});f(this,"animate2D",()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})});f(this,"drawEntities2D",()=>{this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})});f(this,"updateEntities2D",()=>{this.updateEntitiesFrameId&&(cancelAnimationFrame(this.updateEntitiesFrameId),this.updateEntitiesFrameId=null),this.updateEntitiesFrameId=requestAnimationFrame(()=>{this.updateEntitiesFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.drawEntities2D()})});f(this,"commitRenderState",()=>{try{let t=[];this.frameId=null,this.publish("pre-render"),this.state.internalTweenGroup.update(),this.state.externalTweenGroup.update(),(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.geometry2DIdsInScene.clear(),eC(this.state.geometryScene,this.state.geometry2DIdsInScene),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.geometry3DIdsInScene.clear(),this.state.geometryGroupIdsToLoad.clear(),QE(this.state.geometryScene,this.state.geometry3DIdsInScene,this.state.geometryGroupIdsToLoad),this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0,this.systems.outlineInterpolationSystem.geometries3DDirty=!0,this.systems.geometryInFocusSystem.focusablesDirty=!0,this.threeDdirty=!1);let n=this.systems.meshOptimizationSystem.update();n&&t.push(n),this.systems.borderSystem.update(),this.systems.meshModificationSystem.update(),this.systems.meshDetachmentSystem.update(),this.systems.renderOrderSystem.update(),this.systems.clippingPlaneSystem.update(),this.systems.imageSystem.update(this.systems.cameraSystem.getRotation()),t.push(this.systems.text3DSystem.update(this.systems.cameraSystem.getRotation())),this.systems.customGeometrySystem.update(),this.systems.panBoundsSystem.update(),this.systems.geometryInFocusSystem.update(this.systems.cameraSystem.isCameraMoving(),this.systems.cameraSystem.lastCameraStoppedMovingTime()),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.pathSystem.update(this.systems.cameraSystem.minZoomAltitude,this.systems.cameraSystem.maxZoomAltitude,this.systems.cameraSystem.getZoomAltitude()),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.occlusion2DSystem.update(),this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.systems.watermarkSystem.update();let o=this.needs2DRecompute;return this.nextFrame=requestAnimationFrame(()=>{this.nextFrame=null,this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height,this.systems.watermarkSystem.options.position,!o&&this.systems.cameraSystem.isCameraMoving(),this.systems.imageSystem.currentImageScreenBBoxes)}),this.systems.textureSystem.update(),this.systems.pluginSystem.update(this.state),this.systems.drawSystem.update(),this.systems.geometryDisposalSystem.update(),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1,this.systems.cameraSystem.rotationDirty=!1,this.systems.cameraSystem.stateDirty&&(this.publish("camera-state-change"),this.systems.cameraSystem.stateDirty=!1),this.publish("post-render"),this.needs2DRecompute=!1,Promise.all(t)}catch(t){return Promise.reject(t)}});this.renderer=t,this.state=n,this.mode=o,this.scene=i,this.cameraObject=a,this.viewCamera=l,this.systems=u,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D),this.systems.cameraSystem.on("pan-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("zoom-end",()=>this.needs2DRecompute=!0),this.systems.cameraSystem.on("rotate-start",()=>this.needs2DRecompute=!1),this.systems.cameraSystem.on("rotate-end",()=>this.needs2DRecompute=!0)}paint(){var t;(t=this.renderer)!=null&&t.renderer&&(this.mode==="standalone"&&this.renderer.clear(),this.renderer.render(this.scene,this.state.useStandaloneCamera||this.mode==="standalone"?this.cameraObject:this.viewCamera))}destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.geometry2DIdsInScene.clear(),this.state.geometry3DIdsInScene.clear(),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.collidersDirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};p();import{z as lr}from"zod";var DH=lr.object({interactive:lr.boolean().optional(),id:lr.string().optional(),width:lr.union([lr.number(),lr.object({on:lr.literal("zoom-level").optional(),input:lr.array(lr.number()).nonempty(),output:lr.array(lr.number()).nonempty(),easing:lr.string().optional()})]).optional(),accentColor:lr.string().optional(),displayArrowsOnPath:lr.boolean().optional(),animateArrowsOnPath:lr.boolean().optional(),visibleThroughGeometry:lr.boolean().optional(),dashed:lr.boolean().optional()}),TH=lr.object({type:lr.enum(["Feature"]),geometry:Kp,properties:lr.object({parentId:lr.any().optional()})});function FF(e,r){lr.object({features:lr.array(TH)}).parse(e),DH.parse(r)}var x0,Yu=class{constructor(r,t){f(this,"type","path");f(this,"mesh",new vu);f(this,"material");f(this,"geometry");f(this,"outline");f(this,"feature");f(this,"options");f(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});f(this,"breakpoint",0);f(this,"altitudeBreakpoints");f(this,"accentColor","blue");f(this,"completeFraction",1);f(this,"altitudeAdjustment",1);f(this,"displayArrowsOnPath",!1);f(this,"animateArrowsOnPath",!1);f(this,"visibleThroughGeometry",!1);f(this,"highlightStartFraction",0);f(this,"highlightEndFraction",0);f(this,"highlightCompleteFraction",1);f(this,"highlightWidthMultiplier",1.1);f(this,"highlightColor","red");f(this,"dashed",!1);f(this,"isVertical",!1);f(this,"dirty",!0);f(this,"materialDirty",!0);f(this,"position",new be);D(this,x0,0);var n,o,i,a,l,u;this.feature=r,this.options=t||{},this.width=(n=t==null?void 0:t.width)!=null?n:this.width,this.accentColor=(o=t==null?void 0:t.accentColor)!=null?o:this.accentColor,this.displayArrowsOnPath=(i=t==null?void 0:t.displayArrowsOnPath)!=null?i:this.displayArrowsOnPath,this.animateArrowsOnPath=(a=t==null?void 0:t.animateArrowsOnPath)!=null?a:this.animateArrowsOnPath,this.visibleThroughGeometry=(l=t==null?void 0:t.visibleThroughGeometry)!=null?l:this.visibleThroughGeometry,this.dashed=(u=t==null?void 0:t.dashed)!=null?u:this.dashed}setColor(){}setOpacity(){}set visible(r){this.mesh&&(this.mesh.visible=r)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,x0)}set altitude(r){this.mesh&&(this.mesh.position.z=r,M(this,x0,r))}set complete(r){this.material&&(this.material.uniforms.complete.value=r,this.material.needsUpdate=!0)}};x0=new WeakMap;p();p();p();var di=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1},InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-di.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?di.Bounce.In(e*2)*.5:di.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),I0=function(){return performance.now()},o4=function(){function e(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(t){return r._tweens[t]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var o=0,i=t;o<i.length;o++){var a=i[o];(r=a._group)===null||r===void 0||r.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var n=0,o=r;n<o.length;n++){var i=o[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,t){r===void 0&&(r=I0()),t===void 0&&(t=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var i=this._tweens[n[o]],a=!t;i&&i.update(r,a)===!1&&!t&&this.remove(i)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Yp={Linear:function(e,r){var t=e.length-1,n=t*r,o=Math.floor(n),i=Yp.Utils.Linear;return r<0?i(e[0],e[1],n):r>1?i(e[t],e[t-1],t-n):i(e[o],e[o+1>t?t:o+1],n-o)},Bezier:function(e,r){for(var t=0,n=e.length-1,o=Math.pow,i=Yp.Utils.Bernstein,a=0;a<=n;a++)t+=o(1-r,n-a)*o(r,a)*e[a]*i(n,a);return t},CatmullRom:function(e,r){var t=e.length-1,n=t*r,o=Math.floor(n),i=Yp.Utils.CatmullRom;return e[0]===e[t]?(r<0&&(o=Math.floor(n=t*(1+r))),i(e[(o-1+t)%t],e[o],e[(o+1)%t],e[(o+2)%t],n-o)):r<0?e[0]-(i(e[0],e[0],e[1],e[1],-n)-e[0]):r>1?e[t]-(i(e[t],e[t],e[t-1],e[t-1],n-t)-e[t]):i(e[o?o-1:0],e[o],e[t<o+1?t:o+1],e[t<o+2?t:o+2],n-o)},Utils:{Linear:function(e,r,t){return(r-e)*t+e},Bernstein:function(e,r){var t=Yp.Utils.Factorial;return t(e)/t(r)/t(e-r)},Factorial:function(){var e=[1];return function(r){var t=1;if(e[r])return e[r];for(var n=r;n>1;n--)t*=n;return e[r]=t,t}}(),CatmullRom:function(e,r,t,n,o){var i=(t-e)*.5,a=(n-r)*.5,l=o*o,u=o*l;return(2*r-2*t+i+a)*u+(-3*r+3*t-2*i-a)*l+i*o+r}}},PF=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),lI=new o4,Wi=function(){function e(r,t){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=di.Linear.None,this._interpolationFunction=Yp.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=PF.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof t=="object"?(this._group=t,t.add(this)):t===!0&&(this._group=lI,lI.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(r,t){if(t===void 0&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=r,this._propertiesAreSetUp=!1,this._duration=t<0?0:t,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,t){if(r===void 0&&(r=I0()),t===void 0&&(t=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=r,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var i in this._valuesEnd)o[i]=this._valuesEnd[i];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,t,n,o,i){for(var a in n){var l=r[a],u=Array.isArray(l),c=u?"array":typeof l,d=!u&&Array.isArray(n[a]);if(!(c==="undefined"||c==="function")){if(d){var m=n[a];if(m.length===0)continue;for(var h=[l],g=0,x=m.length;g<x;g+=1){var E=this._handleRelativeValue(l,m[g]);if(isNaN(E)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}h.push(E)}d&&(n[a]=h)}if((c==="object"||u)&&l&&!d){t[a]=u?[]:{};var v=l;for(var I in v)t[a][I]=v[I];o[a]=u?[]:{};var m=n[a];if(!this._isDynamic){var C={};for(var I in m)C[I]=m[I];n[a]=m=C}this._setupProperties(v,t[a],m,o[a],i)}else(typeof t[a]>"u"||i)&&(t[a]=l),u||(t[a]*=1),d?o[a]=n[a].slice().reverse():o[a]=t[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(r){return r===void 0&&(r=I0()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=I0()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,t=this._chainedTweens.length;r<t;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=di.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=Yp.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,t){var n=this,o;if(r===void 0&&(r=I0()),t===void 0&&(t=e.autoStartOnUpdate),this._isPaused)return!0;var i;if(!this._goToEnd&&!this._isPlaying)if(t)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=r-this._startTime,l=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),u=this._duration+this._repeat*l,c=function(){if(n._duration===0||a>u)return 1;var E=Math.trunc(a/l),v=a-E*l,I=Math.min(v/n._duration,1);return I===0&&a===n._duration?1:I},d=c(),m=this._easingFunction(d);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,m),this._onUpdateCallback&&this._onUpdateCallback(this._object,d),this._duration===0||a>=this._duration)if(this._repeat>0){var h=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=h);for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*h,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,x=this._chainedTweens.length;g<x;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,t,n,o){for(var i in n)if(t[i]!==void 0){var a=t[i]||0,l=n[i],u=Array.isArray(r[i]),c=Array.isArray(l),d=!u&&c;d?r[i]=this._interpolationFunction(l,o):typeof l=="object"&&l?this._updateProperties(r[i],a,l,o):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(r[i]=a+(l-a)*o))}},e.prototype._handleRelativeValue=function(r,t){return typeof t!="string"?t:t.charAt(0)==="+"||t.charAt(0)==="-"?r+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(r){var t=this._valuesStartRepeat[r],n=this._valuesEnd[r];typeof n=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(n):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=t},e.autoStartOnUpdate=!1,e}();var BFe=PF.nextId,Za=lI,_Fe=Za.getAll.bind(Za),LFe=Za.removeAll.bind(Za),RFe=Za.add.bind(Za),NFe=Za.remove.bind(Za),jFe=Za.update.bind(Za);p();p();p();var OF=(e,r)=>(r-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,kF=(e,r)=>new qe(e.clientX-r.offsetLeft,e.clientY-r.offsetTop),cI=(e,r)=>Math.atan2(r.y-e.y,r.x-e.x),E0=(e,r)=>Math.sqrt((r.y-e.y)**2+(r.x-e.x)**2),dI=(e,r)=>new qe((e.x+r.x)/2,(e.y+r.y)/2),pI=e=>{let r=0,{wheelDelta:t,detail:n}=e;return t!==void 0?r=t:n!==void 0&&(r=-n),r};var i4=class{constructor(r,t){f(this,"input1");f(this,"input2");f(this,"lastAngle");f(this,"lastDistance");f(this,"totalDistance");f(this,"first");f(this,"second");this.input1=r,this.input2=t,this.lastAngle=cI(r,t),this.lastDistance=E0(r,t),this.totalDistance=0,this.first=r,this.second=t}update(r,t){let n=E0(r,t);this.input1=r,this.input2=t;let o=cI(r,t);this.lastAngle=o,this.lastDistance=n,this.totalDistance+=(E0(this.first,r)+E0(this.second,t))/2,this.first=dI(this.first,r),this.second=dI(this.second,t)}};p();var C0=class{constructor(r,t,n){f(this,"touch");f(this,"camera");f(this,"cameraPlane");f(this,"viewCoordinate");f(this,"snapHolderMatrix");f(this,"snapCamera");f(this,"cameraPosition");f(this,"raycaster");f(this,"worldCoordinate");f(this,"snapshotted",!1);this.touch=r,this.camera=t,this.cameraPlane=n,this.viewCoordinate={x:r.x,y:r.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let r=new qe(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new fa,this.raycaster.setFromCamera(r,this.snapCamera);let t=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=t&&t.length>0?t[0].point:null,this.snapshotted=!0}updateAnchorState(r,t){this.camera=r,this.snapCamera=r.clone(),this.snapHolderMatrix=r.matrixWorld.clone(),this.updateViewCoordinate(t),this.snapshotCameraState()}updateViewCoordinate(r){this.viewCoordinate={x:r.x,y:r.y}}reUnproject(){var n,o;let r=new qe(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(r,this.snapCamera);let t=(o=this.raycaster)==null?void 0:o.intersectObject(this.cameraPlane,!0)[0];return t?t.point:void 0}};var pi={};fu(pi,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>MH,CLIPPING_RADIUS:()=>S0,CONTROL_OPTIONS:()=>wH,DEFAULT_ANIMATION_DURATION:()=>yI,DEFAULT_BEARING:()=>kH,DEFAULT_MAX_ZOOM_LEVEL:()=>PH,DEFAULT_MIN_ZOOM_LEVEL:()=>bI,DEFAULT_PITCH:()=>OH,DEFAULT_ZOOM_LEVEL:()=>FH,EVENTS:()=>l4,MAPLIBRE_TILE_SIZE:()=>a4,MAX_LAT:()=>fI,MAX_MERCATOR_ZOOM_LEVEL:()=>u4,MIN_LAT:()=>mI,MIN_MERCATOR_ZOOM_LEVEL:()=>s4,ROOM_MERCATOR_ZOOM_LEVEL:()=>AH,TWO_PI:()=>hI,WHEEL_ZOOM_MULTIPLIER:()=>gI,ZRANGE:()=>Xp});p();var a4=512,mI=-85.051129,fI=85.051129,S0=1e4,wH={chain:"chain",cancel:"cancel"},hI=Math.PI*2,Xp=100,gI=1e4,s4=0,u4=24,MH=17,AH=20,yI=200,l4=["change","pan-start","pan-end","rotate-start","rotate-end","zoom-start","zoom-end","multi-start","multi-end","multi-cancel","pedestal-start","pedestal-change","pedestal-end","user-pan-start","user-pedestal-start","user-rotate-start","user-dolly-start","user-zoom-start","user-tilt-start","user-pan-end","user-pedestal-end","user-rotate-end","user-dolly-end","user-zoom-end","user-tilt-end","position-updated","zoom-updated","tilt-updated","rotation-updated"],FH=18,bI=12,PH=22,OH=0,kH=0;var c4=!1,BH=!1;var d4,gc=class extends Ge{constructor(t,n,o,i,a){super();f(this,"dirty",!1);f(this,"zoomDirty",!1);f(this,"rotationDirty",!1);f(this,"panDirty",!1);f(this,"stateDirty",!1);D(this,d4,bI);f(this,"zoomSpeed",5);f(this,"rotateSpeed",100);f(this,"enabled",!0);f(this,"enableZoom",!0);f(this,"enablePan",!0);f(this,"enablePedestal",!1);f(this,"maxPedestal",1/0);f(this,"minPedestal",0);f(this,"enableRotate",!0);f(this,"minZoomAltitude",0);f(this,"maxZoomAltitude",1/0);f(this,"ignoreZoomLimits",!1);f(this,"zoomFactor",1);f(this,"panBounds",{min:new be(1/0,1/0),max:new be(-1/0,-1/0),center:new be(0,0,0),radius:1/0});f(this,"minTilt",0);f(this,"maxTilt",1.2);f(this,"MOUSE_BUTTONS",{ORBIT:Zh.RIGHT,ZOOM:Zh.MIDDLE,PAN:Zh.LEFT});f(this,"camera");f(this,"scene");f(this,"renderer");f(this,"elevation");f(this,"orbit");f(this,"cameraPlane");f(this,"raycaster",new fa);f(this,"rendererState");f(this,"options");f(this,"state",-1);f(this,"intersection");f(this,"viewState",null);f(this,"tweens",new Map);f(this,"clock",new IE(!0));f(this,"coords",{mouse:new qe,rotateStart:new qe,rotateEnd:new qe,rotateDelta:new qe,panStart:new be,panCameraStart:new be,panEnd:new be,panDelta:new be,initialShiftPos:new qe,initialPedestal:0,floorAnchor:new be});f(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});f(this,"scrollTimer",null);f(this,"lastWheelTime",0);f(this,"resetZoom",!1);f(this,"zoomStart");f(this,"pedestalScaleFactor",1);f(this,"isUserZooming",!1);f(this,"stayInsideBounds",!0);f(this,"userInteracting",!1);f(this,"cameraMoving",!1);f(this,"lastCameraMoveTime",Date.now());f(this,"raycastToFloor",t=>{this.raycaster.setFromCamera(t,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new be});f(this,"isUserInteracting",()=>this.userInteracting);f(this,"getPosition",()=>new be(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));f(this,"getPedestal",()=>this.orbit.position.z);f(this,"pan",(t,n)=>{isNaN(t)||isNaN(n)||(this.setPosition(this.orbit.position.x+t,this.orbit.position.y+n),this.publish("position-updated"))});f(this,"postRender",()=>{(this.state===2||this.state===6)&&(this.raycaster.setFromCamera(this.coords.mouse,this.camera),this.intersection=this.raycaster.intersectObject(this.cameraPlane,!1)[0],this.intersection&&(this.coords.panStart.set(this.intersection.point.x,this.intersection.point.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0))),this.state===3&&this.resetZoom&&(this.resetZoom=!1,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0)),this.state===7&&this.isAnimating===!1&&(this.state=-1,this.publish("multi-end"))});f(this,"isCameraMoving",()=>this.cameraMoving);f(this,"lastCameraStoppedMovingTime",()=>this.lastCameraMoveTime);f(this,"setPosition",(t,n)=>{t===void 0||n===void 0||isNaN(t)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(t,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)});f(this,"updateCameraPosition",(t,n)=>{let o=t-this.panBounds.center.x,i=n-this.panBounds.center.y,a=Math.sqrt(o*o+i*i);if(this.stayInsideBounds&&a>this.panBounds.radius){let l=Math.atan2(i,o),u={x:Math.cos(l)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(l)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=u.x,this.orbit.position.y=u.y}else this.orbit.position.x=t,this.orbit.position.y=n});f(this,"tilt",t=>{if(isNaN(t))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(t+this.getTilt(),this.maxTilt),this.minTilt):t+this.getTilt();n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end"),this.stateDirty=!0});f(this,"zoomIn",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i/1.5},t,n,o)});f(this,"zoomOut",(t,n,o)=>{let i=this.getZoomAltitude();this.animateCamera({zoom:i*1.5},t,n,o)});f(this,"getRotation",()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2));f(this,"cancelAnimation",()=>{let t=Array.from(this.tweens.keys());if(t.length<1)return;let n=t[t.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)});f(this,"animateCamera",(t,n,o,i,a,l)=>{let u=w({interruptible:!0},l),c={},d={},m=this.getPosition();if(t.position!=null&&(t.position.x!==void 0&&(c.x=m.x,d.x=t.position.x),t.position.y!==void 0&&(c.y=m.y,d.y=t.position.y),t.position.z!==void 0&&(c.z=m.z,d.z=t.position.z)),t.zoom!==void 0&&(c.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.zoom=t.zoom:d.zoom=Math.min(Math.max(t.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),t.rotation!==void 0){let{start:S,end:T}=TE(this.getRotation(),t.rotation);c.rotation=S,d.rotation=T}t.tilt!==void 0&&(c.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?d.tilt=t.tilt:d.tilt=Math.max(Math.min(t.tilt,this.maxTilt),this.minTilt));let h=c.zoom!==d.zoom,g=c.rotation!==d.rotation,x=c.tilt!==d.tilt,E=new Wi(c).to(d,y.env.TESTING?0:n).onUpdate(S=>{this.setMulti({x:S.x,y:S.y,z:S.z},S.zoom,S.rotation,S.tilt)}).onComplete(()=>{this.completeTween(E),this.publish("multi-end",{zooming:h,rotating:g,tilting:x}),i&&i()}).onStart(()=>{this.state!==7&&(this.state=7,E.state=7,this.publish("multi-start",{zooming:h,rotating:g,tilting:x})),this.publish("change")});this.rendererState.internalTweenGroup.add(E);let v=Array.from(this.tweens.entries()),I=v[v.length-1],C=!1;return I!=null&&(I[1].interruptible?(typeof I[1].cancelledCallback=="function"&&I[1].cancelledCallback(),this.completeTween(I[0])):(C=!0,I[0].chain(E))),this.tweens.set(E,{cancelledCallback:a,interruptible:u.interruptible}),o?E.easing(o):E.easing(di.Quadratic.In),!t.doNotAutoStart&&!C&&(E.start(),this.publish("change")),E.cameraAnimation=!0,E});f(this,"setMulti",(t,n,o,i,a=!0)=>{this.state===-1&&this.publish("multi-start");let l=!1;t!=null&&(t.x!==void 0&&!isNaN(t.x)&&t.y!==void 0&&!isNaN(t.y)&&(this.updateCameraPosition(t.x,t.y),l=!0),t.z!==void 0&&!isNaN(t.z)&&(this.setPedestal(t.z,!0,!1),l=!0)),l&&this.publish("position-updated");let u={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let c=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;c!==this.camera.position.z&&(u.zooming=!0,this.camera.position.z=c,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>S0&&(this.camera.near=n-S0,this.camera.far=n+S0):(this.camera.near=n/Xp,this.camera.far=n*Xp),this.camera.updateProjectionMatrix())}if(o!==void 0&&!isNaN(o)&&o!==this.getRotation()&&(u.rotating=!0,this.orbit.rotation.z=-o,this.publish("rotation-updated")),i!==void 0&&!isNaN(i)){let c=this.stayInsideBounds?Math.max(Math.min(i,this.maxTilt),this.minTilt):i;c!==this.elevation.rotation.x&&(u.tilting=!0,this.elevation.rotation.x=c,this.publish("tilt-updated"))}a&&this.publish("change"),this.state===-1&&this.publish("multi-end",u),this.stateDirty=!0});f(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);f(this,"getZoomScaledMax",()=>{let t=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,t)});f(this,"setRotation",(t,n)=>{if(isNaN(t))return;this.state===-1&&!n&&this.publish("rotate-start");let o=-(t%hI);o!==this.orbit.rotation.z&&(this.orbit.rotation.z=o,n||this.publish("rotation-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,this.rotationDirty=!0,n||(this.stateDirty=!0)});f(this,"setZoomAltitude",t=>{if(isNaN(t))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(t,this.getZoomScaledMin()),this.getZoomScaledMax()):t;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/Xp,this.camera.far=n*Xp,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0});f(this,"setZoomLevel",t=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(t))});f(this,"getZoomAltitude",()=>this.camera.position.z);f(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));f(this,"setTilt",(t,n)=>{if(isNaN(t))return;this.state===-1&&!n&&this.publish("rotate-start");let o=this.stayInsideBounds?Math.max(Math.min(t,this.maxTilt),this.minTilt):t;o!==this.elevation.rotation.x&&(this.elevation.rotation.x=o,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)});f(this,"getTilt",()=>this.elevation.rotation.x);f(this,"setCameraPlaneElevation",t=>{this.cameraPlane.position.z=t});f(this,"zoom",t=>{if(isNaN(t))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-t;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(n,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):n,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.stateDirty=!0});f(this,"getProjectionScaleFactor",(t,n,o)=>lv(t,n,o));f(this,"update",()=>{this.orbit.updateMatrixWorld(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())});f(this,"setPedestal",(t,n=!1,o=!0)=>{typeof t=="number"&&!isNaN(t)&&(this.orbit.position.z=t,n&&(this.publishPedestalChangeEvent(t),this.publish("pedestal-change",{pedestal:t})),this.publish("change"),this.dirty=!0,o&&(this.stateDirty=!0))});f(this,"dispose",()=>{for(let t of l4)t.endsWith("start")?(this.off(t,this.setCameraMoving),t.startsWith("user")&&this.off(t,this.setUserInteracting)):(t.endsWith("end")||t.endsWith("cancel"))&&(this.off(t,this.unsetCameraMoving),t.startsWith("user")&&this.off(t,this.unsetUserInteracting));this.removeEventListeners(),this.scene.remove(this.cameraPlane),this.destroy()});f(this,"createCameraPlane",()=>{let t=c4?2e3:1e10,n=c4?100:1,o=new Di(t,t,n,n),i=new Fr({color:0,wireframe:c4,visible:c4}),a=new Ze(o,i);return this.scene.add(a),a});f(this,"addEventListeners",()=>{let{domElement:t}=this.renderer;for(let n of l4)n.endsWith("start")?(this.on(n,this.setCameraMoving),n.startsWith("user")&&this.on(n,this.setUserInteracting)):(n.endsWith("end")||n.endsWith("cancel"))&&(this.on(n,this.unsetCameraMoving),n.startsWith("user")&&this.on(n,this.unsetUserInteracting));t.addEventListener("contextmenu",this.onContextMenu,!1),t.addEventListener("mousedown",this.onMouseDown,!1),t.addEventListener("wheel",this.onMouseWheel,{passive:!1}),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchmove",this.onTouchMove,!1)});f(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)});f(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)});f(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)});f(this,"removeEventListeners",()=>{let{domElement:t}=this.renderer;t.removeEventListener("contextmenu",this.onContextMenu,!1),t.removeEventListener("mousedown",this.onMouseDown,!1),t.removeEventListener("wheel",this.onMouseWheel,!1),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});f(this,"removeMouseUpEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});f(this,"onContextMenu",t=>{t.preventDefault()});f(this,"onMouseUp",()=>{if(this.enabled!==!1){switch(this.removeMouseUpEventListeners(),this.state){case 2:this.publish("pan-end"),this.publish("user-pan-end");break;case 1:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}this.state=-1,this.panDirty=!1}});f(this,"onMouseMove",t=>{if(this.enabled!==!1)if(t.preventDefault(),this.mouseToScene(t),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(t)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(t)});f(this,"onTouchStart",t=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(t),t.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(t),this.state=9):this.enablePan&&(this.handleTouchStartPan(t),this.state=6);break;case 2:this.touch.inputs=new i4(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});f(this,"onTouchMove",t=>{if(this.enabled!==!1)switch(this.touchToScene(t),t.touches.length){case 2:t.preventDefault(),t.stopPropagation();let n=w({},this.touch.inputs.first),o=w({},this.touch.inputs.second),i=new qe(this.touch.touches[0].x,this.touch.touches[0].y),a=new qe(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(t);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let l=n.y<i.y&&o.y<a.y,u=n.y>i.y&&o.y>a.y;this.enableRotate&&this.state!==4&&(u||l)?(this.handleTouchStartTilt(t),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(t.preventDefault(),t.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(t):this.enablePan&&this.state===6&&this.handleTouchMovePan(t);break;default:this.state=-1}});f(this,"onTouchEnd",t=>{if(this.enabled!==!1){switch(this.handleTouchEnd(),this.state){case 2:case 6:this.publish("user-pan-end");break;case 4:this.publish("pan-end"),this.publish("user-tilt-end");break;case 1:case 5:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:case 9:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}t.touches.length?this.onTouchStart(t):this.state=-1}});f(this,"handleTouchMovePan",t=>{let n=Object.hasOwn(t,"x")?new qe(t.x,t.y):this.touch.touches[0],o=this.raycastToFloor(n);this.coords.panEnd.set(o.x,o.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0});f(this,"handleTouchStartDolly",()=>{let t=this.touch.touches[0].x-this.touch.touches[1].x,n=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let o=new qe(this.touch.touches[0].x-t/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(o),this.orbit.updateMatrixWorld(),this.touch.anchor1=new C0(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new C0(this.touch.touches[1],this.camera,this.cameraPlane),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-dolly-start"),this.publish("zoom-start"),this.publish("multi-start")});f(this,"handleMouseMovePan",()=>{let t=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(t.x,t.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change"),this.panDirty=!0});f(this,"handleTouchStartTilt",t=>{this.coords.rotateStart.set(t.touches[1].clientX,t.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});f(this,"handleTouchMovePedestal",t=>{this.handleMouseMovePedestal(t.touches[0])});f(this,"handleTouchMoveTilt",t=>{this.coords.rotateEnd.set(t.touches[1].clientX,t.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)});f(this,"handleTouchMoveDolly",()=>{let t=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:t.x,y:t.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let o=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);o&&this.setCameraFromTransformMatrix(o),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,t),this.touch.anchor2.updateAnchorState(this.camera,n)});f(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1});f(this,"handleTouchStartPan",t=>{let n=Object.hasOwn(t,"x")?new qe(t.x,t.y):this.touch.touches[0],o=this.raycastToFloor(n);this.coords.panStart.set(o.x,o.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")});f(this,"handleTouchStartPedestal",t=>{this.handleMouseDownPedestal(t.touches[0])});f(this,"onMouseDown",t=>{if(this.enabled!==!1){if(this.mouseToScene(t),t.preventDefault(),this.state===3&&this.publish("zoom-end"),t.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(t),this.state=0}else t.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(t),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});f(this,"onMouseWheel",t=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(t.preventDefault(),t.stopPropagation(),this.mouseToScene(t),this.canScrollZoom(t)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(t)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(t))});f(this,"handleMouseWheel",t=>{if(this.publish("zoom-start"),!this.canScrollZoom(t)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),o=n-pI(t)*n/gI*this.zoomSpeed;if(this.setZoomAltitude(o),this.enablePan){let i=o/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-i),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")});f(this,"setCameraFromTransformMatrix",t=>{this.orbit.updateMatrixWorld();let n=new Zc;n.setFromRotationMatrix(t,"ZYX");let o=(t.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),i=n.z,a=new be(0,0,1);a.applyEuler(n),a.setLength(o);let l=new be;l.setFromMatrixPosition(t),l.sub(a),this.enablePan&&this.setPosition(l.x,l.y),this.enableZoom&&this.setZoomAltitude(o),this.enableRotate&&this.setRotation(-i)});f(this,"makeTransformFromTouchAnchors",(t,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let o=this.camera.projectionMatrix.clone(),i=t.worldCoordinate,a=n.worldCoordinate,l=t.reUnproject(),u=n.reUnproject();if(!l||!u||!i||!a)return null;let c=t.viewCoordinate,d=n.viewCoordinate,m=a.x-i.x,h=a.y-i.y,g=Math.atan2(h,m),x=u.x-l.x,E=u.y-l.y,v=Math.atan2(E,x),I=OF(g,v),C=new mo;C.makeRotationZ(-I);let S=C.clone();S.multiply(t.snapHolderMatrix);let T=(Vt,Ae,ye)=>Vt.elements[(Ae-1)*4+ye-1],A=T(o,1,1)*T(S,1,1)-c.x*T(o,3,4)*T(S,3,1),F=T(o,1,1)*T(S,1,2)-c.x*T(o,3,4)*T(S,3,2),P=T(o,1,1)*T(S,1,3)-c.x*T(o,3,4)*T(S,3,3),O=i.x*A+i.y*F+i.z*P,_=T(o,2,2)*T(S,2,1)-c.y*T(o,3,4)*T(S,3,1),G=T(o,2,2)*T(S,2,2)-c.y*T(o,3,4)*T(S,3,2),L=T(o,2,2)*T(S,2,3)-c.y*T(o,3,4)*T(S,3,3),q=i.x*_+i.y*G+i.z*L,$=T(o,1,1)*T(S,1,1)-d.x*T(o,3,4)*T(S,3,1),K=T(o,1,1)*T(S,1,2)-d.x*T(o,3,4)*T(S,3,2),X=T(o,1,1)*T(S,1,3)-d.x*T(o,3,4)*T(S,3,3),V=a.x*$+a.y*K+a.z*X,Y=T(o,2,2)*T(S,2,1)-d.y*T(o,3,4)*T(S,3,1),ee=T(o,2,2)*T(S,2,2)-d.y*T(o,3,4)*T(S,3,2),oe=T(o,2,2)*T(S,2,3)-d.y*T(o,3,4)*T(S,3,3),le=a.x*Y+a.y*ee+a.z*oe,ve=Math.abs($-A),he=Math.abs(K-F),de=Math.abs(X-P),Fe=Math.abs($-_),ce=Math.abs(K-G),Pe=Math.abs(X-L),He=Math.abs(Y-A),bt=Math.abs(ee-F),B=Math.abs(oe-P),re=Math.abs(Y-_),R=Math.abs(ee-G),ue=Math.abs(oe-L),ie=Math.min(ve+he+de,Fe+ce+Pe),se=Math.min(He+bt+B,re+R+ue);ie<se&&($=Y,K=ee,X=oe,V=le);let Le=_*P-A*L,Et=G*P-F*L,Ce=q*P-O*L,xe=$*L-_*X,We=K*L-G*X,Gr=V*L-q*X,xi=(Gr*Et-Ce*We)/(xe*Et-Le*We),ca=(Gr*Le-Ce*xe)/(We*Le-Et*xe),po=G*A-F*_,da=L*A-P*_,Ii=q*A-O*_,_o=K*_-G*$,ml=X*_-L*$,mu=((V*_-q*$)*po-Ii*_o)/(ml*po-da*_o),Ei=S.clone();return Ei.elements[12]=xi,Ei.elements[13]=ca,Ei.elements[14]=mu,mu>0?Ei:null});f(this,"updateTouchOrigin",()=>{let t=this.renderer.domElement;this.touch.origin.offsetLeft=t.getBoundingClientRect().left,this.touch.origin.offsetTop=t.getBoundingClientRect().top});f(this,"touchToScene",t=>{this.touch.touches=[];for(let n=0,o=t.touches.length;n<o;n++){let i=t.touches[n],a=kF(i,this.touch.origin);this.touch.touches.push(new qe(a.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(a.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]});f(this,"canScrollZoom",t=>{let n=pI(t),o=this.getZoomAltitude();return!(n<0&&o===this.getZoomScaledMax()||n>0&&o===this.getZoomScaledMin())});f(this,"mouseToScene",t=>{let n=this.getMousePos(t);return this.coords.mouse.x=n.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(n.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse});f(this,"getMousePos",t=>({x:t.offsetX,y:t.offsetY}));f(this,"handleMouseDownRotate",t=>{this.coords.rotateStart.set(t.clientX,t.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});f(this,"handleMouseDownPan",()=>{let t=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(t.x,t.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")});f(this,"handleMouseDownPedestal",t=>{let n=new qe(t.clientX,t.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=lv(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});f(this,"handleMouseMovePedestal",t=>{let n={x:t.clientX,y:t.clientY},o=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(o<this.minPedestal?o=Math.max(o,this.minPedestal):o>this.maxPedestal&&(o=Math.min(o,this.maxPedestal))),o!==this.getPedestal()&&this.setPedestal(o,!0)});f(this,"handleMouseMoveRotate",t=>{this.coords.rotateEnd.set(t.clientX,t.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setRotation(this.getRotation()+this.coords.rotateDelta.x/this.rotateSpeed),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd),this.publish("change")});f(this,"publishUserZoomDebounced",zm(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));f(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});f(this,"setCameraMoving",()=>{this.cameraMoving=!0});f(this,"unsetCameraMoving",()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()});f(this,"setUserInteracting",()=>{this.userInteracting=!0});f(this,"unsetUserInteracting",()=>{this.userInteracting=!1});f(this,"publishPedestalChangeEvent",t=>{this.publish("pedestal-change",{pedestal:t,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});f(this,"convertAltitudeToZoomLevel",t=>{let[,n]=this.center,o=this.computeMetersPerPixelFromAltitude(t),i=Math.cos(ut.degToRad(n))*2*Math.PI*qb/o;return ut.clamp(Math.log2(i/512),s4,u4)});f(this,"convertZoomLevelToAltitude",t=>this.computeMetersPerPixelFromZoomLevel(t)*this.options.canvasHeight/2/Math.tan(ut.degToRad(this.camera.fov)/2));f(this,"completeTween",t=>{t.isPlaying()&&t.stop(),this.rendererState.internalTweenGroup.remove(t),this.tweens.delete(t)});f(this,"debugContainer",new hl);this.camera=t,this.renderer=o,this.rendererState=i,this.scene=n,this.options=a,this.elevation=t.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=t.position.z,a.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(t){this.minZoomAltitude=this.convertZoomLevelToAltitude(t),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,d4)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(t){this.maxZoomAltitude=this.convertZoomLevelToAltitude(t),this.stateDirty=!0}get scrollPercent(){let t=this.minPedestal,n=this.maxPedestal,o=this.getPedestal();return o=Math.min(o,n),o=Math.max(o,t),(o-t)/(n-t)*100}get fov(){return this.camera.fov}get scrolledToBottom(){return this.minPedestal===0||Math.floor(this.getPedestal())<=this.minPedestal}get scrolledToTop(){return this.maxPedestal===0||Math.ceil(this.getPedestal())>=this.maxPedestal}get center(){var i,a,l,u;let t=this.getPosition(),{lat:n,lon:o}=dg((a=(i=this.rendererState.center)==null?void 0:i[1])!=null?a:0,(u=(l=this.rendererState.center)==null?void 0:l[0])!=null?u:0,t.x,t.y);return[o,n]}setCenter(t,n){var a,l,u,c;let{x:o,y:i}=pg((l=(a=this.rendererState.center)==null?void 0:a[1])!=null?l:0,(c=(u=this.rendererState.center)==null?void 0:u[0])!=null?c:0,n,t);this.setPosition(o,i)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(t=>t.cameraAnimation)}getCameraFrameForCoordinates(t,n){var h,g;let o=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,i=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,a=this.options.canvasWidth,l=this.options.canvasHeight,u=this.getRotation(),c=this.getTilt(),d=this.getPosition();this.setRotation((h=n.rotation)!=null?h:u,!0),this.setTilt((g=n.tilt)!=null?g:c,!0);let m=BF(t,{canvasWidth:a,canvasHeight:l,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:o,maxZoom:i,position:d,camera:this.camera,orbit:this.orbit});return this.setRotation(u,!0),this.setTilt(c,!0),{center:m.position,zoomLevel:this.convertAltitudeToZoomLevel(m.zoom)}}focusOn(t,n){if(BH){this.debugContainer&&nr(this.debugContainer);let v=new Si(4,4,4),I=new Fr({color:65280,depthTest:!1}),C=new ma(v,I,t.length),S=new mo;t.forEach((T,A)=>{S.setPosition(T),C.setMatrixAt(A,S)}),C.instanceMatrix.needsUpdate=!0,this.debugContainer.add(C),this.scene.add(this.debugContainer)}let o=n.curve,i=n.callback,a=n.cancelledCallback,l=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,u=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,c=this.options.canvasWidth,d=this.options.canvasHeight,m;n.duration!==void 0?m=n.duration:y.env.TESTING==="true"?m=0:m=yI;let h=n.padding,g=this.getRotation(),x=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let E=BF(t,{canvasHeight:d,paddingOption:h,canvasWidth:c,minZoom:l,maxZoom:u,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(g),this.setTilt(x),this.animateCamera({position:E.position,tilt:n.tilt,rotation:n.rotation,zoom:E.zoom},m,o,i,a,n)}resize(t,n){this.options.canvasWidth=t,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(t){let[,n]=this.center,o=ut.clamp(t,s4,u4),i=Math.pow(2,o),a=ut.clamp(n,mI,fI),l=i*512;return Math.cos(ut.degToRad(a))*Math.PI*2*qb/l}computeMetersPerPixelFromAltitude(t){return t*2*Math.tan(ut.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};d4=new WeakMap,f(gc,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);function BF(e,{canvasWidth:r,orbit:t,paddingOption:n,verticalPadding:o=0,canvasHeight:i,minZoom:a,maxZoom:l,camera:u,position:c}){let d={zoom:a,position:c};if(e.length===0)return d;for(let Le of gc.CAMERA_FRAME_PADDING_SIDES)typeof n[Le]!="number"&&(n[Le]=0);let m=n.type==="portion"?{top:n.top*i,bottom:n.bottom*i,left:n.left*r,right:n.right*r,type:"pixel"}:n;if(m.left+m.right>=r||m.top+m.bottom>=i)return d;t.updateMatrixWorld();let h=u.matrixWorldInverse,g=u.fov*(Math.PI/180)/2,x=g,v=Math.atan(Math.tan(g)*(r/i)),I=new be(1/0,1/0,1/0),C=new be(-1/0,-1/0,-1/0),S=new Tr,T=new be;for(let Le=0,Et=e.length;Le<Et;Le++)T.copy(e[Le]),S.expandByPoint(T),T.applyMatrix4(h),I.min(T),C.max(T),T.copy(e[Le]),T.z-=o,T.applyMatrix4(h),I.min(T),C.max(T),T.copy(e[Le]),T.z+=o,T.applyMatrix4(h),I.min(T),C.max(T);let A=C.x-I.x,F=C.y-I.y,P=r-m.left-m.right,O=i-m.top-m.bottom,_=(C.x+I.x)/2,G=(C.y+I.y)/2,L=A/P,q=F/O,$=a,K=l,X=$*Math.tan(v)*2,V=K*Math.tan(v)*2,Y=X/r,ee=V/r,oe=Math.max(L,q);oe=ut.clamp(oe,Y,ee);let le=P*oe,ve=O*oe,he={min:{x:_-le/2-m.left*oe,y:G-ve/2-m.bottom*oe},max:{x:_+le/2+m.right*oe,y:G+ve/2+m.top*oe}},de=(he.min.x+he.max.x)/2,Fe=(he.min.y+he.max.y)/2,ce=S.getCenter(new be),Pe=Math.abs(de-he.min.x),He=Math.abs(Fe-he.min.y),bt=Pe/Math.tan(v),B=He/Math.tan(x),re=new be;re.set(de,Fe,C.z+Math.max(bt,B)),re.applyMatrix4(u.matrixWorld);let R=new be;R.set(de,Fe,C.z),R.applyMatrix4(u.matrixWorld);let ue=new be().subVectors(R,re),ie=(ce.z-re.z)/ue.z,se=new be().copy(re).add(ue.clone().multiplyScalar(ie));return R.set(se.x,se.y,se.z),re.sub(R),{position:se,zoom:re.length()}}p();var _H=300,D0,T0,p4=class{constructor(r){f(this,"state");D(this,D0,new be);D(this,T0,new be);this.state=r}update(r){var o;let t,n;this.state.cameraObject.getWorldPosition(s(this,T0));for(let i of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(i),t&&(n=t.components[0],n&&"containerEl"in n&&n.markerContainer!=null)){if(n.visibilityNeedsUpdate!==!1&&(n.visibilityNeedsUpdate==="show"?n.canShow=!0:n.canShow=!1),(n.canShow&&n.visible===!0||((o=n.animation)==null?void 0:o.pending)===!0)&&!n.offscreen)if(n.options.zIndex!=null)n.markerContainer.style.transform="translate3D(".concat(n.projection.x,"px, ").concat(n.projection.y,"px, ").concat(n.options.zIndex,"px)");else{t.object3d.getWorldPosition(s(this,D0));let a=s(this,T0).distanceTo(s(this,D0));n.markerContainer.style.transform="translate3D(".concat(n.projection.x,"px, ").concat(n.projection.y,"px, ").concat(-a,"px)")}if(n.canShow===!0&&n.visible===!0?n.markerContainer.style.pointerEvents=r?"none":n.pointerEvents:n.markerContainer.style.pointerEvents="none",n.currentStrategyIndex===-1&&n.visible&&n.visibilityNeedsUpdate==="show")continue;n.visibilityNeedsUpdate!==!1&&!n.offscreen&&(n.visibilityNeedsUpdate==="show"&&(n.markerContainer.style.opacity="0"),n.animation&&n.animation.cancel(),n.animation=n.markerContainer.animate([{opacity:n.canShow&&n.visible?"1":"0"}],{duration:_H,easing:"ease-in-out",fill:"forwards"}),n.visibilityNeedsUpdate=!1)}}};D0=new WeakMap,T0=new WeakMap;p();var m4=class extends Ge{constructor(t,n){super();f(this,"state");f(this,"dirty",!0);f(this,"domTree");f(this,"observers",new Map);f(this,"updateDimensions",t=>{t.forEach(n=>{var a;let i=(a=n.target.parentElement)==null?void 0:a.getAttribute("data-marker-id");if(i){let l=this.state.geometry2DMap.get(i),u=l==null?void 0:l.components[0];l&&u instanceof cs&&(u.updateDimensions(n.contentRect.width,n.contentRect.height),u.collisionDirty=!0)}}),this.publish("dimensions-update")});this.state=t,this.domTree=n}setupObserver(){var o;if(this.observers){for(let i of this.observers.values())i.disconnect();this.observers.clear()}let t,n;for(let i of this.domTree.children){let a=i.getAttribute("data-marker-id");if(a!=null&&(t=this.state.geometry2DMap.get(a),n=t.components[0],(o=n.options)!=null&&o.dynamicResize)){let l=new ResizeObserver(this.updateDimensions);l.observe(n.containerEl),this.observers.set(i.userData.entityId,l)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let t of this.observers.values())t.disconnect();this.observers.clear()}};p();var LH=0,RH=90,NH=(y.env.NODE_ENV==="test",!1),Ha={linear:di.Linear.None,"ease-in":di.Quadratic.In,"ease-out":di.Quadratic.Out,"ease-in-out":di.Quadratic.InOut},jH=-50,Se,je,Ws,w0,M0,xI,f4=class{constructor(r,t,n){D(this,M0);D(this,Se);D(this,je);D(this,Ws);D(this,w0);M(this,Se,r),M(this,je,t),M(this,Ws,n),s(this,Se).map&&s(this,Se).map.transform.setMinElevationForCurrentTile(jH),s(this,je).cameraSystem.on("pedestal-change",({pedestal:o})=>{s(this,je).cameraSystem.setCameraPlaneElevation(o)})}get center(){var r,t;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(t=(r=s(this,Se).map).getCenter)==null?void 0:t.call(r).toArray():s(this,je).cameraSystem.center}setCenter(r){var t;if(s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map){(t=s(this,Se).map)==null||t.setCenter(r),s(this,je).interactionSystem.handleHover();return}s(this,je).cameraSystem.setCenter(r[0],r[1]),s(this,je).interactionSystem.handleHover()}get zoomLevel(){var r;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(r=s(this,Se).map)==null?void 0:r.getZoom():s(this,je).cameraSystem.getZoomLevel()}setZoomLevel(r){var t;s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map&&((t=s(this,Se).map)==null||t.setZoom(r)),s(this,je).cameraSystem.setZoomLevel(ha(r,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits."))}getState(){return{zoomLevel:this.zoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,minPitch:this.minPitch,maxPitch:this.maxPitch,autoMinZoomLevel:this.autoMinZoomLevel,panMode:this.panMode,screenOffsets:this.insetsPadding,center:this.center,bearing:this.bearing,pitch:this.pitch,elevation:this.elevation}}get isAnimating(){return s(this,je).cameraSystem.isAnimating}cancelAnimation(){s(this,je).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,je).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,je).cameraSystem.minZoomLevel}setAutoMinZoomLevel(r){s(this,je).panBoundsSystem.autoMinZoomLevel=r,r&&(s(this,je).panBoundsSystem.dirty=!0,s(this,je).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,je).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(r,t=!1){var o;t&&this.setAutoMinZoomLevel(!1);let n=ha(r,pi.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(pi.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,je).cameraSystem.setMinZoomLevel(n),this.zoomLevel<n&&this.setZoomLevel(n),(o=s(this,Se).map)==null||o.setMinZoom(n)}setMaxZoomLevel(r){var n;let t=ha(r,this.minZoomLevel,pi.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(pi.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,je).cameraSystem.setMaxZoomLevel(t),this.zoomLevel>t&&this.setZoomLevel(t),(n=s(this,Se).map)==null||n.setMaxZoom(t)}get maxPitch(){var r,t;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(t=(r=s(this,Se).map)==null?void 0:r.getMaxPitch)==null?void 0:t.call(r):ut.radToDeg(s(this,je).cameraSystem.maxTilt)}get minPitch(){var r,t;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(t=(r=s(this,Se).map)==null?void 0:r.getMinPitch)==null?void 0:t.call(r):ut.radToDeg(s(this,je).cameraSystem.minTilt)}setMinPitch(r){var n;let t=Math.max(LH,r);(n=s(this,Se).map)==null||n.setMinPitch(t),s(this,je).cameraSystem.minTilt=ut.degToRad(t)}setMaxPitch(r){var n;let t=Math.min(RH,r);(n=s(this,Se).map)==null||n.setMaxPitch(t),s(this,je).cameraSystem.maxTilt=ut.degToRad(t)}get bearing(){var r;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(r=s(this,Se).map)==null?void 0:r.getBearing():ut.radToDeg(s(this,je).cameraSystem.getRotation())}setBearing(r){var t;if(s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map){(t=s(this,Se).map)==null||t.setBearing(r);return}s(this,je).cameraSystem.setRotation(ut.degToRad(r))}get pitch(){var r;return s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(r=s(this,Se).map)==null?void 0:r.getPitch():ut.radToDeg(s(this,je).cameraSystem.getTilt())}setPitch(r){var t;if(s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map){(t=s(this,Se).map)==null||t.setPitch(r);return}s(this,je).cameraSystem.setTilt(ut.degToRad(ha(r,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")))}get elevation(){return s(this,je).cameraSystem.getPedestal()}setElevation(r){s(this,je).cameraSystem.setPedestal(r,!0)}animateElevation(r,t){return s(this,w0)&&s(this,w0).stop(),new Promise(n=>{var o;s(this,je).cameraSystem.animateCamera({position:{z:r}},(t==null?void 0:t.duration)||300,Ha[(t==null?void 0:t.easing)||"ease-in-out"],n,n,{interruptible:(o=t==null?void 0:t.interruptible)!=null?o:!0})})}get insetsPadding(){return s(this,Ws).insetsPadding}get panMode(){return s(this,je).cameraSystem.enablePan===!1&&s(this,je).cameraSystem.enablePedestal===!0?"elevation":"default"}setPanMode(r){if(r!=="default"&&r!=="elevation")throw new Error("Invalid pan mode");r!==this.panMode&&(r==="default"?(s(this,je).cameraSystem.enablePan=!0,s(this,je).cameraSystem.enablePedestal=!1):(s(this,je).cameraSystem.enablePan=!1,s(this,je).cameraSystem.enablePedestal=!0))}setInsetPadding(r){s(this,Ws).insetsPadding=Object.assign({},s(this,Ws).insetsPadding,r)}animateTo(r){var a,l,u,c,d,m;if(s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map)return(m=s(this,Se).map)==null||m.flyTo({center:(a=r.center)!=null?a:this.center,zoom:(l=r.zoomLevel)!=null?l:this.zoomLevel,bearing:(u=r.bearing)!=null?u:this.bearing,pitch:(c=r.pitch)!=null?c:this.pitch,duration:(d=r.duration)!=null?d:600}),Promise.resolve();let t=r.center?s(this,Se).convertTo3DMapPosition(r.center[1],r.center[0],r.center[2]||this.elevation):void 0,n=r.zoomLevel!==void 0?s(this,je).cameraSystem.convertZoomLevelToAltitude(ha(r.zoomLevel,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits.")):void 0,o=r.bearing!==void 0?ut.degToRad(r.bearing):void 0,i=r.pitch!==void 0?ut.degToRad(ha(r.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0;return new Promise(h=>{var g;s(this,je).cameraSystem.animateCamera({position:t,zoom:n,rotation:o,tilt:i},r.duration||0,Ha[r.easing||"ease-in-out"],()=>{s(this,je).interactionSystem.handleHover(),h()},h,{interruptible:(g=r==null?void 0:r.interruptible)!=null?g:!0})})}getCameraFrameForCoordinates(r,t){let n=Q(this,M0,xI).call(this,t||{},()=>Promise.resolve()),{pointCloud:o}=_F(r,s(this,Se),s(this,Ws).geometry3DMap);if(o.length===0)return z.error("No valid coordinates found in targets:",r),{center:this.center,zoomLevel:this.zoomLevel};let{center:i,zoomLevel:a}=s(this,je).cameraSystem.getCameraFrameForCoordinates(o,n);return{center:s(this,Se).convert3DMapPositionToCoordinate(i),zoomLevel:a}}focusOn(r,t){var a,l,u,c;let{pointCloud:n,geoBounds:o,firstPosition:i}=_F(r,s(this,Se),s(this,Ws).geometry3DMap);return n.length===0?(z.error("No valid coordinates found in targets:",r),Promise.resolve()):s(this,Se).mode==="outdoors-overlay"&&s(this,Se).map?(n.length===1&&i?(a=s(this,Se).map)==null||a.flyTo({center:[i[0],i[1]],duration:(t==null?void 0:t.duration)||s(this,Se).map.getBearing(),animate:!0,bearing:(t==null?void 0:t.bearing)===void 0?s(this,Se).map.getBearing():t==null?void 0:t.bearing,pitch:(t==null?void 0:t.pitch)===void 0?s(this,Se).map.getPitch():t==null?void 0:t.pitch,zoom:(t==null?void 0:t.maxZoomLevel)||s(this,Se).map.getMaxZoom()}):(NH&&UH(s(this,Se),o),(c=s(this,Se).map)==null||c.fitBounds(o,{duration:(l=t==null?void 0:t.duration)!=null?l:pi.DEFAULT_ANIMATION_DURATION,bearing:(t==null?void 0:t.bearing)===void 0?s(this,Se).map.getBearing():t==null?void 0:t.bearing,pitch:(t==null?void 0:t.pitch)===void 0?s(this,Se).map.getPitch():t==null?void 0:t.pitch,maxZoom:(u=t==null?void 0:t.maxZoomLevel)!=null?u:s(this,Se).map.getMaxZoom()})),s(this,je).interactionSystem.handleHover(),Promise.resolve()):new Promise(d=>{s(this,je).cameraSystem.focusOn(n,Q(this,M0,xI).call(this,t||{},d))})}};Se=new WeakMap,je=new WeakMap,Ws=new WeakMap,w0=new WeakMap,M0=new WeakSet,xI=function(r,t){var n;return{minZoom:(r==null?void 0:r.maxZoomLevel)===void 0?void 0:s(this,je).cameraSystem.convertZoomLevelToAltitude(ha(r.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(r==null?void 0:r.minZoomLevel)===void 0?void 0:s(this,je).cameraSystem.convertZoomLevelToAltitude(ha(r.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:r!=null&&r.padding?Object.assign({},cg,r==null?void 0:r.padding):this.insetsPadding,curve:Ha[(r==null?void 0:r.easing)||"ease-in-out"],rotation:(r==null?void 0:r.bearing)===void 0?void 0:ut.degToRad(r.bearing),tilt:(r==null?void 0:r.pitch)!==void 0?ut.degToRad(ha(r.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0,duration:r==null?void 0:r.duration,callback:()=>{s(this,je).interactionSystem.handleHover(),t()},cancelledCallback:t,interruptible:(n=r==null?void 0:r.interruptible)!=null?n:!0,verticalPadding:r==null?void 0:r.verticalPadding}};function vI(e,r){e[0]=Math.min(e[0],r[0]),e[1]=Math.min(e[1],r[1]),e[2]=Math.max(e[2],r[0]),e[3]=Math.max(e[3],r[1])}function _F(e,r,t){var l;let n=[],o=[1/0,1/0,-1/0,-1/0],i=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:o,firstPosition:i};let a=r.getSystems().renderSystem;for(let u of e)if(typeof u=="string"){(a.threeDdirty||a.twoDdirty)&&r.renderSync();let c=t.get(u);if(!c){z.error("Entity not found with id:",u);continue}let d=new Tr;KE(r,"userData"in c&&(l=c.userData.entityId)!=null?l:c.id,n,d,c instanceof Pr?c.position.z:void 0);let m=r.convert3DMapPositionToCoordinate(d.min),h=r.convert3DMapPositionToCoordinate(d.max);vI(o,m),vI(o,h),i||(i=r.convert3DMapPositionToCoordinate(d.getCenter(new be)))}else n.push(r.convertTo3DMapPosition(u[1],u[0],u[2]||0)),vI(o,u),i||(i=u);return{pointCloud:n,geoBounds:o,firstPosition:i}}function UH(e,r){var n,o,i,a;let t=[[r[0],r[1]],[r[0],r[3]],[r[2],r[3]],[r[2],r[1]],[r[0],r[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(o=e.map)!=null&&o.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(i=e.map)==null||i.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}}}),(a=e.map)==null||a.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}p();p();var LF="uniform vec4 uSize;\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n // Scale the position by the size of the quad\n // and shift to top left corner for 0,0\n vec2 transformed = position.xy * uSize.xy - vec2(1.0, -1.0);\n // Apply width .x and height .y of image\n transformed += vec2(uSize.x, -uSize.y);\n // Apply left .w and top .z offset\n transformed += vec2(uSize.w, -uSize.z) * 2.0;\n gl_Position = vec4(transformed, 1.0, 1.0);\n}";p();var RF="varying vec2 vUv;\nuniform sampler2D uTexture;\nuniform float uOpacity;\nvoid main() {\n #ifndef debug\n vec4 texture = texture2D(uTexture, vUv);\n gl_FragColor = vec4(texture.rgb, texture.a * uOpacity);\n #else\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n #endif\n}";p();var NF=4.291666666666667,jF=15,UF=25,zF=43/60;p();var GF=["horizontal","icon"],zH=new Map([[GF[0],'<svg viewBox="0 0 206 48">\n <path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z"/>\n <path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z"/>\n <path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z"/>\n <path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z"/>\n </svg>'],[GF[1],'<svg viewBox="0 0 43 60">\n <path d="M14.0291 7.06645C14.0291 10.9691 10.8885 14.1329 7.01453 14.1329C3.14051 14.1329 0 10.9691 0 7.06645C0 3.16376 3.14051 0 7.01453 0C10.8885 0 14.0291 3.16376 14.0291 7.06645Z"/>\n <path d="M28.7335 18.3468H35.1045C36.7455 18.3468 37.5178 19.0599 37.5821 20.6158V57.7309C37.5821 59.2868 36.8099 60 35.1367 60H28.9588C27.1569 60 26.642 59.7406 25.6767 58.282L12.6452 38.282V57.7309C12.6452 59.2868 11.8729 60 10.1997 60H3.82873C2.15554 60 1.3833 59.2868 1.3833 57.7309V20.6158C1.3833 19.0599 2.15554 18.3468 3.82873 18.3468H10.1032C11.9051 18.4116 12.4843 18.671 13.3852 20.0648L26.3524 40.162V20.6158C26.3524 19.0599 27.1247 18.3468 28.7335 18.3468Z"/>\n <path d="M41.5 60C42.3362 60 43 59.3143 43 58.5V58.4914C43 57.6771 42.3448 57 41.5 57C40.6638 57 40 57.6857 40 58.5V58.5086C40 59.3229 40.6552 60 41.5 60ZM41.5 59.8371C40.7414 59.8371 40.1724 59.2371 40.1724 58.5086V58.5C40.1724 57.7714 40.75 57.1629 41.5 57.1629C42.2586 57.1629 42.8276 57.7629 42.8276 58.4914V58.5C42.8276 59.2286 42.25 59.8371 41.5 59.8371ZM40.9138 59.2286H41.2069V58.7057H41.5259L41.8879 59.2286H42.2414L41.8362 58.6543C42.0431 58.5943 42.1897 58.44 42.1897 58.1914C42.1897 57.8743 41.9397 57.7114 41.6034 57.7114H40.9138V59.2286ZM41.2069 58.4657V57.9686H41.5776C41.7759 57.9686 41.8879 58.0543 41.8879 58.2171C41.8879 58.3629 41.7759 58.4657 41.5776 58.4657H41.2069Z"/>\n </svg>']]),GH=/<svg([^>]*)>/g;function $F(e,r,t,n){let o=zH.get(e);return o?o.replace(GH,'<svg$1 width="'.concat(t,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(r,';">')):""}p();var yc=class yc{constructor(){f(this,"loader");this.loader=new og}static getInstance(){return yc.instance||(yc.instance=new yc),yc.instance}getLoader(){return this.loader}load(r){return new Promise((t,n)=>{this.loader.load(r,t,void 0,n)})}};f(yc,"instance");var II=yc,Xu=II.getInstance();var VF=!1,Nt,qs,Qp,Nr,Un,bc,qi,Wa,h4=class extends Ge{constructor(t,n,o){super();D(this,Nt,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")},interactive:!0,visible:!0});D(this,qs);D(this,Qp);D(this,Nr);D(this,Un);D(this,bc);D(this,qi,0);D(this,Wa,0);f(this,"dirty",!0);f(this,"getPositionAlignedCanvasCoordinates",(t,n)=>({"top-left":{x:0,y:0},"top-right":{x:t,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:t,y:n},center:{x:t/2,y:n/2},top:{x:t/2,y:0},bottom:{x:t/2,y:n},left:{x:0,y:n/2},right:{x:t,y:n/2}})[s(this,Nt).position]);f(this,"getPositionAlignedPadding",()=>{var o,i,a,l;let t=s(this,Nt).padding;if(typeof t=="number")return{"top-left":{x:t,y:t},"top-right":{x:-t,y:t},"bottom-left":{x:t,y:-t},"bottom-right":{x:-t,y:-t},center:{x:0,y:0},top:{x:0,y:t},bottom:{x:0,y:-t},left:{x:t,y:0},right:{x:-t,y:0}}[s(this,Nt).position];let n={top:(o=t.top)!=null?o:0,right:(i=t.right)!=null?i:0,bottom:(a=t.bottom)!=null?a:0,left:(l=t.left)!=null?l:0};return{x:n.left-n.right,y:n.top-n.bottom}});o&&Object.entries(o).forEach(([i,a])=>{a!==void 0&&(s(this,Nt)[i]=a)}),M(this,Qp,t),M(this,qs,n)}get color(){return s(this,Nt).color==="light"?"white":"#293136"}get iconName(){return s(this,Nt).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,Nt).iconOnly?jF:75}get defaultWidth(){return s(this,Nt).iconOnly?UF:150}get aspectRatio(){return s(this,Nt).iconOnly?zF:NF}get options(){return w({},s(this,Nt))}set options(t){var n,o;M(this,Nt,{padding:t.padding||s(this,Nt).padding,position:t.position||s(this,Nt).position,iconOnly:t.iconOnly||s(this,Nt).iconOnly,color:t.color||s(this,Nt).color,scale:t.scale||s(this,Nt).scale,onClick:s(this,Nt).onClick,interactive:(n=t.interactive)!=null?n:s(this,Nt).interactive,visible:(o=t.visible)!=null?o:s(this,Nt).visible})}get icon(){return $F(this.iconName,this.color,s(this,qi)*s(this,qs).pixelRatio,s(this,Wa)*s(this,qs).pixelRatio)}setSize(t,n){s(this,Un)&&(s(this,Un).uniforms.uSize.value.x=t,s(this,Un).uniforms.uSize.value.y=n)}setXY(t,n){s(this,Un)&&(s(this,Un).uniforms.uSize.value.w=t,s(this,Un).uniforms.uSize.value.z=n)}get width(){return s(this,qi)}get height(){return s(this,Wa)}getPositionAlignedOffset(t,n){return{"top-left":{x:0,y:0},"top-right":{x:-t,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-t,y:-n},center:{x:-(t/2),y:-(n/2)},top:{x:-(t/2),y:0},bottom:{x:-(t/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-t,y:-(n/2)}}[s(this,Nt).position]}insertIntoQuadTree(t){s(this,bc)!=null&&typeof s(this,Nt).onClick=="function"&&s(this,Nt).interactive&&t.insert(s(this,bc))}resize(t,n){if(s(this,Nt).visible!==!0)return;let o=this.getPositionAlignedCanvasCoordinates(t,n),i=this.getPositionAlignedPadding(),a=this.getPositionAlignedOffset(s(this,qi),s(this,Wa)),l=Math.min(t-s(this,qi),Math.max(0,o.x+i.x+a.x)),u=Math.min(n-s(this,Wa),Math.max(0,o.y+i.y+a.y));this.setSize(s(this,qi)/t,s(this,Wa)/n),this.setXY(l/t,u/n),M(this,bc,new Ke(l,u,s(this,qi),s(this,Wa),{entityId:"watermark"}))}update(){this.dirty&&(s(this,Nt).visible===!0?(M(this,qi,Math.min(s(this,qs).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,Nt).scale))),M(this,Wa,s(this,qi)/this.aspectRatio),Xu.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),t=>{if(M(this,Un,new gu({uniforms:{uTexture:{value:t},uSize:{value:new dE(0,0,0,0)},uOpacity:{value:.7}},vertexShader:LF,fragmentShader:RF,depthWrite:!1,depthTest:!1,defines:{debug:VF},wireframe:VF,transparent:!0,visible:!0})),s(this,Nr))s(this,Nr).visible=!0,s(this,Nr).material=s(this,Un),s(this,Nr).material.needsUpdate=!0;else{let n=new Di(2,2,1,1);M(this,Nr,new Ze(n,s(this,Un))),s(this,Nr).position.set(0,0,-1),s(this,Nr).frustumCulled=!1,s(this,Nr).renderOrder=999;let o=new Si(1,1,1),i=new Ze(o,new Fr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));i.frustumCulled=!1,i.layers.set(1),s(this,Nr).add(i),s(this,Qp).add(s(this,Nr))}this.resize(s(this,qs).canvasWidth,s(this,qs).canvasHeight),this.publish("texture-loaded")})):s(this,Nr)&&(s(this,Nr).visible=!1),this.dirty=!1)}destroy(){s(this,Nr)&&(s(this,Qp).remove(s(this,Nr)),nr(s(this,Nr))),M(this,Nr,void 0),s(this,Un)&&s(this,Un).dispose(),M(this,Un,void 0),M(this,bc,void 0)}};Nt=new WeakMap,qs=new WeakMap,Qp=new WeakMap,Nr=new WeakMap,Un=new WeakMap,bc=new WeakMap,qi=new WeakMap,Wa=new WeakMap;p();var g4=100,ZH=!1,b4=class extends Ge{constructor(t,n){super();f(this,"currentTotalBoundingBox");f(this,"state");f(this,"cameraSystem");f(this,"debugMesh",null);f(this,"dirty",!0);f(this,"autoMinZoomLevel",!0);this.state=t,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Tr,this.state.geometryScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new be(0,0,0),new be(g4*2,g4*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.geometryScene),this.currentTotalBoundingBox.expandByScalar(g4)));let t=new Tr().setFromObject(this.state.geometryScene);this.currentTotalBoundingBox.union(t);let n=t.getSize(new be),o=Math.max(n.x,n.y,n.z);for(let a of this.state.geometry2DMap.values())a.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(a.position),a.positionDirty=!1);let i=y4.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(o,g4)).getBoundingSphere(HH).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new be),min:y4.min,max:y4.max,radius:i},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,ZH&&this.state.geometryScene.parent instanceof yu){this.debugMesh&&(this.state.geometryScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new hl,this.debugMesh.add(new Ze(new ng(this.cameraSystem.panBounds.radius),new Fr({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.geometryScene.parent.add(this.debugMesh);let a=new be;y4.getSize(a);let l=new Si(a.x,a.y,a.z),u=new Fr({color:65280,wireframe:!0,transparent:!0,opacity:.5}),c=new Ze(l,u);c.position.copy(this.currentTotalBoundingBox.getCenter(new be)),this.debugMesh.add(c)}}}},y4=new Tr,HH=new mE;p();var EI="\xA9 Mappedin",WH="https://info.mappedin.com/feedback",SI=["top-left","top-right","bottom-left","bottom-right"],qH=640,KH=()=>"<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>\n <circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/>\n <path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/>\n </svg>",CI={custom:[],position:"bottom-right",feedback:!0},em,v4=class{constructor(r,t={}){f(this,"controlContainerEl");f(this,"controlPositions");f(this,"compact");D(this,em);f(this,"attribContainerEl");f(this,"attribInnerEl");f(this,"attribButtonEl");f(this,"feedbackLinkEl");f(this,"attribHTML",EI);f(this,"customAttributions",[]);f(this,"toggleAttribution",r=>{this.attribContainerEl!=null&&(r.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))});M(this,em,!!t.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),r.appendChild(this.controlContainerEl),this.controlPositions=SI.reduce((n,o)=>{let i=document.createElement("div");return i.classList.add("mappedin-ctrl-".concat(o)),this.controlContainerEl.appendChild(i),n[o]=i,n},{})}addAttributionControl(r=CI){var o;let t=r.position&&SI.includes(r.position)?r.position:CI.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(t)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[t].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=KH(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,em)?EI:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((o=r.feedback)!=null?o:CI.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=WH,this.feedbackLinkEl.target="_blank",this.feedbackLinkEl.rel="noopener",this.feedbackLinkEl.textContent="Provide Feedback",this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner"),this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner-bold"),this.attribContainerEl.appendChild(this.feedbackLinkEl)),r.custom&&(this.customAttributions=r.custom),this.updateAttributionDisplay()}updateAttribution(r){if(!r.style||!this.attribInnerEl||!this.attribContainerEl)return;let t=s(this,em)?[EI]:[],n=r.style.sourceCaches;for(let o in n){let i=n[o];if(i.used||i.usedForTerrain){let a=i.getSource();a.attribution&&t.indexOf(a.attribution)<0&&t.push(a.attribution)}}t=t.filter(o=>String(o).trim()),t=t.filter((o,i)=>{for(let a=i+1;a<t.length;a++)if(t[a].indexOf(o)>=0)return!1;return!0}),this.attribHTML=t.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let r=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=r)}resizeAttribution(r){this.attribContainerEl&&(r<=qH||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(r){this.resizeAttribution(r)}updateData(r){this.updateAttribution(r)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};em=new WeakMap;p();var A0,F0,tm=class{constructor(r,t){f(this,"mesh");f(this,"type","custom-geometry");f(this,"dirty",!0);f(this,"feature");f(this,"builder");f(this,"outline");D(this,A0,1);f(this,"color",new vr);D(this,F0,0);this.mesh=new vu,this.feature=r,this.builder=t}get visible(){return this.mesh.visible}set visible(r){this.mesh.visible=r}set opacity(r){M(this,A0,r)}get opacity(){return s(this,A0)}setColor(r){this.color.set(r)}get position(){var r;return(r=this.mesh)==null?void 0:r.position}get altitude(){return s(this,F0)}set altitude(r){this.mesh&&(this.mesh.position.z=r,M(this,F0,r))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(r){this.mesh&&(this.mesh.renderOrder=r)}};A0=new WeakMap,F0=new WeakMap;p();var x4=class{constructor(r,t){f(this,"state");f(this,"convertTo3DMapPosition");this.state=r,this.convertTo3DMapPosition=t}update(){let r,t;for(let n of this.state.geometry3DIdsInScene){let o=this.state.geometry3DMap.get(n);(o==null?void 0:o.type)==="custom-geometry"&&(r=o.components[0],t=o.components[1],r.dirty&&t.visible!==!1&&(r.position.copy(this.convertTo3DMapPosition(r.feature.geometry.coordinates[1],r.feature.geometry.coordinates[0],t.altitude)),r.builder.setup(r.mesh),r.mesh.traverse(i=>{i.userData=H(w({},i.userData),{entityId:n,type:"custom-geometry"})}),r.dirty=!1),t.visible!==!1&&r.builder.update(r.mesh))}}};p();p();function ZF(e){return e.children.some(r=>r.userData.isOutline)}function HF(e,r){var n;let t=e.userData.entities3D.values().next().value;return t?((n=r.geometry3DMap.get(t))==null?void 0:n.components[3])!==void 0:!1}function I4(e,r,t,n,o){let a=e.getAttribute("position").array,l=1/0,u=-1/0;for(let d=0;d<r.count;d++){let h=(r.start+d)*3,g=a[h+2];l=Math.min(l,g),u=Math.max(u,g)}let c=u-l;if(!o||o.thickness===0||c===0)for(let d=0;d<r.count;d++){let h=(r.start+d)*3,g=a[h+2];Math.abs(g-u)<1e-4?a[h+2]=Math.max(t+n,2e-4+n):a[h+2]=n}else{let d=o.thickness,m=l+d,h=l+d,g=u-d,x=u-d,E=n-d,v=n,I=n,C=n+t,S=n+t,T=n+t+d;for(let A=0;A<r.count;A++){let P=(r.start+A)*3,O=a[P+2],_;if(O<=m){let G=d>0?(O-l)/d:0;_=E+G*(v-E)}else if(O>=x){let G=d>0?(O-x)/d:0;_=S+G*(T-S)}else{let G=g-h,L=G>0?(O-h)/G:0;_=I+L*(C-I)}a[P+2]=_}}e.attributes.position.needsUpdate=!0}p();function DI(e){var c,d;let r=new Qh,t=(c=e.mesh)==null?void 0:c.geometry;if(!t||!((d=e.batchedProps)!=null&&d.range))return;let n=e.batchedProps.range,o=n.start,i=n.count,a=t.getAttribute("position");if(a){let m=new Float32Array(i*3);for(let h=0;h<i;h++){let g=o+h;m[h*3]=a.array[g*3],m[h*3+1]=a.array[g*3+1],m[h*3+2]=a.array[g*3+2]}r.setAttribute("position",new An(m,3))}let l=t.getAttribute("normal");if(l){let m=new Float32Array(i*3);for(let h=0;h<i;h++){let g=o+h;m[h*3]=l.array[g*3],m[h*3+1]=l.array[g*3+1],m[h*3+2]=l.array[g*3+2]}r.setAttribute("normal",new An(m,3))}let u=t.getAttribute("uv");if(u){let m=new Float32Array(i*2);for(let h=0;h<i;h++){let g=o+h;m[h*2]=u.array[g*2],m[h*2+1]=u.array[g*2+1]}r.setAttribute("uv",new An(m,2))}if(t.index){let m=t.index,h=new Uint32Array(i);for(let g=0;g<i;g++)h[g]=m.array[o+g];r.setIndex(new An(h,1))}return r}function WF(e,r,t){let n=DI(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,t),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let o=r.addGeometry(n);r.addInstance(o),r.setMatrixAt(o,t);let i=r.getGeometryIdAt(o),a=r.getGeometryRangeAt(i);return a&&e.batchedProps&&(e.batchedProps.range=a),n.dispose(),o}p();p();var qF="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\nattribute float visibility;\nvarying vec4 v_color;\n\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n vLineDistance = scale * lineDistance;\n v_color = color;\n\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n if (visibility < 0.5) {\n gl_Position = vec4(-2.0, -2.0, -2.0, 1.0);\n }\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n\n}";p();var KF="// Modified from https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib/linedashed.glsl.js\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\nvarying vec4 v_color;\n\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n discard;\n\n }\n\n vec3 outgoingLight = vec3( 0.0 );\n\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n\n outgoingLight = diffuseColor.rgb; // simple shader\n\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n\n // Discard alpha lower than 0.01 to avoid opacity fighting\n if (v_color.a <= 0.01) { \n discard;\n }\n}\n";var E4=class extends gE{constructor(r){super(r),this.onBeforeCompile=t=>{t.vertexShader=qF,t.fragmentShader=KF}}};p();var Ki,vc,Qu,el,P0,TI,xc=class{constructor(){D(this,P0);D(this,Ki,[]);D(this,vc,!1);D(this,Qu);D(this,el)}get size(){return s(this,Ki).length}add(r){s(this,Ki).push(r),s(this,vc)||Q(this,P0,TI).call(this)}onComplete(r){M(this,Qu,r)}clearOnComplete(){M(this,Qu,void 0)}clearAll(){M(this,Ki,[]),M(this,vc,!1),M(this,Qu,void 0),s(this,el)!==void 0&&(cancelIdleCallback(s(this,el)),M(this,el,void 0))}};Ki=new WeakMap,vc=new WeakMap,Qu=new WeakMap,el=new WeakMap,P0=new WeakSet,TI=function(){M(this,vc,!0),M(this,el,requestIdleCallback(r=>{let t=0;for(;s(this,Ki).length>0&&r.timeRemaining()>2;){let n=s(this,Ki).shift();n&&(n(),t++)}if(t===0&&s(this,Ki).length>0&&r.timeRemaining()<2){let n=s(this,Ki).shift();n&&n()}M(this,el,void 0),s(this,Ki).length>0?Q(this,P0,TI).call(this):(M(this,vc,!1),s(this,Qu)&&s(this,Qu).call(this))},{timeout:3e3}))};var XH=80,Ic,rm,S4,D4,T4,C4=class extends Ge{constructor(t){super();f(this,"rendererState");f(this,"outlineOpacitiesDirty",!0);f(this,"useIdleFramesOnly",!0);D(this,Ic,!0);D(this,rm,-1/0);f(this,"idleBuildQueue",new xc);f(this,"idleComputeBoundingSphereQueue",new xc);D(this,S4,new Map);D(this,D4,new E4({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:fl}));D(this,T4,()=>{this.publish("needs-render")});this.rendererState=t,this.idleBuildQueue.onComplete(s(this,T4))}get geometries3DDirty(){return s(this,Ic)}set geometries3DDirty(t){M(this,Ic,t)}buildOutlines(t){var h;let n=[];for(let g of t.userData.entities3D.values()){let x=this.rendererState.geometry3DMap.get(g);if(x instanceof Mt&&x.type==="geometry"&&x.components[3]&&x.components[3].dirty===!0&&x.components[0].material!=null){let E=x.components[0].geometry,v=!1;E||(E=DI(x.components[0]),v=!0);let I=x.components[1];n.push([x.components[3],new bE(E,(h=I.bevel)!=null&&h.enabled?1:XH)]),v&&(E==null||E.dispose(),E=void 0)}}if(n.length===0)return;let o=No(n.map(g=>g[1]),!1);if(o==null)return;let i=o.getAttribute("position"),a=new Float32Array(i.count*4),l=new An(a,4);o.setAttribute("color",l);let u=new Uint8Array(i.count);u.fill(0);let c=new An(u,1,!1);o.setAttribute("visibility",c);let d=0;for(let g=0;g<n.length;g++){let[x,E]=n[g],v=E.getAttribute("position").count;x.edgeColors=l,x.edgeVisibility=c,x.geometry=o,x.ranges={count:v,start:d},d+=v,E.dispose()}let m=new km(o,s(this,D4));m.userData.isOutline=!0,t.add(m)}update(t,n=!0){var a;let o;if(this.geometries3DDirty){for(let l of this.rendererState.geometry3DIdsInScene){let u=this.rendererState.geometry3DMap.get(l);u instanceof Ti&&HF(u,this.rendererState)&&!ZF(u)&&u.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(u)):this.buildOutlines(u))}M(this,Ic,!1),this.outlineOpacitiesDirty=!0}for(let l of this.rendererState.geometry3DIdsInScene){let u=this.rendererState.geometry3DMap.get(l);if(u instanceof Mt&&u.type==="geometry"&&u.components[3]&&u.components[3].dirty===!0&&u.components[0].material!=null&&u.parentObject3D instanceof Ti){let c=u.components[3].geometry;if(!c)continue;let d=u.components[3];if(!d)continue;let m=d.enabled&&u.components[1].visible;if(d.visible!==m&&(d.visible=m),!d.visible)continue;let h=d.edgeColors;if(!h||!d.ranges)continue;let g=new vr(d.color);for(let I=0;I<d.ranges.count;I++){let C=d.ranges.start+I;h.setXYZ(C,g.r,g.g,g.b)}let x=u.components[1].height,E=u.components[1].altitude,v=(a=u.components[1])==null?void 0:a.bevel;I4(c,d.ranges,x,E,v),c.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>c.computeBoundingSphere()),d.dirty=!1}}let i=n?yl(t,16,19,0,1):s(this,rm);if((i!==s(this,rm)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DIdsInScene.size>0){for(let l of this.rendererState.geometry3DIdsInScene)if(o=this.rendererState.geometry3DMap.get(l),(o==null?void 0:o.type)==="geometry"&&o.components[0]instanceof xr){let u=o.components[3];if(u&&u.edgeColors&&u.geometry&&u.visible){let c=Math.min(i,o.components[1].opacity*Qc(o));if(u.currentOpacity!==c){for(let d=0;d<u.ranges.count;d++){let m=u.ranges.start+d;u.edgeColors.setW(m,c)}u.geometry.attributes.color.needsUpdate=!0}}}}M(this,rm,i),M(this,Ic,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,S4).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};Ic=new WeakMap,rm=new WeakMap,S4=new WeakMap,D4=new WeakMap,T4=new WeakMap;p();p();import{z as ko}from"zod";var w4=class extends Ze{constructor(){super(...arguments);f(this,"userData",{entityId:""})}},QH=ko.object({flipImageToFaceCamera:ko.boolean().optional(),url:ko.string()}),eW=ko.object({type:ko.enum(["Feature"]),properties:ko.object({width:ko.number(),height:ko.number(),rotation:ko.number().min(0).max(360).optional(),verticalOffset:ko.number().optional()}),geometry:Kp});function JF(e,r,t){ko.union([ko.number(),ko.string()]).parse(e),eW.parse(r),QH.parse(t)}var M4=class{constructor(r){f(this,"mesh",new vu);f(this,"imageMesh");f(this,"outline");f(this,"type","image");f(this,"instanceIndex",-1);f(this,"geometry");f(this,"material");f(this,"feature");f(this,"position",new be);this.feature=r}get visible(){var r,t;return(t=(r=this.mesh)==null?void 0:r.visible)!=null?t:!1}set visible(r){this.mesh&&(this.mesh.visible=r)}};p();function wI(e,r){return{x:e.x*Math.cos(r)-e.y*Math.sin(r),y:e.x*Math.sin(r)+e.y*Math.cos(r)}}function tW(e,r){return e.map(t=>wI(t,r))}function rW(e){let r=1/0,t=1/0,n=-1/0,o=-1/0;for(let i of e)r=Math.min(r,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x),o=Math.max(o,i.y);return{minX:r,minY:t,maxX:n,maxY:o}}function nW(e,r){let t=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let i=r[n].x,a=r[n].y,l=r[o].x,u=r[o].y;a>e.y!=u>e.y&&e.x<(l-i)*(e.y-a)/(u-a)+i&&(t=!t)}return t}function YF(e,r,t,n,o){for(let i=0;i<o;i++)for(let a=0;a<n;a++)if(e[t+i][r+a]!==1)return!1;return!0}function oW(e,r,t){let n=e.maxX-e.minX,o=e.maxY-e.minY,i,a,l=w({},e);return n/o>r?(a=o/t,i=a*r,l.minX+=(n-i*t)/2):(i=n/t,a=i/r,l.minY+=(o-a*t)/2),{dx:i,dy:a,gridBounds:l}}function iW(e,r,t,n,o){let i=Array(t).fill(0).map(()=>Array(t).fill(0));for(let a=0;a<t;a++)for(let l=0;l<t;l++){let u={x:r.minX+l*n,y:r.minY+a*o};nW(u,e)&&(i[a][l]=1)}return i}function aW(e,r){let t=Array(r).fill(0).map(()=>Array(r).fill(0));for(let n=0;n<r;n++)for(let o=0;o<r;o++)if(e[n][o]===1){let i=0;for(let a=1;a<=Math.min(r-o,r-n)&&YF(e,o,n,a,a);a++)i=a;t[n][o]=i}return t}function sW(e,r,t,n,o,i){let a=0,l=0,u=0;for(let c=0;c<n;c++)for(let d=0;d<n;d++)if(e[c][d]===1){let m=Math.pow(r[c][d],2),h=t.minX+d*o,g=t.minY+c*i;a+=m,l+=h*m,u+=g*m}return{x:l/a,y:u/a}}function uW(e,r,t,n,o,i,a){let l=-1/0,u=null,c=e.length,d=Math.sqrt(Math.pow(r.maxX-r.minX,2)+Math.pow(r.maxY-r.minY,2));for(let m=0;m<c;m++)for(let h=0;h<c;h++)if(e[m][h]===1)for(let g=1;g<=c-h;g++){let x=g;if(!(x>c-m)&&YF(e,h,m,g,x)){let E=g*x,v=r.minX+(h+g/2)*t,I=r.minY+(m+x/2)*n,C={x:v,y:I},T=Math.sqrt(Math.pow(C.x-o.x,2)+Math.pow(C.y-o.y,2))/d,A=E*(1-i)-T*i*E;A>l&&(l=A,u={center:C,width:g*t*a,height:g*n*a})}}return u}function MI(e,r,t,n={}){let{scaleFactor:o=.9,centerPriority:i=.5,resolution:a=100,minimumSizeRatio:l=.5}=n,u=DE(t),c=e.width/e.height,d=tW(r,u),m=rW(d),{dx:h,dy:g,gridBounds:x}=oW(m,c,a),E=iW(d,x,a,h,g),v=aW(E,a),I=sW(E,v,x,a,h,g),C=uW(E,x,h,g,I,i,o);return!C||C.width<e.width*l||C.height<e.height*l?e:H(w({},C),{center:wI(C.center,-u),rotation:t,polygonCenter:wI(I,-u)})}var O0=Math.PI*2,lW=Math.PI/2,cW=Math.PI*1.5,dW=ga(lW,2),pW=ga(cW,2),mW=.01,XF=!1,A4=class extends Ge{constructor(t,n,o,i=0,a=0,l={}){super();f(this,"rendererState");f(this,"convertTo3DMapPosition");f(this,"projectToScreen");f(this,"initialBearing",0);f(this,"naturalBearing",0);f(this,"imagePlacementOptions");f(this,"cameraFrustum",new tg);f(this,"imageLoadingCache",new Map);f(this,"currentImageScreenBBoxes",[]);f(this,"viewProjectionMatrix",new mo);this.rendererState=t,this.convertTo3DMapPosition=n,this.projectToScreen=o,this.initialBearing=i,this.naturalBearing=a,this.imagePlacementOptions=l}createImageMesh(t,n,o,i=0,a,l){var x,E,v;let u={width:o.width,height:o.height,center:this.convertTo3DMapPosition(a),rotation:(x=o.rotation)!=null?x:0},c=(E=this.imagePlacementOptions.mode)!=null?E:"default",d=(()=>{switch(c){case"fit-nearest-90":let I=(this.initialBearing-this.naturalBearing+360)%180;return I>=45&&I<=135?MI(u,l,u.rotation+90,this.imagePlacementOptions):u;case"fit-initial-bearing":return MI(u,l,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return u}})();if(XF&&d.polygonCenter){let I=new Ze(new ng(1),new _m({color:65280}));I.position.set(d.polygonCenter.x,d.polygonCenter.y,i),this.rendererState.geometryScene.add(I)}let m=new _m({transparent:!0,depthWrite:!1,side:as}),h=new Di(d.width,d.height),g=new w4(h);if(g.visible=!1,g.renderOrder=Ro.IMAGE_MESH,(v=this.getOrDownloadImage(n))==null||v.then(I=>{m.map=I,m.needsUpdate=!0,m.map.colorSpace=Hh,g.visible=!0,this.publish("image-loaded")}),g.userData.entityId=t,g.material=m,XF){let I=new Ze(new Di(o.width,o.height),new _m({color:"gray"}));g.add(I);let C=new EE;g.add(C),C.scale.set(10,10,10)}return g.position.set(d.center.x,d.center.y,i+mW),g.rotation.z=(-ut.degToRad(d.rotation)+O0)%O0,g}getOrDownloadImage(t){var n;if(this.imageLoadingCache.has(t))return(n=this.imageLoadingCache.get(t))==null?void 0:n.promise;{let o=new Promise(i=>{Xu.getLoader().load(t,a=>{let l=this.imageLoadingCache.get(t);l&&!l.loaded&&(l.loaded=!0),i(a)})});return this.imageLoadingCache.set(t,{loaded:!1,promise:o}),o}}flipIfNeeded(t,n){if(t.imageMesh==null)return;let o=-n,i=t.imageMesh.rotation.z,a=ga((i-o+O0)%O0,2);a>dW&&a<pW&&(t.imageMesh.rotation.z=(i+Math.PI)%O0)}update(t){var a,l,u,c,d;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,o,i;for(let m of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(m),(n==null?void 0:n.type)==="image"){if(o=n.components[0],i=n.components[1],i.url&&o.imageMesh==null){let h=this.convertTo3DMapPosition(o.feature.geometry.coordinates),g={x:h.x,y:h.y};o.imageMesh=this.createImageMesh(n.id,i.url,o.feature.properties,o.feature.properties.verticalOffset,o.feature.geometry.coordinates,[g]),o.mesh.add(o.imageMesh),o.position.copy(o.imageMesh.position)}o.imageMesh&&(i.flipImageToFaceCamera&&this.flipIfNeeded(o,t),o.imageMesh.material instanceof _m&&i.dirty&&(o.imageMesh.material.opacity=i.opacity))}else if((n==null?void 0:n.type)==="geometry"){if(o=n.components[0],i=n.components[1],i.showImage&&((a=o.feature.properties)!=null&&a.image)&&o.imageMesh==null&&o.visible&&o.mesh!=null&&o.mesh.parent!=null&&((l=o.feature.properties)==null?void 0:l.image.position)!=null&&o.feature.geometry.coordinates!=null&&o.feature.geometry.coordinates.length>0){let h=o.feature.geometry.coordinates[0].map(x=>{let E=this.convertTo3DMapPosition(x);return{x:E.x,y:E.y}}),g=this.createImageMesh(m,(u=o.feature.properties)==null?void 0:u.image.path,(c=o.feature.properties)==null?void 0:c.image,i.height,(d=o.feature.properties)==null?void 0:d.image.position,h);o.mesh.parent.add(g),o.imageMesh=g}if(o.imageMesh){if(!o.visible)o.imageMesh.visible=!1;else if(i.showImage&&!o.imageMesh.visible)if(i.url){let h=this.imageLoadingCache.get(i.url);h&&h.loaded&&(o.imageMesh.visible=!0)}else o.imageMesh.visible=!0;else!i.showImage&&o.imageMesh.visible&&(o.imageMesh.visible=!1);i.flipImageToFaceCamera&&this.flipIfNeeded(o,t),i.enableImageCollisions===!0&&this.updateImageScreenBBoxes(o)}}}updateImageScreenBBoxes(t){if(t.imageMesh==null)return;let n=t.imageMesh.geometry.boundingBox;if(n!=null){let o=new be;if(t.imageMesh.getWorldPosition(o),!this.cameraFrustum.containsPoint(o))return;let i=new qe;this.projectToScreen(i,o);let a=[new be(n.min.x,n.min.y,n.min.z),new be(n.max.x,n.min.y,n.min.z),new be(n.min.x,n.max.y,n.min.z),new be(n.max.x,n.max.y,n.min.z),new be(n.min.x,n.min.y,n.max.z),new be(n.max.x,n.min.y,n.max.z),new be(n.min.x,n.max.y,n.max.z),new be(n.max.x,n.max.y,n.max.z)],l=[];for(let g of a){let x=g.clone().applyMatrix4(t.imageMesh.matrixWorld),E=new qe;this.projectToScreen(E,x),l.push(E)}let u=1/0,c=1/0,d=-1/0,m=-1/0;for(let g of l)u=Math.min(u,g.x),c=Math.min(c,g.y),d=Math.max(d,g.x),m=Math.max(m,g.y);let h=new Ke(i.x,i.y,d-u,m-c);this.currentImageScreenBBoxes.push(h)}}};p();var fW=250,tl,F4=class extends Ge{constructor(t,n){super();f(this,"cameraDirty",!0);f(this,"focusablesDirty",!0);f(this,"state");f(this,"camera");f(this,"debugEl",null);f(this,"raycasters",[]);f(this,"collisions",new Map);f(this,"focusableEntities",new Set);f(this,"debugRaycasters",!1);D(this,tl);f(this,"update",(t=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!t&&(Date.now()-n>fW||(s(this,tl)&&cancelAnimationFrame(s(this,tl)),M(this,tl,requestAnimationFrame(()=>{this.updateRaf()}))))});this.state=t,this.camera=n,this.buildRaycasters()}resize(){this.buildRaycasters()}buildRaycasters(){this.debugEl&&this.debugEl.remove();let t=new qe(this.state.canvasWidth/2,this.state.canvasHeight/2),n=new qe(t.x/1.2,t.y/1.2),o=new qe(t.x+(t.x-n.x),n.y),i=new qe(n.x,t.y+(t.y-n.y)),a=new qe(o.x,i.y),l=new qe(t.x,t.y/1.5),u=new qe(t.x,t.y+(t.y-l.y));this.debugEl=document.createElement("div"),Object.assign(this.debugEl.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none"}),document.body.append(this.debugEl),this.raycasters=[t,l,u,n,o,i,a].map((c,d)=>{if(this.debugRaycasters){let E=document.createElement("div");E.style.position="absolute",E.style.top=c.y+"px",E.style.left=c.x+"px",E.style.width="10px",E.style.height="10px",E.style.backgroundColor="red",this.debugEl.append(E)}let m=c.x/this.state.canvasWidth*2-1,h=-(c.y/this.state.canvasHeight)*2+1,g=new qe(m,h),x=new fa;return x.setFromCamera(g,this.camera),[x,g,d===0?10:d<7?2:1]})}updateFocusableEntities(){this.focusableEntities.clear();let t,n,o;for(let i of this.state.geometry3DIdsInScene)if(o=this.state.geometry3DMap.get(i),o!=null){if(o.type==="group-container"&&o.components[1]!==void 0&&o.components[1]instanceof $m){if(n=o.components[1],n.dirty===!0||n.focusMesh==null){n.focusMesh&&nr(n.focusMesh);let a=new Tr;a.setFromObject(o);let l=a.max.x-a.min.x,u=a.max.y-a.min.y,c=a.max.z-a.min.z;if(!isFinite(l)||!isFinite(u)||!isFinite(c)||isNaN(l)||isNaN(u)||isNaN(c)||l<=0||u<=0||c<=0)continue;let d=new Si(l,u,c),m={transparent:!0,opacity:this.debugRaycasters?1:0,visible:this.debugRaycasters};if(this.debugRaycasters){let x=["red","green","blue","yellow","purple","orange","pink","brown","gray","black"];m.color=x[Math.floor(Math.random()*x.length)]}let h=new Fr(m),g=new Ze(d,h);g.position.set((a.min.x+a.max.x)/2,(a.min.y+a.max.y)/2,0),g.userData={entityId:o.userData.entityId},n.focusMesh=g,o.add(g),o.components[1].dirty=!1}this.focusableEntities.add(n.focusMesh)}else if(o.type==="geometry"&&o.components[4]&&o.components[4]instanceof $m&&(t=o.components[0],n=o.components[4],t instanceof xr&&t.geometry!=null&&(n.dirty===!0||n.focusMesh==null))){if(n.focusMesh==null){let a=new Ze(t.geometry);a.userData={entityId:o.id},n.focusMesh=a}this.focusableEntities.add(n.focusMesh)}}this.focusablesDirty=!1}updateRaf(){if(this.focusableEntities.size===0){this.publish("geometry-in-focus",[]);return}this.cameraDirty&&this.raycast()}raycast(){this.collisions.clear();for(let[n,o]of this.raycasters)n.setFromCamera(o,this.camera);for(let[n,o,i]of this.raycasters)n.intersectObjects(Array.from(this.focusableEntities.values())).forEach(l=>{var u;if((l==null?void 0:l.object)!=null&&"isMesh"in l.object&&(l!=null&&l.object.isMesh)){let c=l.object.userData.entityId,d=(u=this.collisions.get(c))!=null?u:0;this.collisions.set(c,d+i)}});let t=Array.from(this.collisions,([n,o])=>({entityId:n,weight:o})).sort((n,o)=>o.weight-n.weight).map(({entityId:n})=>n);this.publish("geometry-in-focus",t),this.cameraDirty=!1}showRaycasters(){this.debugRaycasters=!0,this.buildRaycasters()}hideRaycasters(){this.debugRaycasters=!1,this.buildRaycasters()}destroy(){s(this,tl)&&cancelAnimationFrame(s(this,tl)),this.debugEl&&this.debugEl.remove(),this.collisions.clear(),this.focusableEntities.clear(),this.raycasters=[]}};tl=new WeakMap;p();p();p();p();function P4(e,r){r===void 0&&(r={});var t=Qd(e);switch(!r.properties&&e.type==="Feature"&&(r.properties=e.properties),t.type){case"Polygon":return hW(t,r);case"MultiPolygon":return gW(t,r);default:throw new Error("invalid poly")}}function hW(e,r){r===void 0&&(r={});var t=Qd(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{};return QF(n,o)}function gW(e,r){r===void 0&&(r={});var t=Qd(e),n=t.coordinates,o=r.properties?r.properties:e.type==="Feature"?e.properties:{},i=[];return n.forEach(function(a){i.push(QF(a,o))}),bl(i)}function QF(e,r){return e.length>1?kE(e,r):us(e[0],r)}function yW(e,r){var t=!0;return ba(e,function(n){ba(r,function(o){if(t===!1)return!1;t=bW(n.geometry,o.geometry)})}),t}function bW(e,r){switch(e.type){case"Point":switch(r.type){case"Point":return!EW(e.coordinates,r.coordinates);case"LineString":return!e8(r,e);case"Polygon":return!Gs(e,r)}break;case"LineString":switch(r.type){case"Point":return!e8(e,r);case"LineString":return!vW(e,r);case"Polygon":return!t8(r,e)}break;case"Polygon":switch(r.type){case"Point":return!Gs(r,e);case"LineString":return!t8(e,r);case"Polygon":return!xW(r,e)}}return!1}function e8(e,r){for(var t=0;t<e.coordinates.length-1;t++)if(IW(e.coordinates[t],e.coordinates[t+1],r.coordinates))return!0;return!1}function vW(e,r){var t=rp(e,r);return t.features.length>0}function t8(e,r){for(var t=0,n=r.coordinates;t<n.length;t++){var o=n[t];if(Gs(o,e))return!0}var i=rp(r,P4(e));return i.features.length>0}function xW(e,r){for(var t=0,n=e.coordinates[0];t<n.length;t++){var o=n[t];if(Gs(o,r))return!0}for(var i=0,a=r.coordinates[0];i<a.length;i++){var l=a[i];if(Gs(l,e))return!0}var u=rp(P4(e),P4(r));return u.features.length>0}function IW(e,r,t){var n=t[0]-e[0],o=t[1]-e[1],i=r[0]-e[0],a=r[1]-e[1],l=n*a-o*i;return l!==0?!1:Math.abs(i)>=Math.abs(a)?i>0?e[0]<=t[0]&&t[0]<=r[0]:r[0]<=t[0]&&t[0]<=e[0]:a>0?e[1]<=t[1]&&t[1]<=r[1]:r[1]<=t[1]&&t[1]<=e[1]}function EW(e,r){return e[0]===r[0]&&e[1]===r[1]}var r8=yW;function AI(e,r){var t=!1;return ba(e,function(n){ba(r,function(o){if(t===!0)return!0;t=!r8(n.geometry,o.geometry)})}),t}var CW=5e3,FI="outdoor-system-debug-container",n8=!1,Ks,Cr,k0,nm,Js,om,im,mi,am,B0,k4,B4,Ji,PI,sm,Ec,o8,_4,_0,i8,a8,O4=class{constructor(r){D(this,Ji);D(this,Ks,!0);D(this,Cr);f(this,"idleQueue",new xc);D(this,k0,"");D(this,nm,new Set);D(this,Js,new Set);D(this,om);D(this,im);D(this,mi,null);D(this,am,!1);D(this,B0,r=>{if(!s(this,Cr))throw new Error("Map not initialized");let n=[[r[0],r[1]],[r[2],r[1]],[r[2],r[3]],[r[0],r[3]]].map(u=>s(this,Cr).project(u)),o=Math.max(...n.map(u=>u.x)),i=Math.min(...n.map(u=>u.x)),a=Math.max(...n.map(u=>u.y)),l=Math.min(...n.map(u=>u.y));return[new nv.default(i,l),new nv.default(o,a)]});D(this,k4,()=>{s(this,mi)&&(clearTimeout(s(this,mi)),M(this,mi,null),M(this,Ks,!1))});D(this,B4,()=>{s(this,mi)&&(clearTimeout(s(this,mi)),M(this,mi,null)),M(this,mi,setTimeout(()=>{s(this,k4).call(this)},CW))});D(this,sm,async()=>{if(n8&&s(this,om)){let r=s(this,B0).call(this,s(this,om));Q(this,Ji,a8).call(this,r)}if(!(!s(this,Cr)||!s(this,am))&&s(this,Ks)&&!(!s(this,Js)||s(this,Js).size===0)&&(s(this,Ji,o8)&&s(this,_4).call(this),s(this,im))){let r=new Set;this.idleQueue.onComplete(()=>{s(this,Ec).length>0&&(s(this,Js).forEach(t=>{var n;(n=s(this,Cr))==null||n.setFilter(t,["all",...s(this,Ec)])}),M(this,Ks,!1)),M(this,Ec,[])});for(let t of s(this,im)){let n=bu(t),o=s(this,B0).call(this,n),i=s(this,Cr).queryRenderedFeatures(o,{layers:Array.from(s(this,Js))});for(let a of i)a.id==null||r.has(a.id)||this.idleQueue.add(()=>{if(a.geometry!=null&&"coordinates"in a.geometry){let l;if(a.geometry.type==="Polygon"?l=ug(a.geometry.coordinates):a.geometry.type==="MultiPolygon"&&(l=BE(a.geometry.coordinates)),!l)return;AI(t,l)&&a.id!=null&&(r.add(a.id),s(this,Ec).push(["!=",["id"],a.id]))}})}}});D(this,Ec,[]);D(this,_4,()=>{this.idleQueue.clearAll()});D(this,_0,r=>{var t,n;if(s(this,Cr)&&r&&r.dataType==="style"&&r.type==="styledata"&&s(this,nm).size>0){let o=(n=(t=r==null?void 0:r.style)==null?void 0:t.stylesheet)==null?void 0:n.id;(!o||o!==s(this,k0))&&(M(this,k0,o),Q(this,Ji,PI).call(this),M(this,Ks,!0))}});r&&(M(this,Cr,r),s(this,Cr).on("styledata",s(this,_0)),s(this,Cr).on("render",s(this,sm)),M(this,am,s(this,Cr).loaded()),s(this,Cr).on("load",()=>{M(this,am,!0)})),n8&&Q(this,Ji,i8).call(this)}hideLayersIntersectingPolygons(r,t,n){s(this,mi)&&clearTimeout(s(this,mi)),s(this,B4).call(this),M(this,om,r),M(this,im,t.reduce((o,i)=>{if(i.geometry.type==="Polygon"){let a=ug(i.geometry.coordinates);o.push(a)}else i.geometry.type==="MultiPolygon"&&o.push(...i.geometry.coordinates.map(a=>ug(a)));return o},[]));for(let o of n)s(this,nm).add(o);M(this,Ks,!0),Q(this,Ji,PI).call(this),s(this,sm).call(this)}destroy(){s(this,Cr)&&(s(this,Cr).off("styledata",s(this,_0)),s(this,Cr).off("render",s(this,sm))),this.idleQueue.clearAll()}};Ks=new WeakMap,Cr=new WeakMap,k0=new WeakMap,nm=new WeakMap,Js=new WeakMap,om=new WeakMap,im=new WeakMap,mi=new WeakMap,am=new WeakMap,B0=new WeakMap,k4=new WeakMap,B4=new WeakMap,Ji=new WeakSet,PI=function(){if(M(this,Js,new Set),s(this,Cr))for(let r of s(this,nm))s(this,Cr).getLayer(r)&&s(this,Js).add(r)},sm=new WeakMap,Ec=new WeakMap,o8=function(){return this.idleQueue.size!==0},_4=new WeakMap,_0=new WeakMap,i8=function(){if(!document.getElementById(FI)&&s(this,Cr)){let r=document.createElement("div");r.id=FI,r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.bottom="0",r.style.right="0",r.style.pointerEvents="none",r.style.zIndex="1000",s(this,Cr).getContainer().appendChild(r)}},a8=function(r){let t=document.getElementById(FI);if(!t)return;let n=document.getElementById("bbox");n==null&&(n=document.createElement("div"),n.id="bbox",n.style.position="absolute",t.appendChild(n));let o=[Math.min(r[0].x,r[1].x),Math.min(r[0].y,r[1].y)],i=[Math.max(r[0].x,r[1].x),Math.max(r[0].y,r[1].y)];n.style.top=o[1]+"px",n.style.left=o[0]+"px",n.style.width=i[0]-o[0]+"px",n.style.height=i[1]-o[1]+"px",n.style.border="2px solid ".concat(s(this,Ks)?"red":"blue")};p();p();p();p();var L4="attribute float pathDistance;\nattribute vec3 pathNormal;\nattribute vec3 pathTangent;\n\n\nuniform vec2 uvScale;\nuniform float vertexes;\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform float nearZoom;\nuniform float farZoom;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform vec2 cameraParameters;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform float highlightWidthMultiplier;\nuniform vec3 highlightColor;\n\nfloat flattenFactor = 0.0;\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping y = mx + b where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main() {\n fragPathDistance = pathDistance;\n\n // We can get an origin point for the cross-section of the path by\n // subtracting the surface normal times the radius, since the surface normal\n // points strictly away from the centre.\n vec3 origin = position - nearRadius * normal;\n \n // Inflate the path along its surface normal to increase its radius from\n // 'nearRadius' to 'farRadius' when the camera is at 'farZoom'.\n vec3 adjustedPosition = position;\n zoomLevel = clampRemap(cameraParameters.x, nearZoom, farZoom, 0.0, 1.0);\n\n // expansion factor uses the zoom level to increase/decrease the radius\n // for fixed widths, this number is ZERO\n float expansionFactor = (farRadius - nearRadius) * zoomLevel;\n\n adjustedPosition += normal * expansionFactor;\n\n\n // TODO: optimize by removing branching\n bool isHighlighted = fragPathDistance >= highlightStartFraction && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction);\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // we have to subtract 1., don't ask why\n adjustedPosition += normal * (highlightWidthMultiplier - 1.) / 2.;\n }\n \n\n // Determine how far the path extends \"up\" or \"down\" in the direction of the\n // path normal.\n float height = dot(adjustedPosition - origin, pathNormal);\n\n // For horizontal paths, flatten the bottom half entirely so that it's flat\n // against the floor. This makes the path look nicer when it's\n // semitransparent behind opaque geometry, so you don't see it\n // peeking through. For vertical paths, preserve the full tube geometry.\n if (!pathIsVertical) {\n float desiredHeight = max(height, 0.0);\n desiredHeight = desiredHeight * flattenFactor;\n float flattenMagnitude = height - desiredHeight;\n adjustedPosition = adjustedPosition - pathNormal * flattenMagnitude;\n }\n\n // Transform the vertices into NDC.\n vec4 mvPosition = modelViewMatrix * vec4(adjustedPosition, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n\n fragTexcoord = uv;\n\n // Compute a texture coordinate for mapping the arrow texture to the path.\n // We don't want to use the u-value that Three.js provides, because the\n // path may end up twisting arbitrarily -- but we want the arrow texture to\n // always be on the top of the path.\n vec3 bitangent = cross(normal, pathTangent);\n fragTopTextureU = -dot(bitangent, pathNormal) * 0.5 + 0.5;\n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n if (isHighlighted) {\n // TODO: fix scaling\n fragTopTextureU = -dot(bitangent, pathNormal * highlightWidthMultiplier) * 0.5 + 0.5;\n }\n\n radius = mix(nearRadius, farRadius, zoomLevel);\n}\n";p();var OI="#define ARROW_FADING_POINT 0.15\n\nuniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nuniform vec2 resolution;\nuniform vec2 cameraParameters;\nuniform vec3 color;\nuniform float pathLength;\nuniform bool showPulse;\nuniform vec3 pulseColor;\nuniform float pulse;\nuniform float pulseLength;\nuniform bool pathIsVertical;\nuniform bool displayArrowsOnPath;\nuniform float arrowAnimationTimer;\nuniform float opacityMultiplier;\nuniform bool dashed;\nuniform sampler2D arrowTexture;\n\nvarying float zoomLevel;\nvarying float radius;\nvarying vec2 fragTexcoord;\nvarying float fragTopTextureU;\nvarying float fragPathDistance;\n\n\nuniform float highlightStartFraction;\nuniform float highlightEndFraction;\nuniform float highlightCompleteFraction;\nuniform vec3 highlightColor;\n\n// How long the arrow should be, as a factor of pathRadius. Since we've\n// mostly flattened the top of the path, values near 2.0 (the diameter)\n// will probably look best.\nconst float arrowLength = 2.0;\n\n// How much of a relative margin the arrow texture should have inside the\n// area laid out for it. Useful to pull the arrow away from the edges of the\n// path, which slope down.\nconst float arrowMargin = 0.1;\n\n// How many arrow-lengths of space should be between arrows on a short path.\nconst float arrowSpacingOnShortPath = 6.0;\n\n// How many arrow-lengths of space should be between arrows on a long path.\nconst float arrowSpacingOnLongPath = 7.5;\n\n// How long a path must be to be considered \"long\", as a factor of\n// the path radius.\nconst float longPathLength = 200.;\n\n// How long a path must be to be considered \"short\", as a factor of the\n// path radius.\nconst float shortPathLength = 75.;\n\n// How much of the path's length the fade-in should comprise when going from\n// zero opacity to full opacity.\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // Compute the opacity of the path based on the distance from the current\n // fragment to the 'complete' value as it varies from 0.0 to 1.0.\n // Fragments that are at the 'complete' value or past it will be fully\n // transparent, while fragments that are at 'complete - completeLength'\n // or before it will be fully opaque. However, we adjust the 'complete'\n // value here so that it overshoots by one full 'completeLength', so that\n // the entire path will be opaque when the 'complete' value is at 1.0.\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n // Push in the texture coordinates so that they ramp up\n // at 'arrowMargin' instead of at zero; this remapping looks somewhat\n // like this:\n // 1 ^ ___\n // | /\n // | /\n // | /\n // | /\n // |___/\n // 0 +---------->\n // 0 ^ 1\n // arrowMargin\n // Making the arrows narrower on the path.\n float u = fragTopTextureU;\n u = clamp(\n u * (1. / (1. - arrowMargin * 2.)) - (1. / (1. - arrowMargin * 2.) - 1.) / 2.,\n 0.0,\n 1.0\n );\n\n float arrowSpacing = clampRemap(\n pathLength,\n shortPathLength * radius,\n longPathLength * radius,\n arrowSpacingOnShortPath,\n arrowSpacingOnLongPath\n );\n\n // Reduce the spacing between arrows when the camera zooms out, as increasing\n // the path radius will increase the arrow size and thus be able to fit\n // fewer arrows on in total, and this secondary movement of the arrows\n // \"zooming off\" the end of the path is unpleasant\n float expandAmount = mix(1.0, farRadius / nearRadius, zoomLevel);\n float effectiveArrowSpacing =\n arrowSpacing * 1.0 / expandAmount +\n arrowMargin * 2.0;\n\n float effectiveArrowLength = arrowLength * radius * (1. - arrowMargin * 2.0);\n\n // Adjust the slope of the vertical texture coordinate so that it goes\n // from 0 to 1 along the length of the arrow plus the spacing between\n // arrows, and adjust its x-intercept so that one arrow moves to the\n // exact position of the next arrow as 'arrowAnimationTimer' goes\n // from 0 to 1\n float v = (\n fragTexcoord.x * (pathLength / effectiveArrowLength)\n - arrowAnimationTimer * (1. + effectiveArrowSpacing)\n );\n\n // Compute a \"looping sawtooth\" wave for determining the vertical texture\n // coordinates of the arrow texture, roughly as follows:\n // 3 ^ /\n // | ___/\n // 2 | /\n // | ___/\n // 1 | /\n // |___/\n // 0 +--------------->\n // 0 ^ ^\n // ^ |_|\n // | effectiveArrowLength\n // |___|\n // effectiveArrowSpacing\n //\n // This is effectively equivalent to this sort of sawtooth wave:\n // ^\n // 1 | / / /\n // |___/ ___/ ___/\n // 0 +--------------->\n //\n // Causing the image of the arrow to repeat, with dead space (the bottom\n // edge of the texture stretched out) between the arrows at the provided\n // spacing. The reason why the \"looping\" design is preferred is because\n // it takes advantage of WebGL's 'GL_REPEAT' texture wrapping behaviour\n // to avoid the discontinuity that can end up causing visual artifacts.\n if (mod(v, (1. + effectiveArrowSpacing)) < 1.) {\n v = v - effectiveArrowSpacing * floor(v / (1. + effectiveArrowSpacing));\n } else {\n v = ceil(v / (1. + effectiveArrowSpacing));\n }\n\n // Use the r-component of the texture to determine whether the arrow covers\n // this fragment or not\n vec2 sampleTexcoord = vec2(u, v);\n float arrowAmount = 0.0;\n vec3 secondColor = pulseColor;\n\n vec3 finalColor = color;\n\n\n \n // adjust the color based on the highlight but only if the fragment is within the highlight start and end\n // [Anzor] I added 0.005 to make the highlight transition a little smoother when the width multiplier is too high\n if (fragPathDistance >= highlightStartFraction - 0.005 && fragPathDistance <= (highlightEndFraction * highlightCompleteFraction)) {\n finalColor = highlightColor;\n }\n\n\n if (displayArrowsOnPath) {\n arrowAmount = texture2D(arrowTexture, sampleTexcoord).r;\n float delta = 1.0 - abs(fragPathDistance * 2.0 - 1.0);\n secondColor = mix(finalColor, pulseColor, 1.0 - smoothstep(ARROW_FADING_POINT, 0.0, delta));\n }\n\n if (dashed) {\n float dashLength = 0.1; // Adjust this value to change the dash length\n float gapLength = 0.1; // Adjust this value to change the gap length\n float totalLength = dashLength + gapLength;\n float numSegments = ceil(1.0 / totalLength);\n float adjustedTotalLength = 1.0 / numSegments;\n float adjustedDashLength = adjustedTotalLength * (dashLength / (dashLength + gapLength));\n float pattern = mod(fragPathDistance, adjustedTotalLength);\n opacity = pattern < adjustedDashLength ? 1.0 : 0.0;\n }\n\n\n\n if (showPulse) {\n // Add the pulse color to the path by determining how far the current fragment\n // is from 'pulse'\n float pulseLocation = remap(\n pulse,\n 0.0,\n 1.0,\n -pulseLength,\n 1.0 + pulseLength\n );\n float pulseDistance = smoothstep(\n 0.0,\n pulseLength,\n abs(fragPathDistance - pulseLocation)\n );\n\n // Blend the pulse color to the path based on how close this fragment is to\n // the 'pulse' value and whether it's covered by an arrow -- but if it's\n // covered by *both*, then we go back to using the regular path color\n // (making arrows look like \"holes\" when they're overlapping the pulse.)\n float pulseLevel = abs(1.0 - pulseDistance - arrowAmount);\n\n \n gl_FragColor = vec4(mix(finalColor, secondColor, pulseLevel), opacity * opacityMultiplier);\n } else if (displayArrowsOnPath) {\n gl_FragColor = vec4(mix(finalColor, pulseColor, arrowAmount), opacity * opacityMultiplier);\n } else {\n \n gl_FragColor = vec4(finalColor, opacity * opacityMultiplier);\n }\n #include <colorspace_fragment>\n}\n";p();var s8="uniform float complete;\nuniform float nearRadius;\nuniform float farRadius;\nvarying float fragPathDistance;\nconst float completeLength = 0.1;\n\n// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using\n// linear interpolation/extrapolation.\n//\n// This performs a pure linear mapping 'y = mx + b' where\n// 'm = (yMax - yMin) / (xMax - xMin)',\n// 'b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin'.\nfloat remap(float x, float xMin, float xMax, float yMin, float yMax) {\n return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;\n}\n\n// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear\n// interpolation, clamping result values outside [yMin, yMax].\nfloat clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {\n return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);\n}\n\nvoid main(void) {\n // this ensures that the stencil mask moves along with the path above it, to avoid the progress bar effect\n float completeLocation = complete * (1.0 + completeLength);\n float completeAmount = clampRemap(\n fragPathDistance,\n completeLocation - completeLength,\n completeLocation,\n 0.0,\n 1.0\n );\n float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);\n\n // 2020/01/09 Terence Dickson\n // When we render the background and overlay for the mapbox outdoor context\n // behind everything else in single-buffer rendering, the fact that the path\n // writes to the depth buffer means that the background and overlay will not\n // be drawn behind the path even when the path is still fading in. The effect\n // is subtle and is only visible in single-buffer rendering so this quick fix\n // prevents writes to the depth buffer for zero opacity fragments, which gets\n // rid of the most visually-offensive ghosting.\n if (opacity <= 0.0) {\n discard;\n }\n\n gl_FragColor = vec4(0.0, 1.0, 0.0, opacity);\n}";var u8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAQkHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZpZciQ7rkT/uYpeAicQ5HI4mr0dvOX3ATOl0li3q3SVJkUqFMEBcHc4IuX2///fcf/hK7cSXRatpZXi+cott9h5U/3j63EMPt+fL1/h+fPdeff6NnJMHNPjD2U/7+qcl183aH6eH+/PO52PN7E+B3qZ+Tlgspkjb57X1edAKT7Oh+fvrj3v6/nNdp7ftd057abHnz78npVgLGG8FF3cKSTPz2oXJFaQWuocCz9D0mhnEu8Tx54k6dexc98F77vY+f48n96HwvnyvKB8iNHzfJCvY3cj9HZF4dfM7/6QZ4j+7deb2J2z6jn7sbueC5Eq7rmpl63cd1w4GCrd2wov5Vt4r/fVeFW2OMnYIpuD13ShhUi0T8hhhR5O2Pc4w2SJOe5IuGOMM6Z7rhL+FudNSrZXOFFJz3KpkqtJ1hKn4+tawp233flmqMy8AlfGwGCBOz693Fcn/+b1OtA5Bt0QfH2NFeuKFnCWYZmzn1xFQsJ5xlRufO/LvcGNf5PYRAblhrmywe7HY4gh4Re20s1z4jrx2fkHNYKu5wCEiLmFxYREBnwJSUIJXmPUEIhjJT+dlceU4yADQSSu4A65SamQnBptbu7RcK+NEh+nkRYSIZBGSQ0EIlk5C/jRXMFQlyTZiUgRlSpNekklFymlaDGN6po0q2hR1apNe001V6mlaq211d5iS0iYtNLUtdpa651JO0N37u5c0fuII408ZJSho442+gQ+M0+ZZeqss82+4koL+q+y1K262uo7bKC085Zdtu662+4HrJ108pFTjp562umvWXtm9X3WwofM/T5r4Zk1y1i+1+mvrHFa9WWIYHIiljMyFnMg42oZANDRcuZryDla5ixnvkVIIZGsBbHkrGAZI4N5hygnvObuV+Z+mzcn+Y/yFr/LnLPU/RuZc5a6Z+Y+5+2LrK1+K0q6CTIWWkx9OggbF+zaY+1Wk/766H46wF8ONFY+O8hBMEc7oc4Vdh+8JsE+PUSrVjr70Zz1+H56PH3o9sRR1ql5Ha8bUMQxpe89Tki8Sb0tE23cw3DcfEo+ugnj2G3WEmononVfoag71pVjR+EmAE53eT5tqYfEHl/7ThMusaI+St0jktFa9gKnreiQqCNpZ2mJdSkbaiK6DrovYR4/JhJfRsx5d5EVZnEIPetHnU5KynJPTSuCPuC0lOuXH7n1DNq7DpUtHbhM5lDA0c2bnDCJoOObMnyj+aPjPwx0yiDUxKKsg35VnRnBEVhonKwK5hOk5NttUrhr2+tMOXkPJb1RZ+iAelYjL2MuO3pGRQ78GdxwOOaTAcJZcewq7ilB1RJCSozUdSEdwVJVb6asiBsHH1Bqgbiv3Cmkkis6ktVnZGRRwMNJjUA3Ao2127YWdhAIblxF51hzMcZsVZc0r0dJo5Liqfn41Q+q193SGhhkMkgaLJRNnEpqBtyVvbcVffIk+LE9QPFBTMTQe0aWkMXMnx3dy5sfHreDE60Ql50E+SqRcmfK16L2p0Ol8JFATu3qASXy7SvmiGW2cdMBxsty44CvtLogfGlv7WkCSV0WId2270EaD5Ym40cs+SAwZuNjPSTywAvEfLmzQhtLDntfCnhl/fNmUNnzyA2g76Zn0SP+c+I6bCC0FONUQ4L50e95dif+DH/m9htQjBEhPPpOjYjmm2ChbfEMIUaYtAIxmWJHlilLU8ZRs9pCsHbDpFaRgZljz2QandjDIBPZDGTuoZW1KdlYh52ALzisKJRNWSQmLAWx8iv9mGttT15bBc2oxd57bZtVF98CYtK3UH22Yd/A7WaKa+ZjNTOXEzNhMJ5kmQOvfzsbxbZALJ2xwGBjX2HFQybhi7kpbA7DVpS3RxMJwFyHwGk5gs6a4lrRHVqhYT0QTJC9UZcC9Yrelkn6yXch68NKNtG7CiU3vf/zMZAYXPWdrR9XZ/ctMV1sJQ2wJEGxzaHs7LmmHIwnUwbwnNAapBY9xhE19DNJW3ua0dDk/AjwITacR0PqZxkbyJ+E5jYbxI84x1TBE+y90hwDCYZIM0tqAKPZfCzFrbH8kYCm3eqQkZ2+2GovcL8Suokyg8yyCJes6dcouSLiNSLb0ETJU+/N/WFsBBSOXBbm9Cwp4CzlOag7ro7R2vC19nSsCPmAjIEMiobFwaoVXhjTU2XMpgEsDH/L3Sx54OCTMUSXI/IIA2V4QcLQpwVz12pInI0bY56pIQ2BSGRLL+yLfZ7JkiimbK+aepsbwRStpokx5gCqe1hjdMAwcINbkk5jmedrNRAG5pUXPe0sZIoXy1h7lSDxApzheg24JeDNtDS1oBDBUC4iWZFilBPhZx0Kqx2lihpbG9q4sYidksCN4yRYhNM4nxfBbTi4E3AT6B3igbvs9Gv8ZkHsIfdlep+2HelEDbkJdNjqZQ90B7k6OIoFfkkPNoY+z0gzACa1f2qcBYxVJpT2QQgS19dKQlbC24S92xiEAFRKB5Uy1qrBgOtwIge55G0kRPfIytGx0tMOrGfrijB2FHOk/TKcMjDTMPeBo4FnXD5cQ8vtdgoAN0yuzZQHQI09wm/5vAB6RHyI9rYKiZ6YWC6rbaiLmDtoaToC1bViXQFNtgWsOfEEKCleC3GWPSfgQWRQWMgw/9FDgvOZrFAT3SmsA3DLbqlsSppQG5QeOjPXavUUkxF/qgLM05vW5o7UakuBqo2ZW8Nj0LB7imVJC9QSA+wd7RPztIUZ80xQZq0ROrc8CSVncWzkTA/RwmunldCPAQKjqVC7bhRuTIv0plbk7gOX4m5OAi2YesYZ0KBQRToG8iv9x8dgGtgECYRBeEU87OxoSc8epu+s7Mq/MN0VbBT19dii7ekO66UZwdAMtoAVQd13J5nwZe98OgGslmVqAGBkeLZNVNVlWpV18qihntXKnBZvrDIVgFpx4q5poLqREOVplMPSpTF2KvjBAzDpprkruXIaaUmUD4Xo2yrGWcYlixKIwRFjl0jPQhKznUXZAoSjlg9c/NwAI4p3Q/w5bCNfhUZS7bGfqesHqKAlyZZxZgNrhGevZXccaqBys4NEqB3Vqfptji9uUrhCL6yXFqxtm0hhLyYU3Tjd8I/HZaWD1oyVjnG5hhpCN5yHSf8BQUZlVNd00OP4M0TK+JSM7iqWi01SinFkCQXWxiZJLqqAHiEt3G3I2WYd46KU9pIJIOkoRQYCcEAAPguHo0Y4k8Hl6SW50MoW0uZU8jJOUghKo38Nl5ZSwsJNAUC2/lFZWkfMjrU8dFrTjHpJnUrLCILQIxINiYdQlDXaE/razQ4jjQluN5jW1Eh/S7yYvI5gigSjdLYU9TiFXAcHjISiLhQd9obb3OQmwY+YqVwiBMCkOGLXaK/ljBShh56c1g0uyIb2lBRKO7ZTAFncw5c5UGjGSy3CsI1Jt2mtruZkfhBZmbR+842Yu1eDiWEl0V6LZcGem6Ct+LW4Wy3oAjyNObazKBHomhJ3HMKEKHgiGksH+Ig1nTidfNMyA+oYHqVFaRGLiQreVLc9GvQgftKjW9cfUSKNYL80rqU7Um2rwqQJR1ai31Wq7vzKJEsFHDj0bAEMUKXgvfD5bWbaLPBTKz1Nk/Fg+GUZvUzFw80CLaKtPAACVAWrismh863FU4IJ0716SXBUNVb/SDMVvZgDt34CXoOq1JKvg0n08gPHTwXBNgD5W8pZZ8E9EVWcv1DZMB2NFysIwkqBSaH5QRmsAHdkHB+UANvLJvFpQKAahSmYTLEd2AFO+5rsqRRU6sVv5IP0wsSPLcWsbC1Y95mte71CUm6RJJWwkg6Q4k+xWMM0ByElJPQ6j2ED5hY42ALpZRytx9RlgQlJLijzhKi5eX5JBSIRGfo9o2xhd/0aWku8OS+4D9ZnovHDQMPaYo4qm2mlZbUnd7pR6oQj29Z2BqJ9n3LRT+MTLu3IR+ZP2TCPh3EDw8H1NHpoT7FibNYU8WHd9ESHcY12aDOQCUBddi4Ucp+4yuzz8ybcCCu1h8zvzXhDN4HYLq1R+U0xzUqg5QSA3iSBgdDouy55Ifx0DaeEhgezxBRGmoEJ6AJitVuzwtKPlUskHgU2F0LS7AFIwW5jPu0RUL7sp+fkNk0ee8P6uXYgl40WM+cdCOW21r13e0ivt0ff/mYcUfrQZWs2BiN6G+MDTGz1BKORmUTNQp9YGSHFxAeTkQrKd6FoVUogyytW25OLy3OpaO5oZCQp46aPzb5LnJiFEIwAKkmbYVYIjzVv3vj7rA6HignEeQAXTAHKDhoD7Uujh0QjtsB6fTP1NzO7T1Nzq4F1GnfHdXCG1Yxjwdtjf+PGRGTzEtEAUCz7KLfTdItLwCXuSOAzVjaZB6LvbUZhYGWmifSZlcMDnGHPd6gPeiK9erhpiw7ZP9ahTrMhFDa1J53m9ri2DloziqGETTcVSppCbTDDjExg6RrZ6cPEzB8XArEjQSB29odrUoLyoS/65RfM9fprGGjlHpbhGgbYD8MtmW1eFcAWX5dbcMHcl8sUI2k+H7GPW9VrArw3G+BefcCrCaAT/N53YLvP26Uy0kMFnDEZz0DJkmQqEOlL7SlKweYhH8gxpYeAYi0f9magqPbMYZuUI6007lSZQoyoGfYQHsNRzHXR3MMINTSMZpq1KD2A5MDJgtMLdRU6R4CEOJcKGiIJ7K6P/vAM6xpECHI8rRHsaEj6smkngAUjXTzrRoSI48ZpHOqgOY5OejKVdpnmiYUChQnVdIPa6ekGqRSRgEO119oDHOiIUQ5ciYVgaF1oG8Udo8WYtD+DEi8D/w8rAJE2k2PoyV0oMtpauxreaFjpujAvxFlwBhjuNqM9P0IfI5iD8Nh8y1kG4igjJkDNkOijnlLhItAd9lhRd670yNRTu95cR/Xuu0c5WO4DEFk5YQAPtLvU4TYPGRh4APPEDNiuuwR6SC21JoFbQBBMr+zJmT32QplNI6p16PbculN/pCX1wAyTWGTeJ774aln0gvQikw7TmkfsNbdQNs0adutYUDqNtGc0RqngUYdhUYuHSL1/eLrgvqDTC5neu++vufRkEgP9D2T64Kg/c4n+s7k3dDr3me8nOr0c72MRNmgF7D4WySPP0YAI/bI4eixwc7K13QiRiL85A8fnSsUj+mvTrsZtVUEQZ6sTpVafW8nYJZyaZS0U+0xIb6et9PhhtoObozQbjKAoDf6eiFgx1UUvpUYj1GweH0MNMrofhynfWn7+KYu7n5r83hN9aqm+6qjcH7dUlgvZVLV3xqq4fbP16qv+eofuTz43eomAqfS7GBAB9zEE31WJ37eVIPtdGN5A8nMYPvvLt8t2/V/6gM19G4g/hIL7UXf9JgbuLRZ+AoW//AzyMxTcWyz8BAruLRZ+AgX3r3y2+mT/PwfiN1DoVI+QT3CZDmvb8022JeYb6HiQPQpPPvboFB+i1MZdcqWZqthHmix6vttw0UAI1z8oEnGwVe++c7JamxslC+8xKJE41XJmug1npz+6CUAKyURd9gSxo+kWxvtZth848GBlws/0SKjYhmbZ9IiV+mcGBSdWHk8sqSr2zz5J7QME/0yD+z4Pe+JuGn1MV/vUyZwOHojWPlmPXgf9CuoeN9UAT+FGwaLg44v3dWe6QpvuL3Ln/p3k/2AgqNDcfwHgqUmIIqn+hwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH4wYRESAMujenGAAAB9FJREFUeNrtnWlsFVUUx899fS1gUoKioEY+WBRUEohGkUhAKxgEjSgGoRGB4AJCNKAIJBJZJSiyGYMKKkIoLlEUKhUraxFkKUE2kU1aCrRgW2jpg9f29R2/sBTo67v3zL2zvfP73MzM+XU6mf+5504BGIZhGIZhGIZhGIZhGMZGGq3JvSmR62++BXHH7Ylbf9ouRMT99yVq/e0PICIiHumUmPV3PooXOf5EItafXoCXOdUn8ep/pgjrUDY40ervX4JXUTEiocoXL5/FawiNEwlU/6hzeB3hqQljQIwJYT3UzEkQA2JiGOslsiAhDIgZ1RiD6NIEMBD8NIKxyQr6vv7FtdgQa31uILg0ig2zsZmv4//yePUj7rjNv/U3yUEJ/r7Xr/XfvBmlOPKwT+vfhpIUdvdj/Wm7UZpTz/mv/g4HUYGyQb5r/+SjEhXD/VV/j5OoSGisj16LRe9iVCY8xTcGxIulSKBmtk8MiKHlSMIn8ViMqkQivojHgfcuIJ0VAc/XPzmMVljrcQOBmdVojY1NvVx/8mcRtEqeh+NxypJatM6+ezxb/7Io6uBwR4/e/1moicJunvz956A2ip/1Xv3Nt6JGSgd6rf47/0KtlHssHrfZi5rxVDwWDx5C7XgoHotHC9AANbO8YqBXERohMt8bv/8X/kNDRDM9cA+IgWVojhWuNxAYXo4mWePyeBwYHUKz5Lo6HidNvICmybvVxfXPqEbz7Gvr2vrn1KAdHH7IpX//8yNoD8dcGY+TM6NoF26MxzLTL26Mx0majtM4q5ed7yhNulVsd5WAxqset/mGS6/d5CIBLXI62/7I6ZKyzjUC0rIfsP+hE3zkxt9c8vy7tPnJbiKfuyP+Xdn8ZDeuiMei+zF0juWOGyBNv+iMxw4bEBkl6CzOxmPx6ll0mryWDtb/ViU6z17H4rEYG0I3cMiheByYFEZ34Ew8Dn5UjW7BiXisY/rFDfGYmgWCCwcngXto0q08z1YBSUsy3NWgb5Qe2WSjgJRlfdy2RJPcNXm9bQIarexpsP5VdxHjcbMcm2Q3/5P64i71U8k/ELuLNsVjcct2cnST+rGg+Jo4XmhLPBZ376GOfoOkAIB5NWTHxuu/nzj9ElkA8gLgA+pLlvF43IU4/VI9G1QEAHnIPjfVaP1PnqRdVngKqAkActDMa2Hw/u9zijjjNg5UBcBr1FbD3jbG6h9QSruk8ovfyFESABnUWSNT8VgMI06/lF7aBqomAJ4n3m+G4nHgbeJfZfHljcCKAqDHcWo87m2g/gnE53LhlS+lqQqATv9S4/FL2u//qcT2T34XoAuAdvuJBspf11z/LOKbyYG6q4bqAqDVTqKByjFa21/U6ZfdaWBNADTdTDQQnqSv/pRMYjrZevVLCUUAiF+JBqpnaqv/J2I+zb3mxZwkAMTPDq8ep1A3P/1y3ZOEJABgiaPxuOnvxLN/B7oEwELq/sPl1utvSdz8VPsl6BMAn1AbBKut1t96F+3ENXOFTgFiehXRwAZL8Vi0JW5+qppW7+HIAgDGnyca2G4hHouOh2knvTARdAuAkedsj8cinTj9Ujka9AuAV87YHI/F08TNT2eHgQkB0I/aIDhGmuIU/YnnKxkAZgTAU8SGHC0eDyJufiqKfTKrAqBrPtFAiXo8HlFBO1VBA7ebZQHQifhUVo7H4p2QgQeOdQHQbp8t8Tg4idj+2dPgwJIGAdBqhw3xmDz9EuelQ4cASP3DeDwOziW+ecdbldEiACDbcDxOWkBs/8QNHpoEAPXjLNFMmfpv+IZ4+PjRU5cAWGwwHqcQNz/J2NUmAMgjavHjMfEPTGpvvz4BQH1MrzMkoHoW2CsAppEaBFskemQUA+HJYLcAeJfQINgpNVuvbiA0FuwXAG8qNwh2S07WqxqQ/saPXgEwRDGu7W8te2Q1A6XSH0HWLAD6nVa5zoPS9asZKJb/DLZuAdDzhPx1Hu2gkobkDRQq/J8w7QJAfstevuI3+WQN1F39dkAAtP9H7jpPdFVtiMgZOKC0Z9aAAEiT+mrbScLQjIyBXWngtABokRf/kKefonRF4xvYqrjmYEQApG6Md8SyvrS+eDwDG5QbzUYExL3QMxnUlZGGD5wFbhEADQ7YVwyhr401YCD6LbhHACyK3SA4N9TK6mhMA5EvwE0CYF6sBkFopLXl8exYq9/gLgHwYf3x+PxoqwMC9RoIvw9uE1D/gH3VeOsjItnSq9/OCqhvwL5qAoABA5XU28qsAHjj2tW8mukABgzEXP12WgAMvrpBEPkYwICB2KvfjguAvnUH7GvnARgwUGRhEt24gLoD9tGvAAwYKLDyySzzAqDzpQH76CIAAwYOWtqNYoMAaH9xwP57AAMG9ljbj2SHALhjJyLijwAGDGyzuCPNFgGQuhlxpfw1yR94dfAxi5cmojI/lRyx+rtaX9XDhADr2CVABc//JycWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWIDToH8FyJUWtVWAALedDoFhGIZhGIZhGIZhGIYxyf+YwEMsIhMo/AAAAABJRU5ErkJggg==";var DW=new og;function l8(e,r,t){var Le,Et;let{breakpoint:n,width:o,accentColor:i,completeFraction:a,isVertical:l,visibleThroughGeometry:u,dashed:c,highlightCompleteFraction:d,highlightStartFraction:m,highlightEndFraction:h,highlightColor:g,highlightWidthMultiplier:x}=r,{color:E}=t,v=!0,I=0,C=1/0,S=r.displayArrowsOnPath,T=!0,A=S,F=typeof o=="object"?Number(o.output[n])/2:o/2,P=typeof o=="object"?Number((Le=o.output[n+1])!=null?Le:o.output[n])/2:o/2,O=((Et=t.altitude)!=null?Et:0)+TW,_=0;e[0].z+=O;for(let Ce=1;Ce<e.length;++Ce){e[Ce].z+=O;let xe=e[Ce].x-e[Ce-1].x,We=e[Ce].z-e[Ce-1].z;if(l)_+=Math.sqrt(xe*xe+We*We);else{let Gr=e[Ce].y-e[Ce-1].y;_+=Math.sqrt(xe*xe+Gr*Gr+We*We)}}if(!l){let Ce=e[0],xe=e[e.length-1];e.push(xe.clone().setZ(xe.z-.01)),e.unshift(Ce.clone().setZ(Ce.z-.01))}let G=new cE;A&&(G=DW.load(u8),G.colorSpace=Hh);let L=new vr(E),q=new vr(i),$={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new qe(1,1)},cameraParameters:{type:"v2",value:new qe(I,0)},complete:{type:"f",value:v?0:1},color:{type:"c",value:L},pathLength:{type:"f",value:_},nearRadius:{type:"f",value:F},farRadius:{type:"f",value:P},nearZoom:{type:"f",value:I},farZoom:{type:"f",value:C},pulseColor:{type:"c",value:q},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:l},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:G},displayArrowsOnPath:{type:"b",value:S},showPulse:{type:"b",value:T},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:c},highlightCompleteFraction:{type:"f",value:d},highlightStartFraction:{type:"f",value:m},highlightEndFraction:{type:"f",value:h},highlightColor:{type:"c",value:new vr(g)},highlightWidthMultiplier:{type:"f",value:x}},K=new yE(e);K.curveType="catmullrom",K.tension=0;let X=30,V=8,Y=X*e.length,ee=new vE(K,Y,F,V,!1),oe=new Float32Array(ee.attributes.position.count);for(let Ce=e.length;Ce<oe.length;Ce++)oe[Ce]=Ce;ee.setAttribute("vertexIndex",new An(oe,1));let le=new Float32Array(ee.attributes.position.count),ve=new An(le,1);for(let Ce=0;Ce<=Y;Ce++)for(let xe=0;xe<=V;++xe)ve.setX(Ce*(V+1)+xe,Ce/Y);ee.setAttribute("pathDistance",ve);let he=new Float32Array(ee.attributes.normal.count*3),de=new An(he,3);for(let Ce=0;Ce<Y;Ce++){let xe=ee.tangents[Ce];for(let We=0;We<=V;++We)de.setXYZ(Ce*(V+1)+We,xe.x,xe.y,xe.z)}ee.setAttribute("pathTangent",de);let Fe=new Float32Array(ee.attributes.normal.count*3),ce=new An(Fe,3);for(let Ce=0;Ce<Y;Ce++){let xe=ee.tangents[Ce];var Pe,He,bt;l?(Pe=xe.x*xe.y,He=-1+xe.y*xe.y,bt=xe.z*xe.y):(Pe=-xe.x*xe.z,He=-xe.y*xe.z,bt=1-xe.z*xe.z);let We=Math.sqrt(Pe*Pe+He*He+bt*bt);We===0&&(We=1);let Gr=Pe/We,xi=He/We,ca=bt/We;for(let po=0;po<=V;++po)ce.setXYZ(Ce*(V+1)+po,Gr,xi,ca)}ee.setAttribute("pathNormal",ce);let B=new gu({uniforms:$,vertexShader:L4,fragmentShader:OI});B.transparent=!0,B.alphaTest=.5,$.resolution.value.x=1,$.resolution.value.y=1,$.vertexes.value=oe.length,$.arrowTexture.value.wrapS=Om,$.arrowTexture.value.wrapT=Om,$.arrowTexture.value.anisotropy=16;let re=new Ze(ee,B),R=re.clone(),ue=H(w({},$),{opacityMultiplier:{type:"f",value:.25},pathIsVertical:{type:"b",value:l}});ue.complete.value=1,R.material=new gu({uniforms:ue,vertexShader:L4,fragmentShader:OI}),R.material.transparent=!0,R.material.alphaTest=.5,R.material.depthWrite=!1,R.material.depthTest=!1,ue.resolution.value.x=1,ue.resolution.value.y=1,ue.vertexes.value=oe.length,ue.arrowTexture.value.wrapS=Om,ue.arrowTexture.value.wrapT=Om,ue.arrowTexture.value.anisotropy=16,ue.complete.value=a,re.userData=R.userData=r.mesh.userData;let ie=r.mesh;if(!u){let Ce=new gu({uniforms:$,vertexShader:L4,fragmentShader:s8}),xe=new Ze(ee,Ce);xe.name="stencil",xe.material.colorWrite=!1,xe.material.stencilWrite=!0,xe.material.stencilRef=1,xe.material.stencilFunc=Yh,xe.material.stencilZPass=hu,xe.material.stencilZFail=hu,xe.material.stencilFail=hu,xe.material.depthWrite=!1,xe.material.depthTest=!1,xe.userData=r.mesh.userData,ie.add(xe),ie.add(R),R.renderOrder=0,re.renderOrder=1}if(ie.add(re),l){let Ce=new Tr().setFromObject(re),xe=new be;Ce.getCenter(xe),ie.children.forEach(We=>{We.geometry.center(),We.position.copy(xe)})}u&&(re.material.stencilWrite=!0,re.material.stencilRef=1,re.material.stencilFunc=Jh,re.material.stencilZPass=Wh,re.material.stencilZFail=Wh,re.material.stencilFail=Wh,re.material.needsUpdate=!0,re.layers.disableAll(),re.layers.enable(Ro.ALWAYS_ON_TOP_PATHS)),ee.computeBoundingBox();let se=new be;return ee.boundingBox.getCenter(se),{mesh:ie,material:B,center:se}}var TW=.15;var wW=.5,L0=class extends Ge{constructor(t,n,o,i){super();f(this,"rendererState");f(this,"verticalDistanceDirty",!0);f(this,"convertTo3DMapPosition");f(this,"getParentContainer");f(this,"convertZoomLevelToAltitude");this.rendererState=t,this.convertTo3DMapPosition=n,this.getParentContainer=o,this.convertZoomLevelToAltitude=i}update(t,n,o){let i,a=!1;for(let l of this.rendererState.geometry3DIdsInScene)if(i=this.rendererState.geometry3DMap.get(l),i&&i.type==="path"&&i.components[0].type==="path"){let u=i.components[0],c=i.components[1],d=u.isVertical&&this.verticalDistanceDirty;if(!(u instanceof Yu))continue;let m=[];if(u.dirty||c.dirty||d){if(u.mesh.parent!=null)for(let h=u.mesh.children.length-1;h>=0;h--)nr(u.mesh.children[0]);if(u.feature.features.length===2&&u.feature.features[0].properties.parentId&&u.feature.features[1].properties.parentId){let h=u.feature.features[0],g=u.feature.features[u.feature.features.length-1],x,E,v=h.geometry.coordinates[2]||0,I=g.geometry.coordinates[2]||0;h.properties.parentId&&(x=this.getParentContainer(h.properties.parentId,!0),x!=null&&x.altitude!=null&&(v+=x.altitude,u.isVertical=!0)),g.properties.parentId&&(E=this.getParentContainer(g.properties.parentId,!0),E!=null&&E.altitude!=null&&(I+=E.altitude,u.isVertical=!0));let C=this.convertTo3DMapPosition(h.geometry.coordinates[1],h.geometry.coordinates[0],v),S=this.convertTo3DMapPosition(g.geometry.coordinates[1],g.geometry.coordinates[0],I);Math.abs(C.z-S.z)>wW&&x!=null&&x.visible&&E!=null&&E.visible&&(m=[C,S])}else{let h=u.feature.features;for(let g=0;g<h.length;g++)if(g===0||!aC(h[g].geometry.coordinates,h[g-1].geometry.coordinates)){let x=this.convertTo3DMapPosition(h[g].geometry.coordinates[1],h[g].geometry.coordinates[0],h[g].geometry.coordinates[2]||0);m.push(x)}}if(m.length>1){let{mesh:h,material:g,center:x}=l8(m,u,{color:c.color,altitude:c.altitude,isVertical:u.isVertical});u.mesh=h,u.material=g,u.position=x}u.dirty&&typeof u.width=="object"&&u.width.on==="zoom-level"&&(u.altitudeBreakpoints=u.width.input.map(h=>this.convertZoomLevelToAltitude(h))),u.dirty=!1}c.dirty&&(u.mesh.children.forEach(h=>{h.name!=="stencil"&&(h.material.uniforms.color.value.set(c.color),h.material.visible=c.visible,h.material.needsUpdate=!0)}),u.mesh.position.z=c.altitude,c.dirty=!1),u.material&&(u.mesh.children.forEach(h=>{var x,E,v,I,C,S,T;let g=h.material.uniforms;if(h.name==="stencil"){u.materialDirty&&c8(u,h.material);return}if(typeof u.width=="object"&&u.width.on==="zoom-level"){u.altitudeBreakpoints&&u.altitudeBreakpoints.length>2&&z.warn("Path width interpolation does not yet support more than 2 breakpoints! This will be added in a future version. Path width will only use the first two breakpoints.");let A=PE(o,(E=(x=u.altitudeBreakpoints)==null?void 0:x.slice(0,2))!=null?E:[t,n]);u.breakpoint=A,g.nearZoom.value=(I=(v=u.altitudeBreakpoints)==null?void 0:v[A])!=null?I:t,g.farZoom.value=(S=(C=u.altitudeBreakpoints)==null?void 0:C[A+1])!=null?S:n,g.nearRadius.value=Number(u.width.output[A])/2,g.farRadius.value=Number((T=u.width.output[A+1])!=null?T:u.width.output[A])/2}g.cameraParameters.value.x=o,u.materialDirty&&(g.displayArrowsOnPath.value=u.displayArrowsOnPath,g.pulseColor.value.set(u.accentColor),g.complete.value=u.completeFraction,c8(u,h.material),typeof u.width=="number"&&(g.nearZoom.value=t,g.farZoom.value=n,g.nearRadius.value=Number(u.width)/2,g.farRadius.value=Number(u.width)/2))}),u.displayArrowsOnPath&&u.animateArrowsOnPath&&(u.mesh.children.forEach(h=>{h.name!=="stencil"&&(h.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,h.material.needsUpdate=!0)}),a=!0),u.materialDirty=!1)}this.verticalDistanceDirty=!1,a&&this.publish("animate:path")}};function c8(e,r){let t=r.uniforms;t.highlightCompleteFraction.value=e.highlightCompleteFraction,t.highlightStartFraction.value=e.highlightStartFraction,t.highlightEndFraction.value=e.highlightEndFraction,t.highlightWidthMultiplier.value=e.highlightWidthMultiplier,t.highlightColor.value.set(e.highlightColor)}p();var Sr,um,Ys,N4,R4=class{constructor(r){f(this,"rendererState");f(this,"dirty",!1);D(this,Sr);D(this,um);D(this,Ys);D(this,N4,new mo);this.rendererState=r}updateOne(r){if(r instanceof Mt&&r.components[0]instanceof xr&&r.components[1]instanceof xa&&r.parentObject3D instanceof Ti&&(M(this,Sr,r.components[0]),M(this,Ys,r.components[1]),!s(this,Sr).detached&&s(this,Sr).shouldDetach&&s(this,Sr).mesh!=null&&s(this,Sr).material!=null&&s(this,Sr).batchedProps!=null)){M(this,um,r.parentObject3D),s(this,Sr).visible=!1;let t=new vr(s(this,Ys).color),n=s(this,Ys).opacity*Qc(r),o=new hC({color:t,side:as,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1},1,s(this,Sr).material.repeatYFactor),i=new zC(1,s(this,Sr).batchedProps.positionCount,0,o),a=WF(s(this,Sr),i,s(this,N4));if(a==null)return;i.userData={entities:{0:r.id},detached:!0},s(this,Sr).instanceIndex=a,s(this,Sr).material.setColor(s(this,Sr).instanceIndex,t,s(this,Ys).topColor?new vr(s(this,Ys).topColor):t),s(this,Sr).mesh=i,s(this,Sr).material=o,s(this,um).add(i),s(this,Sr).shouldDetach=!1,s(this,Sr).detached=!0}}update(){if(!this.dirty)return;let r;for(let t of this.rendererState.geometry3DIdsInScene)r=this.rendererState.geometry3DMap.get(t),this.updateOne(r);this.dirty=!1,this.cleanup()}cleanup(){M(this,Sr,void 0),M(this,um,void 0),M(this,Ys,void 0)}};Sr=new WeakMap,um=new WeakMap,Ys=new WeakMap,N4=new WeakMap;p();p();function d8(e,r,t){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let o=r||1e-4,i=o/Math.max(t,1e-4);return I4(e.mesh.geometry,e.batchedProps.range,o,0),e.material&&(e.material.repeatYFactor=i),e.currentHeight=o,!0}return!1}function p8(e,r,t,n,o,i){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,t),t.decompose(n,o,i),n.z=r,t.compose(n,o,i),e.mesh.setMatrixAt(e.instanceIndex,t),e.altitude=r,!0):!1}var Yi,qa,U4,z4,G4,$4,j4=class{constructor(r){f(this,"rendererState");f(this,"dirty",!1);D(this,Yi);D(this,qa);D(this,U4,new mo);D(this,z4,new be);D(this,G4,new Xh);D(this,$4,new be);this.rendererState=r}updateOne(r){var t;if(r instanceof Mt&&r.type==="geometry"&&((t=r.components[1])!=null&&t.dirty)&&(M(this,Yi,r.components[0]),M(this,qa,r.components[1]),r.type==="geometry")){let n=!1;s(this,qa).height!==s(this,Yi).currentHeight&&(n=d8(s(this,Yi),s(this,qa).height,s(this,qa).initialHeight)),s(this,qa).altitude!==s(this,Yi).altitude&&(n=p8(s(this,Yi),s(this,qa).altitude,s(this,U4),s(this,z4),s(this,G4),s(this,$4))),n&&s(this,Yi).mesh!=null&&s(this,Yi).mesh.computeBoundingSphere()}}update(){let r;for(let t of this.rendererState.geometry3DIdsInScene)r=this.rendererState.geometry3DMap.get(t),this.updateOne(r);this.cleanup()}cleanup(){M(this,Yi,void 0),M(this,qa,void 0)}};Yi=new WeakMap,qa=new WeakMap,U4=new WeakMap,z4=new WeakMap,G4=new WeakMap,$4=new WeakMap;p();var MW={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1},V4=class{constructor(r){f(this,"state",MW);f(this,"core");this.core=r}update(r){let t={};for(let[n,o]of Object.entries(r))n in this.state&&this.state[n]!==r[n]&&(this.state[n]=o,t[n]=o);this.handleUpdate(t)}handleUpdate(r){r.showPolygonLabelTextAreaMesh!=null&&(r.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),r.showEnvMap!=null&&(r.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),r.showCollisionBoxes!=null&&(r.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes())}};p();var R0=9,AW=!1,m8=.1;function FW(e,r,t){for(let n=0;n<r;n++){let o=(t&16711680)>>16,i=(t&65280)>>8,a=t&255;e[n*3]=o/255,e[n*3+1]=i/255,e[n*3+2]=a/255}}var Z4=class{constructor(r,t,n){f(this,"state");f(this,"renderer");f(this,"renderService");f(this,"pickingTexture");f(this,"pickingMaterial");f(this,"pixelBuffer");f(this,"width",0);f(this,"height",0);f(this,"scale",1/2);f(this,"color",1);f(this,"convertTo3DMapPosition");f(this,"destroyed",!1);f(this,"enabled",!1);f(this,"backgroundId",16777215);f(this,"resize",()=>{let r=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/r*this.scale),this.height=Math.floor(this.renderer.domElement.height/r*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new pE(this.width,this.height,{format:uE,type:sE,internalFormat:"RGBA"})});f(this,"shouldShowByXY",(r,t,n)=>{if(this.pixelBuffer==null)return!1;let o=r+(this.height-t-1)*this.width,i=this.pixelBuffer[o*4],a=this.pixelBuffer[o*4+1],l=this.pixelBuffer[o*4+2],u=i<<16|a<<8|l;return u===n||u===this.backgroundId});f(this,"activeOccluders",new Set);f(this,"update",()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let r,t;for(let o of this.state.geometry3DIdsInScene){let i=this.state.geometry3DMap.get(o);if(i&&i instanceof Pr&&i.userData.occluderFeature!=null&&i.userData.occluderId!=null&&(this.activeOccluders.add(i.userData.occluderId),i.userData.occluderDirty)){if(r=i.userData.occluderFeature,r.geometry.type==="Polygon"&&r.geometry.coordinates.length>0){let a=W1(r,this.convertTo3DMapPosition,{color:"white",height:m8});t=this.createOccluderMesh(a,i.userData.occluderId),i.add(t)}else if(r.geometry.type==="MultiPolygon"){let a=q1(r,this.convertTo3DMapPosition,{color:"white",height:m8});t=this.createOccluderMesh(a,i.userData.occluderId),i==null||i.add(t)}i.userData.occluderDirty=!1}}this.renderer.setRenderTarget(this.pickingTexture);let n=new vr(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(R0),this.renderer.render(this.state.geometryScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(R0),AW?this.renderService.enabledLayers.add(R0):this.renderService.enabledLayers.delete(R0),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let o of this.state.geometry2DIdsInScene){let i=this.state.geometry2DMap.get(o);if(i&&(i==null?void 0:i.occluderId)!=null&&this.activeOccluders.has(i==null?void 0:i.occluderId)){let a=i.components[0].projection,l=Math.floor(a.x*this.scale),u=Math.floor(a.y*this.scale),c=this.shouldShowByXY(l,u,i.occluderId);i.components[0].isOccluded=!c}}}).catch(o=>{this.destroyed||z.error(o)})});if(this.state=r,this.convertTo3DMapPosition=t,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new gu({glslVersion:lE,vertexShader:"\n attribute vec3 color;\n varying vec3 vColor;\n void main() {\n vColor = color;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n varying vec3 vColor;\n out vec4 fragColor;\n\n void main() {\n fragColor = vec4(vColor, 1.0);\n }\n "})}applyId(r,t){let n=r.attributes.position,o=new Float32Array(n.count*3);FW(o,n.count,t),r.setAttribute("color",new An(o,3))}createOccluderMesh(r,t){let n=new Ze(r,this.pickingMaterial);return n.layers.set(R0),this.applyId(n.geometry,t),n.userData.occluderId=t,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var r;this.destroyed=!0,(r=this.pickingTexture)==null||r.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};p();var H4=class{constructor(r){this.state=r;f(this,"dirty",!0)}update(){var r;if(this.dirty){for(let t of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(t);if(n instanceof Mt&&n.type==="geometry"&&((r=n.components[0])==null?void 0:r.geometry)!=null){let o=n.components[0];o.geometry&&(o.geometry.dispose(),o.geometry=void 0)}}this.dirty=!1}}};p();var W4=class extends Ge{constructor(t){super();f(this,"dirty",!0);f(this,"state");f(this,"texturePromiseCache",new Map);this.state=t}async loadTexture(t){if(this.texturePromiseCache.has(t))return this.texturePromiseCache.get(t);let n=new Promise((o,i)=>{Xu.getLoader().load(t,o,void 0,i)});return this.texturePromiseCache.set(t,n),n}update(){for(let t of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(t);if(!(n instanceof Mt))continue;let o=n.components[6];if(!(o instanceof vl))continue;let i=n.components[0];if(!(i instanceof xr)||!o.dirty)continue;let a=Hs(i);a!=null&&(o.texture!=null&&(o.texture.path===""?(a.texture=null,a.hideTextures(i.instanceIndex),o.dirty=!1):this.loadTexture(o.texture.path).then(l=>{l&&(o.textureInstance=l,a.texture=l,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),o.topTexture!=null&&(o.topTexture.path===""?(a.topTexture=null,a.hideTextures(i.instanceIndex),o.dirty=!1):this.loadTexture(o.topTexture.path).then(l=>{l&&(o.topTextureInstance=l,a.topTexture=l,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),o.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async t=>{(await t).dispose()}),this.texturePromiseCache.clear()}};p();var q4=class{constructor(r){f(this,"currentOrder",Ro.ALWAYS_ON_TOP_MODELS);f(this,"assignedOrders",new WeakMap);f(this,"state");this.state=r}assignOrder(r){return this.assignedOrders.has(r)?this.assignedOrders.get(r):(this.currentOrder+=1,this.assignedOrders.set(r,this.currentOrder),this.currentOrder)}releaseOrder(r){return this.assignedOrders.delete(r),Ro.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(r){return this.assignedOrders.get(r)}update(){var o;let r,t,n;for(let i of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(i),n&&n.type==="model"&&(o=n.components[1])!=null&&o.dirty)if(r=n.components[1],t=n.components[0],r.visibleThroughGeometry===!0){let a=this.assignOrder(t);t.renderOrder!==a&&(t.renderOrder=a)}else t.renderOrder>Ro.GEOMETRY&&(t.renderOrder=this.releaseOrder(t))}};p();var f8=1e4,K4=class{constructor(r){f(this,"rendererState");f(this,"dirty",!1);this.rendererState=r}update(){var o;let r,t,n;for(let i of this.rendererState.geometry3DIdsInScene)if(r=this.rendererState.geometry3DMap.get(i),(r==null?void 0:r.type)==="model"&&r.components[7]!=null&&(n=r.components[0],t=r.components[7],t.dirty&&n.mesh!=null&&(t==null?void 0:t.verticalOffset)!==1/0&&(t.plane==null&&(t.plane=new hE(new be(0,0,-1),t.verticalOffset),this.process(n,t)),t.plane.constant!==t.verticalOffset&&(t.plane.constant=t.verticalOffset),t.topColor!=null&&((o=t.holeFillMesh)==null?void 0:o.material)instanceof Bm&&t.holeFillMesh.material.color.set(t.topColor),t.topVisible!=null&&t.holeFillMesh!=null&&(t.holeFillMesh.visible=t.topVisible),t.dirty=!1),t.plane!=null&&t.holeFillMesh!=null&&t.topVisible===!0)){let a=t.plane,l=t.holeFillMesh;a.coplanarPoint(l.position),l.lookAt(l.position.x-a.normal.x,l.position.y-a.normal.y,l.position.z-a.normal.z)}}process(r,t){var h;if(r.mesh==null)return;let n=r.mesh.parent,o=[];r.mesh.traverse(g=>{if(g instanceof Ze){let x=g.geometry.clone();g.updateWorldMatrix(!0,!1),x.applyMatrix4(g.matrixWorld),o.push(x),x.computeVertexNormals(),g.material.clippingPlanes=[t.plane],g.material.transparent=!1}});let i=No(o),a=new eg,l=new eg,u=this.createHoleFillGeometry(i,t.plane,1);u.name="hole-fill-group";let c=new Bm({color:(h=t.topColor)!=null?h:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:Jh,stencilFail:hu,stencilZFail:hu,stencilZPass:hu}),d=new Di(f8,f8),m=new Ze(d,c);m.name="hole-fill-mesh",t.holeFillMesh=m,m.renderOrder=1.1,l.add(u),l.add(r.mesh),a.add(l),a.add(m),n==null||n.add(a),r.mesh=a}createHoleFillGeometry(r,t,n=0){let o=new eg,i=new Fr;i.depthWrite=!1,i.depthTest=!1,i.colorWrite=!1,i.stencilWrite=!0,i.stencilFunc=Yh;let a=i.clone();a.side=Pm,a.clippingPlanes=[t],a.stencilFail=qh,a.stencilZFail=qh,a.stencilZPass=qh;let l=new Ze(r,a);l.renderOrder=n,o.add(l);let u=i.clone();u.side=fl,u.clippingPlanes=[t],u.stencilFail=Kh,u.stencilZFail=Kh,u.stencilZPass=Kh;let c=new Ze(r,u);return c.renderOrder=n,o.add(c),o}};p();var J4=class{constructor(){f(this,"plugins",new Set)}registerPlugin(r){this.plugins.add(r)}unregisterPlugin(r){this.plugins.delete(r)}update(r){for(let t of this.plugins)t.update(r)}};var h8=new fa;var{DEFAULT_PITCH:RI,DEFAULT_BEARING:NI,DEFAULT_ZOOM_LEVEL:jI,DEFAULT_MIN_ZOOM_LEVEL:PW,DEFAULT_MAX_ZOOM_LEVEL:OW}=pi,kW=ut.radToDeg(.6435011087932844),cr,rr,Cc,N0,lm,rl,Sc,cm,fn,BI,U,fi,Dc,Dt,Xi,dr,hi,jr,j,j0,Ur,jt,g8,y8,b8,Xs,U0,z0,G0,$0,dm,Y4,V0,pm,Z0,Tc,_I,wc,H0,W0,zn,Gn,LI,X4,Q4,mm,q0,kI=class extends Ge{constructor(t,n={}){var h,g,x,E,v,I,C,S,T,A,F,P,O,_,G,L;super();D(this,fn);f(this,"options");f(this,"container");f(this,"Debug");D(this,cr);D(this,rr);D(this,Cc);D(this,N0);D(this,lm);D(this,rl);D(this,Sc);D(this,cm);f(this,"rendererDomElement");D(this,U,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,geometryScene:new Pr("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:cg,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new o4,externalTweenGroup:new o4,cameraObject:new Kb,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1,directionalLight:new ig(16777215,.3*Math.PI),ambientLight:new xE(16777215,.741*Math.PI),renderer:void 0,threeJSScene:new yu});D(this,fi,{});D(this,Dc,new AbortController);f(this,"camera");D(this,Dt);D(this,Xi);D(this,dr);D(this,hi);D(this,jr);D(this,j,{});D(this,j0,window.matchMedia("screen and (min-resolution: 2dppx)"));f(this,"map");D(this,Ur,()=>{var t;this.aborted||!((t=s(this,j))!=null&&t.renderSystem)||(s(this,j).renderSystem.twoDdirty=!0)});D(this,jt,()=>{var t;this.aborted||!((t=s(this,j))!=null&&t.renderSystem)||(s(this,j).renderSystem.threeDdirty=!0)});D(this,Xs,"standalone");D(this,U0,()=>{s(this,j).geometryDisposalSystem.dirty=!0,this.render()});D(this,z0,t=>Math.trunc(t*10)/10);D(this,G0,()=>{Q(this,fn,BI).call(this,Xc()),s(this,j).twoDDrawSystem.dirty=!0,s(this,dm).call(this,void 0,void 0,!0)});D(this,$0,()=>{s(this,dm).call(this)});D(this,dm,(t,n,o=!1)=>{let i=t!=null?t:this.rendererDomElement.clientWidth,a=n!=null?n:this.rendererDomElement.clientHeight;if((i===0||a===0)&&!o)return;s(this,U).canvasWidth=i,s(this,U).canvasHeight=a,Q(this,fn,BI).call(this,Xc()),s(this,Tc).call(this),Q(this,fn,b8).call(this),s(this,j).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,j).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,j).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,j).htmlControlsSystem.resize(this.canvasWidth),s(this,j).geometryInFocusSystem.resize(),s(this,j).occlusion2DSystem.resize();let{top:l,left:u}=this.container.getBoundingClientRect();s(this,U).containerOffset=[l,u],this.publish("resize"),this.render()});D(this,Y4,()=>{this.renderSync()});D(this,V0,new be);D(this,pm,(t,n)=>{let o=this.mode==="standalone"?s(this,rr):this.viewCamera;if(s(this,rr).position.z+this.camera.elevation>n.z){s(this,V0).copy(n);let i=s(this,V0).project(o),a=(i.x+1)/2*this.canvasWidth-0/2,l=(-i.y+1)/2*this.canvasHeight-0/2,u=s(this,z0).call(this,a),c=s(this,z0).call(this,l);t.x=u,t.y=c}else t.x=-1e3,t.y=-1e3});D(this,Z0,(t,n)=>{s(this,jr).setBufferSize(t,n),s(this,rr).aspect=t/n,s(this,rr).updateProjectionMatrix(),s(this,rr).updateMatrixWorld(!0),s(this,lm).x=t,s(this,lm).y=n});D(this,Tc,()=>{var a;let t=s(this,U).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,U).canvasHeight=this.rendererDomElement.clientHeight,o=Math.floor(t*this.resolutionScale),i=Math.floor(n*this.resolutionScale);s(this,Z0).call(this,o,i),(a=this.map)==null||a.resize(),s(this,U).shouldMeasureCanvas=!1});f(this,"getParentContainer",(t,n=!0)=>{if(!t)return n?s(this,U).geometryScene:void 0;if(typeof t=="string"||typeof t=="number"){let o=s(this,U).geometry3DMap.get(t);return o instanceof Pr?o:(z.warn("Parent (".concat(typeof t=="object"?t.id:t,") is not a valid container, adding to scene")),n?s(this,U).geometryScene:void 0)}else if(t.type==="group-container"){let o=s(this,U).geometry3DMap.get(t.id);if(o instanceof Pr)return o}return n?s(this,U).geometryScene:void 0});f(this,"showCollisionBoxes",()=>{s(this,j).collisionSystem.showCollisionBoxes(),this.render()});f(this,"hideCollisionBoxes",()=>{s(this,j).collisionSystem.hideCollisionBoxes(),this.render()});f(this,"projectScreenXYToCoordinate",(t,n,o=!1)=>{var m,h;let i=this.container.getBoundingClientRect(),a=(t-i.left)/s(this,U).canvasWidth*2-1,l=-((n-i.top)/s(this,U).canvasHeight)*2+1,u=new qe(a,l),c,d;if(o)h8.setFromCamera(u,s(this,rr)),c=(m=h8.intersectObject(s(this,rl),!1)[0])==null?void 0:m.point;else{let g=s(this,j).interactionSystem.getThreeDIntersectsFromXY(u);c=(h=g==null?void 0:g[0])==null?void 0:h.point,d=s(this,j).interactionSystem.getGroupContainerIntersectsFromXY(u)}if(c)return{coordinate:this.convert3DMapPositionToCoordinate(c),groupContainers:d}});f(this,"projectCoordinateToScreenXY",t=>{let n=this.convertTo3DMapPosition(t[1],t[0],t[2]||0),o=new qe;return s(this,pm).call(this,o,n),{x:o.x,y:o.y}});f(this,"convert3DMapPositionToCoordinate",t=>{var i,a,l,u;let{lat:n,lon:o}=dg((a=(i=s(this,U).center)==null?void 0:i[1])!=null?a:0,(u=(l=s(this,U).center)==null?void 0:l[0])!=null?u:0,t.x,t.y);return[o,n,t.z]});f(this,"setBackgroundColor",(t,n)=>{s(this,jr).setBackgroundColor(t,n)});f(this,"getMetersPerPixel",()=>s(this,j).cameraSystem.getCurrentMetersPerPixel());f(this,"hideOutdoorLayersIntersectingPolygons",(t,n,o)=>{s(this,j).outdoorLayersSystem.hideLayersIntersectingPolygons(t,n,o),this.render()});D(this,wc,new tg);D(this,H0,new mo);D(this,W0,t=>{var n;z.error("Render failed: ",t,(n=t.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:t})});f(this,"render",()=>{var t;if(!(((t=s(this,j))==null?void 0:t.renderSystem)==null||this.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,j).renderSystem.update().catch(s(this,W0))});f(this,"renderSync",()=>this.aborted?Promise.resolve():s(this,j).renderSystem.update(!0).catch(s(this,W0)));D(this,zn,zm(()=>{this.publish("user-interaction-start",void 0)},0,!0));D(this,Gn,zm(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));f(this,"on",(t,n)=>{this.aborted||(super.on(t,n),["outdoor-view-loaded","outdoor-style-loaded"].includes(t)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(z.warn('"'.concat(t,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(t)))});f(this,"off",(t,n)=>{super.off(t,n)});f(this,"getCursor",()=>s(this,j).interactionSystem.getCursor());D(this,X4,()=>{if(s(this,U).geometryScene.removeEventListener("childadded",s(this,jt)),s(this,U).geometryScene.removeEventListener("childadded",s(this,Ur)),s(this,U).geometryScene.removeEventListener("childremoved",s(this,jt)),s(this,U).geometryScene.removeEventListener("childremoved",s(this,Ur)),window.removeEventListener("resize",s(this,$0),!1),s(this,j0).removeEventListener("change",s(this,G0)),this.map){for(let t in s(this,fi))for(let n of s(this,fi)[t])this.map.off(t,n);M(this,fi,{})}this._subscribers={}});D(this,Q4,()=>{try{s(this,Xs)!=="outdoors-overlay"&&(this.map&&this.map.remove(),this.container&&this.rendererDomElement&&this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement)),this.container&&(s(this,hi)&&this.container.contains(s(this,hi))&&this.container.removeChild(s(this,hi)),s(this,Dt)&&this.container.contains(s(this,Dt))&&this.container.removeChild(s(this,Dt)))}catch(t){z.warn("Error during DOM cleanup, some elements may not have been removed:",t)}});f(this,"destroy",()=>{var t,n;s(this,j)&&(s(this,j).textureSystem.destroy(),this.aborted||s(this,Dc).abort(),s(this,X4).call(this),(t=globalThis.MappedinDebug)!=null&&t.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,j).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,j).cameraSystem.isCameraMoving)),this.remove("__scene"),s(this,j).renderSystem.destroy(),s(this,j).cameraSystem.dispose(),s(this,j).exporterSystem.destroy(),s(this,j).outdoorLayersSystem.destroy(),s(this,j).borderSystem.destroy(),s(this,Sc)&&s(this,Sc).disconnect(),s(this,jr).destroy(),(n=s(this,cr))==null||n.traverse(o=>{nr(o),"dispose"in o&&typeof o.dispose=="function"&&o.dispose()}),M(this,cr,void 0),s(this,j).htmlControlsSystem.destroy(),s(this,j).collisionSystem.destroy(),s(this,j).interactionSystem.destroy(),s(this,j).domMutationSystem.destroy(),s(this,j).geometryInFocusSystem.destroy(),s(this,j).occlusion2DSystem.destroy(),M(this,j,void 0),s(this,Q4).call(this),M(this,jr,void 0))});D(this,mm,new be);D(this,q0,new be);if(M(this,Dc,new AbortController),s(this,U).useStandaloneCamera=(h=n.useStandaloneCamera)!=null?h:!1,s(this,U).naturalBearing=(g=n.naturalBearing)!=null?g:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!t.clientWidth||!t.clientHeight)throw new Error("[MappedinJS] Container width and height must be greater than 0");this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),(n.mode==="outdoors-interleaved"||n.mode==="outdoors-overlay")&&n.map&&(M(this,Xs,n.mode),this.map=n.map),s(this,U).geometryScene.addEventListener("childadded",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),s(this,U).geometryScene.addEventListener("childremoved",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),s(this,U).geometry3DMap.set(s(this,U).geometryScene.userData.entityId,s(this,U).geometryScene),n.center&&(s(this,U).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=t,Q(this,fn,g8).call(this),Q(this,fn,y8).call(this),s(this,j).htmlControlsSystem=new v4(this.container,{outdoorEnabled:!!this.map}),s(this,Xs)!=="outdoors-overlay"&&s(this,j).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),M(this,jr,new R1({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(x=n.gl)==null?void 0:x.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:q=>{var $;($=n.onWebGLContextRestored)==null||$.call(n,q),s(this,Ur).call(this),s(this,jt).call(this),this.render()},onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(E=n.backgroundAlpha)!=null?E:1})),s(this,U).renderer=s(this,jr).renderer,M(this,cr,s(this,U).threeJSScene),s(this,Xs)!=="standalone"&&s(this,cr).add(sC()),s(this,cr).add(s(this,U).geometryScene);let o=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof o<"u"&&(o.dispatchEvent(new CustomEvent("observe",{detail:s(this,cr)})),o.dispatchEvent(new CustomEvent("observe",{detail:s(this,jr)}))),M(this,rr,new Kb(kW,this.aspect,50,1e5)),s(this,U).cameraObject=s(this,rr),M(this,N0,new fE),s(this,rr).renderOrder=999;let i=new hl;i.add(s(this,rr)),M(this,cm,new hl),s(this,cm).add(i),s(this,cr).add(s(this,cm)),s(this,rr).updateProjectionMatrix(),s(this,rr).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:()=>0,georeference:[{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}}]},this.rendererDomElement=s(this,jr).domElement(),M(this,lm,new qe);let a=new Di(1e6,1e6),l=new Fr({color:0,visible:!1});M(this,rl,new Ze(a,l)),s(this,rl).name="worldPlane",s(this,cr).add(s(this,rl)),(v=n.gl)!=null&&v.canvas||t.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,$0),!1),s(this,j0).addEventListener("change",s(this,G0)),typeof ResizeObserver=="function"&&((I=y.env)==null?void 0:I.NODE_ENV)!=="test"&&(M(this,Sc,new ResizeObserver(ZE(q=>{s(this,dm).call(this,q[0].contentRect.width,q[0].contentRect.height)},50))),(C=s(this,Sc))==null||C.observe(t)),t.classList.add("mappedin-map"),this.rendererDomElement.style.width=(S=globalThis.MappedinDebug)!=null&&S.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(T=globalThis.MappedinDebug)!=null&&T.TEST_IOS?"1920px":"100%",y.env.NODE_ENV==="test"&&this.rendererDomElement.setAttribute("data-testid","mappedin-canvas"),this.mode!=="outdoors-overlay"&&this.rendererDomElement.tabIndex!==void 0&&this.rendererDomElement.removeAttribute("tabindex"),s(this,U).canvasWidth=this.rendererDomElement.clientWidth,s(this,U).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let u=this.canvasWidth,c=this.canvasHeight;s(this,j).watermarkSystem=new h4(s(this,rr),s(this,U),n==null?void 0:n.watermark),s(this,j).watermarkSystem.on("texture-loaded",this.render),s(this,U).shouldMeasureCanvas=!0,s(this,U).pixelRatio=this.resolutionScale,s(this,Z0).call(this,Math.floor(u*this.resolutionScale),Math.floor(c*this.resolutionScale)),s(this,U).directionalLight.position.set(-150,-150,350),s(this,cr).add(s(this,U).directionalLight),s(this,cr).add(s(this,U).ambientLight),s(this,j).cameraSystem=new gc(s(this,rr),s(this,cr),s(this,jr).renderer,s(this,U),{mode:this.mode,canvasHeight:c,canvasWidth:u}),(A=globalThis.MappedinDebug)!=null&&A.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,j).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,j).cameraSystem.isCameraMoving)),s(this,j).cameraSystem.on("user-dolly-start",s(this,zn)),s(this,j).cameraSystem.on("user-pan-start",s(this,zn)),s(this,j).cameraSystem.on("user-rotate-start",s(this,zn)),s(this,j).cameraSystem.on("user-zoom-start",s(this,zn)),s(this,j).cameraSystem.on("user-tilt-start",s(this,zn)),s(this,j).cameraSystem.on("user-pedestal-start",s(this,zn)),s(this,j).cameraSystem.on("user-dolly-end",s(this,Gn)),s(this,j).cameraSystem.on("user-pan-end",s(this,Gn)),s(this,j).cameraSystem.on("user-rotate-end",s(this,Gn)),s(this,j).cameraSystem.on("user-zoom-end",s(this,Gn)),s(this,j).cameraSystem.on("user-tilt-end",s(this,Gn)),s(this,j).cameraSystem.on("user-pedestal-end",s(this,Gn)),s(this,j).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,j).geometryInFocusSystem&&(s(this,j).geometryInFocusSystem.cameraDirty=!0),this.render()}),this.onAbort(()=>{s(this,j).cameraSystem.off("user-dolly-start",s(this,zn)),s(this,j).cameraSystem.off("user-pan-start",s(this,zn)),s(this,j).cameraSystem.off("user-rotate-start",s(this,zn)),s(this,j).cameraSystem.off("user-zoom-start",s(this,zn)),s(this,j).cameraSystem.off("user-tilt-start",s(this,zn)),s(this,j).cameraSystem.off("user-pedestal-start",s(this,zn)),s(this,j).cameraSystem.off("user-dolly-end",s(this,Gn)),s(this,j).cameraSystem.off("user-pan-end",s(this,Gn)),s(this,j).cameraSystem.off("user-rotate-end",s(this,Gn)),s(this,j).cameraSystem.off("user-zoom-end",s(this,Gn)),s(this,j).cameraSystem.off("user-tilt-end",s(this,Gn)),s(this,j).cameraSystem.off("user-pedestal-end",s(this,Gn)),s(this,j).renderSystem.off("measure-canvas",s(this,Tc)),s(this,j).cameraSystem.off("change",this.render),s(this,j).outlineInterpolationSystem.off("needs-render",this.render)}),s(this,j).pathSystem=new L0(s(this,U),this.convertTo3DMapPosition,this.getParentContainer,s(this,j).cameraSystem.convertZoomLevelToAltitude),s(this,j).pathSystem.on("animate:path",this.render),this.onAbort(()=>{s(this,j).pathSystem.off("animate:path",this.render)}),s(this,j).panBoundsSystem=new b4(s(this,U),s(this,j).cameraSystem);let d=()=>{let{panBounds:q,fov:$,convertAltitudeToZoomLevel:K}=s(this,j).cameraSystem;if(s(this,j).panBoundsSystem.autoMinZoomLevel){if(q.radius<=0)return;let X=Math.min(s(this,U).canvasWidth/s(this,U).canvasHeight,1),V=$*Math.PI/180*X,Y=Math.tan(V/2),{radius:ee,center:oe}=s(this,j).cameraSystem.panBounds,le=ee/Y,ve=this.getThreeCamera().getWorldPosition(new be),he=oe.distanceTo(ve),de=Math.abs(ve.z-oe.z),Fe=le*de/he,ce=K(Fe);iC(ce,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(ce)}this.publish("pan-bounds-change",s(this,j).cameraSystem.panBounds)};s(this,j).panBoundsSystem.on("update",d),this.onAbort(()=>{s(this,j).panBoundsSystem.off("update",d)}),this.camera=new f4(this,s(this,j),s(this,U)),this.camera.setZoomLevel((F=n.zoomLevel)!=null?F:jI),this.camera.setBearing((P=n.bearing)!=null?P:NI),this.camera.setPitch((O=n.pitch)!=null?O:RI),this.camera.setMaxZoomLevel(OW),this.camera.setMinZoomLevel(PW),s(this,j).domVisiblitySystem=new X1(s(this,U),s(this,hi)),s(this,j).domMutationSystem=new m4(s(this,U),s(this,hi)),s(this,j).domMutationSystem.on("dimensions-update",()=>{s(this,j).collisionSystem.collidersDirty=!0,this.render()}),s(this,j).domDrawSystem=new p4(s(this,U)),s(this,j).collisionSystem=new j1(s(this,Xi),s(this,U),((_=n.useCollisionWorker)!=null?_:!0)&&((G=n.useWorkers)!=null?G:!0)),s(this,j).twoDDrawSystem=new e4(s(this,U),s(this,dr),n.transformImageRequest),s(this,j).twoDDrawSystem.on("img:loaded",this.render),s(this,j).interactionSystem=new c0(this.rendererDomElement,s(this,U),s(this,rr),s(this,rl),s(this,j).cameraSystem.isUserInteracting),s(this,j).interactionSystem.on("doubletap-with-onefinger",q=>{var $;s(this,j).cameraSystem.enableZoom&&this.camera.animateTo({center:($=this.projectScreenXYToCoordinate(q.clientX,q.clientY))==null?void 0:$.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:av,easing:"ease-out"})}),s(this,j).interactionSystem.on("singletap-with-twofinger",()=>{s(this,j).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:av,easing:"ease-out"})}),s(this,j).interactionSystem.on("hover",this.render),s(this,j).interactionSystem.on("click",q=>{var Y,ee,oe,le,ve,he,de,Fe,ce;if(q.entity2D.some(Pe=>Pe.id==="watermark")&&typeof s(this,j).watermarkSystem.options.onClick=="function"&&s(this,j).watermarkSystem.options.interactive){s(this,j).watermarkSystem.options.onClick();return}let K=q.entity3D?[(Y=q.entity3D)==null?void 0:Y.id]:[];(le=(oe=(ee=q.entity3D)==null?void 0:ee.parentObject3D)==null?void 0:oe.userData)!=null&&le.entityId&&K.push((de=(he=(ve=q.entity3D)==null?void 0:ve.parentObject3D)==null?void 0:he.userData)==null?void 0:de.entityId);let X=[],V=[];for(let Pe of q.entity2D)Pe.components[0]instanceof cs?X.push(Pe.id):Pe.components[0]instanceof ls&&V.push(Pe.id);this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(q.position),geometry:K,paths:((Fe=q.entity3D)==null?void 0:Fe.components[0])instanceof Yu?[q.entity3D.id]:[],markers:X,models:((ce=q.entity3D)==null?void 0:ce.components[0])instanceof Ju?[q.entity3D.id]:[],labels:V,containers:Array.isArray(q.groupContainers)?q.groupContainers.map(Pe=>Pe.userData.entityId):[],pointerEvent:q.pointerEvent})}),s(this,j).interactionSystem.on("hover",q=>{var X,V,Y;if(!q.position)return;let $=[],K=[];for(let ee of q.entity2D)ee.components[0]instanceof cs?$.push(ee.id):ee.components[0]instanceof ls&&K.push(ee.id);this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(q.position),geometry:q.entity3D?[(X=q.entity3D)==null?void 0:X.id]:[],paths:((V=q.entity3D)==null?void 0:V.components[0])instanceof Yu?[q.entity3D.id]:[],markers:$,models:((Y=q.entity3D)==null?void 0:Y.components[0])instanceof Ju?[q.entity3D.id]:[],labels:K,containers:Array.isArray(q.groupContainers)?q.groupContainers.map(ee=>ee.userData.entityId):[]})}),s(this,j).geometryInFocusSystem=new F4(s(this,U),s(this,rr));let m=q=>{this.publish("geometry-in-focus",q)};s(this,j).geometryInFocusSystem.on("geometry-in-focus",m),this.onAbort(()=>{s(this,j).geometryInFocusSystem.off("geometry-in-focus",m)}),s(this,j).twoDVisiblitySystem=new r4(s(this,U)),s(this,j).drawSystem=new t4(s(this,U),this.convertTo3DMapPosition),s(this,j).twoDProjectionSystem=new Q1(s(this,U),s(this,pm)),s(this,j).exporterSystem=new d0(s(this,U)),s(this,j).meshOptimizationSystem=new Y1(s(this,U),this.convertTo3DMapPosition),s(this,j).meshOptimizationSystem.on("model-loaded",this.render),s(this,j).meshOptimizationSystem.on("geometry-2d-added",this.render),s(this,j).meshOptimizationSystem.on("geometry-group-added",s(this,U0)),this.onAbort(()=>{s(this,j).meshOptimizationSystem.off("model-loaded",this.render),s(this,j).meshOptimizationSystem.off("geometry-2d-added",this.render),s(this,j).meshOptimizationSystem.off("geometry-group-added",s(this,U0))}),s(this,j).meshDetachmentSystem=new R4(s(this,U)),s(this,j).meshModificationSystem=new j4(s(this,U)),s(this,j).geometryDisposalSystem=new H4(s(this,U)),s(this,j).textureSystem=new W4(s(this,U)),s(this,j).textureSystem.on("texture-added",this.render),this.onAbort(()=>{s(this,j).textureSystem.off("texture-added",this.render)}),s(this,j).borderSystem=new UC(s(this,U),this.convertTo3DMapPosition),s(this,j).clippingPlaneSystem=new K4(s(this,U)),s(this,j).renderOrderSystem=new q4(s(this,U)),s(this,j).pluginSystem=new J4,s(this,j).customGeometrySystem=new x4(s(this,U),this.convertTo3DMapPosition),s(this,j).outlineInterpolationSystem=new C4(s(this,U)),s(this,j).outlineInterpolationSystem.on("needs-render",this.render),s(this,j).renderSystem=new n4(s(this,jr),s(this,U),this.mode,s(this,cr),s(this,rr),this.viewCamera,s(this,j)),s(this,j).imageSystem=new A4(s(this,U),this.convertTo3DMapPosition,s(this,pm),n.bearing,n.naturalBearing,n.imagePlacementOptions),s(this,j).text3DSystem=new cC(s(this,U),this.convertTo3DMapPosition,(L=n.useWorkers)!=null?L:!0),s(this,j).text3DSystem.on("render",this.render),s(this,j).imageSystem.on("image-loaded",this.render),s(this,j).renderSystem.on("pre-render",()=>this.publish("pre-render")),s(this,j).renderSystem.on("post-render",()=>this.publish("post-render")),s(this,j).renderSystem.on("measure-canvas",s(this,Tc)),this.onAbort(()=>{s(this,j).renderSystem.off("pre-render",()=>this.publish("pre-render")),s(this,j).renderSystem.off("post-render",()=>this.publish("post-render")),s(this,j).renderSystem.off("measure-canvas",s(this,Tc))}),s(this,j).outdoorLayersSystem=new O4(this.map),s(this,j).occlusion2DSystem=new Z4(s(this,U),this.convertTo3DMapPosition,s(this,jr)),n.occlusionEnabled&&s(this,j).occlusion2DSystem.enable(),this.Debug=new V4(this),n.environment!==!1&&M(this,Cc,Q(this,fn,LI).call(this)),s(this,Y4).call(this)}get viewCamera(){return s(this,N0)}get canvasWidth(){return s(this,U).canvasWidth}get canvasHeight(){return s(this,U).canvasHeight}get resolutionScale(){var t,n;return(n=(t=this.map)==null?void 0:t._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:Xc()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,Xs)}addGroupContainer(t,n,o){if(!s(this,U).geometry3DMap.has(t)&&!s(this,U).geometry2DMap.has(t)){let i=new Pr(t);i.addEventListener("childadded",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),i.addEventListener("childremoved",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),(n==null?void 0:n.visible)!==void 0&&(i.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&i.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&fo(i,n.interactive,s(this,U)),(n==null?void 0:n.focusable)!==void 0&&bg(i,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(i.userData.preloadGeometry=n.preloadGeometry),s(this,U).geometry3DMap.set(t,i);let a=this.getParentContainer(o);a instanceof Pr&&a.addEntity(i),s(this,jt).call(this),this.render()}else z.error("Group container with ID '".concat(t,"' already exists. The group container cannot be added."));return{id:t,type:"group-container"}}addCustomGeometry(t,n,o,i,a){if(s(this,U).geometry3DMap.has(t))z.error("Custom geometry with ID '".concat(t,"' already exists. The custom geometry cannot be added."));else{let l=new tm(n,o),u=new Mt(l,new xa(i));(i==null?void 0:i.interactive)!==void 0&&fo(u,i.interactive,s(this,U)),u.id=t,l.mesh.userData={entityId:t,type:"custom-geometry"},s(this,U).geometry3DMap.set(u.id,u);let c=this.getParentContainer(a);a&&c instanceof Pr?c.addEntity(u):s(this,U).geometryScene.addEntity(u),s(this,jt).call(this),this.render()}return{id:t,type:"custom-geometry"}}registerPlugin(t){s(this,j).pluginSystem.registerPlugin(t)}unregisterPlugin(t){s(this,j).pluginSystem.unregisterPlugin(t)}addGeometryGroup(t,n,o,i){var a,l,c;if(!s(this,U).geometry3DMap.has(t)&&!s(this,U).geometry2DMap.has(t)){let d=new Ti(t);d.addEventListener("childadded",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),d.addEventListener("childremoved",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),d.userData.dirty=!0,s(this,U).geometry3DMap.set(t,d);let m=typeof o=="function"?o(n.features[0]):o;for(let g of n.features){if(g.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(g.geometry.type))continue;let x=(g==null?void 0:g.id)||((a=g==null?void 0:g.properties)==null?void 0:a.id)||Bt(),E={color:vg};if(typeof o=="function")E=(l=o(g))!=null?l:{color:vg};else{let u=o||{color:vg},{visible:I}=u;E=tn(u,["visible"])}let v=s(this,j).meshOptimizationSystem.createEntityFromFeature(x,g,w({outline:!0},E));s(this,U).geometry3DMap.set(x,v),d.userData.entities3D.add(x),s(this,j).textureSystem.dirty=!0}d.setVisible((c=m==null?void 0:m.visible)!=null?c:!0);let h=this.getParentContainer(i);h instanceof Pr&&h.addEntity(d),s(this,jt).call(this),this.render()}else z.error("Geometry group with ID '".concat(t,"' already exists. The geometry group cannot be added."));return s(this,j).outlineInterpolationSystem.geometries3DDirty=!0,{id:t,type:"geometry-group"}}addOccluder(t,n){let o=this.getParentContainer(n),i=s(this,j).occlusion2DSystem.reserveOccluderId();return o==null||o.addOccluderFeature(t,i),i}addImage(t,n,o,i){try{JF(t,n,o)}catch(a){z.error(a);return}if(!s(this,U).geometry3DMap.has(t)&&!s(this,U).geometry2DMap.has(t)){let a=new M4(n),l=new Mt(a,new xa(o));l.id=t||Bt(),a.mesh.userData={entityId:l.id,type:"path"},s(this,U).geometry3DMap.set(l.id,l);let u=this.getParentContainer(i);u instanceof Pr&&u.addEntity(l),s(this,jt).call(this),this.render()}else z.error("Image with ID '".concat(t,"' already exists. The image cannot be added."));return{id:t,type:"image"}}addModelGroup(t,n,o,{parent:i,onComplete:a}={}){var l,u;try{SF(t,n,o)}catch(c){z.error(c);return}if(!s(this,U).geometry3DMap.has(t)&&!s(this,U).geometry2DMap.has(t)){let c=new Ti(t);c.addEventListener("childadded",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),c.addEventListener("childremoved",()=>{s(this,jt).call(this),s(this,Ur).call(this)}),s(this,U).geometry3DMap.set(t,c),c.userData.dirty=!0,c.userData.modelURL=o.url;for(let m of n.features){let h=m.id||m.properties.id||Bt(),g=s(this,j).meshOptimizationSystem.createModelFromFeature(h,m,w({},o));(m.properties.interactive!==void 0||o.interactive!=null)&&fo(g,(l=m.properties.interactive)!=null?l:o.interactive,s(this,U)),o.clippingPlaneZOffset!=null&&(g.components[7]=new vC,g.components[7].verticalOffset=o.clippingPlaneZOffset),g.parentId=c.userData.entityId,s(this,U).geometry3DMap.set(h,g),c.userData.entities3D.add(h)}let d=this.getParentContainer(i);d instanceof Pr&&d.addEntity(c),s(this,jt).call(this),(u=this.render())==null||u.then(a)}else z.error("Model group with ID '".concat(t,"' already exists. The model group cannot be added."));return{id:t,type:"geometry-group"}}addMarker2D(t,n,o,i){var l;let a=o==null?void 0:o.id;try{$E(t,n,o||{})}catch(u){z.error(u);return}if(a===void 0||!s(this,U).geometry2DMap.has(a)&&!s(this,U).geometry3DMap.has(a)){let u=Q(this,fn,_I).call(this,t,new cs(n,o),o==null?void 0:o.occluderId,o==null?void 0:o.verticalOffset);u.id=a||String(u.id),a=u.id,(o==null?void 0:o.interactive)!=null&&o.interactive!=="pointer-events-auto"&&fo(u,o==null?void 0:o.interactive,s(this,U)),(o==null?void 0:o.enabled)!=null&&gg(u,o.enabled);let c=typeof(o==null?void 0:o.attachTo)=="string"||typeof(o==null?void 0:o.attachTo)=="number"?s(this,U).geometry3DMap.get(o.attachTo):void 0;c instanceof Mt&&c.attach(u),(l=this.getParentContainer(i))==null||l.addEntity(u),this.render()}else z.error("Marker2D with ID '".concat(a,"' already exists. The marker cannot be added."));return{id:a,type:"marker"}}addText3D(t,n,o,i){if(!s(this,U).geometry3DMap.has(t)&&!s(this,U).geometry2DMap.has(t)){let a=new hg(H(w({},n),{properties:H(w({},n.properties),{id:t,content:n.properties.text})})),l=new Mt(a,new Gm(o==null?void 0:o.appearance));l.id=t,a.mesh.userData.entityId=t.toString(),a.mesh.userData.type="text3d",s(this,U).geometry3DMap.set(t,l);let u=this.getParentContainer(i);u instanceof Pr&&u.addEntity(l),s(this,jt).call(this),this.render()}else z.error("Text3D with ID '".concat(t,"' already exists. The text3d cannot be added."));return{id:t,type:"text3d"}}labelText3D(t,n,o={}){var c,d;try{if(!n||!t)throw new Error("content and meshGeometryId are required");mC.parse(o)}catch(m){z.error(m);return}let i=s(this,U).geometry3DMap.get(t);if((i==null?void 0:i.type)!=="geometry"){z.error(".labelText3D failed: target incorrect");return}let a=i==null?void 0:i.components[0];if(!a.feature.properties.textArea)return;if(a.textEntityId){let m=s(this,U).geometry3DMap.get(a.textEntityId);if((m==null?void 0:m.type)!=="text3d"){z.error(".labelText3D failed: existing text3d not found");return}return{id:m.id,type:m.type}}let l=new hg({type:"Feature",geometry:{coordinates:(c=a.feature.properties.textArea)==null?void 0:c.position,type:"Point"},properties:{textArea:a.feature.properties.textArea,content:n,id:Bt()}});l.polygonEntityId=t;let u=new Mt(l,new Gm(o==null?void 0:o.appearance));return a.textEntityId=u.id.toString(),l.mesh.userData.entityId=u.id.toString(),l.mesh.userData.type="text3d",s(this,U).geometry3DMap.set(u.id.toString(),u),o.parentId&&((d=this.getParentContainer(o.parentId))==null||d.addEntity(u)),this.render(),{id:u.id,type:"text3d"}}addLabel2D(t,n,o,i){var l;let a=o==null?void 0:o.id;try{GE(t,n,o||{})}catch(u){z.error(u);return}if(a===void 0||!s(this,U).geometry2DMap.has(a)&&!s(this,U).geometry3DMap.has(a)){let u=Q(this,fn,_I).call(this,t,new ls(n,o||{},s(this,U)),o==null?void 0:o.occluderId,o==null?void 0:o.verticalOffset);u.id=a||String(u.id),a=u.id,(o==null?void 0:o.interactive)!=null&&fo(u,o==null?void 0:o.interactive,s(this,U)),(o==null?void 0:o.enabled)!=null&&gg(u,o.enabled);let c=typeof(o==null?void 0:o.attachTo)=="string"||typeof(o==null?void 0:o.attachTo)=="number"?s(this,U).geometry3DMap.get(o.attachTo):void 0;c instanceof Mt&&c.attach(u),(l=this.getParentContainer(i))==null||l.addEntity(u),s(this,Ur).call(this),this.render()}else z.error("Label2D with ID '".concat(a,"' already exists. The label cannot be added."));return{id:a,type:"label"}}addPath(t,n={},o){var u,c;try{FF(t,n||{})}catch(d){z.error(d);return}let i=new Yu(t,BC(n)),a=new Mt(i,new xa({color:(u=n==null?void 0:n.color)!=null?u:"#ff834c",altitude:(c=n==null?void 0:n.verticalOffset)!=null?c:.1}));a.id=(n==null?void 0:n.id)||Bt(),i.mesh.userData={entityId:a.id,type:"path"},s(this,U).geometry3DMap.set(a.id,a),(n==null?void 0:n.interactive)!=null&&fo(a,n==null?void 0:n.interactive,s(this,U));let l=this.getParentContainer(o);return l instanceof Pr&&l.addEntity(a),s(this,jt).call(this),this.render(),{id:a.id,type:"path"}}updateWatermark(t){s(this,j).watermarkSystem.options=t,s(this,j).watermarkSystem.dirty=!0,s(this,j).collisionSystem.collidersDirty=!0,this.render()}remove(t){var o,i;let n;if(typeof t=="string"||typeof t=="number"?(n=s(this,U).geometry2DMap.get(t),n==null&&(n=s(this,U).geometry3DMap.get(t))):typeof t.id=="string"||typeof t.id=="number"?(n=s(this,U).geometry2DMap.get(t.id),n==null&&(n=s(this,U).geometry3DMap.get(t.id))):n=t,n!=null){if(n.type==="custom-geometry")s(this,U).geometry3DMap.delete(n.id),n.object3d&&nr(n.object3d);else if(n.type==="group-container"){s(this,U).geometry3DMap.delete(n.userData.entityId);for(let l of n.childrenIds.values())this.remove(l),n.userData.entities2D.delete(l);let a=n.components[1];a&&a.focusMesh&&nr(a.focusMesh),nr(n)}else if(n.type==="geometry-group"){s(this,U).geometry3DMap.delete(n.userData.entityId);for(let a of n.userData.entities3D.values())this.remove(a),n.userData.entities3D.delete(a);nr(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let a=n.components[0],l=n.components[4];if(n.entities2D.size>0){for(let c of n.entities2D.values())this.remove(c);n.removeAllEntities()}let u=(i=(o=n.parentObject3D)==null?void 0:o.userData.entityId)!=null?i:n.parentId;if(u){let c=s(this,U).geometry3DMap.get(u);c instanceof Ti&&c.userData.entities3D.delete(n.id)}if(n.object3d&&nr(n.object3d),n.type==="geometry"){let c=n.components[3];c&&(c.enabled=!1,c.dirty=!0)}l&&"focusMesh"in l&&l.focusMesh!=null&&nr(l.focusMesh),"textMesh"in a&&a.textMesh!=null&&this.remove(a.textMesh.userData.entityId),s(this,U).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let a=n.attachedTo;if(a){let l=s(this,U).geometry3DMap.get(a);l instanceof Mt&&l.detach(n)}n.object3d&&nr(n.object3d),n.type==="label"&&delete s(this,j).twoDDrawSystem.textCache[n.id],s(this,U).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&nr(n.object3d),s(this,U).geometry3DMap.delete(n.id);else if(n.type==="text3d"){nr(n.object3d);let{batchedText:a,textMesh:l,polygonEntityId:u}=n.components[0];if(l&&(a&&a.removeText(l),nr(l)),u){s(this,j).text3DSystem.remove(u);let c=s(this,U).geometry3DMap.get(u);(c==null?void 0:c.type)==="geometry"&&(c.components[0].textMesh=void 0,c.components[0].textEntityId=void 0)}s(this,U).geometry3DMap.delete(n.id)}s(this,jt).call(this),s(this,Ur).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,cr)}getThreeCamera(){return s(this,rr)}async setEnvironment(t){if(s(this,cr))if(t==="basic"){s(this,Cc)||M(this,Cc,Q(this,fn,LI).call(this));let n=await s(this,Cc);s(this,cr).environment=n}else s(this,cr).environment=null}getEnvironment(){var t;return(t=s(this,cr))!=null&&t.environment?"basic":!1}getCurrentSceneGLTF(t){return s(this,j).exporterSystem.getCurrentSceneGLTF(t)}getBoundingArea(t){(s(this,j).renderSystem.threeDdirty||s(this,j).renderSystem.twoDdirty)&&this.renderSync();let n=new Tr;if(t==null)n.setFromObject(s(this,U).geometryScene);else{let o=Yc(s(this,U),t);if((o==null?void 0:o.type)==="geometry"&&(o==null?void 0:o.object3d)!=null){let i=o.components[0],a=i instanceof xr?i.geometry:void 0;i.mesh instanceof rg&&a?(a.computeBoundingBox(),a.boundingBox&&n.union(a.boundingBox)):n.setFromObject(o.object3d)}else((o==null?void 0:o.type)==="geometry-group"||(o==null?void 0:o.type)==="group-container")&&(o==null?void 0:o.userData.entityId)!=null&&n.setFromObject(o)}if(gl(n))return qE(n).map(this.convert3DMapPositionToCoordinate)}hasState(t){return Yc(s(this,U),t)!=null}getState(t){var o,i,a,l,u,c,d,m,h,g,x,E,v,I,C,S,T;if(t==null)return{type:"map-view",hoverColor:s(this,U).hoverColor,text3dHoverColor:s(this,U).text3dHoverColor};let n=Yc(s(this,U),t);if((n==null?void 0:n.type)==="custom-geometry"){let A=n.components[0],F=n.components[1];return{id:n.id,type:"custom-geometry",visible:F.visible,altitude:F.altitude,parent:(o=n.parentObject3D)==null?void 0:o.userData.entityId,position:this.convert3DMapPositionToCoordinate(A.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let A=Array.from(n.userData.entities3D.values()),F=A==null?void 0:A[0],P=F?this.getState(F):{};return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:P==null?void 0:P.altitude,initialColor:P==null?void 0:P.initialColor,color:P==null?void 0:P.color,side:(i=P==null?void 0:P.side)!=null?i:"double",opacity:P==null?void 0:P.opacity,height:P==null?void 0:P.height,texture:P==null?void 0:P.texture,topColor:P==null?void 0:P.topColor,topTexture:P==null?void 0:P.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(O=>s(this,U).geometry3DMap.get(O)).every(O=>O&&O.components[2]!=null),children:A,bevel:P==null?void 0:P.bevel}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(a=n.getWorldPosition(BW).z)!=null?a:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map(A=>this.getState(A)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let A=n.components[0],F=n.object3d.parent,P=F==null?void 0:F.userData.entityId;return{id:n.id,type:"label",text:A.text||"",parent:{id:P,type:F==null?void 0:F.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:A.enabled,visible:A.visible,initialRank:jm(A.initialRank),options:{rank:jm(A.rank),appearance:A.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo}}}else if((n==null?void 0:n.type)==="marker"){let A=n.components[0],F=n.object3d.parent,P=F==null?void 0:F.userData.entityId;return{id:n.id,type:"marker",enabled:A.enabled,visible:A.visible,placement:A.options.placement,dynamicResize:A.options.dynamicResize,parent:{id:P,type:F==null?void 0:F.type},position:this.convert3DMapPositionToCoordinate(n.position),element:A.containerEl,initialRank:jm(A.initialRank),contentHTML:A.contentHtml,options:{rank:jm(A.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:A.options.lowPriorityPin}}}else if((n==null?void 0:n.type)==="geometry"){let{color:A,hoverColor:F,initialColor:P,initialTopColor:O,topColor:_,altitude:G}=n.components[1],L=n.components[0],q=n.components[4],$=n.components[1],K=n.components[6],X=n.components[2],V=n.components[3],Y=n.parentObject3D;return{id:n.id,type:"geometry",opacity:$.opacity,initialColor:P,color:A,focusable:q!=null&&q.focusMesh!=null,initialTopColor:O,topColor:_,side:$.side,hoverColor:F,hovered:!!(X!=null&&X.hover),height:$.height,visible:$.visible,outline:V==null?void 0:V.enabled,showImage:$.showImage,texture:(l=K==null?void 0:K.texture)==null?void 0:l.path,topTexture:(u=K==null?void 0:K.topTexture)==null?void 0:u.path,flipImageToFaceCamera:$.flipImageToFaceCamera,enableImageCollisions:$.enableImageCollisions,parent:{id:Y==null?void 0:Y.userData.entityId,type:Y==null?void 0:Y.type},altitude:G,bevel:$.bevel,position:this.convert3DMapPositionToCoordinate(L.position),interactive:n.components[2]!=null,borderVisible:$.borderVisible,borderColor:$.borderColor,borderWidth:$.borderWidth}}else if((n==null?void 0:n.type)==="model"){let A=n.components[0],F=n.components[1],P=n.components[2];return{id:n.id,type:"model",position:A.mesh?this.convert3DMapPositionToCoordinate((c=A.mesh)==null?void 0:c.getWorldPosition(new be)):this.convert3DMapPositionToCoordinate(A.position),interactive:P!=null,material:F.material,parent:(d=n.parentObject3D)!=null&&d.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:F.visible,verticalOffset:F.verticalOffset,color:F.color,opacity:F.opacity,rotation:(m=F.rotation)!=null?m:rd,scale:(h=F.scale)!=null?h:td}}else if((n==null?void 0:n.type)==="path"){let A=n.components[0],F=n.components[2],P=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(A.position),visible:P.visible,interactive:F!=null,completeFraction:A.completeFraction,color:P.color,accentColor:A.accentColor,width:A.width,animateArrowsOnPath:A.animateArrowsOnPath,displayArrowsOnPath:A.displayArrowsOnPath,verticalOffset:P.altitude,highlightCompleteFraction:A.highlightCompleteFraction,highlightStartFraction:A.highlightStartFraction,highlightEndFraction:A.highlightEndFraction,highlightColor:A.highlightColor,highlightWidthMultiplier:A.highlightWidthMultiplier}}else if((n==null?void 0:n.type)==="image"){let A=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate(A.position),visible:n.components[1].visible,verticalOffset:(g=A.feature.properties.verticalOffset)!=null?g:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(x=A.feature.properties.width)!=null?x:0,height:(E=A.feature.properties.height)!=null?E:0,rotation:(v=A.feature.properties.rotation)!=null?v:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof hg&&"textArea"in n.components[0].feature.properties){_C(n);let A=n.components[0],F=n.components[1],{textMesh:P}=A,O=(I=A.mesh)==null?void 0:I.parent;O instanceof Pr&&((C=O.children.find(L=>L.type==="batchedtext"))==null||C.getWorldPosition(s(this,q0))),s(this,mm).set(0,0,0);let _=P?P.getWorldPosition(s(this,mm)):s(this,mm);return Object.assign({},ed,F.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(_.add(s(this,q0))),visible:(S=A.visible)!=null?S:!1,content:(T=A.feature.properties.content)!=null?T:""})}else return}}setState(t,n){var i,a;if(typeof t=="object"&&n==null){"hoverColor"in t&&(Rm(t.hoverColor)?s(this,U).hoverColor=(i=t.hoverColor)!=null?i:s(this,U).hoverColor:z.warn('Failed to update global hover color. Invalid color "'.concat(t.hoverColor,'".'))),"text3dHoverColor"in t&&(s(this,U).text3dHoverColor=(a=t.text3dHoverColor)!=null?a:s(this,U).text3dHoverColor);return}let o=Yc(s(this,U),t);if(o!=null){if(o.type==="custom-geometry"){let l=s(this,U).geometry3DMap.get(o.id);if(l instanceof Mt&&l.components[0]instanceof tm){let u=n;xu(o,s(this,U),u.visible),nd(o,s(this,U),u.altitude),mv(o,u.position,this.convertTo3DMapPosition),fv(o,this.getParentContainer(u.parent,!1)),fo(o,u.interactive,s(this,U))&&s(this,jt).call(this)}}else if(o.type==="path"){let l=n;fo(o,l.interactive,s(this,U))&&s(this,jt).call(this),nd(o,s(this,U),l.verticalOffset),kC(o,s(this,U),l)}else if(o.type==="model"){let l=n;fo(o,l.interactive,s(this,U))&&s(this,jt).call(this),xu(o,s(this,U),l.visible),RC(o,l),NC(o,l)}else if(o.type==="group-container"){let l=n;xu(o,s(this,U),l.visible)&&(s(this,j).pathSystem.verticalDistanceDirty=!0,s(this,j).geometryInFocusSystem.focusablesDirty=!0),nd(o,s(this,U),l.altitude)&&(s(this,j).pathSystem.verticalDistanceDirty=!0),fo(o,l.interactive,s(this,U))&&s(this,jt).call(this),yg(o,s(this,U),l.opacity)&&(s(this,j).outlineInterpolationSystem.outlineOpacitiesDirty=!0),l.preloadGeometry&&o.userData.preloadGeometry!==!0&&(o.userData.preloadGeometry=!0,s(this,j).outlineInterpolationSystem.geometries3DDirty=!0),bg(o,l.focusable)&&(s(this,j).geometryInFocusSystem.focusablesDirty=!0)}else if(o.type==="geometry-group"){let l=n;xu(o,s(this,U),l.visible),xC(o,s(this,U),l),yv(o,s(this,U),l.outline),l.height!=null&&pv(o,s(this,U),l.height),nd(o,s(this,U),l.altitude),gv(o,s(this,U),l)&&(s(this,j).textureSystem.dirty=!0),gv(o,s(this,U),l),IC(o,s(this,U),l.shading),yg(o,s(this,U),l.opacity)&&(s(this,j).outlineInterpolationSystem.outlineOpacitiesDirty=!0),fo(o,l.interactive,s(this,U))&&(s(this,jt).call(this),s(this,Ur).call(this)),bv(o,s(this,U),l.side)}else if(o.type==="geometry"){if(o.components[0]instanceof xr){let l=n;xu(o,s(this,U),l.visible),yv(o,s(this,U),l.outline),EC(o,l),bg(o,l.focusable)&&(s(this,j).geometryInFocusSystem.focusablesDirty=!0),PC(o,l.renderOrder)&&(s(this,j).meshDetachmentSystem.dirty=!0),FC(o,l.opacity)&&(s(this,j).meshDetachmentSystem.dirty=!0,s(this,j).interactionSystem.dirty3D=!0,s(this,j).outlineInterpolationSystem.outlineOpacitiesDirty=!0),hv(o,l.flipImageToFaceCamera),MC(o,l.enableImageCollisions),nd(o,s(this,U),l.altitude),l.height!=null&&pv(o,s(this,U),l.height),AC(o,l)&&(s(this,j).meshDetachmentSystem.dirty=!0,s(this,j).textureSystem.dirty=!0),CC(o,l),TC(o,l.hoverColor),fo(o,l.interactive,s(this,U)),wC(o,l.hovered),bv(o,s(this,U),l.side),OC(o,l)}s(this,jt).call(this)}else if(o.type==="label"||o.type==="marker"){let l=n;DC(o,n,s(this,U)),SC(o,n,s(this,U))&&(s(this,Ur).call(this),s(this,j).domMutationSystem.dirty=!0),mv(o,l.position,this.convertTo3DMapPosition),fv(o,this.getParentContainer(l.parent,!1))&&(s(this,Ur).call(this),s(this,j).panBoundsSystem.dirty=!0),gg(o,l.enabled),xu(o,s(this,U),l.visible)}else if(o.type==="image"){let l=n;xu(o,s(this,U),l.visible),yg(o,s(this,U),l.opacity),hv(o,l.flipImageToFaceCamera)}else if(o.type==="text3d"){let l=n;LC(o,s(this,U),l)}this.render()}}convertTo3DMapPosition(t,n,o=0,i){var u,c,d,m,h;if(Array.isArray(t))return this.convertTo3DMapPosition(t[1],t[0],(u=t[2])!=null?u:o,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:a,y:l}=pg((d=(c=s(this,U).center)==null?void 0:c[1])!=null?d:0,(h=(m=s(this,U).center)==null?void 0:m[0])!=null?h:0,t,n);return i?(i.set(a,l,o),i):new be(a,l,o)}get backgroundColor(){return typeof s(this,jr).backgroundColor=="string"?s(this,jr).backgroundColor:"#".concat(s(this,jr).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,jr).backgroundAlpha}getThreeRenderer(){return s(this,jr)}getCenter(t){let n=Array.isArray(t)?t:this.getBoundingArea(t);return n?oC(n):void 0}isInView(t){let n=Yc(s(this,U),t);if(s(this,H0).identity().multiply(s(this,rr).projectionMatrix).multiply(s(this,rr).matrixWorldInverse),s(this,wc).setFromProjectionMatrix(s(this,H0)),n instanceof ov)return s(this,wc).containsPoint(n.position);if(n instanceof Mt){let o=n==null?void 0:n.components[0];if(o instanceof tm||o instanceof Ju)return s(this,wc).containsPoint(this.convertTo3DMapPosition(o.feature.geometry.coordinates));if(o instanceof xr){let i=new Tr(this.convertTo3DMapPosition(o.featureBbox[1],o.featureBbox[0],0),this.convertTo3DMapPosition(o.featureBbox[3],o.featureBbox[2],0));return s(this,wc).intersectsBox(i)}}return!1}queryGeometry2DInView(t){let{screenOffsets:n,fullyContains:o}=t!=null?t:{},[i,a,l,u]=uC(this.container,n),c=new Ke(i,a,l,u);return s(this,j).collisionSystem.visibleCollidersQTree.queryRect(c).filter(g=>o?c.contains(g):c.intersects(g)).map(g=>s(this,U).geometry2DMap.get(g.userData.entityId)).filter(g=>g!=null).filter(g=>g.components[0]instanceof ls||g.components[0]instanceof cs).map(g=>g.id.toString())}onMapLibreEvent(t,n){if(!this.map){z.warn('Tried to add event listener "'.concat(t,'" but MapLibre map is not initialized.'));return}this.map.on(t,n),s(this,fi)[t]=s(this,fi)[t]||[],s(this,fi)[t].push(n)}offMapLibreEvent(t,n){!this.map||!Array.isArray(s(this,fi)[t])||(this.map.off(t,n),s(this,fi)[t]=s(this,fi)[t].filter(o=>o!==n))}get aborted(){return s(this,Dc).signal.aborted}onAbort(t){s(this,Dc).signal.addEventListener("abort",t,{once:!0})}getSystems(){return s(this,j)}getInternalState(){return s(this,U)}getInternalTweenGroup(){return s(this,U).internalTweenGroup}getExternalTweenGroup(){return s(this,U).externalTweenGroup}computeMinZOffsetBetweenContainers(t,n,o){if(!t||!n)return-1;Kc(t,"group-container"),Kc(n,"group-container");let i=mg(t,this.getThreeCamera()),a=n.clone(),l=mg(a,this.getThreeCamera());if(!gl(i)||!gl(l))return-1;let u=0,c;o&&this.container.querySelectorAll(".debug-box").forEach(m=>m.remove());do{if(u>1e4)return-1;if(u+=20,a.position.z=u,a.updateMatrixWorld(),l.makeEmpty(),mg(a,s(this,rr),l),c=i.intersectsBox(l),o){let d=cv(i,"blue",this.container),m=cv(l,c?"red":"green",this.container);d.classList.add("debug-box"),m.classList.add("debug-box")}}while(c);return u}};cr=new WeakMap,rr=new WeakMap,Cc=new WeakMap,N0=new WeakMap,lm=new WeakMap,rl=new WeakMap,Sc=new WeakMap,cm=new WeakMap,fn=new WeakSet,BI=function(t){var n;s(this,Xs)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(t)),s(this,U).pixelRatio=this.resolutionScale},U=new WeakMap,fi=new WeakMap,Dc=new WeakMap,Dt=new WeakMap,Xi=new WeakMap,dr=new WeakMap,hi=new WeakMap,jr=new WeakMap,j=new WeakMap,j0=new WeakMap,Ur=new WeakMap,jt=new WeakMap,g8=function(){M(this,Dt,document.createElement("div")),s(this,Dt).classList.add("mappedin__smart-collision-engine__container"),M(this,Xi,document.createElement("canvas")),s(this,Xi).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Dt)),M(this,dr,document.createElement("canvas")),s(this,dr).classList.add("mappedin__smart-collision-engine__container"),s(this,dr).width=s(this,Dt).clientWidth*this.resolutionScale,s(this,dr).height=s(this,Dt).clientHeight*this.resolutionScale,s(this,dr).style.width=s(this,Dt).clientWidth+"px",s(this,dr).style.height=s(this,Dt).clientHeight+"px",s(this,Dt).appendChild(s(this,Xi)),s(this,Dt).appendChild(s(this,dr)),s(this,Xi).width=s(this,Dt).clientWidth,s(this,Xi).height=s(this,Dt).clientHeight,s(this,dr).width=s(this,Dt).clientWidth*this.resolutionScale,s(this,dr).height=s(this,Dt).clientHeight*this.resolutionScale,s(this,dr).style.width=s(this,Dt).clientWidth+"px",s(this,dr).style.height=s(this,Dt).clientHeight+"px"},y8=function(){M(this,hi,document.createElement("div")),s(this,hi).classList.add("mappedin-2d-entities"),Object.assign(s(this,hi).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,hi))},b8=function(){s(this,dr).width=s(this,Dt).clientWidth*this.resolutionScale,s(this,dr).height=s(this,Dt).clientHeight*this.resolutionScale,s(this,dr).style.width=s(this,Dt).clientWidth+"px",s(this,dr).style.height=s(this,Dt).clientHeight+"px",s(this,Xi).width=s(this,Dt).clientWidth,s(this,Xi).height=s(this,Dt).clientHeight,s(this,dr).width=s(this,Dt).clientWidth*this.resolutionScale,s(this,dr).height=s(this,Dt).clientHeight*this.resolutionScale,s(this,dr).style.width=s(this,Dt).clientWidth+"px",s(this,dr).style.height=s(this,Dt).clientHeight+"px",s(this,j).collisionSystem.collidersDirty=!0},Xs=new WeakMap,U0=new WeakMap,z0=new WeakMap,G0=new WeakMap,$0=new WeakMap,dm=new WeakMap,Y4=new WeakMap,V0=new WeakMap,pm=new WeakMap,Z0=new WeakMap,Tc=new WeakMap,_I=function(t,n,o,i){let a=new ov(n,this.convertTo3DMapPosition(t[1],t[0],t[2]||0),i);return a.occluderId=o!=null?o:s(this,j).occlusion2DSystem.backgroundId,s(this,U).geometry2DMap.set(a.id,a),a},wc=new WeakMap,H0=new WeakMap,W0=new WeakMap,zn=new WeakMap,Gn=new WeakMap,LI=async function(){return Xu.load(iF).then(t=>{var n;return s(this,cr)&&((n=s(this,cr).environment)==null||n.dispose(),t.mapping=aE,s(this,cr).environment=t,this.render()),t})},X4=new WeakMap,Q4=new WeakMap,mm=new WeakMap,q0=new WeakMap;var BW=new be,UI=kI;p();function _W(e,r){LW(e,r)(e.getScene(),r),RW(e,r),r.addFolder("Export").add({export:async()=>{let a=await e.getCurrentSceneGLTF({binary:!0}),l=new Blob([a],{type:"application/octet-stream"});var u=document.createElement("a");document.body.appendChild(u),u.style.display="none";let c=window.URL.createObjectURL(l);u.href=c,u.download="scene.glb",u.click(),window.URL.revokeObjectURL(c)}},"export");let o=r.addFolder("Camera"),i={get bearing(){return e.camera.bearing},set bearing(a){e.camera.setBearing(a)},get pitch(){return e.camera.pitch},set pitch(a){e.camera.setPitch(a)},get zoomLevel(){return e.camera.zoomLevel},set zoomLevel(a){e.camera.setZoomLevel(a)}};o.add(i,"bearing",-359,359,1),o.add(i,"pitch",e.camera.minPitch,e.camera.maxPitch,1),o.add(i,"zoomLevel",e.camera.minZoomLevel,e.camera.maxZoomLevel,.1)}function LW(e,r){let t=r;return function n(o,i){let a=i.addFolder("".concat([o.type]," ").concat(o.id.slice(0,16)));if(i.close(),o.type==="geometry"||o.type==="model"||o.type==="path"||o.type==="image"){let l={get height(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"?u.height:0},set height(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(o,{height:u})},set flipImageToFaceCamera(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="image"&&e.setState(o,{flipImageToFaceCamera:u})},get flipImageToFaceCamera(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="image"?u.flipImageToFaceCamera:!1},set visible(u){let c=e.getState(o.id);((c==null?void 0:c.type)==="geometry"||(c==null?void 0:c.type)==="path"||(c==null?void 0:c.type)==="image")&&e.setState(o,{visible:u})},get visible(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"||(u==null?void 0:u.type)==="path"||(u==null?void 0:u.type)==="image"?u.visible:!1},set outline(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(o,{outline:u})},get outline(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"?u.outline:!1},get opacity(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"?u.opacity:1},set opacity(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(c,{opacity:u})},get color(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"&&u.color?jE(u.color).toHexString():"#ffffff"},set color(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry"&&e.setState(c,{color:u})},set interactive(u){let c=e.getState(o.id);((c==null?void 0:c.type)==="geometry"||(c==null?void 0:c.type)==="model"||(c==null?void 0:c.type)==="path")&&(e.setState(o,{interactive:u}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry"||(u==null?void 0:u.type)==="model"||(u==null?void 0:u.type)==="path"?u.interactive:!1},get completeFraction(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="path"?u.completeFraction:1},set completeFraction(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="path"&&e.setState(c,{completeFraction:u})},focus:()=>{}};a.add(l,"focus").onChange(()=>{let u=e.getState(o.id);(u==null?void 0:u.type)==="model"||(u==null?void 0:u.type)==="path"||(u==null?void 0:u.type)==="image"?e.camera.focusOn([u.position]):(u==null?void 0:u.type)==="geometry"&&e.camera.focusOn(e.getBoundingArea(u))}),a.add(l,"visible"),o.type==="image"?a.add(l,"flipImageToFaceCamera"):(a.add(l,"interactive"),o.type==="path"&&a.add(l,"completeFraction",0,1,.1),o.type!=="model"&&(a.addColor(l,"color"),a.add(l,"outline"))),o.type==="geometry"&&(a.add(l,"height"),a.add(l,"opacity",0,1,.1))}else if(o.type==="marker"){let l={get interactive(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="marker"?(c=u.options)==null?void 0:c.interactive:!1},set interactive(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="marker"&&(e.setState(c,{options:{interactive:u}}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},focus:()=>{}};a.add(l,"focus").onChange(()=>{let u=e.getState(o.id);(u==null?void 0:u.type)==="marker"&&e.camera.focusOn([u.position])}),a.add(l,"interactive")}else if(o.type==="label"){let l={get interactive(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options)==null?void 0:c.interactive:!1},set interactive(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&(e.setState(c,{options:{interactive:u}}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get text(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?u.text:""},set text(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:u})},get"Text Color"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.textColor:"#000000"},set"Text Color"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(o.id,{text:l.text,options:{appearance:{textColor:u}}})},get"Text Size"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.textSize:10},set"Text Size"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{textSize:u}}})},get"Icon Size"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.iconSize:10},set"Icon Size"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{iconSize:u}}})},get"Pin Color"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.pinColor:"#000000"},set"Pin Color"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{pinColor:u}}})},get"Pin Color Inactive"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.pinColorInactive:"#000000"},set"Pin Color Inactive"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{pinColorInactive:u}}})},get"Pin Outline Color"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.pinOutlineColor:"#000000"},set"Pin Outline Color"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{pinOutlineColor:u}}})},get"Pin Outline Color Inactive"(){var c;let u=e.getState(o.id);return(u==null?void 0:u.type)==="label"?(c=u.options.appearance)==null?void 0:c.pinOutlineColorInactive:"#000000"},set"Pin Outline Color Inactive"(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="label"&&e.setState(c,{text:l.text,options:{appearance:{pinOutlineColorInactive:u}}})},focus:()=>{}};a.add(l,"focus").onChange(()=>{let u=e.getState(o.id);(u==null?void 0:u.type)==="label"&&e.camera.focusOn([u.position])}),a.add(l,"interactive"),a.add(l,"text"),a.add(l,"Text Size",10,50),a.add(l,"Icon Size",10,50),a.addColor(l,"Text Color"),a.addColor(l,"Active Background Color"),a.addColor(l,"Inactive Background Color"),a.addColor(l,"Active Foreground Color"),a.addColor(l,"Inactive Foreground Color")}else if(o.type==="geometry-group"){let l={get opacity(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"?u.opacity:1},set opacity(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{opacity:u})},set visible(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{visible:u})},get visible(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"?u.visible:!1},set outline(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{outline:u})},get outline(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"?u.outline:!1},set altitude(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(o,{altitude:u})},get altitude(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"?u.altitude:0},set interactive(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&(e.setState(o,{interactive:u}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"?u.interactive:!1},get shadingStart(){var c,d;let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"&&(d=(c=u.shading)==null?void 0:c.start)!=null?d:0},set shadingStart(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{start:u}})},get shadingEnd(){var c,d;let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"&&(d=(c=u.shading)==null?void 0:c.end)!=null?d:0},set shadingEnd(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{end:u}})},get shadingIntensity(){var c,d;let u=e.getState(o.id);return(u==null?void 0:u.type)==="geometry-group"&&(d=(c=u.shading)==null?void 0:c.intensity)!=null?d:0},set shadingIntensity(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="geometry-group"&&e.setState(c,{shading:{intensity:u}})}};a.add(l,"visible"),a.add(l,"opacity",0,1,.1),a.add(l,"interactive"),a.add(l,"outline"),a.add(l,"altitude",0,100,1),a.add(l,"shadingStart",0,1,.1),a.add(l,"shadingEnd",0,1,.1),a.add(l,"shadingIntensity",0,1,.1)}else if(o.type==="group-container"){let l={set visible(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="group-container"&&e.setState(o,{visible:u})},get visible(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="group-container"?u.visible:!1},set interactive(u){let c=e.getState(o.id);(c==null?void 0:c.type)==="group-container"&&(e.setState(c,{interactive:u}),t.controllersRecursive().forEach(d=>d.updateDisplay()))},get interactive(){let u=e.getState(o.id);return(u==null?void 0:u.type)==="group-container"?u.interactive:!1}};a.add(l,"visible"),a.add(l,"interactive")}if(a.close(),o.children)for(let l of o.children.values())n(l,a)}}function RW(e,r){let t=r.addFolder("Watermark"),n={padding:16,iconOnly:!1,position:"bottom-left",color:"dark",scale:1};t.add(n,"padding",0,100,1),t.add(n,"scale",.5,1.5,.1),t.add(n,"color",["dark","light"]),t.add(n,"position",["top-left","top-right","bottom-left","bottom-right","center","top","bottom","left","right"]),t.add(n,"iconOnly"),t.onChange(()=>{e.updateWatermark(n)})}var v8="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",jW="https://auth.mappedin.com/oauth2/token";var eb="";function zI(e){eb=e,WE(e)}var fc="";function GI(e){fc=e}async function x8(e,r){var o,i,a,l,u,c,d,m;let t=(o=r==null?void 0:r.useWorkers)!=null?o:!0,n=H(w({},r),{watermark:r==null?void 0:r.watermark,attribution:r==null?void 0:r.attribution,antialias:r==null?void 0:r.antialias,occlusionEnabled:r==null?void 0:r.occlusionEnabled,transformImageRequest:r==null?void 0:r.transformImageRequest,naturalBearing:(i=r==null?void 0:r.naturalBearing)!=null?i:0,imagePlacementOptions:r==null?void 0:r.imagePlacementOptions,onWebGLContextCreationError:r==null?void 0:r.onWebGLContextCreationError,onWebGLContextLost:r==null?void 0:r.onWebGLContextLost,onWebGLContextRestored:r==null?void 0:r.onWebGLContextRestored,onWebGLRendererError:r==null?void 0:r.onWebGLRendererError,useStandaloneCamera:(a=r==null?void 0:r.useStandaloneCamera)!=null?a:!1,useCollisionWorker:(l=r==null?void 0:r.useCollisionWorker)!=null?l:!0,useWorkers:t});if(t===!0&&((u=r==null?void 0:r.outdoorView)!=null&&u.enabled)){let h=r.outdoorView.headers;h==null&&(h=await rC(jW));let g=r.center||[0,0],x=new HE({container:e,style:r.outdoorView.style||v8,center:g,attributionControl:!1,zoom:(c=r.zoomLevel)!=null?c:jI,pitch:(d=r.pitch)!=null?d:RI,bearing:(m=r.bearing)!=null?m:NI,transformRequest:XE(h),trackResize:!1,pixelRatio:r.outdoorView.lowDpi?1:Xc(),canvasContextAttributes:{antialias:typeof r.antialias=="boolean"?r.antialias:!0,powerPreference:"high-performance"},interactive:!1,validateStyle:!1,centerClampedToGround:!1,boxZoom:!1,doubleClickZoom:!1,scrollZoom:!1,dragPan:!1,dragRotate:!1,keyboard:!1,touchZoomRotate:!1}),E=x.painter.context.gl,v=new UI(e,w({center:g,zoomLevel:x.getZoom(),pitch:x.getPitch(),bearing:x.getBearing(),gl:E,map:x,mode:"outdoors-interleaved"},n)),I={center:x.getCenter().toArray(),zoom:x.getZoom(),bearing:x.getBearing(),pitch:x.getPitch(),elevation:x.getCenterElevation()};x.setMinZoom(v.camera.minZoomLevel),x.setMaxZoom(v.camera.maxZoomLevel),x.setMaxPitch(v.camera.maxPitch),x.setMinPitch(v.camera.minPitch),v.on("camera-change",L=>{I.center=L.center,I.zoom=L.zoomLevel,I.bearing=L.bearing,I.pitch=L.pitch,I.elevation=L.elevation,x.jumpTo(I)});let C=VE.fromLngLat(g,0),S=tC(C,v.viewCamera,()=>{v.renderSync()}),T=async()=>{x&&(x.addLayer(S),v.renderSync())};v.onMapLibreEvent("style.load",T);let A=!1,F=!1,P=()=>{x&&(A||(v.publish("outdoor-view-loaded"),A=!0),F||(F=!0,v.publish("outdoor-style-loaded")))};v.onMapLibreEvent("idle",P);let O=L=>{L&&(L.sourceDataType==="metadata"||L.sourceDataType==="visibility"||L.dataType==="style"||L.type==="terrain")&&v.getSystems().htmlControlsSystem.updateData(x)},_=L=>{x&&L&&L.dataType==="style"&&L.type==="styledata"&&(F=!1),O(L)};v.onMapLibreEvent("styledata",_),v.onMapLibreEvent("sourcedata",O),v.onMapLibreEvent("terrain",O);let G=L=>{var q;if(((q=L.error)==null?void 0:q.url)===v8){z.error('Failed to load outdoor view style, possibly due to invalid token "'.concat(h["x-mappedin-tiles-key"],'"'));return}z.warn(L)};return v.onMapLibreEvent("error",G),v}else return new UI(e,n)}p();p();p();p();var K0=class K0{constructor(r,t,n){f(this,"id");f(this,"text");f(this,"target");f(this,"__type",K0.__type);this.id=r,this.text=t,this.target=n}static is(r){return r.__type===K0.__type}get focusTarget(){return this.target.anchorTarget}};f(K0,"__type","label");var Qs=K0;p();var Mc,fm=class fm{constructor(r,t,n){f(this,"id");D(this,Mc);f(this,"__type",fm.__type);f(this,"contentEl");this.id=r,this.contentEl=t,M(this,Mc,n)}get target(){return s(this,Mc)}get coordinate(){return s(this,Mc).anchorTarget}toJSON(){return{id:this.id,__type:fm.__type,target:this.target,coordinate:this.coordinate}}static is(r){return r.__type===fm.__type}get focusTarget(){return this.target.anchorTarget}updateTarget(r){M(this,Mc,r)}};Mc=new WeakMap,f(fm,"__type","marker");var Ka=fm;p();var Y0,X0,J0=class J0{constructor(r,t,n){D(this,Y0);D(this,X0);f(this,"target");f(this,"__type",J0.__type);M(this,Y0,r),M(this,X0,t),this.target=n}static is(r){return r.__type===J0.__type}get id(){return s(this,Y0)}get url(){return s(this,X0)}};Y0=new WeakMap,X0=new WeakMap,f(J0,"__type","image-3d");var Ac=J0;p();var Fc,hm=class hm{constructor(r,t,n){f(this,"id");f(this,"groupId");f(this,"__type",hm.__type);D(this,Fc);this.id=r,this.groupId=t,M(this,Fc,n)}get target(){return s(this,Fc)}static is(r){return r.__type===hm.__type}updateTarget(r){M(this,Fc,r)}toJSON(){return{id:this.id,__type:hm.__type,groupId:this.groupId,target:s(this,Fc)}}};Fc=new WeakMap,f(hm,"__type","model");var Pc=hm;p();var Oc,Q0=class Q0{constructor(r,t){f(this,"id");f(this,"coordinates");D(this,Oc);f(this,"__type",Q0.__type);this.id=r,this.coordinates=t}static is(r){return r.__type===Q0.__type}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return s(this,Oc)?s(this,Oc):(M(this,Oc,b2(this.coordinates)),s(this,Oc))}get focusTarget(){return this.coordinates}};Oc=new WeakMap,f(Q0,"__type","path-segment");var nl=Q0,kc,gm=class gm{constructor(r,t,n,o){f(this,"id");f(this,"animation");f(this,"coordinates");f(this,"segments");D(this,kc);f(this,"__type",gm.__type);this.id=r,this.animation=t,this.coordinates=n,this.segments=o.map(({id:i,coordinates:a})=>new nl(i.toString(),a))}static is(r){return r.__type===gm.__type}get focusTarget(){return this.coordinates}get distance(){return s(this,kc)?s(this,kc):(M(this,kc,b2(this.coordinates)),s(this,kc))}toJSON(){return{__type:gm.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};kc=new WeakMap,f(gm,"__type","path");var Qi=gm;p();var UW=7,ol,Bc,eh=class{constructor(r,t){D(this,ol);D(this,Bc);var n;M(this,ol,r),M(this,Bc,(n=t==null?void 0:t.precision)!=null?n:UW)}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let r=s(this,ol).center;if(s(this,Bc)===-1)return r;let t=ga(r.latitude,s(this,Bc)),n=ga(r.longitude,s(this,Bc));return new De({latitude:t,longitude:n,floorId:r.floorId,verticalOffset:r.verticalOffset})}get bearing(){return s(this,ol).bearing}get pitch(){return s(this,ol).pitch}get zoomLevel(){return ga(s(this,ol).zoomLevel,5)}};ol=new WeakMap,Bc=new WeakMap;p();var th=class th{constructor(r){f(this,"id");f(this,"__type",th.__type);this.id=r}static is(r){return r.__type===th.__type}get focusTarget(){return this}};f(th,"__type","shape");var eu=th;p();var rh=class rh{constructor(r,t){f(this,"id");f(this,"target");f(this,"__type",rh.__type);this.id=r,this.target=t}static is(r){return r.__type===rh.__type}};f(rh,"__type","text-3d");var il=rh;p();p();p();var zW=new Map([["search-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7C13 8.29583 12.5892 9.49572 11.8907 10.4765L15.4614 14.0472C15.6567 14.2425 15.6567 14.559 15.4614 14.7543L14.7543 15.4614C14.559 15.6567 14.2424 15.6567 14.0472 15.4614L10.4765 11.8907C9.49571 12.5892 8.29583 13 7 13C3.68629 13 1 10.3137 1 7ZM7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7C11 9.20914 9.20914 11 7 11Z"\n stroke="none"\n />\n </svg>'],["close-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M12.5963 1.98959C12.7916 1.79433 13.1082 1.79433 13.3034 1.98959L14.0105 2.6967C14.2058 2.89196 14.2058 3.20855 14.0105 3.40381L3.40392 14.0104C3.20866 14.2057 2.89208 14.2057 2.69682 14.0104L1.98971 13.3033C1.79445 13.108 1.79445 12.7915 1.98971 12.5962L12.5963 1.98959Z"\n stroke="none"\n />\n <path\n d="M1.98971 3.40381C1.79445 3.20855 1.79445 2.89196 1.98971 2.6967L2.69682 1.98959C2.89208 1.79433 3.20866 1.79433 3.40392 1.98959L14.0105 12.5962C14.2058 12.7915 14.2058 13.108 14.0105 13.3033L13.3034 14.0104C13.1082 14.2057 12.7916 14.2057 12.5963 14.0104L1.98971 3.40381Z"\n stroke="none"\n />\n </svg>'],["empty-64x40",'<svg viewBox="0 0 64 40">\n <g>\n <g clipPath="url(#clip0_499_175492)">\n <path\n d="M32 39.7032C49.6731 39.7032 64 36.5925 64 32.7552C64 28.9179 49.6731 25.8071 32 25.8071C14.3269 25.8071 0 28.9179 0 32.7552C0 36.5925 14.3269 39.7032 32 39.7032Z"\n stroke="none"\n fill="#F5F5F5"\n />\n <path\n d="M55 13.6653L44.854 2.24866C44.367 1.47048 43.656 1 42.907 1H21.093C20.344 1 19.633 1.47048 19.146 2.24767L9 13.6663V22.8367H55V13.6653Z"\n fill="none"\n />\n <path\n d="M41.613 16.8128C41.613 15.2197 42.607 13.9046 43.84 13.9036H55V31.9059C55 34.0132 53.68 35.7402 52.05 35.7402H11.95C10.32 35.7402 9 34.0122 9 31.9059V13.9036H20.16C21.393 13.9036 22.387 15.2167 22.387 16.8098V16.8317C22.387 18.4248 23.392 19.7111 24.624 19.7111H39.376C40.608 19.7111 41.613 18.4128 41.613 16.8198V16.8128Z"\n fill="#FAFAFA"\n />\n </g>\n <defs>\n <clipPath id="clip0_499_175492">\n <rect width="64" height="40" fill="white" />\n </clipPath>\n </defs>\n </g>\n </svg>'],["caret-12x12",'<svg viewBox="0 0 12 12">\n <path\n stroke="none"\n d="M8.38828 5.78337L3.92578 1.93493C3.75938 1.79196 3.51562 1.92087 3.51562 2.15173V9.84861C3.51562 10.0795 3.75938 10.2084 3.92578 10.0654L8.38828 6.21696C8.51602 6.10681 8.51602 5.89353 8.38828 5.78337Z"\n />\n </svg>'],["plus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5L1 8.5C1 8.77614 1.22386 9 1.5 9H7V14.5C7 14.7761 7.22386 15 7.5 15H8.5C8.77614 15 9 14.7761 9 14.5V9H14.5C14.7761 9 15 8.77614 15 8.5V7.5C15 7.22386 14.7761 7 14.5 7H9V1.5C9 1.22386 8.77614 1 8.5 1H7.5Z"\n stroke="none"\n />\n </svg>'],["recenter-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M0 2.5C0 2.22386 0.223858 2 0.5 2H1.5C1.77614 2 2 2.22386 2 2.5V13.5C2 13.7761 1.77614 14 1.5 14H0.5C0.223858 14 0 13.7761 0 13.5V2.5Z" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M4.5 4C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5ZM6 6V10H10V6H6Z"\n />\n <path d="M14.5 2C14.2239 2 14 2.22386 14 2.5V13.5C14 13.7761 14.2239 14 14.5 14H15.5C15.7761 14 16 13.7761 16 13.5V2.5C16 2.22386 15.7761 2 15.5 2H14.5Z" />\n </g>\n </svg>'],["minus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M1.5 9C1.22386 9 1 8.77614 1 8.5L1 7.5C1 7.22386 1.22386 7 1.5 7L14.5 7C14.7761 7 15 7.22386 15 7.5V8.5C15 8.77614 14.7761 9 14.5 9L1.5 9Z"\n stroke="none"\n />\n </svg>'],["logo-horizontal-206x48",'<svg viewBox="0 0 206 48">\n <path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z" />\n <path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z" />\n <path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z" />\n <path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z" />\n </svg>'],["share-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M13 6C14.6569 6 16 4.65685 16 3C16 1.34315 14.6569 0 13 0C11.3431 0 10 1.34315 10 3C10 3.13463 10.0089 3.26719 10.0261 3.39712L6.82972 5.17286C6.10576 4.44825 5.10523 4 4 4C1.79086 4 0 5.79086 0 8C0 10.2091 1.79086 12 4 12C5.10523 12 6.10576 11.5518 6.82972 10.8271L10.0261 12.6029C10.0089 12.7328 10 12.8654 10 13C10 14.6569 11.3431 16 13 16C14.6569 16 16 14.6569 16 13C16 11.3431 14.6569 10 13 10C12.2011 10 11.4752 10.3123 10.9376 10.8214L7.84579 9.1037C7.94622 8.75313 8 8.38284 8 8C8 7.61716 7.94622 7.24687 7.84579 6.8963L10.9376 5.17864C11.4752 5.68775 12.2011 6 13 6ZM13 4C13.5523 4 14 3.55228 14 3C14 2.44772 13.5523 2 13 2C12.4477 2 12 2.44772 12 3C12 3.55228 12.4477 4 13 4ZM4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10ZM14 13C14 13.5523 13.5523 14 13 14C12.4477 14 12 13.5523 12 13C12 12.4477 12.4477 12 13 12C13.5523 12 14 12.4477 14 13Z"\n stroke="none"\n />\n </svg>'],["checkmark-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M15.387 3.31662C15.6008 3.49148 15.6323 3.80649 15.4574 4.02021L6.77402 14.6332C6.58509 14.8642 6.30292 14.9986 6.00457 15C5.70622 15.0013 5.42285 14.8694 5.23184 14.6402L0.551937 9.02429C0.375155 8.81215 0.403817 8.49687 0.615956 8.32009L1.38418 7.67991C1.59632 7.50312 1.9116 7.53179 2.08838 7.74392L5.99299 12.4295L13.9095 2.75374C14.0844 2.54002 14.3994 2.50852 14.6131 2.68338L15.387 3.31662Z"\n stroke="none"\n />\n </svg>'],["arrow-right-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.35355 1.64645C8.54881 1.45118 8.8654 1.45118 9.06066 1.64645L14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L9.06066 14.3536C8.8654 14.5488 8.54882 14.5488 8.35355 14.3536L7.64645 13.6464C7.45118 13.4512 7.45118 13.1346 7.64645 12.9393L11.5858 9H0.5C0.223858 9 0 8.77614 0 8.5V7.5C0 7.22386 0.223858 7 0.5 7H11.5858L7.64645 3.06066C7.45118 2.8654 7.45118 2.54882 7.64645 2.35355L8.35355 1.64645Z"\n stroke="none"\n />\n </svg>'],["arrow-up-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M1 11.5C1 11.2239 1.22386 11 1.5 11H6V13.5C6 13.7761 5.77614 14 5.5 14H1.5C1.22386 14 1 13.7761 1 13.5V11.5Z" />\n <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />\n <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />\n <path d="M10 2.5C10 2.22386 10.2239 2 10.5 2H14.5C14.7761 2 15 2.22386 15 2.5V4.5C15 4.77614 14.7761 5 14.5 5H10V2.5Z" />\n </g>\n </svg>'],["connection-stairs-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.25 12H2.5C2.225 12 2 11.7429 2 11.4286C2 11.1143 2.225 10.8571 2.5 10.8571H4.25V7.91429H6.5V4.94286H8.75V2H11.5C11.775 2 12 2.25714 12 2.57143C12 2.88571 11.775 3.14286 11.5 3.14286H9.75V6.08571H7.5V9.02857H5.25V12Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>'],["connection-escalator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3.63008 12H2C0.895431 12 0 12.8954 0 14C0 15.1046 0.89543 16 2 16H4.63008C4.86879 16 5.09962 15.9146 5.28087 15.7593L11.7191 10.2407C11.9004 10.0854 12.1312 10 12.3699 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11.3699C11.1312 6 10.9004 6.08539 10.7191 6.24074L4.28087 11.7593C4.09962 11.9146 3.86879 12 3.63008 12Z" />\n <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />\n <path d="M9 2C9 3.10457 8.10457 4 7 4C5.89543 4 5 3.10457 5 2C5 0.89543 5.89543 0 7 0C8.10457 0 9 0.89543 9 2Z" />\n </g>\n </svg>'],["connection-escalator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.26686 2.98522C5.26686 2.44335 5.71573 2 6.26436 2C6.81299 2 7.26187 2.44335 7.26187 2.98522C7.26187 3.5271 6.81299 3.97045 6.26436 3.97045C5.71573 3.97045 5.26686 3.50246 5.26686 2.98522Z"\n stroke="none"\n />\n <path\n d="M7.26188 5.48588V5.25125C7.26188 4.85716 6.91275 4.53696 6.48881 4.53696H6.03993C5.61599 4.53696 5.26687 4.88179 5.26687 5.25125V7.66458L4.3192 8.6995H3.67082C2.74813 8.6995 2 9.43842 2 10.3498C2 11.2611 2.74813 12 3.67082 12H4.61845C5.36658 12 6.11471 11.6798 6.61347 11.1133L9.6808 7.76354H10.3292C11.2519 7.76354 12 7.02463 12 6.11329C12 5.20196 11.2519 4.46305 10.3292 4.46305H9.38155C8.60848 4.46305 7.88529 4.78324 7.38653 5.34975L7.26188 5.48588ZM4.61846 11.0148H3.67083C3.29677 11.0148 2.99751 10.7192 2.99751 10.3498C2.99751 9.9803 3.29677 9.68473 3.67083 9.68473H4.61846C4.71821 9.68473 4.81796 9.63547 4.86784 9.56158L8.13467 5.99015C8.45886 5.64532 8.90774 5.44828 9.38155 5.44828H10.3292C10.7032 5.44828 11.0025 5.74384 11.0025 6.1133C11.0025 6.48276 10.7032 6.77833 10.3292 6.77833H9.38155C9.2818 6.77833 9.18205 6.82759 9.13218 6.87685L5.86534 10.4729C5.54115 10.8177 5.09228 11.0148 4.61846 11.0148Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3 5.5C3 6.32843 2.32843 7 1.5 7C0.671573 7 0 6.32843 0 5.5C0 4.67157 0.671573 4 1.5 4C2.32843 4 3 4.67157 3 5.5Z" />\n <path d="M3 10.5C3 11.3284 2.32843 12 1.5 12C0.671573 12 0 11.3284 0 10.5C0 9.67157 0.671573 9 1.5 9C2.32843 9 3 9.67157 3 10.5Z" />\n <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />\n <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />\n </g>\n </svg>'],["connection-elevator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M7.476 2H2.72693C1.77095 2 1 2.72464 1 3.62319V10.3768C1 11.2754 1.77095 12 2.72693 12H7.476C8.43198 12 9.20293 11.2754 9.20293 10.3768V3.62319C9.17209 2.72464 8.40114 2 7.476 2ZM7.476 3.15942C7.75354 3.15942 7.96941 3.36232 7.96941 3.62319V10.3768C7.96941 10.6377 7.75354 10.8406 7.476 10.8406H5.71824V3.15942H7.476ZM4.48472 3.15942V10.8406H2.72693C2.44939 10.8406 2.23352 10.6377 2.23352 10.3768V3.62319C2.23352 3.36232 2.44939 3.15942 2.72693 3.15942H4.48472Z"\n stroke="none"\n />\n <path\n d="M12.4643 6.19064H10.6638C10.4456 6.19064 10.2546 6.06243 10.1728 5.88294C10.0909 5.70346 10.1455 5.47269 10.2819 5.31884L11.1821 4.47269C11.4004 4.26756 11.755 4.26756 11.946 4.47269L12.8462 5.31884C13.0099 5.47269 13.0371 5.67781 12.9553 5.88294C12.8735 6.08807 12.6825 6.19064 12.4643 6.19064Z"\n stroke="none"\n />\n <path\n d="M11.564 9.65216C11.4276 9.65216 11.2912 9.60088 11.1821 9.49831L10.2819 8.65216C10.1182 8.49831 10.0909 8.29319 10.1728 8.08806C10.2546 7.90857 10.4456 7.78036 10.6638 7.78036H12.4643C12.6825 7.78036 12.8735 7.90857 12.9553 8.08806C13.0371 8.26754 12.9826 8.49831 12.8462 8.65216L11.9459 9.49831C11.8641 9.60088 11.7004 9.65216 11.564 9.65216Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>'],["new-tab-14x14",'<svg viewBox="0 0 14 14">\n <g stroke="none">\n <path d="M2.625 2.625H5.6875C5.92913 2.625 6.125 2.42912 6.125 2.1875V1.3125C6.125 1.07088 5.92913 0.875 5.6875 0.875H1.3125C1.07088 0.875 0.875 1.07088 0.875 1.3125V12.6875C0.875 12.9291 1.07088 13.125 1.3125 13.125H12.6875C12.9291 13.125 13.125 12.9291 13.125 12.6875V8.3125C13.125 8.07088 12.9291 7.875 12.6875 7.875H11.8125C11.5709 7.875 11.375 8.07088 11.375 8.3125V11.375H2.625V2.625Z" />\n <path d="M12.9063 0.875H8.40311C8.20822 0.875 8.11063 1.11062 8.24843 1.24843L9.88124 2.88124L5.8156 6.94688C5.64475 7.11774 5.64475 7.39475 5.8156 7.5656L6.43432 8.18432C6.60517 8.35517 6.88218 8.35517 7.05304 8.18432L11.1187 4.11868L12.7516 5.75157C12.8894 5.88938 13.125 5.79178 13.125 5.59689V1.09375C13.125 0.972938 13.0271 0.875 12.9063 0.875Z" />\n </g>\n </svg>'],["compress-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path\n id="Vector"\n d="M4.67773 10.7154H0.713449C0.556306 10.7154 0.427734 10.844 0.427734 11.0011V11.8583C0.427734 12.0154 0.556306 12.144 0.713449 12.144H3.82059V15.2868C3.82059 15.444 3.94916 15.5725 4.10631 15.5725H4.96345C5.12059 15.5725 5.24916 15.444 5.24916 15.2868V11.2868C5.24916 10.9708 4.99381 10.7154 4.67773 10.7154ZM4.96345 0.429688H4.10631C3.94916 0.429688 3.82059 0.558259 3.82059 0.715402V3.85826H0.713449C0.556306 3.85826 0.427734 3.98683 0.427734 4.14397V5.00112C0.427734 5.15826 0.556306 5.28683 0.713449 5.28683H4.67773C4.99381 5.28683 5.24916 5.03147 5.24916 4.7154V0.715402C5.24916 0.558259 5.12059 0.429688 4.96345 0.429688ZM15.2849 10.7154H11.3206C11.0045 10.7154 10.7492 10.9708 10.7492 11.2868V15.2868C10.7492 15.444 10.8777 15.5725 11.0349 15.5725H11.892C12.0492 15.5725 12.1777 15.444 12.1777 15.2868V12.144H15.2849C15.442 12.144 15.5706 12.0154 15.5706 11.8583V11.0011C15.5706 10.844 15.442 10.7154 15.2849 10.7154ZM15.2849 3.85826H12.1777V0.715402C12.1777 0.558259 12.0492 0.429688 11.892 0.429688H11.0349C10.8777 0.429688 10.7492 0.558259 10.7492 0.715402V4.7154C10.7492 5.03147 11.0045 5.28683 11.3206 5.28683H15.2849C15.442 5.28683 15.5706 5.15826 15.5706 5.00112V4.14397C15.5706 3.98683 15.442 3.85826 15.2849 3.85826Z"\n />\n </g>\n </svg>'],["washroom-14x14",'<svg viewBox="0 0 14 14" stroke="none">\n <path d="M4.55125 3.09062C4.55125 3.69326 4.07639 4.18176 3.49058 4.18176C2.90525 4.18176 2.43039 3.69326 2.43039 3.09062C2.43039 2.4885 2.90525 2 3.49058 2C4.07639 2 4.55125 2.4885 4.55125 3.09062Z" />\n <path d="M5.1193 5.48047C4.81653 4.83116 4.17252 4.41571 3.47822 4.41571C2.78392 4.41571 2.13986 4.83116 1.83714 5.48047L1.04175 7.22034C0.940664 7.441 1.02893 7.70073 1.24393 7.81791C1.47077 7.90871 1.72324 7.81791 1.82433 7.59725L2.49349 6.15554L2.21587 11.4407C2.20305 11.7263 2.41805 11.9734 2.69567 11.9993C2.97329 12.0124 3.21344 11.7913 3.23859 11.5057L3.4028 8.285H3.567L3.73121 11.5057C3.74403 11.7913 3.97086 11.9993 4.23616 11.9993H4.26131C4.53893 11.9861 4.75343 11.7395 4.74111 11.4407L4.46349 6.15554L5.13265 7.59725C5.20858 7.75298 5.35997 7.85697 5.52418 7.85697C5.5873 7.85697 5.65042 7.84379 5.71354 7.81792C5.92804 7.71393 6.0163 7.44153 5.91572 7.22035L5.1193 5.48047Z" />\n <path d="M12.9582 7.22034L12.1505 5.48047C11.8477 4.83116 11.2037 4.41571 10.5094 4.41571C9.81513 4.41571 9.17107 4.83116 8.86836 5.48047L8.06064 7.22034C7.95955 7.441 8.04782 7.70073 8.26282 7.81791C8.47732 7.9219 8.7298 7.8311 8.84371 7.60993L9.52519 6.12977L9.46207 7.2204L8.57842 8.92184C8.47733 9.11663 8.61638 9.36316 8.83089 9.36316H9.33584L9.22242 11.4668C9.2096 11.7397 9.41177 11.9862 9.68939 11.9994C9.95469 12.0126 10.1943 11.8046 10.2072 11.519L10.3581 9.33723H10.6737L10.7871 11.5058C10.7999 11.7787 11.0144 11.9862 11.2792 11.9862H11.3043C11.5696 11.973 11.7841 11.7396 11.7713 11.4535L11.6579 9.33718H12.1628C12.3773 9.33718 12.5287 9.09066 12.4153 8.89586L11.5317 7.19442L11.4685 6.1038L12.1757 7.5972C12.2516 7.75293 12.403 7.85692 12.5672 7.85692C12.6303 7.85692 12.6934 7.84373 12.7566 7.81786C12.9711 7.70068 13.0593 7.44102 12.9582 7.22034Z" />\n <path d="M11.5696 3.09062C11.5696 3.69326 11.0948 4.18176 10.5094 4.18176C9.92363 4.18176 9.44876 3.69326 9.44876 3.09062C9.44876 2.4885 9.92363 2 10.5094 2C11.0948 2 11.5696 2.4885 11.5696 3.09062Z" />\n <path d="M6.99996 2.00006C6.76031 2.00006 6.57095 2.19485 6.57095 2.44138V11.5575C6.57095 11.804 6.76031 11.9988 6.99996 11.9988C7.2396 11.9988 7.42896 11.804 7.42896 11.5575V2.44138C7.42896 2.19485 7.2396 2.00006 6.99996 2.00006Z" />\n </svg>'],["point-of-interest-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n // Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>'],["flag-20x20",'<svg viewBox="0 0 20 20" stroke="none">\n <path\n d="M16.9987 4.27111C16.936 5.06715 16.3836 5.93162 15.5238 6.57845C14.7549 7.15682 13.0885 8.04927 10.5434 7.55174C8.32167 7.1164 6.82156 8.02129 6.08085 10.2416L8.24615 17.3998C8.31833 17.6471 8.17711 17.9059 7.9292 17.9813C7.88527 17.9938 7.83976 18 7.79426 18C7.58634 18 7.40277 17.8647 7.34236 17.6673L5.1644 10.4686C5.13773 10.4173 5.12125 10.3613 5.11419 10.3038L3.41956 4.70042C3.38112 4.63512 3.35994 4.56127 3.3568 4.48587L3.02101 3.37886C2.98413 3.25992 2.9959 3.13165 3.05553 3.02203C3.11437 2.91242 3.21479 2.83079 3.33482 2.79504C3.45564 2.75928 3.5851 2.7725 3.69494 2.83235C3.80477 2.89144 3.88637 2.99172 3.92167 3.11143L3.9813 3.31355C4.38847 2.85956 4.90472 2.51439 5.48136 2.30915C6.97201 1.75566 8.95216 1.95467 10.6469 2.83156C11.6888 3.36951 14.3374 4.54493 16.3647 3.79553C16.5154 3.74111 16.684 3.76599 16.8127 3.86239C16.9406 3.95879 17.0105 4.11251 16.9987 4.27111Z"\n stroke="none"\n />\n </svg>'],["link-16x16",'<svg viewBox="0 0 16 16" stroke="none">\n <path\n d="M9.10678 11.2433C9.07993 11.2167 9.04367 11.2018 9.00589 11.2018C8.9681 11.2018 8.93184 11.2167 8.90499 11.2433L6.82999 13.3183C5.86928 14.279 4.24785 14.3808 3.18714 13.3183C2.12464 12.2558 2.22642 10.6362 3.18714 9.67546L5.26214 7.60046C5.31749 7.5451 5.31749 7.45403 5.26214 7.39868L4.55142 6.68796C4.52457 6.66138 4.48832 6.64646 4.45053 6.64646C4.41274 6.64646 4.37649 6.66138 4.34964 6.68796L2.27464 8.76296C0.763923 10.2737 0.763923 12.7183 2.27464 14.2272C3.78535 15.7362 6.22999 15.738 7.73892 14.2272L9.81392 12.1522C9.86928 12.0969 9.86928 12.0058 9.81392 11.9505L9.10678 11.2433ZM13.7246 2.77903C12.2139 1.26832 9.76928 1.26832 8.26035 2.77903L6.18357 4.85403C6.15698 4.88088 6.14207 4.91714 6.14207 4.95493C6.14207 4.99271 6.15698 5.02897 6.18357 5.05582L6.89249 5.76475C6.94785 5.8201 7.03892 5.8201 7.09428 5.76475L9.16928 3.68975C10.13 2.72903 11.7514 2.62725 12.8121 3.68975C13.8746 4.75225 13.7729 6.37189 12.8121 7.3326L10.7371 9.4076C10.7106 9.43445 10.6956 9.47071 10.6956 9.5085C10.6956 9.54628 10.7106 9.58254 10.7371 9.60939L11.4479 10.3201C11.5032 10.3755 11.5943 10.3755 11.6496 10.3201L13.7246 8.2451C15.2336 6.73439 15.2336 4.28975 13.7246 2.77903ZM9.75142 6.00939C9.72457 5.9828 9.68832 5.96789 9.65053 5.96789C9.61275 5.96789 9.57649 5.9828 9.54964 6.00939L5.50499 10.0522C5.47841 10.0791 5.46349 10.1154 5.46349 10.1531C5.46349 10.1909 5.47841 10.2272 5.50499 10.254L6.21214 10.9612C6.26749 11.0165 6.35857 11.0165 6.41392 10.9612L10.4568 6.91832C10.5121 6.86296 10.5121 6.77189 10.4568 6.71653L9.75142 6.00939Z"\n stroke="none"\n />\n </svg>']]),GW=/<svg([^>]*)>/g;function I8(e,r,t){let n=zW.get(e);return n?n.replace(GW,'<svg$1 style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):""}var $W=e=>'\n <div class="pin-shadow" style="background: '.concat(e,'"></div>\n <svg width="').concat(20*.9,'px" height="').concat(48*.9,'px" viewBox="0 0 20 48">\n <path\n d="M1.37965 29.3246C1.5778 31.2167 2.27661 33.0694 3.83078 33.775C4.0998 37.1861 4.7451 40.2227 5.65918 42.4784C6.14556 43.6787 6.72883 44.71 7.41453 45.4578C8.10027 46.2056 8.97065 46.7527 9.99989 46.7527C11.0292 46.7527 11.8995 46.2055 12.585 45.4576C13.2706 44.7098 13.8536 43.6785 14.3398 42.4783C15.2536 40.2226 15.8988 37.186 16.1688 33.7752C17.7232 33.0697 18.422 31.2169 18.6201 29.3247C18.8386 27.2385 18.5165 24.6502 17.6475 22.0285L17.6473 22.0278C16.9657 19.9761 16.0319 18.1622 14.9848 16.7474C17.0884 15.1587 18.4471 12.5964 18.4471 9.7152C18.4471 4.93539 14.6967 1 9.99966 1C5.30272 1 1.54993 4.93527 1.54993 9.7152C1.54993 12.5961 2.90839 15.1583 5.01167 16.747C3.9635 18.1625 3.03185 19.977 2.3522 22.0286C1.48319 24.6503 1.16118 27.2385 1.37965 29.3246Z"\n fill="').concat(e,'"\n stroke="white"\n strokeWidth="2"\n />\n </svg>\n '),VW=e=>'\n <div class="pin-shadow" style="background: '.concat(e,'"></div>\n <svg width="36" height="42" viewBox="-2 -2 40 46">\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="none"\n stroke="white"\n strokeWidth="4"\n />\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="').concat(e,'"\n />\n </svg>\n '),$I="#722ED1",VI="#1890FF",E8=({type:e="departure",color:r=VI})=>'<div class="dropped-pin-wrapper">\n '.concat(e==="departure"?$W(r):VW(r),"\n </div>"),ZW=e=>{switch(e){case"default":return 28;case"selection":return 28;case"navigation":return 32}},C8=({type:e="stairs",color:r=$I,direction:t="up"})=>{let n=ZW("default"),o=n/2+2,i=t&&t!=="none";return'<div class="mappedin-connection-marker">\n <div class="connection-circle"\n role="button"\n style="background:'.concat(r,"; width:").concat(n,"px; height:").concat(n,'px;"\n >\n ').concat(I8("connection-"+e+"-16x16","white",o)||"","\n </div>\n ").concat(i?'<div style="margin-left: -'.concat(n*.2,'px;">\n <div class="bouncey">\n <div class="connection-circle"\n role="button"\n style="width: ').concat(n,"px; height: ").concat(n,'px;">\n <div class="').concat(t==="up"?"":"arrow--down",'">\n <svg viewBox="0 0 16 16" style="fill: white; width: ').concat(o,"px; height: ").concat(o,'px">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>'):"","\n </div>")};p();var S8=63710088e-1,tb=new WeakMap,D8=async e=>new Promise(r=>setTimeout(r,e));function rb(e,r,t){let n=e.distance,o=qW(e,r,t);return o?(n-(o==null?void 0:o.distance))/n:0}function ZI(e,r){if(e.coordinates.length===0)return[];if(tb.has(e)&&tb.get(e).has(r))return tb.get(e).get(r);let t=e.coordinates.map(n=>nb(n,r));return tb.set(e,new Map([[r,t]])),t}function nb(e,r){let t=r.latitude,n=r.longitude,o=e.latitude-t,i=e.longitude-n,a=Math.PI*S8/180,l=a*Math.cos(t*Math.PI/180),u=i*l,c=o*a;return{x:u,y:c}}function HW(e,r){if(e.length===0)return;let t,n=1/0;for(let o=0;o<e.length;o++){let i=e[o],a=ZI(i,r);for(let l=0;l<a.length-1;l++){let u=a[l],c=a[l+1],d=ob(u,c,{x:0,y:0}),m=Math.sqrt(d.x*d.x+d.y*d.y);m<n&&(n=m,t=d)}}if(t)return WW(t,r)}function ob(e,r,t){let n=r.x-e.x,o=r.y-e.y,i=t.x-e.x,a=t.y-e.y,l=n*n+o*o;if(l===0)return{x:e.x,y:e.y};let u=(i*n+a*o)/l,c=Math.max(0,Math.min(1,u));return{x:e.x+c*n,y:e.y+c*o}}function WW(e,r){let n=Math.PI*S8/180,o=n*Math.cos(r.latitude*Math.PI/180),i=e.y/n,a=e.x/o,l=r.latitude+i,u=r.longitude+a;return new De({latitude:l,longitude:u,floorId:r.floorId,verticalOffset:r.verticalOffset})}function qW(e,r,t){let n=HW([e],r);if(!n)return;let o=ZI(e,t),i=nb(n,t),a=-1,l=1/0;for(let c=0;c<o.length-1;c++){let d=o[c],m=o[c+1],h=ob(d,m,i),g=h.x-i.x,x=h.y-i.y,E=Math.sqrt(g*g+x*x);E<1&&E<l&&(l=E,a=c)}if(a===-1){let c=0,d=1/0;for(let m=0;m<o.length;m++){let h=o[m],g=h.x-i.x,x=h.y-i.y,E=Math.sqrt(g*g+x*x);E<d&&(d=E,c=m)}a=Math.max(0,c-1)}let u=[n];for(let c=a+1;c<e.coordinates.length;c++)u.push(e.coordinates[c]);return new nl("".concat(e.id,"_remaining"),u)}function ib(e,r,t,n){var m;let o,i,a=1/0,l=1/0,u=nb(r,n),c=nb(t,n);for(let h of e)for(let g of h.segments){if(g.isConnectionSegment)continue;let x=(m=g.coordinates[0])==null?void 0:m.floorId,E=x===r.floorId,v=x===t.floorId;if(!E&&!v)continue;let I=ZI(g,n);if(E){let C=1/0;for(let S=0;S<I.length-1;S++){let T=I[S],A=I[S+1],F=ob(T,A,u),P=F.x-u.x,O=F.y-u.y,_=Math.sqrt(P*P+O*O);_<C&&(C=_)}C<a&&(a=C,o=g)}if(v){let C=1/0;for(let S=0;S<I.length-1;S++){let T=I[S],A=I[S+1],F=ob(T,A,c),P=F.x-c.x,O=F.y-c.y,_=Math.sqrt(P*P+O*O);_<C&&(C=_)}C<l&&(l=C,i=g)}}if(!o||!i)return;let d=[];if(o.id===i.id)return d.push({segment:o,startHighlightFraction:rb(o,r,n),endHighlightFraction:rb(i,t,n)}),d;for(let h of e)for(let g of h.segments)g.id===o.id?d.push({segment:g,startHighlightFraction:rb(g,r,n),endHighlightFraction:1}):g.id===i.id?d.push({segment:g,startHighlightFraction:0,endHighlightFraction:rb(g,t,n)}):d.push({segment:g,startHighlightFraction:0,endHighlightFraction:1});return d}var T8=.01,w8=.02,KW={drawDuration:1e3,color:"#40A9FF",interactive:!1,accentColor:"blue",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},JW={drawDuration:1e3,color:"#B3DDFF",interactive:!1,accentColor:"#40A9FF",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},al={setMapOnConnectionClick:!0,setMapToDeparture:!0,createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:KW,inactivePathOptions:JW,markerOptions:{departureColor:VI,destinationColor:$I},animatePathDrawing:!0},tu,Ja,gt,yt,ru,_c,Dr,uo,gi,sl,Xe,M8,A8,HI,WI,qI,F8,KI,nh,ab,ym,JI,bm,oh=class{constructor(r){D(this,Xe);D(this,tu,new Map);D(this,Ja,new Map);D(this,gt);D(this,yt,al);D(this,ru);D(this,_c);D(this,Dr,[]);D(this,uo);D(this,gi,new Map);D(this,sl,new Map);D(this,bm,r=>{var t;if((t=s(this,yt).createMarkers)!=null&&t.connection&&r.markers!=null&&r.markers.length>0){let{instruction:n}=s(this,tu).get(r.markers[0].id);n!=null&&n.action.toFloor&&(s(this,yt).setMapOnConnectionClick&&s(this,gt).setFloor(n.action.toFloor.id,"navigation-connection-click"),s(this,gt).publish("navigation-connection-click",{instruction:n,fromFloor:n.action.fromFloor,toFloor:n.action.toFloor}))}});M(this,gt,r)}get isMultiFloor(){if(!s(this,Dr).length)return!1;let r=new Set;for(let t of s(this,Dr))for(let n of t.coordinates)if(n.floorId&&(r.add(n.floorId),r.size>1))return!0;return!1}getPathById(r){return s(this,gt).Paths.getById(r)}getMarkerById(r){return s(this,tu).get(r)}get paths(){let r=new Set;return s(this,Ja).forEach(t=>r.add(t)),Array.from(r)}get activeDirections(){return s(this,sl).get(s(this,uo))}get activePath(){if(s(this,uo))return s(this,Ja).get(s(this,uo).id)}get floorStacks(){let r=s(this,gt).getMapData();if(!s(this,Dr).length||!r)return[];let t=new Set;for(let n of s(this,Dr))for(let o of n.coordinates)if(o.floorId){let i=r.getById("floor",o.floorId);i&&t.add(i.floorStack)}return Array.from(t)}get floors(){let r=s(this,gt).getMapData();if(!s(this,Dr).length||!r)return[];let t=new Set;for(let n of s(this,Dr))for(let o of n.coordinates)if(o.floorId){let i=r.getById("floor",o.floorId);i&&t.add(i)}return Array.from(t)}setActivePathByIndex(r){let t=s(this,Dr)[r];if(!s(this,Dr).length){z.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,Dr)[r]){z.warn("Direction #".concat(r," does not exist"));return}let n=s(this,gi).get(t);if(!n){z.warn("The direction is not a part of muli-direcional path");return}Q(this,Xe,ab).call(this,n)}setActivePath(r){if(!s(this,Dr).length){z.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!s(this,sl).get(r)){z.warn('Path "'.concat(r.id,'" is not a part of muli-direcional path'));return}Q(this,Xe,ab).call(this,r)}setActivePathByDirections(r){if(!s(this,Dr).length){z.warn("[setActivePathByDirections] Cannot set an active path before drawing. Call Navigation.draw() first.");return}let t=s(this,gi).get(r);if(!t){let n=s(this,Dr).find(o=>o.id===r.id);if(!n){z.warn("[setActivePathByDirections] Cannot find directions for id");return}t=s(this,gi).get(n)}if(!t){z.warn("[setActivePathByDirections] Cannot find path for directions");return}Q(this,Xe,ab).call(this,t)}clearHighlightedPathSection(){for(let r of this.paths)for(let t of r.segments)s(this,gt).updateState(t,{highlightCompleteFraction:0})}highlightPathSection(r,t,n){var d;let o=(d=n==null?void 0:n.animationDuration)!=null?d:1500,i=s(this,gt).getMapData().mapCenter,a=ib(this.paths,r,t,i);if(!a)return;this.clearHighlightedPathSection();let l=a.map(m=>{var h,g;return s(this,gt).updateState(m.segment,{highlightStartFraction:m.startHighlightFraction,highlightEndFraction:m.endHighlightFraction,highlightColor:(h=n==null?void 0:n.color)!=null?h:"red",highlightWidthMultiplier:(g=n==null?void 0:n.widthMultiplier)!=null?g:1}),new Wi({fraction:0}).to({fraction:1},o).onUpdate(x=>{s(this,gt).updateState(m.segment,{highlightCompleteFraction:x.fraction})})}),u=()=>{},c=new Promise(m=>{u=m});return l.length>0&&(l.forEach((m,h)=>{h<l.length-1&&m.chain(l[h+1]),s(this,gt).tweenGroup().add(l[h])}),l[0].start(),l[l.length-1].onComplete(()=>{s(this,gt).tweenGroup().remove(l[l.length-1]),u()})),{animation:c}}drawSync(r,t={}){var l,u,c;s(this,_c)&&this.clear(),M(this,_c,!0),Q(this,Xe,KI).call(this,t);let n=Array.isArray(r)?r:[r],o=n[0],i=n[n.length-1],a=o.coordinates[0];M(this,Dr,n),a.floorId&&s(this,yt).setMapToDeparture&&s(this,gt).setFloor(a.floorId),(l=s(this,yt).createMarkers)!=null&&l.departure&&Q(this,Xe,ym).call(this,"departure",o.instructions[0]);for(let d=0;d<n.length;d++){let m=n[d],h=d?w({},s(this,yt).inactivePathOptions):w({},s(this,yt).pathOptions);if(m.coordinates.length<2){z.warn("Directions must have at least 2 coordinates");return}let g=Q(this,Xe,HI).call(this,m.coordinates,H(w({},h),{animateDrawing:s(this,yt).animatePathDrawing,verticalOffset:Q(this,Xe,qI).call(this,d===0?"active":"inactive")}));s(this,gi).set(m,g),s(this,sl).set(g,m),(u=s(this,yt).createMarkers)!=null&&u.connection&&Q(this,Xe,JI).call(this,m.instructions,"connection"),d===0&&(M(this,uo,s(this,gi).get(s(this,Dr)[0])),s(this,gt).externalPubSub.on("click",s(this,bm)))}(c=s(this,yt).createMarkers)!=null&&c.destination&&Q(this,Xe,ym).call(this,"destination",i.instructions[i.instructions.length-1]),s(this,gt).mapObjects.forEach(d=>{d.processFloorChange(d.currentFloorId)}),Q(this,Xe,nh).call(this)}async draw(r,t={}){s(this,ru)&&this.clear(),Q(this,Xe,KI).call(this,t);let n=Array.isArray(r)?r:[r],i=n[0].coordinates[0];return M(this,Dr,n),i.floorId&&s(this,yt).setMapToDeparture&&s(this,gt).setFloor(i.floorId),Q(this,Xe,F8).call(this,n)}clear(){s(this,tu).forEach(r=>{r!=null&&r.marker&&s(this,gt).currentMap.Markers.remove(r.marker.id.toString())}),s(this,tu).clear(),s(this,Ja).forEach(r=>{s(this,gt).currentMap.Paths.remove(r.segments.map(t=>t.id.toString()))}),s(this,Ja).clear(),s(this,ru)&&(s(this,ru).cancel(),M(this,ru,void 0)),s(this,_c)&&M(this,_c,!1),M(this,Dr,[]),s(this,gi).clear(),s(this,sl).clear(),M(this,uo,void 0),s(this,gt).externalPubSub.off("click",s(this,bm)),s(this,gt).mapObjects.forEach(r=>{r.processFloorChange(r.currentFloorId)}),Q(this,Xe,nh).call(this)}};tu=new WeakMap,Ja=new WeakMap,gt=new WeakMap,yt=new WeakMap,ru=new WeakMap,_c=new WeakMap,Dr=new WeakMap,uo=new WeakMap,gi=new WeakMap,sl=new WeakMap,Xe=new WeakSet,M8=function(r){return r!=null&&["TakeConnection","ExitConnection","TakeVortex","ExitVortex"].includes(r.type)},A8=function(){if(!s(this,uo))return;let r=s(this,Ja).get(s(this,uo).id);if(r){for(let t of s(this,Ja).values())if(t.id.includes("internal-"))if(t.id===s(this,uo).id)for(let n of r.segments)s(this,gt).updateState(n,{verticalOffset:w8});else s(this,gt).updateState(t,{verticalOffset:T8})}},HI=function(r,t){var a,l;let n=(l=(a=t.id)==null?void 0:a.toString())!=null?l:Bt(),o=s(this,gt).currentMap.Paths.add(r,t),i=new Qi(n,o.animation,r,o.paths);return s(this,Ja).set(n,i),i},WI=function(r,t,n=!1){let o=s(this,gt).currentMap.Markers.add(r.coordinate,t,{interactive:n,placement:"top",rank:"always-visible"}),i=s(this,gt).currentMap.Markers.getContentEl(o.id.toString());if(!i)throw new Error("marker component should exist");return new Ka(o.id.toString(),i,r.coordinate)},qI=function(r){var t,n,o,i;return r==="active"?w8+((n=(t=s(this,yt).pathOptions)==null?void 0:t.verticalOffset)!=null?n:0):T8+((i=(o=s(this,yt).inactivePathOptions)==null?void 0:o.verticalOffset)!=null?i:0)},F8=function(r){let t=r[0],n=r[r.length-1],o=!1;return M(this,ru,{promise:new Promise(async i=>{var a,l,u;if(y.env.NODE_ENV!=="test"&&await D8(500),o||!r.length){i();return}(a=s(this,yt).createMarkers)!=null&&a.departure&&Q(this,Xe,ym).call(this,"departure",t.instructions[0]);for(let c=0;c<r.length;c++){let d=r[c],m=c===0?w({},s(this,yt).pathOptions):w({},s(this,yt).inactivePathOptions);if(d.coordinates.length<2){z.warn("Directions must have at least 2 coordinates"),i();return}let h=Q(this,Xe,HI).call(this,d.coordinates,H(w({},m),{animateDrawing:s(this,yt).animatePathDrawing,verticalOffset:Q(this,Xe,qI).call(this,c===0?"active":"inactive")}));if(s(this,gi).set(d,h),s(this,sl).set(h,d),c===0&&(M(this,uo,s(this,gi).get(s(this,Dr)[0])),s(this,gt).externalPubSub.on("click",s(this,bm))),y.env.NODE_ENV!=="test"&&await h.animation,o){i();return}(l=s(this,yt).createMarkers)!=null&&l.connection&&Q(this,Xe,JI).call(this,d.instructions,"connection")}if((u=s(this,yt).createMarkers)!=null&&u.destination&&Q(this,Xe,ym).call(this,"destination",n.instructions[n.instructions.length-1]),o){i();return}s(this,gt).mapObjects.forEach(c=>{c.processFloorChange(c.currentFloorId)}),Q(this,Xe,nh).call(this),i()}),cancel:()=>{o=!0}}),s(this,ru).promise},KI=function(r){var t,n,o;M(this,yt,{setMapOnConnectionClick:(t=r.setMapOnConnectionClick)!=null?t:al.setMapOnConnectionClick,setMapToDeparture:(n=r.setMapToDeparture)!=null?n:al.setMapToDeparture,pathOptions:w(w({},al.pathOptions),r.pathOptions),inactivePathOptions:w(w({},al.inactivePathOptions),r.inactivePathOptions),createMarkers:w(w({},al.createMarkers),r.createMarkers),markerOptions:w(w({},al.markerOptions),r.markerOptions),animatePathDrawing:(o=r.animatePathDrawing)!=null?o:al.animatePathDrawing})},nh=function(){s(this,gt).publish("navigation-state-change",{isMultiFloor:this.isMultiFloor,floorStacks:this.floorStacks,floors:this.floors,activeDirections:this.activeDirections,activePath:this.activePath,paths:this.paths})},ab=function(r){M(this,uo,r),s(this,Dr).forEach(t=>{let n=s(this,gi).get(t);if(n){let o=n.id===s(this,uo).id?w({},s(this,yt).pathOptions):w({},s(this,yt).inactivePathOptions);s(this,gt).updateState(n,o)}}),s(this,gt).publish("navigation-active-path-change",{directions:this.activeDirections,path:this.activePath}),Q(this,Xe,A8).call(this),Q(this,Xe,nh).call(this)},ym=function(r,t){var n,o,i,a,l;if(r==="connection"&&t){let u=t.action.type==="ExitConnection"?s(this,yt).markerOptions.departureColor:s(this,yt).markerOptions.destinationColor,c;typeof((n=s(this,yt).createMarkers)==null?void 0:n.connection)=="function"?(c=s(this,yt).createMarkers.connection(t),s(this,gt).updateState(c,{interactive:!0})):c=Q(this,Xe,WI).call(this,t,C8({type:(i=(o=t.action.connection)==null?void 0:o.type)!=null?i:t.action.connectionType,color:u,direction:t.action.direction}),!0),s(this,tu).set(c.id,{instruction:t,marker:c})}else{let u=r==="departure"?s(this,yt).markerOptions.departureColor:s(this,yt).markerOptions.destinationColor,c;typeof((a=s(this,yt).createMarkers)==null?void 0:a.departure)=="function"&&r==="departure"?c=s(this,yt).createMarkers.departure(t):typeof((l=s(this,yt).createMarkers)==null?void 0:l.destination)=="function"&&r==="destination"?c=s(this,yt).createMarkers.destination(t):c=Q(this,Xe,WI).call(this,t,E8({type:r,color:u})),s(this,tu).set(c.id,{instruction:t,marker:c})}},JI=function(r,t){r.filter(o=>Q(this,Xe,M8).call(this,o.action)).forEach(o=>{Q(this,Xe,ym).call(this,t,o)})},bm=new WeakMap;p();var Oe,ah,nu,sb,YI,ih=class{constructor(r){D(this,nu);D(this,Oe);D(this,ah);f(this,"interactions",{set:r=>{(r==null?void 0:r.pan)!=null&&(s(this,Oe).getSystems().cameraSystem.enablePan=r.pan),(r==null?void 0:r.zoom)!=null&&(s(this,Oe).getSystems().cameraSystem.enableZoom=r.zoom),(r==null?void 0:r.bearingAndPitch)!=null&&(s(this,Oe).getSystems().cameraSystem.enableRotate=r.bearingAndPitch)},enable:()=>{s(this,Oe).getSystems().cameraSystem.enablePan=!0,s(this,Oe).getSystems().cameraSystem.enableZoom=!0,s(this,Oe).getSystems().cameraSystem.enableRotate=!0},disable:()=>{s(this,Oe).getSystems().cameraSystem.enablePan=!1,s(this,Oe).getSystems().cameraSystem.enableZoom=!1,s(this,Oe).getSystems().cameraSystem.enableRotate=!1}});f(this,"setMinPitch",r=>{s(this,Oe).camera.setMinPitch(r)});f(this,"setMaxPitch",r=>{s(this,Oe).camera.setMaxPitch(r)});f(this,"setMinZoomLevel",r=>{s(this,Oe).camera.setMinZoomLevel(r,!0)});f(this,"setMaxZoomLevel",r=>{s(this,Oe).camera.setMaxZoomLevel(r)});M(this,ah,r),M(this,Oe,r.core)}setScreenOffsets(r){s(this,Oe).camera.setInsetPadding(r)}get screenOffsets(){return s(this,Oe).camera.insetsPadding}get panMode(){return s(this,Oe).camera.panMode}setPanMode(r){if(r!=="default"&&r!=="elevation")throw new Error("Invalid pan mode");r!==this.panMode&&s(this,Oe).camera.setPanMode(r)}getFocusOnTransform(r,t){var o,i,a;let n=s(this,Oe).camera.getCameraFrameForCoordinates(Q(this,nu,YI).call(this,r),{pitch:t==null?void 0:t.pitch,bearing:t==null?void 0:t.bearing,padding:(t==null?void 0:t.screenOffsets)||this.screenOffsets,maxZoomLevel:t==null?void 0:t.maxZoomLevel,verticalPadding:(o=t==null?void 0:t.axisAlignedPadding)==null?void 0:o.vertical,minZoomLevel:t==null?void 0:t.minZoomLevel,duration:t==null?void 0:t.duration,easing:t==null?void 0:t.easing});return{center:new De(n.center[1],n.center[0]),zoomLevel:n.zoomLevel,bearing:(i=t==null?void 0:t.bearing)!=null?i:this.bearing,pitch:(a=t==null?void 0:t.pitch)!=null?a:this.pitch}}focusOn(r,t){var n;return s(this,Oe).camera.focusOn(Q(this,nu,YI).call(this,r),{pitch:t==null?void 0:t.pitch,bearing:t==null?void 0:t.bearing,padding:(t==null?void 0:t.screenOffsets)||this.screenOffsets,maxZoomLevel:t==null?void 0:t.maxZoomLevel,minZoomLevel:t==null?void 0:t.minZoomLevel,duration:t==null?void 0:t.duration,verticalPadding:(n=t==null?void 0:t.axisAlignedPadding)==null?void 0:n.vertical,easing:t==null?void 0:t.easing})}animateTo(r,t){var u;let{center:n,zoomLevel:o,bearing:i,pitch:a}=r,l=n!=null?n:this.center;return s(this,Oe).camera.animateTo({center:n!=null?[l.longitude,l.latitude,s(this,Oe).camera.elevation]:void 0,zoomLevel:o,bearing:i,pitch:a,duration:(u=t==null?void 0:t.duration)!=null?u:600,easing:t==null?void 0:t.easing})}set(r){let{center:t=this.center,zoomLevel:n=this.zoomLevel,bearing:o=this.bearing,pitch:i=this.pitch}=r,a=[t.longitude,t.latitude];s(this,Oe).camera.setCenter(a),s(this,Oe).camera.setZoomLevel(n),s(this,Oe).camera.setBearing(o),s(this,Oe).camera.setPitch(i)}get center(){let r=s(this,Oe).camera.center;return new De(r[1],r[0],void 0)}setAutoMinZoomLevel(r){s(this,Oe).camera.setAutoMinZoomLevel(r)}get autoMinZoomLevel(){return s(this,Oe).camera.autoMinZoomLevel}get zoomLevel(){return s(this,Oe).camera.zoomLevel}get pitch(){return s(this,Oe).camera.pitch}get minPitch(){return s(this,Oe).camera.minPitch}get maxPitch(){return s(this,Oe).camera.maxPitch}get bearing(){let r=s(this,Oe).camera.bearing;return(r<0?r+360:r)%360}get minZoomLevel(){return s(this,Oe).camera.minZoomLevel}get maxZoomLevel(){return s(this,Oe).camera.maxZoomLevel}setElevation(r){s(this,Oe).camera.setElevation(r)}get elevation(){return s(this,Oe).camera.elevation}animateElevation(r,t){return s(this,Oe).camera.animateElevation(r,t)}get bounds(){return E1(s(this,Oe).getSystems().cameraSystem.panBounds,s(this,Oe).convert3DMapPositionToCoordinate)}get isAnimating(){return s(this,Oe).camera.isAnimating}cancelAnimation(){s(this,Oe).camera.cancelAnimation()}updateFacadesInView(){s(this,Oe).getSystems().geometryInFocusSystem.raycast()}};Oe=new WeakMap,ah=new WeakMap,nu=new WeakSet,sb=function(r){var n,o,i,a,l,u;let t=s(this,Oe).camera.elevation;return De.is(r)&&r.floorId!=null?(o=(n=s(this,Oe).getState(r.floorId))==null?void 0:n.altitude)!=null?o:t:no.is(r)?(a=(i=s(this,Oe).getState(r.id))==null?void 0:i.altitude)!=null?a:t:"floor"in r&&no.is(r.floor)&&(u=(l=s(this,Oe).getState(r.floor.id))==null?void 0:l.altitude)!=null?u:t},YI=function(r){var i;let t=[],o=(Array.isArray(r)?r:[r]).flatMap(a=>{var l;return(l=a==null?void 0:a.focusTarget)!=null?l:[a]});for(let a of o)if(a!=null)if(De.is(a)){let l=Q(this,nu,sb).call(this,a);t.push([a.longitude,a.latitude,l])}else if((a==null?void 0:a.id)!=null){let l=Q(this,nu,sb).call(this,a);if(no.is(a)&&((i=s(this,ah).getMapDataInternal())!=null&&i.enterpriseMode)){t.push(a.id);continue}else if("geoJSON"in a&&a.geoJSON.geometry.coordinates.length>0){RE(a.geoJSON,c=>{t.push([c[0],c[1],l])});continue}let u=s(this,Oe).getBoundingArea(a.id);if(u)t.push(...u.map(c=>[c[0],c[1],l]));else if("geoJSONBoundingBox"in a){let c=Q(this,nu,sb).call(this,a);if(a.geoJSONBoundingBox!=null){let d=[[a.geoJSONBoundingBox[0],a.geoJSONBoundingBox[1],c],[a.geoJSONBoundingBox[2],a.geoJSONBoundingBox[3],c]];t.push(...d)}}}else y2(a)&&t.push(a);return t};p();var vm,sh=class{constructor({currentMapGetter:r}){D(this,vm);M(this,vm,r)}get currentMap(){return s(this,vm).call(this)}async getCurrentSceneGLTF(r){let t=s(this,vm).call(this);return t?t==null?void 0:t.Exporter.getCurrentSceneGLTF(r):(z.error("There is no map to export. Please load a map first."),new Blob)}};vm=new WeakMap;p();var ea,lh,uh=class{constructor({currentMapGetter:r}){D(this,ea,new Map);D(this,lh);M(this,lh,r)}get currentMap(){return s(this,lh).call(this)}getAll(){return Array.from(s(this,ea).values()).map(r=>r.label)}getById(r){return s(this,ea).get(r)}add(r,t,n){let o=r.anchorTarget,i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Labels.add(o,t,H(w({},n),{attachTo:Lp(r),rank:(n==null?void 0:n.rank)==null||(n==null?void 0:n.rank)==="initial"?"medium":n.rank})),l=new Qs(a.id.toString(),t,r);return s(this,ea).set(l.id,{label:l,entityId:l.id}),l}__EXPERIMENTAL__all(r){var n;let t=[];return(n=this.currentMap)==null||n.Labels.all({onCreate:(o,i,a)=>{let l=new Qs(o.toString(),i,a);s(this,ea).set(l.id,{label:l,entityId:l.id}),t.push(l)},labelOptions:r}),t}remove(r){var n;let t=s(this,ea).get(r.id);t&&((n=this.currentMap)==null||n.Labels.remove(t),s(this,ea).delete(r.id.toString()))}removeAll(){let r=[];return s(this,ea).forEach(({label:t})=>{this.remove(t),r.push(t),s(this,ea).delete(t.id.toString())}),r}};ea=new WeakMap,lh=new WeakMap;p();p();var YW={color:"#ffffff",opacity:1},ub={altitude:0,height:1,color:"#ffffff",opacity:1,width:.15},P8={opacity:.25,color:"#a7d1ec",height:.8,width:.05,altitude:.1,cap:"square",visible:!1},O8={color:"red",opacity:.2,height:ub.height+.1,visible:!0,borderVisible:!1},k8=.5,ta=class{constructor(r,t,n=new Map){f(this,"containerId");f(this,"layers");f(this,"renderer");this.containerId=t,this.layers=n,this.renderer=r}get visible(){return this.renderer.getState(this.containerId).visible}setVisible(r){this.renderer.setState(this.containerId,{visible:r})}},B8=0,Lc,ch=class{constructor(r,t,n,o,i,a,l,u){f(this,"id");f(this,"name");f(this,"elevation");f(this,"maxHeight");f(this,"containerId");f(this,"externalId");f(this,"metadata");f(this,"shortName");f(this,"subtitle");f(this,"occluderId");f(this,"loaded",!1);f(this,"styleMap",{});f(this,"obstructions");f(this,"entrances");f(this,"spaces");f(this,"floorImages");f(this,"floorText");f(this,"areas");f(this,"renderer");f(this,"mapObject");f(this,"options");f(this,"layers",new Map);f(this,"footprint");f(this,"floorStackId");f(this,"multiFloorView");f(this,"mapDataInternal");f(this,"facadesByStyleId",new Map);D(this,Lc);f(this,"load",()=>{var a,l,u,c,d,m,h,g,x,E,v,I,C,S,T,A,F,P,O,_,G,L,q;if(this.loaded)return this;((a=this.footprint)==null?void 0:a.geometry)==null&&((l=this.obstructions)==null?void 0:l.features.length)===0&&((u=this.spaces)==null?void 0:u.features.length)===0&&z.warn("Floor ".concat(this.id," exists in the data but contains no geometry.")),this.loaded=!0;let r=this.renderer.addGroupContainer("".concat(za,"-").concat(this.id),{},this.id);this.layers.set(za,new ta(this.renderer,r.id.toString()));let t=this.renderer.addGroupContainer("".concat(Gi,"-").concat(this.id),{},this.id);this.layers.set(Gi,new ta(this.renderer,t.id.toString()));let n=this.renderer.addGroupContainer("".concat(yr,"-").concat(this.id),{},this.id);this.layers.set(yr,new ta(this.renderer,n.id.toString()));let o=this.renderer.addGroupContainer("".concat(Ga,"-").concat(this.id),{},this.id);this.layers.set(Ga,new ta(this.renderer,o.id.toString()));let i=this.mapObject.getFloorStackAltitudeData(this.floorStackId);if(((c=this.footprint)==null?void 0:c.geometry)!=null&&((d=this.footprint)==null?void 0:d.geometry.coordinates.length)!==0){let $=ub;if(this.obstructions!=null&&this.obstructions.features.length>0){let X=this.obstructions.features.filter(V=>{var Y;return V.geometry.type==="LineString"&&((Y=V.properties.kind)==null?void 0:Y.toLowerCase())==="wall"&&V.properties.footprintComponent===!0});X!=null&&X.length>0&&($=this.styleMap[(m=X[0].properties)==null?void 0:m.id])}let K=this.renderer.addGeometryGroup("Footprint-".concat(this.id),{features:[{geometry:this.footprint.geometry,properties:{id:"Footprint-Floor-".concat(this.id)}}]},H(w({},$),{height:(x=(h=i.get(this.elevation))==null?void 0:h.effectiveHeight)!=null?x:Us((g=this.multiFloorView)==null?void 0:g.floorGap,this.maxHeight),altitude:0,outline:(v=(E=this.options.style)==null?void 0:E.outlines)!=null?v:!0,visible:!1,opacity:this.elevation<0?1:.4,side:this.elevation<0?"back":"front",color:this.elevation<0?"#F0EEE8":$.color,renderOrder:2}),this.id);this.layers.set(bp,new ta(this.renderer,K.id.toString()))}if(this.spaces!=null&&this.spaces.features.length>0){let $=[],K=new Map;this.spaces.features.filter(Y=>{var ee;return Y.geometry.type==="Polygon"&&((ee=Y.properties.kind)==null?void 0:ee.toLowerCase())!=="void"}).forEach(Y=>{var oe;let ee=(oe=this.mapDataInternal)==null?void 0:oe.facadesBySpaceId[Y.properties.id];if(ee){let le=K.get(ee.id)||[];K.set(ee.id,[...le,Y])}else $.push(Y)});let X=this.renderer.addGroupContainer("spaces-".concat(this.id),{},n),V=this.renderer.addGeometryGroup("Spaces-".concat(this.id,"-0"),{features:$},Y=>{var ee;return((ee=Y==null?void 0:Y.properties)==null?void 0:ee.id)!=null&&this.styleMap[Y.properties.id]!=null?_p(this.styleMap[Y.properties.id],this.options):YW},X);if(this.layers.get(yr).layers.set("Spaces",V.id.toString()),K.size>0){let Y=this.renderer.addGroupContainer("".concat(Yl,"-").concat(this.id),{},this.id);this.layers.set(Yl,new ta(this.renderer,Y.id.toString()));for(let[ee,oe]of K){let le=this.renderer.addGroupContainer(ee,{focusable:!0},Y),ve=this.renderer.addGroupContainer("".concat(ee,"-geometry"),{},le),he=z2(oe,this.styleMap),de=0;for(let[Fe,ce]of he){let Pe=this.renderer.addGeometryGroup("Facades-".concat(this.id,"-").concat(ee,"-").concat(de),{features:ce},H(w({},_p(Fe,this.options)),{renderOrder:3}),ve);de++;let He=Fe.id||Pe.id.toString();this.layers.get(Yl).layers.set("".concat(ee,"-").concat(He),Pe.id.toString()),this.facadesByStyleId.has(He)?(I=this.facadesByStyleId.get(He))==null||I.push(ee):this.facadesByStyleId.set(He,[ee])}}}}if(this.obstructions!=null&&this.obstructions.features.length>0){let $=this.obstructions.features.filter(he=>he.geometry.type==="Polygon"&&(he.properties.kind==="object"||he.properties.kind==="unknown")),K=z2($,this.styleMap),X=this.renderer.addGroupContainer("objects-".concat(this.id),{},n),V=0;for(let[he,de]of K){let Fe=this.renderer.addGeometryGroup("Objects-".concat(this.id,"-").concat(V),{features:de},_p(he,this.options),X);V++;let ce=X.id.toString();this.layers.get(yr).layers.set(he.id||ce,Fe.id.toString())}let Y=this.obstructions.features.filter(he=>{var de;return he.geometry.type==="LineString"&&((de=he.properties.kind)==null?void 0:de.toLowerCase())==="wall"&&he.properties.footprintComponent===!1}),ee=this.obstructions.features.filter(he=>{var de;return he.geometry.type==="LineString"&&((de=he.properties.kind)==null?void 0:de.toLowerCase())==="wall"&&he.properties.footprintComponent===!0}),oe=this.entrances,le=ub,ve=ub;if(Y!=null&&Y.length>0){let he=this.styleMap[(C=Y[0].properties)==null?void 0:C.id];he!=null&&(le=w({},he)),ve=le;let{walls:de,entrances:Fe}=U2(Y,(oe==null?void 0:oe.features)||[]),ce=Math.max(le.height-.11,k8),Pe=H(w({},P8),{height:ce}),He=this.renderer.addGeometryGroup("InteriorDoors-".concat(this.id),Fe,Pe,n);this.layers.get(yr).layers.set(gp,He.id.toString());let bt=this.renderer.addGeometryGroup("Walls-".concat(this.id),{features:[de]},_p(le,this.options),n);this.layers.get(yr).layers.set(ju,bt.id.toString())}if(ee!=null&&ee.length>0){let he=this.styleMap[(S=ee[0].properties)==null?void 0:S.id];he!=null&&(ve=H(w({},he),{id:Ua}));let{walls:de,entrances:Fe}=U2(ee,(oe==null?void 0:oe.features)||[]),ce=Math.max(ve.height-.11,k8),Pe=H(w({},P8),{height:ce}),He=this.renderer.addGeometryGroup("ExteriorDoors-".concat(this.id),Fe,Pe,n);this.layers.get(yr).layers.set(yp,He.id.toString());let bt=this.renderer.addGeometryGroup("ExteriorWalls-".concat(this.id),{features:[de]},_p(ve,this.options),n);this.layers.get(yr).layers.set(Ua,bt.id.toString())}}if(this.floorImages!=null){let $=this.renderer.addGroupContainer("images-".concat(this.id),{},this.id);for(let K of this.floorImages.features||[])if(!("anchorId"in K.properties||"anchorId"in K.properties&&((T=K.properties)==null?void 0:T.anchorId)==null)){let X=pA(K,B8);this.mapObject.api.Image3D.add(new De({latitude:K.geometry.coordinates[1],longitude:K.geometry.coordinates[0],floorId:this.id}),K.properties.path,w({id:X,flipImageToFaceCamera:(A=this.options.flipImagesToFaceCamera)!=null?A:!0},K.properties)),B8++}this.layers.set(vp,new ta(this.renderer,$.id.toString()))}if(this.floorText!=null)for(let $ of this.floorText.features||[]){let K=0;"geometryId"in $.properties?K=(P=(F=this.renderer.getState($.properties.geometryId))==null?void 0:F.height)!=null?P:0:K=(O=$.properties.verticalOffset)!=null?O:0,this.renderer.addText3D(Bt(),H(w({},$),{properties:H(w({},$.properties),{verticalOffset:K})}),{},this.id)}if(this.areas!=null){let $=this.renderer.addGroupContainer("areas-".concat(this.id),{},this.id);this.layers.set(Jl,new ta(this.renderer,$.id.toString()));let K=this.renderer.addGeometryGroup("Areas-".concat(this.id),{features:this.areas.features},{color:O8.color},$);for(let X of this.areas.features||[])this.renderer.setState(X.properties.id,H(w({},O8),{visible:!1}));this.layers.get(Jl).layers.set(K.id.toString(),K.id.toString())}return(_=this.multiFloorView)!=null&&_.enabled&&this.renderer.setState(this.id,{altitude:(q=(G=i.get(this.elevation))==null?void 0:G.altitude)!=null?q:this.elevation*Us((L=this.multiFloorView)==null?void 0:L.floorGap,this.maxHeight)}),this.renderer.render(),this});var d,m,h,g,x,E;this.mapObject=n,this.renderer=n.renderer,this.id=t.id,this.options=i;let c=this.renderer.addGroupContainer(this.id,{visible:!1,interactive:!0,preloadGeometry:(d=i.preloadFloors)==null?void 0:d.map(v=>v.id).includes(t.id)},r);this.containerId=c.id.toString(),this.externalId=t.externalId,this.metadata=t.metadata,this.shortName=t.shortName,this.subtitle=t.subtitle,this.name=t.name,this.maxHeight=t.maxHeight,this.elevation=t.elevation,a!=null&&l!=null&&(this.styleMap=l,this.spaces=a.space[this.id],this.entrances=a.entrance[this.id],this.areas=(m=a.area)==null?void 0:m[this.id],this.obstructions=a.obstruction[this.id],this.floorImages=(h=a.floorImages)==null?void 0:h[this.id],this.floorText=(x=(g=a.enterprise)==null?void 0:g.floorText)==null?void 0:x[this.id],this.footprint=(E=a["floor.geojson"])==null?void 0:E.features.find(v=>v.properties.id===t.id)),this.floorStackId=r,this.multiFloorView=o,this.mapDataInternal=u}get geoJSONBoundingBox(){if(s(this,Lc))return s(this,Lc);if(!this.footprint){z.warn("Attempting to get bounding box with no footprint for floor ".concat(this.id));return}return M(this,Lc,I1(this.footprint)),s(this,Lc)}addOccluder(){var n;if(((n=this.footprint)==null?void 0:n.geometry)==null)return;let r=this.renderer.addGroupContainer("".concat(Kl,"-").concat(this.id),{},this.id),t=new ta(this.renderer,r.id.toString());this.layers.set(Kl,t),this.occluderId=this.renderer.addOccluder(this.footprint,t.containerId)}get hasFacadeGeometry(){return this.facadesByStyleId.size>0}get visible(){return this.renderer.getState(this.containerId).visible}setVisible(r){this.renderer.setState(this.containerId,{visible:r})}};Lc=new WeakMap;p();var xm,dh=class{constructor(r,t,n,o){f(this,"id");f(this,"externalId");f(this,"name");f(this,"type");f(this,"floorIds");f(this,"defaultFloorId");f(this,"floorObjects",[]);f(this,"floorObjectsByElevation",new Map);f(this,"metadata");f(this,"containerId");f(this,"facade");f(this,"renderer");D(this,xm);var a;this.id=r.id,this.externalId=r.externalId,this.name=r.name,this.type=r.type,this.metadata=r.metadata,this.floorIds=(a=r.floors)!=null?a:r.maps,this.defaultFloorId=r.defaultFloor,this.renderer=n;let i=n.addGroupContainer(this.id,{visible:!0,interactive:!0},t);this.containerId=i.id.toString(),this.facade=o}get defaultFloor(){if(s(this,xm)==null){if(this.floorObjects.length===0)throw new Vr("No floors in floor stack (".concat(this.id,"). Could not get default floor."));let r;this.defaultFloorId&&(r=this.floorObjects.find(t=>t.id===this.defaultFloorId)),r||(r=this.floorObjects.reduce((t,n)=>Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)),M(this,xm,r)}return s(this,xm)}get isOutdoors(){var t;return((t=this.type)==null?void 0:t.toLowerCase())==="outdoor"?!0:this.facade!=null?!1:this.floorObjects.some(n=>n.hasFacadeGeometry)}addFloor(r){if(this.floorObjectsByElevation.has(r.elevation)){z.error("Floor with same elevation ".concat(r.elevation," already exists in Stack (").concat(this.id,"). Floor (").concat(r.id,") will not be added."));return}this.floorObjects.push(r),this.floorObjectsByElevation.set(r.elevation,r),this.facade&&this.renderer.setState(r.containerId,{focusable:!0})}loadAllFloors(){for(let r of this.floorObjects)r.load(),!this.isOutdoors&&!r.hasFacadeGeometry&&r.footprint!=null&&r.addOccluder()}};xm=new WeakMap;p();function XI(e,r,t="auto",n,o=new Map){var c,d;let i={outdoorOpacity:1,floorStates:[]},a=e.sort((m,h)=>m.elevation-h.elevation),l=e.some(m=>m.elevation===0),u=!0;for(let m of a){let h=(d=(c=o.get(m.elevation))==null?void 0:c.effectiveHeight)!=null?d:Us(t,m.maxHeight),g={floor:m,state:{type:"floor",visible:!1,geometry:{visible:!1},labels:{enabled:!1},markers:{enabled:!1},footprint:{visible:!1},occlusion:{enabled:!1},areas:{visible:!1}}};i.floorStates.push(g),m.id===r.id?(g.state.visible=!0,g.state.geometry.visible=!0,g.state.labels.enabled=!0,g.state.markers.enabled=!0,g.state.occlusion.enabled=!0,g.state.areas.visible=!0,m.elevation<0&&(g.state.footprint.height=h,g.state.footprint.visible=!0,i.outdoorOpacity=.2)):n.includes(m.id)&&m.elevation<r.elevation?(g.state.visible=!0,g.state.geometry.visible=!0,g.state.markers.enabled=!0,g.state.occlusion.enabled=!0,g.state.footprint.visible=!0,g.state.footprint.height=h,m.elevation<0&&(i.outdoorOpacity=.2)):r.elevation>0&&m.elevation<r.elevation&&m.elevation>=0&&(g.state.visible=!0,g.state.footprint.visible=!0,g.state.footprint.height=h),!l&&m.elevation>0&&u&&r.elevation===m.elevation&&(u=!1,g.state.footprint.visible=!1)}return i}var ra,ph=class extends Ge{constructor(t,n,o,i){var c,d,m,h;super();f(this,"floorStacksById",new Map);f(this,"floorsById",new Map);f(this,"startingFloorId","");f(this,"currentFloorId","");f(this,"currentFloorStackId","");f(this,"outdoorFloorStacks",new Set);f(this,"id");f(this,"renderer");f(this,"api");f(this,"mvf");f(this,"options",{});f(this,"styleMap");f(this,"animations",new Map);f(this,"floorStackAltitudeMap",new Map);f(this,"Models",{add:(t,n,o)=>{let m=o,{floorId:i,scale:a}=m,l=tn(m,["floorId","scale"]),u=i?this.floorsById.get(i):void 0,c=w({},l);a!=null&&(c.scale=Array.isArray(o.scale)?o.scale:[o.scale,o.scale,o.scale]);let d=this.renderer.addModelGroup(t,{type:"FeatureCollection",features:n.map(h=>({type:"Feature",properties:{id:Bt(),rotation:o.rotation,scale:c.scale,interactive:o.interactive},geometry:{type:"Point",coordinates:ui(h)}}))},c,{parent:u==null?void 0:u.id});if(d==null)throw new Vr("error creating model");return this.renderer.getState(d).children},remove:(t,n)=>{this.renderer.remove(t),this.renderer.getState(n).children.length===0&&this.renderer.remove(n)}});f(this,"Image3D",{add:(t,n,o)=>{var m;let d=o,{floorId:i,flipImageToFaceCamera:a}=d,l=tn(d,["floorId","flipImageToFaceCamera"]),u=i?this.floorsById.get(i):this.currentFloor,c={type:"Feature",properties:l,geometry:{type:"Point",coordinates:t}};return this.renderer.addImage((m=o.id)!=null?m:Bt(),c,{url:n,flipImageToFaceCamera:a!=null?a:!1},u.id)},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}});f(this,"Markers",{add:(t,n,o)=>{let i=e0(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),m=o,{attachTo:a}=m,l=tn(m,["attachTo"]),u=l;l.rank==="initial"&&(u.rank="medium");let c=i.layers.get(Gi),d=this.renderer.addMarker2D(ui(t),n,H(w({},u),{occluderId:i==null?void 0:i.occluderId,attachTo:a}),c==null?void 0:c.containerId);if(!d)throw new Vr("Failed to create Marker");return d},remove:t=>{this.renderer.remove(t)},getContentEl:t=>{let n=this.renderer.getState(t);if((n==null?void 0:n.type)==="marker")return n.element},removeAll:()=>{},setPosition:(t,n,o)=>{var l;let i=this.renderer.getState(t),a=o?this.floorsById.get(o):this.currentFloor;if(!i){z.error('Failed to retrieve state for Marker with id "'.concat(t,'".'));return}if(i.type!=="marker"){z.error('Geometry with id "'.concat(t,'" is not of type "marker".'));return}this.renderer.setState(i,{position:n,parent:(l=a==null?void 0:a.layers.get(Gi))==null?void 0:l.containerId})},animateTo:(t,n,o,i)=>{let a=this.renderer.getState(t),l=o?this.floorsById.get(o):this.currentFloor;if(!a)return z.error('Failed to retrieve state for Marker with id "'.concat(t,'".')),Promise.resolve();if(a.type!=="marker")return z.error('Geometry with id "'.concat(t,'" is not of type "marker".')),Promise.resolve();let u=w({duration:1e3,easing:"ease-in-out"},i);this.cancelAnimation(t);let c=new Wi({lon:a.position[0],lat:a.position[1]}).to({lon:n[0],lat:n[1]},u.duration).easing(Ha[u.easing]).onUpdate(({lon:d,lat:m})=>{var g;if(!this.renderer.getState(t))this.cancelAnimation(t);else{let x=(g=l==null?void 0:l.layers.get(Gi))==null?void 0:g.containerId;x&&this.Markers.setPosition(t,[d,m],x)}}).start();return this.renderer.getInternalTweenGroup().add(c),this.renderer.render(),this.animations.set(t,c),G2(c).then(()=>{this.animations.delete(t)})}});f(this,"Exporter",{getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)});f(this,"Shapes",{add:(t,n,o)=>{let i=o!=null&&o.floorId?this.floorsById.get(o==null?void 0:o.floorId):this.currentFloor,a="shape-"+Bt();return this.renderer.addGeometryGroup(a,t,n,i.id),a},remove:t=>(this.renderer.remove(t.id),t.id)});f(this,"Text3D",{label:(t,n,o)=>{var a;if(!((a=this.api.getMapDataInternal())!=null&&a.enterpriseMode)){z.warn("Enterprise mode is not enabled, skipping label creation");return}let i=_8(this.renderer,t,n,o);if(i)return{textInfo:i,target:t}},labelAll:(t={})=>{var i;if(!((i=this.api.getMapDataInternal())!=null&&i.enterpriseMode))return z.warn("Enterprise mode is not enabled, skipping label creation"),[];let n=this.api.getMapData();if(!n)return[];let o=[];return n.getByType("space").forEach(a=>{var l,u;if(a.locations[0]){let c=_8(this.renderer,a,(u=(l=a.locations[0])==null?void 0:l.name)!=null?u:a.name,t);c&&o.push({textInfo:c,target:a})}}),o},remove:t=>{var n;if(!((n=this.api.getMapDataInternal())!=null&&n.enterpriseMode)){z.warn("Remove text label only works in enterprise mode");return}return this.renderer.remove(t),t}});f(this,"Labels",{all:({onCreate:t,labelOptions:n={}})=>{for(let o of Object.entries(this.mvf.space)){let[i,a]=o;a&&a.features.forEach(l=>{var E,v,I,C;let u=(E=this.api.getMapData())==null?void 0:E.getById("space",l.properties.id);if(!u)return;let c=(v=this.styleMap[l.properties.id])==null?void 0:v.showImage,d=(I=l.properties.details)==null?void 0:I.images,m=c&&((C=d==null?void 0:d[0])!=null&&C.url)?{icon:d[0].url}:{},h=w({icon:m.icon},n.appearance),x=(i?this.floorsById.get(i):this.currentFloor).layers.get(za);if(l.properties.center&&u.name!==""){let S=this.renderer.addLabel2D(l.properties.center,u.name,H(w({id:l.properties.id+"-label"},n),{appearance:h,rank:n.rank,attachTo:Lp(u)}),gr.is(u)?u.id:x==null?void 0:x.containerId);S&&t(S.id,u.name,u)}})}},add:(t,n,o={})=>{let d=o,{attachTo:i}=d,a=tn(d,["attachTo"]),l=e0(t,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),u=l.layers.get(za),c=this.renderer.addLabel2D(ui(t),n,H(w({},a),{occluderId:l.occluderId,attachTo:i}),u==null?void 0:u.containerId);if(!c)throw new Vr("label creating failed");return c},remove:({entityId:t})=>{this.renderer.remove(t)},removeAll:()=>{}});f(this,"Paths",{add:(t,n)=>{var c;let o=(c=n==null?void 0:n.animateDrawing)!=null?c:!0,i=[],a=t[0].floorId||"root",l=0;for(let d of t){let{floorId:m="root",latitude:h,longitude:g}=d;m!==a&&(l++,a=m),i[l]==null&&i.push({floorId:m,coordinates:[]});let x=m===d.floorId?d:new De({longitude:g,latitude:h,floorId:m});i[l].coordinates.push(x)}let u=i.reduce((d,{floorId:m,coordinates:h},g)=>{var v,I;if(g!==0){let C=i[g-1],S=C.coordinates[C.coordinates.length-1],T=h[0],A=ui(S),F=ui(T),P=this.renderer.addPath({type:"FeatureCollection",features:[{type:"Feature",properties:{parentId:C.floorId},geometry:{type:"Point",coordinates:A}},{type:"Feature",properties:{parentId:m},geometry:{type:"Point",coordinates:F}}]},n,this.id);P&&(o&&this.renderer.setState(P.id,{completeFraction:0}),d.push(H(w({},P),{coordinates:[S,T]})))}if(h.length<2)return d;let x=(I=(v=this.floorsById.get(m))==null?void 0:v.layers.get(Ga))==null?void 0:I.containerId,E=this.renderer.addPath({type:"FeatureCollection",features:h.map(C=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:ui(C)}}))},n,x!=null?x:m);return E&&(o&&this.renderer.setState(E.id,{completeFraction:0}),d.push(H(w({},E),{coordinates:h}))),d},[]);if(o){let d=[],m=this.api.getMapData();return u.forEach(h=>{var x;let g=dA(h,m,this.api);d.push(new Wi({fraction:0}).to({fraction:1},g?(x=n==null?void 0:n.drawDuration)!=null?x:1500:0).onUpdate(E=>{this.renderer.setState(h.id,{completeFraction:E.fraction})}))}),d.forEach((h,g)=>{g<d.length-1&&h.chain(d[g+1]),this.renderer.getInternalTweenGroup().add(h)}),d[0].start(),this.renderer.render(),this.animations.set(u[0].id.toString(),d[0]),{paths:u,animation:G2(d[d.length-1]).then(()=>{this.animations.delete(u[0].id.toString())})}}else return{paths:u,animation:Promise.resolve()}},remove:t=>{t.forEach(n=>{this.cancelAnimation(n),this.renderer.remove(n)})}});D(this,ra,{enabled:!1,floorGap:"auto",updateCameraElevationOnFloorChange:!0});this.renderer=i.core,this.api=i,this.id=t,this.renderer.addGroupContainer(t,{},"root"),this.options=o!=null?o:{},this.mvf=(c=n==null?void 0:n.mvf)!=null?c:{};let a=uA(this.mvf["styles.json"]||{});if(this.styleMap=a,M(this,ra,w({enabled:!1,floorGap:"auto",updateCameraElevationOnFloorChange:!0},o==null?void 0:o.multiFloorView)),!n){this.id!=="outdoors-container"&&z.warn("Map (".concat(this.id,") created with no data."));let g=new dh({id:"default-stack",externalId:"default-stack",name:"Default Stack",maps:["default-floor"]},this.id,this.renderer);this.floorStacksById.set(g.id,g),this.currentFloorStackId=g.id;let x=new ch(g.id,{id:"default-floor",externalId:"default-floor",name:"Default Floor",elevation:0},this,s(this,ra),o!=null?o:{});this.floorsById.set(x.id,x),g.addFloor(x),this.setFloor(x.id);return}let l=n.getMVFFeatureByType("floor-stack");if(l==null||l.length===0)throw new Vr("MVF does not contain any Floor Stacks.");for(let g of l){let x=new dh(g,this.id,this.renderer,(d=this.mvf.facade)==null?void 0:d[g.id]);for(let E of x.floorIds){let v=n.getMVFFeatureById("floor",E);if(v!=null){let I=new ch(x.id,v,this,s(this,ra),o!=null?o:{},this.mvf,a,n);this.floorsById.set(I.id,I),x.addFloor(I)}}if(x.floorObjects.length<1){z.warn("Floor stack ".concat(g.id," has no floors. It will not be loaded."));continue}this.floorStacksById.set(g.id,x),this.currentFloorStackId||(this.currentFloorStackId=g.id),this.floorStackAltitudeMap.set(g.id,mA(x.floorObjects,s(this,ra).floorGap))}for(let[g]of Object.entries(n.facadesBySpaceId)){let x=n.getById("space",g);x&&(this.outdoorFloorStacks.add(x.floor.floorStack.id),(m=this.floorsById.get(x.floor.id))==null||m.setVisible(!0))}let u=(h=this.mvf.enterprise)==null?void 0:h.venue.defaultMap;if(o!=null&&o.initialFloor){let g=Vf(o.initialFloor);g&&this.floorsById.has(g)?u=g:z.error("Invalid initial floor specified (".concat(o.initialFloor,"), using default behavior instead"))}u||(u=this.currentFloorStack.defaultFloor.id),this.startingFloorId=u}get currentFloorStack(){let t=this.floorStacksById.get(this.currentFloorStackId);if(!t)throw new Vr('Current floor stack with id "'.concat(this.currentFloorStackId,'" not found'));return t}setFloorStack(t,n){if(this.currentFloorStackId===t)return;let o=this.floorStacksById.get(t);if(o==null){z.error("Invalid floor stack passed to setFloorStack (".concat(t,"), the floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}if(o.floorObjects.length===0){z.error("Floor stack (".concat(t,") has no floors. The floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}this.setFloor(o.defaultFloor.id,n)}get currentFloor(){let t=this.floorsById.get(this.currentFloorId);if(!t)throw new Vr('Floor with id "'.concat(this.currentFloorId,'" not found'));return t}get floors(){return Array.from(this.floorsById.values())}processFloorChange(t){var i,a,l,u,c,d,m,h,g;if(this.api.manualFloorVisibility===!0)return;let n=(i=this.api.getMapDataInternal())==null?void 0:i.getById("floor",t),o=(a=this.api.getMapDataInternal())==null?void 0:a.getById("floor-stack",this.currentFloorStackId);if(n&&o)if(!((l=s(this,ra))!=null&&l.enabled)||n.floorStack.id!==(o==null?void 0:o.id))for(let x of this.floorStacksById.values())x.floorObjects.forEach(E=>{E.id!==t&&E.setVisible(!1)});else{let x=XI(o.floors,n,s(this,ra).floorGap,((c=(u=this.api.Navigation)==null?void 0:u.floors)==null?void 0:c.map(E=>E.id))||[],this.getFloorStackAltitudeData(o.id));if((m=(d=this.api)==null?void 0:d.Outdoor)==null||m.setOpacity(x.outdoorOpacity),x.floorStates.forEach(E=>{var v;if(E.floor){let I=(v=this.api.getMapData())==null?void 0:v.getById("floor",E.floor.id);I&&this.api.updateState(I,E.state)}}),s(this,ra).updateCameraElevationOnFloorChange){let E=this.floorStackAltitudeMap.get(o.id);this.api.Camera.setElevation((g=(h=E.get(n.elevation))==null?void 0:h.altitude)!=null?g:n.elevation*Us(s(this,ra).floorGap,n.maxHeight))}}}setFloor(t,n){if(this.currentFloorId===t)return;if(!this.floorsById.get(t)){z.error("Invalid floor passed to setFloor (".concat(t,"), the floor was not changed. Current floor is still ").concat(this.currentFloor.id));return}let i=this.currentFloorId;this.publish("floor-change-start",{previousFloorId:i,floorId:t,reason:n}),this.currentFloorStack&&this.processFloorChange(t),this.currentFloorId=t,this.currentFloorStackId=this.currentFloor.floorStackId,this.currentFloor.setVisible(!0),this.updatePathLayersVisibility(),this.publish("floor-change",{reason:n,floorId:this.currentFloor.id,previousFloorId:i})}updatePathLayersVisibility(){var n;let t=this.api.hidePathsNotOnCurrentFloor===!0&&!((n=this.options.multiFloorView)!=null&&n.enabled);for(let o of this.floorsById.values()){let i=o.layers.get(Ga);if(!i)continue;let a=!t||o.id===this.currentFloor.id;i.setVisible(a)}}getFloorStackAltitudeData(t){return this.floorStackAltitudeMap.get(t)}cancelAnimation(t){let n=this.animations.get(t);n&&(n.stop(),this.animations.delete(t),this.renderer.getInternalTweenGroup().remove(n))}loadAllFloors(){var t;for(let n of this.floorStacksById.values()){n.loadAllFloors();let o=this.floorStackAltitudeMap.get(n.id);(t=n.facade)==null||t.spaces.forEach(i=>{let a=this.styleMap[i.spaceId];if(a&&a.altitude>=0){let l=o==null?void 0:o.get(a.altitude/2);l&&this.renderer.setState(i.spaceId,{altitude:l.altitude,height:l.effectiveHeight})}})}}};ra=new WeakMap;function _8(e,r,t,n){return e.labelText3D(r.id,t!=null?t:r.name,H(w({},n),{parentId:r.floor.id}))}p();var yi,fh,mh=class{constructor({currentMapGetter:r}){D(this,yi,new Map);D(this,fh);M(this,fh,r)}get currentMap(){return s(this,fh).call(this)}getAll(){return Array.from(s(this,yi).values()).map(({marker:r})=>r)}getById(r){return s(this,yi).get(r)}add(r,t,n){var c;let o=r.anchorTarget;if(!o)throw new Error("get coordinate failed");let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Markers.add(o,t,H(w({},n),{rank:(n==null?void 0:n.rank)||"medium",dynamicResize:(c=n==null?void 0:n.dynamicResize)!=null?c:!0,attachTo:Lp(r)}));if(a==null)throw new Error("error creating marker");let l=i.Markers.getContentEl(a.id.toString());if(!l)throw new Error("marker component should exist");let u=new Ka(a.id.toString(),l,r);return s(this,yi).set(u.id,{marker:u,entityId:a.id.toString()}),u}remove(r){var n;let t=s(this,yi).get(r.id);t&&((n=this.currentMap)==null||n.Markers.remove(t.entityId),s(this,yi).delete(r.id.toString()))}removeAll(){let r=[];return s(this,yi).forEach(({marker:t})=>{this.remove(t),r.push(t),s(this,yi).delete(t.id.toString())}),r}setPosition(r,t){var a;let n=t.anchorTarget;if(!n){z.error("Cannot determine coordinate from target.");return}let o=this.currentMap;if(!o){z.error("Cannot determine the current map.");return}let i=s(this,yi).get(r.id);if(!i){z.error('Cannot find the Marker with id "'.concat(r.id,'".'));return}o.Markers.setPosition(i.entityId,ui(n),(a=n.floorId)!=null?a:o.currentFloorId),i.marker.updateTarget(t)}animateTo(r,t,n){var l;let o=t.anchorTarget;if(!o)return z.error("Cannot determine coordinate from target."),Promise.resolve();let i=this.currentMap;if(!i)return z.error("Cannot determine the current map."),Promise.resolve();let a=s(this,yi).get(r.id);return a?(a.marker.updateTarget(t),i.Markers.animateTo(a.entityId,ui(o),(l=o.floorId)!=null?l:i.currentFloorId,n)):(z.error('Cannot find the Marker with id "'.concat(r.id,'".')),Promise.resolve())}};yi=new WeakMap,fh=new WeakMap;p();var ou,gh,hh=class{constructor({currentMapGetter:r}){D(this,ou,new Map);D(this,gh);M(this,gh,r)}get currentMap(){return s(this,gh).call(this)}getById(r){return s(this,ou).get(r)}add(r,t,n){var u;let o=r.anchorTarget;if(!o)throw new Error("Target does not implement IAnchorable.");let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let a=i.Image3D.add(ui(o),t,H(w({},n),{floorId:o.floorId,verticalOffset:o.verticalOffset+((u=n.verticalOffset)!=null?u:0)}));if(!a)throw new Error("image component should exist");let l=new Ac(a.id.toString(),t,r);return s(this,ou).set(l.id,{image:l,entityId:a.id.toString()}),l}remove(r){var n;let t=s(this,ou).get(r.id);t&&((n=this.currentMap)==null||n.Image3D.remove(t.entityId),s(this,ou).delete(r.id.toString()))}removeAll(){let r=[];return s(this,ou).forEach(({image:t})=>{this.remove(t),r.push(t),s(this,ou).delete(t.id.toString())}),r}};ou=new WeakMap,gh=new WeakMap;p();var Ya,bh,yh=class{constructor({currentMapGetter:r}){D(this,Ya,new Map);D(this,bh);M(this,bh,r)}get currentMap(){return s(this,bh).call(this)}getById(r){return s(this,Ya).get(r)}add(r,t,n){let o=[r],i=o.reduce((u,c)=>{var m,h;if(!c)return z.error("Cannot determine coordinate from options."),u;let d=(m=e0(c,this.currentMap.floorsById,this.currentMap.floorsById.get("default-floor")))==null?void 0:m.id;return u.has(d)||u.set(d,[]),(h=u.get(d))==null||h.push(c),u},new Map);if(!o.length)throw new Error("targets should not be empty when adding a model");let a=this.currentMap;if(!a)throw new Error("currentMap should exist");let l=[];return i.forEach((u,c)=>{var h;let d=Bt();a.Models.add(d,u,H(w({},n),{url:t,floorId:c,verticalOffset:u[0].verticalOffset+((h=n==null?void 0:n.verticalOffset)!=null?h:0)})).forEach(g=>{let x=new Pc(g.toString(),d,u[0]);s(this,Ya).set(x.id,{model:x,entityId:g.toString(),groupId:d}),l.push(x)})}),l[0]}remove(r){var n;let t=s(this,Ya).get(r.id);t&&((n=this.currentMap)==null||n.Models.remove(t.entityId,t.groupId),s(this,Ya).delete(r.id.toString()))}removeAll(){let r=[];return s(this,Ya).forEach(({model:t})=>{var o;let n=s(this,Ya).get(t.id);n&&(r.push(t),(o=this.currentMap)==null||o.Models.remove(n.entityId,n.groupId),s(this,Ya).delete(t.id.toString()))}),r}};Ya=new WeakMap,bh=new WeakMap;p();var na,xh,vh=class{constructor({currentMapGetter:r}){D(this,na,new Map);D(this,xh);M(this,xh,r)}get currentMap(){return s(this,xh).call(this)}getById(r){var t;return(t=s(this,na).get(r))==null?void 0:t.path}add(r,t){let n=this.currentMap;if(!n)throw new Error("currentMap should exist");let o=n.Paths.add(r,t),i=o.paths.map(l=>l.id.toString()),a=new Qi((t==null?void 0:t.id)||Bt(),o.animation,r,o.paths);for(let l of i)s(this,na).set(l,{path:a,entityIds:i});return s(this,na).set(a.id,{path:a,entityIds:i}),a}highlightPathSection(r,t,n,o){var m,h,g,x;let i=(h=(m=this.currentMap)==null?void 0:m.api.getMapData())==null?void 0:h.mapCenter;if(!i)return;let a=ib([r],t,n,i);if(!a)return;let l=(g=o==null?void 0:o.animationDuration)!=null?g:1500,u=()=>{},c=new Promise(E=>{u=E}),d=new Wi({fraction:0}).to({fraction:1},l).onUpdate(E=>{var v;for(let I of a)(v=this.currentMap)==null||v.api.updateState(I.segment,{highlightCompleteFraction:E.fraction})}).onStart(()=>{var E,v,I;for(let C of a)(I=this.currentMap)==null||I.api.updateState(C.segment,{highlightStartFraction:C.startHighlightFraction,highlightEndFraction:C.endHighlightFraction,highlightColor:(E=o==null?void 0:o.color)!=null?E:"red",highlightWidthMultiplier:(v=o==null?void 0:o.widthMultiplier)!=null?v:1})}).onComplete(()=>{var E;u(),(E=this.currentMap)==null||E.api.removeTween(d)});return(x=this.currentMap)==null||x.api.tweenGroup().add(d),d.start(),{animation:c}}clearHighlightedPathSection(r){var t;(t=this.currentMap)==null||t.api.updateState(r,{highlightCompleteFraction:0,highlightStartFraction:0,highlightEndFraction:0})}clearAllHighlightedPathSections(){for(let r of s(this,na).values())this.clearHighlightedPathSection(r.path)}remove(r){var n;let t=s(this,na).get(r.id);t&&((n=this.currentMap)==null||n.Paths.remove(t.entityIds),s(this,na).delete(r.id),t.entityIds.forEach(o=>s(this,na).delete(o)))}removeAll(){let r=[];return s(this,na).forEach(({path:t})=>{this.remove(t),r.push(t)}),r}};na=new WeakMap,xh=new WeakMap;p();var iu,Eh,Ih=class{constructor({currentMapGetter:r}){D(this,iu,new Map);D(this,Eh);M(this,Eh,r)}get currentMap(){return s(this,Eh).call(this)}getById(r){return s(this,iu).get(r)}add(r,t,n){let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let i=o.Shapes.add(r,t||{},{floorId:n==null?void 0:n.id}),a=new eu(i);return s(this,iu).set(a.id,a),a}remove(r){var n;s(this,iu).get(r.id)&&((n=this.currentMap)==null||n.Shapes.remove(r),s(this,iu).delete(r.id.toString()))}removeAll(){let r=[];return s(this,iu).forEach(t=>{this.remove(t),r.push(t.id),s(this,iu).delete(t.id.toString())}),r}};iu=new WeakMap,Eh=new WeakMap;p();var Sh,Ch=class{constructor({currentMapGetter:r}){D(this,Sh);M(this,Sh,r)}get currentMap(){return s(this,Sh).call(this)}setFromStyleCollection(r){var t,n,o,i,a;for(let l in r)for(let u of((t=this.currentMap)==null?void 0:t.floors)||[]){if(r[l]==null||!u.layers.has(yr))continue;let c=u.layers.get(yr);for(let h of Object.values(r))if(h&&"polygons"in h&&"color"in h)for(let g of h.polygons)(n=this.currentMap)==null||n.renderer.setState(g,{color:h.color});if(c!=null&&c.layers.has(l)&&"color"in r[l]){let h=c.layers.get(l);h&&((o=this.currentMap)==null||o.renderer.setState(h,{color:r[l].color}))}if(c&&l===ju&&!(Ua in r)){let h=c.layers.get(Ua);h&&"color"in r[l]&&((i=this.currentMap)==null||i.renderer.setState(h,{color:r[l].color}))}if(!u.layers.has(Yl))continue;let d=u.layers.get(Yl),m=u.facadesByStyleId.get(l);if(m&&m.length>0)for(let h of m){let g=d.layers.get("".concat(h,"-").concat(l));g&&"color"in r[l]&&((a=this.currentMap)==null||a.renderer.setState(g,{color:r[l].color}))}}}};Sh=new WeakMap;p();var QI={opacity:1},Tn,Dh,Th,ul,au,Rc,e6,L8,Im=class{constructor(r,t){D(this,Rc);D(this,Tn);D(this,Dh,[]);D(this,Th,{opacity:"initial"});D(this,ul,{opacity:new Map});D(this,au,new Set);M(this,Tn,r),M(this,Dh,t||[]);let n=s(this,Tn).map;n&&n.on("idle",()=>{s(this,ul).opacity.size||Q(this,Rc,e6).call(this,n)})}setStyle(r){var t,n;if(s(this,Tn).map){(t=s(this,Tn).map)==null||t.setStyle(r),s(this,au).size&&(s(this,au).clear(),this.hide()),Q(this,Rc,L8).call(this),Q(this,Rc,e6).call(this,s(this,Tn).map),this.setOpacity(s(this,Th).opacity),(n=s(this,Tn).map)==null||n.moveLayer(iv);for(let[o,i,a]of s(this,Dh)||[])s(this,Tn).hideOutdoorLayersIntersectingPolygons(o,i,a)}}get map(){return s(this,Tn).map}get enabled(){return!!s(this,Tn).map}get visible(){return s(this,au).size===0}show(){let r=s(this,Tn).map;if(!r)return;let t=r.getStyle().layers;t&&(t.forEach(n=>{s(this,au).has(n.id)&&r.setLayoutProperty(n.id,"visibility","visible")}),s(this,au).clear())}hide(r=[]){let t=s(this,Tn).map;if(!t)return;let n=t.getStyle().layers;n&&n.forEach(o=>{let i=t.getLayoutProperty(o.id,"visibility");!r.includes(o.id)&&i!=="none"&&(t.setLayoutProperty(o.id,"visibility","none"),s(this,au).add(o.id))})}setOpacity(r,t=[]){var i,a,l;let n=s(this,Tn).map;if(!n)return;let o=(l=(a=(i=s(this,Tn).map)==null?void 0:i.getStyle)==null?void 0:a.call(i))==null?void 0:l.layers;o&&n.once("idle",()=>{o.forEach(u=>{let c=n.getLayoutProperty(u.id,"visibility");if(!t.includes(u.id)&&c!=="none")try{let d=s(this,ul).opacity.get(u.id);d!==void 0&&(u.id==="background"||(u.type==="symbol"?(n.setPaintProperty(u.id,"icon-opacity",r==="initial"?d[0]:r),n.setPaintProperty(u.id,"text-opacity",r==="initial"?d[1]:r)):n.setPaintProperty(u.id,"".concat(u.type,"-opacity"),r==="initial"?d[0]:r)),s(this,Th).opacity=r)}catch(d){z.warn("Error setting opacity:",d)}})})}};Tn=new WeakMap,Dh=new WeakMap,Th=new WeakMap,ul=new WeakMap,au=new WeakMap,Rc=new WeakSet,e6=function(r){let t=r.getStyle().layers;t&&t.forEach(n=>{var i,a,l;r.getLayoutProperty(n.id,"visibility")!=="none"&&(n.id==="background"||(n.type==="symbol"?s(this,ul).opacity.set(n.id,[(i=r.getPaintProperty(n.id,"icon-opacity"))!=null?i:QI.opacity,(a=r.getPaintProperty(n.id,"text-opacity"))!=null?a:QI.opacity]):s(this,ul).opacity.set(n.id,[(l=r.getPaintProperty(n.id,"".concat(n.type,"-opacity")))!=null?l:QI.opacity,void 0])))})},L8=function(){Object.values(s(this,ul)).forEach(r=>r.clear())};p();function XW(){dv(!1)}var su,uu,ll,wh=class{constructor({currentMapGetter:r}){D(this,su);D(this,uu,new Map);D(this,ll,new Map);M(this,su,r)}labelAll(r={}){var o,i;let t=[],n=new Set;return(i=(o=s(this,su).call(this))==null?void 0:o.Text3D.labelAll(r))==null||i.forEach(({textInfo:a,target:l})=>{let u=a.id.toString(),c=s(this,ll).get(u);if(c){n.has(u)||t.push(c.text3DView),n.add(u);return}n.add(u);let d=new il(u,l);s(this,uu).set(d.id,{targetId:l.id,text3d:u,text3DView:d}),s(this,ll).set(u,{text3DView:d}),t.push(d)}),t}label(r,t,n={}){var i;if(s(this,su).call(this))if(gr.is(r)){let a=(i=s(this,su).call(this))==null?void 0:i.Text3D.label(r,t,n);if(!a)return;let l=a.textInfo.id.toString(),u=s(this,ll).get(l);if(u)return u.text3DView;let c=new il(l,a.target);return s(this,uu).set(c.id,{targetId:a.target.id,text3d:l,text3DView:c}),s(this,ll).set(l,{text3DView:c}),c}else throw new Error("Non-space target is not supported")}remove(r){var o;let t=typeof r=="string"?r:r.id,n=s(this,uu).get(t);n&&((o=s(this,su).call(this))==null||o.Text3D.remove(n.text3d),s(this,uu).delete(t),s(this,ll).delete(n.text3d))}removeAll(){s(this,uu).forEach(r=>{var t;(t=s(this,su).call(this))==null||t.Text3D.remove(r.text3d)}),s(this,uu).clear()}};su=new WeakMap,uu=new WeakMap,ll=new WeakMap;p();p();import oa from"zod";p();import{z as R8}from"zod";function N8(e){try{let r=e.shape;if("type"in r){let t=r.type;if(t instanceof R8.ZodOptional&&(t=t._def.innerType),"value"in t)return String(t.value);if(t instanceof R8.ZodDefault&&"value"in t._def.innerType)return String(t._def.innerType.value)}return"unknown"}catch(r){return"unknown"}}function j8(e){if(e.success)return{};let r={};for(let t of e.error.issues)if(t.path.length>0){let n=String(t.path[0]);r[n]||(r[n]=[]),r[n].push(t.message)}return r}function U8(e,r){let t=Object.entries(e);if(t.length>0){let n=t.map(([o,i])=>"".concat(o,": ").concat(i.join(", "))).join("; ");z.warn("".concat(t.length," invalid field(s) in ").concat(r!=null?r:"unknown"," state: [").concat(n,"]"))}}function Ut(e,r,t){if(t!=null&&t.disableValidation)return r;if(r==null||typeof r!="object")return{};let n=e.safeParse(r);if(n.success){let a={};for(let l of Object.keys(r))l in n.data&&(a[l]=r[l]);return a}let o=j8(n);t!=null&&t.warn&&U8(o,N8(e));let i={};for(let a of Object.keys(r))!(a in o)&&a in e.shape&&(i[a]=r[a]);return i}function en(e,r,t){if(t!=null&&t.disableValidation)return r;let n=e.safeParse(r);if(n.success)return n.data;if((t==null?void 0:t.warn)===!0){let o=j8(n);U8(o,N8(e))}return r}var z8="doors",t6=oa.object({type:oa.literal(z8).default(z8),color:oa.string().default("#ffffff"),topColor:oa.string().optional(),texture:oa.object({url:oa.string().optional()}).optional(),topTexture:oa.object({url:oa.string().optional()}).optional(),visible:oa.boolean().default(!1),opacity:oa.number().default(1)}),lb=t6.partial(),ENe=oa.strictObject(t6.shape);function G8(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,opacity:a}=e;return en(t6,{visible:i,color:r,topColor:t,opacity:a,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0})}function cb(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.opacity!==void 0&&(t.opacity=e.opacity)),t}p();import{z as Mh}from"zod";var $8="facade",r6=Mh.object({type:Mh.literal($8).default($8),opacity:Mh.number().default(1),visible:Mh.boolean().default(!0)}),V8=r6.partial(),wNe=Mh.strictObject(r6.shape);function Z8(e){return en(r6,{opacity:e.opacity,visible:e.visible})}p();import{z as ze}from"zod";var Xa="floor",H8="".concat(Xa,".footprint"),W8="".concat(Xa,".geometry"),q8="".concat(Xa,".labels"),K8="".concat(Xa,".markers"),J8="".concat(Xa,".images"),Y8="".concat(Xa,".occlusion"),X8="".concat(Xa,".paths"),Q8="".concat(Xa,".areas"),db=ze.object({type:ze.literal(H8).default(H8),altitude:ze.number().default(0),visible:ze.boolean().default(!1),height:ze.number().default(0),opacity:ze.number().default(1),side:ze.enum(["double","front","back"]),color:ze.string().default("#ffffff")}),eP=db.partial(),pb=ze.object({type:ze.literal(W8).default(W8),opacity:ze.number().default(1),visible:ze.boolean().default(!0)}),tP=pb.partial(),mb=ze.object({type:ze.literal(q8).default(q8),enabled:ze.boolean().default(!0)}),rP=mb.partial(),fb=ze.object({type:ze.literal(K8).default(K8),enabled:ze.boolean().default(!0)}),nP=fb.partial(),hb=ze.object({type:ze.literal(J8).default(J8),visible:ze.boolean().default(!0)}),oP=hb.partial(),gb=ze.object({type:ze.literal(Y8).default(Y8),enabled:ze.boolean().default(!0)}),iP=gb.partial(),yb=ze.object({type:ze.literal(X8).default(X8),visible:ze.boolean().default(!0)}),aP=yb.partial(),bb=ze.object({type:ze.literal(Xa).default(Xa),visible:ze.boolean().default(!1),altitude:ze.number().default(0)}),vb=ze.object({type:ze.literal(Q8).default(Q8),visible:ze.boolean().default(!0)}),sP=vb.partial(),QW=ze.object(H(w({},bb.shape),{geometry:pb,labels:mb,markers:fb,images:hb,footprint:db,occlusion:gb,paths:yb,areas:vb})),uP=bb.partial(),BNe=ze.object(H(w({},bb.shape),{geometry:pb.partial(),labels:mb.partial(),markers:fb.partial(),images:hb.partial(),footprint:db.partial(),occlusion:gb.partial(),paths:yb.partial(),areas:vb.partial()})).partial(),_Ne=ze.strictObject(H(w({},bb.shape),{geometry:ze.strictObject(pb.shape),labels:ze.strictObject(mb.shape),markers:ze.strictObject(fb.shape),images:ze.strictObject(hb.shape),footprint:ze.strictObject(db.shape),occlusion:ze.strictObject(gb.shape),paths:ze.strictObject(yb.shape),areas:ze.strictObject(vb.shape)}));function lP(e,r,t){if(!r){z.error("Floor is not defined. Cannot get floor state.");return}let n=r.layers.get(yr),o=n?t==null?void 0:t.getState(n.containerId):void 0,i=r.layers.get(za),a=r.layers.get(Gi),l=r.layers.get(bp),u=l?t==null?void 0:t.getState(l.containerId):void 0,c=r.layers.get(Kl),d=c?t==null?void 0:t.getState(c.containerId):void 0,m=r.layers.get(vp),h=m?t==null?void 0:t.getState(m.containerId):void 0,g=r.layers.get(Ga),x=g?t==null?void 0:t.getState(g.containerId):void 0,E=r.layers.get(Jl),v=E?t==null?void 0:t.getState(E.containerId):void 0;return en(QW,{geometry:{opacity:o==null?void 0:o.opacity,visible:o==null?void 0:o.visible},labels:{enabled:i==null?void 0:i.visible},markers:{enabled:a==null?void 0:a.visible},footprint:{altitude:u==null?void 0:u.altitude,visible:u==null?void 0:u.visible,height:u==null?void 0:u.height,opacity:u==null?void 0:u.opacity,side:u==null?void 0:u.side,color:u==null?void 0:u.color},images:{visible:h==null?void 0:h.visible},occlusion:{enabled:d==null?void 0:d.visible},paths:{visible:x==null?void 0:x.visible},areas:{visible:v==null?void 0:v.visible},visible:e.visible,altitude:e.altitude})}p();import{z as qt}from"zod";var cP="geometry",n6=qt.object({type:qt.literal(cP).default(cP),visible:qt.boolean().default(!0),color:qt.union([qt.string(),qt.literal("initial")]).default("#ffffff"),topColor:qt.union([qt.string(),qt.literal("initial")]).optional(),hoverColor:qt.union([qt.string(),qt.literal("initial")]).optional(),interactive:qt.boolean().default(!1),opacity:qt.number().default(1),height:qt.number().default(0),altitude:qt.number().default(0),texture:qt.object({url:qt.string()}).optional(),topTexture:qt.object({url:qt.string()}).optional(),flipImageToFaceCamera:qt.boolean().default(!1),enableImageCollisions:qt.boolean().default(!1),borderVisible:qt.boolean().default(!1),borderColor:qt.string().optional(),borderWidth:qt.number().optional()}),o6=n6.partial(),zNe=qt.strictObject(n6.shape);function dP(e){let{altitude:r,interactive:t,hoverColor:n,color:o,visible:i,opacity:a,height:l,texture:u,topTexture:c,flipImageToFaceCamera:d,enableImageCollisions:m,topColor:h,borderVisible:g,borderColor:x,borderWidth:E}=e;return en(n6,{interactive:t,hoverColor:n,color:o,visible:i,opacity:a,height:l,texture:u?{url:e.texture}:void 0,topTexture:c?{url:c}:void 0,flipImageToFaceCamera:d,enableImageCollisions:m,topColor:h,altitude:r,borderVisible:g,borderColor:x,borderWidth:E})}function pP(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.hoverColor!==void 0&&(t.hoverColor=e.hoverColor),e.interactive!==void 0&&(t.interactive=e.interactive),e.height!==void 0&&(t.height=e.height),e.opacity!==void 0&&(t.opacity=e.opacity),e.flipImageToFaceCamera!==void 0&&(t.flipImageToFaceCamera=e.flipImageToFaceCamera),e.enableImageCollisions!==void 0&&(t.enableImageCollisions=e.enableImageCollisions),e.altitude!==void 0&&(t.altitude=e.altitude),e.borderVisible!==void 0&&(t.borderVisible=e.borderVisible),e.borderColor!==void 0&&(t.borderColor=e.borderColor),e.borderWidth!==void 0&&(t.borderWidth=e.borderWidth)),t}p();import ia from"zod";var i6="label",eq=ia.object({type:ia.literal(i6).default(i6),text:ia.string(),rank:ia.custom(e=>lg.safeParse(e).success||e==="initial"),appearance:ia.custom(e=>UE.safeParse(e).success),interactive:ia.boolean().default(!1),enabled:ia.boolean().default(!0),textPlacement:ia.union([ia.enum(ev),ia.array(ia.enum(ev))]).default(tv)}),mP=eq.partial();function fP(e){var o,i,a,l;let{text:r,enabled:t,options:n}=e;return{type:i6,text:r!=null?r:"",appearance:zE((o=n==null?void 0:n.appearance)!=null?o:{}),rank:(i=n==null?void 0:n.rank)!=null?i:"medium",enabled:t!=null?t:!0,interactive:(a=n==null?void 0:n.interactive)!=null?a:!1,textPlacement:(l=n==null?void 0:n.textPlacement)!=null?l:tv}}function hP(e,r){let t={options:{}};if(!t.options)throw new Error("options should exist");return e.text&&(t.text=e.text),e.appearance&&(t.options.appearance=e.appearance),e.textPlacement&&(t.options.textPlacement=e.textPlacement),e.rank!=null&&(e.rank==="initial"?t.options.rank=r.initialRank||2:t.options.rank=e.rank),e.enabled!==void 0&&(t.enabled=e.enabled),e.interactive!==void 0&&(t.options.interactive=e.interactive),e.enabled!==void 0&&(t.enabled=e.enabled),t}p();import zr from"zod";var a6="marker",tq=zr.object({type:zr.literal(a6).default(a6),rank:zr.custom(e=>lg.safeParse(e).success||e==="initial"),placement:zr.union([zr.enum(rv),zr.array(zr.enum(rv))]).optional(),interactive:zr.union([zr.boolean(),zr.literal("pointer-events-auto")]).default(!1),dynamicResize:zr.boolean().default(!0),enabled:zr.boolean().default(!0),zIndex:zr.number().optional(),lowPriorityPin:zr.object({enabled:zr.boolean().optional(),size:zr.number().positive().optional(),color:zr.string().optional()}).optional(),element:zr.custom(e=>e instanceof HTMLElement,{error:"Must be an HTMLElement instance"}),contentHTML:zr.string()}),gP=tq.omit({element:!0}).partial();function yP(e,r){var h,g,x,E;let t=r!=null&&r.target?r.target.anchorTarget:void 0,{enabled:n,placement:o,element:i,dynamicResize:a,contentHTML:l,options:u,position:c,parent:d}=e,m=typeof d=="object"?d.id:d;return t==null&&(t=new De({latitude:(h=c==null?void 0:c[1])!=null?h:0,longitude:(g=c==null?void 0:c[0])!=null?g:0,floorId:m==null?void 0:m.toString()})),{type:a6,rank:(x=u==null?void 0:u.rank)!=null?x:"medium",interactive:(E=u==null?void 0:u.interactive)!=null?E:!1,enabled:n!=null?n:!0,element:i,placement:o!=null?o:[],zIndex:u==null?void 0:u.zIndex,dynamicResize:a!=null?a:!0,lowPriorityPin:u==null?void 0:u.lowPriorityPin,contentHTML:l!=null?l:""}}function bP(e,r){let t={};return t.options={},e.rank!=null&&(e.rank==="initial"?t.options.rank=r.initialRank||2:t.options.rank=e.rank),e.dynamicResize!=null&&(t.options.dynamicResize=e.dynamicResize),e.enabled!=null&&(t.enabled=e.enabled),e.interactive!=null&&(t.options.interactive=e.interactive),e.enabled!==null&&(t.enabled=e.enabled),e.contentHTML!==void 0&&(t.contentHTML=e.contentHTML),e.placement!=null&&(t.placement=e.placement),t}p();import $n from"zod";var vP="path",xb={color:"#4b90e2",width:1,completeFraction:0,visible:!0,verticalOffset:.1},s6=$n.object({type:$n.literal(vP).default(vP),color:$n.string().default(xb.color),width:$n.union([$n.number(),$n.any()]),completeFraction:$n.number().default(xb.completeFraction),visible:$n.boolean().default(xb.visible),verticalOffset:$n.number().default(xb.verticalOffset),highlightStartFraction:$n.number().default(0),highlightEndFraction:$n.number().default(0),highlightColor:$n.string().default("red"),highlightWidthMultiplier:$n.number().default(1.1),highlightCompleteFraction:$n.number().default(1)}),u6=s6.partial(),nje=$n.strictObject(s6.shape);function xP(e){let{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:l,highlightColor:u,highlightWidthMultiplier:c,highlightCompleteFraction:d}=e;return en(s6,{color:r,visible:t,width:n,verticalOffset:o,completeFraction:i,highlightStartFraction:a,highlightEndFraction:l,highlightColor:u,highlightWidthMultiplier:c,highlightCompleteFraction:d})}p();import{z as Vn}from"zod";var IP="shape",l6=Vn.object({type:Vn.literal(IP).default(IP),visible:Vn.boolean().default(!0),altitude:Vn.number().default(0),color:Vn.string().default("#ffffff"),height:Vn.number().default(0),opacity:Vn.number().default(1),interactive:Vn.boolean().default(!1),bevel:Vn.object({enabled:Vn.boolean().optional(),thickness:Vn.number().optional(),size:Vn.number().optional(),offset:Vn.number().optional(),segments:Vn.number().optional()}).optional()}),c6=l6.partial(),lje=Vn.strictObject(l6.shape);function EP(e){let{altitude:r,visible:t,color:n,opacity:o,interactive:i,height:a,children:l,bevel:u}=e;if(l==null||l.length<1){z.error("Expected at least one child for Shape (".concat(e.id,"). Cannot get shape state."));return}return en(l6,{altitude:r,visible:t,color:n,height:a,opacity:o,interactive:i,bevel:u})}function CP(e){let r=Ut(c6,e,{warn:!0}),t={};if(r.visible!==void 0&&(t.visible=r.visible),r.color!==void 0&&(t.color=r.color),r.opacity!==void 0&&(t.opacity=r.opacity),r.altitude!==void 0&&(t.altitude=r.altitude),r.height!==void 0&&(t.height=r.height),r.interactive!==void 0&&(t.interactive=r.interactive),r.bevel!==void 0){let n={enabled:r.bevel.enabled||!1,thickness:r.bevel.thickness,size:r.bevel.size,offset:r.bevel.offset,segments:r.bevel.segments};t.bevel=n}return t}p();import Ib from"zod";var SP="text3d",DP=Ib.object({type:Ib.literal(SP).default(SP),position:Ib.custom(e=>e instanceof De,{error:"Must be a Coordinate instance"})}),TP=dC.extend(w({},DP.shape)),wP=pC.extend(w({},DP.shape)).partial(),gje=Ib.strictObject(TP.shape);function MP(e){var C,S;let{position:r,visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:l,outlineOpacity:u,outlineBlur:c,outlineWidth:d,outlineOffsetX:m,outlineOffsetY:h,strokeWidth:g,strokeOpacity:x,strokeColor:E,fillOpacity:v,hoverColor:I}=e;return en(TP,{position:new De({latitude:(C=r==null?void 0:r[1])!=null?C:0,longitude:(S=r==null?void 0:r[0])!=null?S:0}),visible:t,color:n,flipToFaceCamera:o,font:i,fontSize:a,outlineColor:l,outlineOpacity:u,outlineBlur:c,outlineWidth:d,outlineOffsetX:m,outlineOffsetY:h,strokeWidth:g,strokeOpacity:x,strokeColor:E,fillOpacity:v,hoverColor:I})}p();import lo from"zod";var AP="walls",d6=lo.object({type:lo.literal(AP).default(AP),color:lo.string().default("#ffffff"),topColor:lo.string().optional(),texture:lo.object({url:lo.string()}).or(lo.undefined()),topTexture:lo.object({url:lo.string()}).or(lo.undefined()),visible:lo.boolean().default(!0),height:lo.number().default(0),opacity:lo.number().default(1)}),p6=d6.partial(),Eje=lo.strictObject(d6.shape);function FP(e){let{color:r,topColor:t,texture:n,topTexture:o,visible:i,height:a,opacity:l}=e;return en(d6,{visible:i,color:r,topColor:t,texture:n?{url:n}:void 0,topTexture:o?{url:o}:void 0,height:a,opacity:l})}function m6(e,r){var n,o;let t={};return r==null||(e.color&&(e.color==="initial"?t.color=r.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=r.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),((n=e.texture)==null?void 0:n.url)!==void 0&&(t.texture=e.texture.url),((o=e.topTexture)==null?void 0:o.url)!==void 0&&(t.topTexture=e.topTexture.url),e.height!==void 0&&(t.height=e.height),e.opacity!==void 0&&(t.opacity=e.opacity)),t}p();import{z as Qa}from"zod";var f6="image3d",rq=Qa.object({type:Qa.literal(f6).default(f6),visible:Qa.boolean().default(!0),opacity:Qa.number().min(0).max(1).default(1),position:Qa.custom(e=>e instanceof De,{error:"Must be a Coordinate instance"}),width:Qa.number().default(1),height:Qa.number().default(1),rotation:Qa.number().default(0),verticalOffset:Qa.number().default(0),flipImagesToFaceCamera:Qa.boolean().default(!1)}),PP=rq.partial();function OP(e){var t,n,o,i,a,l,u,c,d;let{position:r}=e;return{type:f6,visible:(t=e.visible)!=null?t:!0,opacity:(n=e.opacity)!=null?n:1,position:new De({latitude:(o=r==null?void 0:r[1])!=null?o:0,longitude:(i=r==null?void 0:r[0])!=null?i:0,verticalOffset:r==null?void 0:r[2]}),width:(a=e.width)!=null?a:1,height:(l=e.height)!=null?l:1,rotation:(u=e.rotation)!=null?u:0,verticalOffset:(c=e.verticalOffset)!=null?c:0,flipImagesToFaceCamera:(d=e.flipImageToFaceCamera)!=null?d:!1}}p();import{z as xt}from"zod";var kP="model",h6=aI.extend({type:xt.literal(kP).default(kP),color:xt.string().optional(),position:xt.custom(e=>De.is(e),{error:"Expected a Coordinate"}),visible:xt.boolean().default(!0),rotation:xt.tuple([xt.number(),xt.number(),xt.number()]).default([0,0,0]),scale:xt.tuple([xt.number(),xt.number(),xt.number()]).default([1,1,1]),verticalOffset:xt.number().default(0),opacity:xt.number().default(1),material:xt.record(xt.string(),sI).optional(),interactive:xt.boolean().default(!1),clippingPlaneZOffset:xt.number().default(1/0),clippingPlaneTopColor:xt.string().default("#E67B5B"),clippingPlaneTopVisible:xt.boolean().default(!0)}),BP=h6.extend({scale:xt.union([xt.number(),xt.tuple([xt.number(),xt.number(),xt.number()])]),rotation:xt.union([xt.number(),xt.tuple([xt.number(),xt.number(),xt.number()])])}).partial(),kje=xt.strictObject(h6.shape);function _P(e){var x,E,v;let{color:r,position:t,rotation:n,scale:o,visible:i,interactive:a,opacity:l,material:u,verticalOffset:c,parent:d,clippingPlaneZOffset:m,clippingPlaneTopVisible:h}=e,g=typeof d=="object"?(x=d==null?void 0:d.id)==null?void 0:x.toString():d==null?void 0:d.toString();return en(h6,{color:r,position:new De({latitude:(E=t==null?void 0:t[1])!=null?E:0,longitude:(v=t==null?void 0:t[0])!=null?v:0,verticalOffset:t==null?void 0:t[2],floorId:g}),rotation:n,scale:o,visible:i,interactive:a,opacity:l,material:u,verticalOffset:c,clippingPlaneZOffset:m,clippingPlaneTopVisible:h})}p();p();p();var Cm=Vh(DO());Cm.registerHelper({});Cm.registerPartial({});var TO=Cm.template({compiler:[8,">= 4.3.0"],main:function(e,r,t,n,o){var i=e.lambda,a=e.escapeExpression,l=e.lookupProperty||function(u,c){if(Object.prototype.hasOwnProperty.call(u,c))return u[c]};return"<div class='mappedin-annotation-marker'>\n <div style='width: "+a(i(r!=null?l(r,"size"):r,r))+"px; height: "+a(i(r!=null?l(r,"size"):r,r))+"px'>\n <img src='"+a(i(r!=null?l(r,"icon"):r,r))+"' alt='"+a(i(r!=null?l(r,"name"):r,r))+"' width='"+a(i(r!=null?l(r,"size"):r,r))+"' height='"+a(i(r!=null?l(r,"size"):r,r))+"' />\n </div>\n</div>"},useData:!0});var kK=30,wO=new Set(["annotation"]);function BK(e){var r,t;return TO({size:kK,icon:(t=(r=e.icon)==null?void 0:r.url)!=null?t:"",name:e.name})}function _K(e={}){return w({rank:"high",placement:["center"],interactive:!0},e)}function LK(e,r){return r.Markers.add(e.coordinate,BK(e),_K())}function MO(e,r){let t=[];for(let n of r)zl(n)&&zi.is(n)&&n.icon!=null&&typeof n.icon.url=="string"&&n.icon.url.length>0&&t.push(LK(n,e));return t}p();var AO=new Set(["space","object"]);function FO(e,r){r.forEach(t=>{KM(t)&&e.updateState(t,{interactive:!0})})}p();p();function PO(e){return zl(e)?"anchorTarget"in e&&e.anchorTarget!=null:!1}p();p();var{entries:zO,setPrototypeOf:OO,isFrozen:RK,getPrototypeOf:NK,getOwnPropertyDescriptor:jK}=Object,{freeze:Hn,seal:bi,create:GO}=Object,{apply:U6,construct:z6}=typeof Reflect<"u"&&Reflect;Hn||(Hn=function(r){return r});bi||(bi=function(r){return r});U6||(U6=function(r,t,n){return r.apply(t,n)});z6||(z6=function(r,t){return new r(...t)});var jb=Wn(Array.prototype.forEach),UK=Wn(Array.prototype.lastIndexOf),kO=Wn(Array.prototype.pop),kh=Wn(Array.prototype.push),zK=Wn(Array.prototype.splice),zb=Wn(String.prototype.toLowerCase),_6=Wn(String.prototype.toString),BO=Wn(String.prototype.match),Bh=Wn(String.prototype.replace),GK=Wn(String.prototype.indexOf),$K=Wn(String.prototype.trim),sa=Wn(Object.prototype.hasOwnProperty),Zn=Wn(RegExp.prototype.test),_h=VK(TypeError);function Wn(e){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return U6(e,r,n)}}function VK(e){return function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return z6(e,t)}}function tt(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zb;OO&&OO(e,null);let n=r.length;for(;n--;){let o=r[n];if(typeof o=="string"){let i=t(o);i!==o&&(RK(r)||(r[n]=i),o=i)}e[o]=!0}return e}function ZK(e){for(let r=0;r<e.length;r++)sa(e,r)||(e[r]=null);return e}function pu(e){let r=GO(null);for(let[t,n]of zO(e))sa(e,t)&&(Array.isArray(n)?r[t]=ZK(n):n&&typeof n=="object"&&n.constructor===Object?r[t]=pu(n):r[t]=n);return r}function Lh(e,r){for(;e!==null;){let n=jK(e,r);if(n){if(n.get)return Wn(n.get);if(typeof n.value=="function")return Wn(n.value)}e=NK(e)}function t(){return null}return t}var _O=Hn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L6=Hn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R6=Hn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HK=Hn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N6=Hn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),WK=Hn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),LO=Hn(["#text"]),RO=Hn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),j6=Hn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),NO=Hn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ub=Hn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qK=bi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KK=bi(/<%[\w\W]*|[\w\W]*%>/gm),JK=bi(/\$\{[\w\W]*/gm),YK=bi(/^data-[\-\w.\u00B7-\uFFFF]+$/),XK=bi(/^aria-[\-\w]+$/),$O=bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QK=bi(/^(?:\w+script|data):/i),eJ=bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),VO=bi(/^html$/i),tJ=bi(/^[a-z][.\w]*(-[.\w]+)+$/i),jO=Object.freeze({__proto__:null,ARIA_ATTR:XK,ATTR_WHITESPACE:eJ,CUSTOM_ELEMENT:tJ,DATA_ATTR:YK,DOCTYPE_NAME:VO,ERB_EXPR:KK,IS_ALLOWED_URI:$O,IS_SCRIPT_OR_DATA:QK,MUSTACHE_EXPR:qK,TMPLIT_EXPR:JK}),Rh={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rJ=function(){return typeof window>"u"?null:window},nJ=function(r,t){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let n=null,o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));let i="dompurify"+(n?"#"+n:"");try{return r.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},UO=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ZO(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rJ(),r=we=>ZO(we);if(r.version="3.2.6",r.removed=[],!e||!e.document||e.document.nodeType!==Rh.document||!e.Element)return r.isSupported=!1,r;let{document:t}=e,n=t,o=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:l,Element:u,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:h,trustedTypes:g}=e,x=u.prototype,E=Lh(x,"cloneNode"),v=Lh(x,"remove"),I=Lh(x,"nextSibling"),C=Lh(x,"childNodes"),S=Lh(x,"parentNode");if(typeof a=="function"){let we=t.createElement("template");we.content&&we.content.ownerDocument&&(t=we.content.ownerDocument)}let T,A="",{implementation:F,createNodeIterator:P,createDocumentFragment:O,getElementsByTagName:_}=t,{importNode:G}=n,L=UO();r.isSupported=typeof zO=="function"&&typeof S=="function"&&F&&F.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:q,ERB_EXPR:$,TMPLIT_EXPR:K,DATA_ATTR:X,ARIA_ATTR:V,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:oe}=jO,{IS_ALLOWED_URI:le}=jO,ve=null,he=tt({},[..._O,...L6,...R6,...N6,...LO]),de=null,Fe=tt({},[...RO,...j6,...NO,...Ub]),ce=Object.seal(GO(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,He=null,bt=!0,B=!0,re=!1,R=!0,ue=!1,ie=!0,se=!1,Le=!1,Et=!1,Ce=!1,xe=!1,We=!1,Gr=!0,xi=!1,ca="user-content-",po=!0,da=!1,Ii={},_o=null,ml=tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Gc=null,mu=tt({},["audio","video","img","source","image","track"]),Ei=null,Vt=tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ae="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",Ne=ke,Je=!1,Ve=null,br=tt({},[Ae,ye,ke],_6),wn=tt({},["mi","mo","mn","ms","mtext"]),hn=tt({},["annotation-xml"]),Mn=tt({},["title","style","font","a","script"]),ns=null,Ci=["application/xhtml+xml","text/html"],gk="text/html",$r=null,$c=null,yk=t.createElement("form"),H6=function(N){return N instanceof RegExp||N instanceof Function},Zb=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($c&&$c===N)){if((!N||typeof N!="object")&&(N={}),N=pu(N),ns=Ci.indexOf(N.PARSER_MEDIA_TYPE)===-1?gk:N.PARSER_MEDIA_TYPE,$r=ns==="application/xhtml+xml"?_6:zb,ve=sa(N,"ALLOWED_TAGS")?tt({},N.ALLOWED_TAGS,$r):he,de=sa(N,"ALLOWED_ATTR")?tt({},N.ALLOWED_ATTR,$r):Fe,Ve=sa(N,"ALLOWED_NAMESPACES")?tt({},N.ALLOWED_NAMESPACES,_6):br,Ei=sa(N,"ADD_URI_SAFE_ATTR")?tt(pu(Vt),N.ADD_URI_SAFE_ATTR,$r):Vt,Gc=sa(N,"ADD_DATA_URI_TAGS")?tt(pu(mu),N.ADD_DATA_URI_TAGS,$r):mu,_o=sa(N,"FORBID_CONTENTS")?tt({},N.FORBID_CONTENTS,$r):ml,Pe=sa(N,"FORBID_TAGS")?tt({},N.FORBID_TAGS,$r):pu({}),He=sa(N,"FORBID_ATTR")?tt({},N.FORBID_ATTR,$r):pu({}),Ii=sa(N,"USE_PROFILES")?N.USE_PROFILES:!1,bt=N.ALLOW_ARIA_ATTR!==!1,B=N.ALLOW_DATA_ATTR!==!1,re=N.ALLOW_UNKNOWN_PROTOCOLS||!1,R=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=N.SAFE_FOR_TEMPLATES||!1,ie=N.SAFE_FOR_XML!==!1,se=N.WHOLE_DOCUMENT||!1,Ce=N.RETURN_DOM||!1,xe=N.RETURN_DOM_FRAGMENT||!1,We=N.RETURN_TRUSTED_TYPE||!1,Et=N.FORCE_BODY||!1,Gr=N.SANITIZE_DOM!==!1,xi=N.SANITIZE_NAMED_PROPS||!1,po=N.KEEP_CONTENT!==!1,da=N.IN_PLACE||!1,le=N.ALLOWED_URI_REGEXP||$O,Ne=N.NAMESPACE||ke,wn=N.MATHML_TEXT_INTEGRATION_POINTS||wn,hn=N.HTML_INTEGRATION_POINTS||hn,ce=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&H6(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ce.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&H6(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ce.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ue&&(B=!1),xe&&(Ce=!0),Ii&&(ve=tt({},LO),de=[],Ii.html===!0&&(tt(ve,_O),tt(de,RO)),Ii.svg===!0&&(tt(ve,L6),tt(de,j6),tt(de,Ub)),Ii.svgFilters===!0&&(tt(ve,R6),tt(de,j6),tt(de,Ub)),Ii.mathMl===!0&&(tt(ve,N6),tt(de,NO),tt(de,Ub))),N.ADD_TAGS&&(ve===he&&(ve=pu(ve)),tt(ve,N.ADD_TAGS,$r)),N.ADD_ATTR&&(de===Fe&&(de=pu(de)),tt(de,N.ADD_ATTR,$r)),N.ADD_URI_SAFE_ATTR&&tt(Ei,N.ADD_URI_SAFE_ATTR,$r),N.FORBID_CONTENTS&&(_o===ml&&(_o=pu(_o)),tt(_o,N.FORBID_CONTENTS,$r)),po&&(ve["#text"]=!0),se&&tt(ve,["html","head","body"]),ve.table&&(tt(ve,["tbody"]),delete Pe.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw _h('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _h('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=N.TRUSTED_TYPES_POLICY,A=T.createHTML("")}else T===void 0&&(T=nJ(g,o)),T!==null&&typeof A=="string"&&(A=T.createHTML(""));Hn&&Hn(N),$c=N}},W6=tt({},[...L6,...R6,...HK]),q6=tt({},[...N6,...WK]),bk=function(N){let ae=S(N);(!ae||!ae.tagName)&&(ae={namespaceURI:Ne,tagName:"template"});let Ee=zb(N.tagName),tr=zb(ae.tagName);return Ve[N.namespaceURI]?N.namespaceURI===ye?ae.namespaceURI===ke?Ee==="svg":ae.namespaceURI===Ae?Ee==="svg"&&(tr==="annotation-xml"||wn[tr]):!!W6[Ee]:N.namespaceURI===Ae?ae.namespaceURI===ke?Ee==="math":ae.namespaceURI===ye?Ee==="math"&&hn[tr]:!!q6[Ee]:N.namespaceURI===ke?ae.namespaceURI===ye&&!hn[tr]||ae.namespaceURI===Ae&&!wn[tr]?!1:!q6[Ee]&&(Mn[Ee]||!W6[Ee]):!!(ns==="application/xhtml+xml"&&Ve[N.namespaceURI]):!1},pa=function(N){kh(r.removed,{element:N});try{S(N).removeChild(N)}catch(ae){v(N)}},Vc=function(N,ae){try{kh(r.removed,{attribute:ae.getAttributeNode(N),from:ae})}catch(Ee){kh(r.removed,{attribute:null,from:ae})}if(ae.removeAttribute(N),N==="is")if(Ce||xe)try{pa(ae)}catch(Ee){}else try{ae.setAttribute(N,"")}catch(Ee){}},K6=function(N){let ae=null,Ee=null;if(Et)N="<remove></remove>"+N;else{let Ar=BO(N,/^[\r\n\t ]+/);Ee=Ar&&Ar[0]}ns==="application/xhtml+xml"&&Ne===ke&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");let tr=T?T.createHTML(N):N;if(Ne===ke)try{ae=new h().parseFromString(tr,ns)}catch(Ar){}if(!ae||!ae.documentElement){ae=F.createDocument(Ne,"template",null);try{ae.documentElement.innerHTML=Je?A:tr}catch(Ar){}}let gn=ae.body||ae.documentElement;return N&&Ee&&gn.insertBefore(t.createTextNode(Ee),gn.childNodes[0]||null),Ne===ke?_.call(ae,se?"html":"body")[0]:se?ae.documentElement:gn},J6=function(N){return P.call(N.ownerDocument||N,N,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Hb=function(N){return N instanceof m&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof d)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},Y6=function(N){return typeof l=="function"&&N instanceof l};function os(we,N,ae){jb(we,Ee=>{Ee.call(r,N,ae,$c)})}let X6=function(N){let ae=null;if(os(L.beforeSanitizeElements,N,null),Hb(N))return pa(N),!0;let Ee=$r(N.nodeName);if(os(L.uponSanitizeElement,N,{tagName:Ee,allowedTags:ve}),ie&&N.hasChildNodes()&&!Y6(N.firstElementChild)&&Zn(/<[/\w!]/g,N.innerHTML)&&Zn(/<[/\w!]/g,N.textContent)||N.nodeType===Rh.progressingInstruction||ie&&N.nodeType===Rh.comment&&Zn(/<[/\w]/g,N.data))return pa(N),!0;if(!ve[Ee]||Pe[Ee]){if(!Pe[Ee]&&eE(Ee)&&(ce.tagNameCheck instanceof RegExp&&Zn(ce.tagNameCheck,Ee)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(Ee)))return!1;if(po&&!_o[Ee]){let tr=S(N)||N.parentNode,gn=C(N)||N.childNodes;if(gn&&tr){let Ar=gn.length;for(let qn=Ar-1;qn>=0;--qn){let is=E(gn[qn],!0);is.__removalCount=(N.__removalCount||0)+1,tr.insertBefore(is,I(N))}}}return pa(N),!0}return N instanceof u&&!bk(N)||(Ee==="noscript"||Ee==="noembed"||Ee==="noframes")&&Zn(/<\/no(script|embed|frames)/i,N.innerHTML)?(pa(N),!0):(ue&&N.nodeType===Rh.text&&(ae=N.textContent,jb([q,$,K],tr=>{ae=Bh(ae,tr," ")}),N.textContent!==ae&&(kh(r.removed,{element:N.cloneNode()}),N.textContent=ae)),os(L.afterSanitizeElements,N,null),!1)},Q6=function(N,ae,Ee){if(Gr&&(ae==="id"||ae==="name")&&(Ee in t||Ee in yk))return!1;if(!(B&&!He[ae]&&Zn(X,ae))){if(!(bt&&Zn(V,ae))){if(!de[ae]||He[ae]){if(!(eE(N)&&(ce.tagNameCheck instanceof RegExp&&Zn(ce.tagNameCheck,N)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(N))&&(ce.attributeNameCheck instanceof RegExp&&Zn(ce.attributeNameCheck,ae)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(ae))||ae==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&Zn(ce.tagNameCheck,Ee)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(Ee))))return!1}else if(!Ei[ae]){if(!Zn(le,Bh(Ee,ee,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&N!=="script"&&GK(Ee,"data:")===0&&Gc[N])){if(!(re&&!Zn(Y,Bh(Ee,ee,"")))){if(Ee)return!1}}}}}}return!0},eE=function(N){return N!=="annotation-xml"&&BO(N,oe)},tE=function(N){os(L.beforeSanitizeAttributes,N,null);let{attributes:ae}=N;if(!ae||Hb(N))return;let Ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:de,forceKeepAttr:void 0},tr=ae.length;for(;tr--;){let gn=ae[tr],{name:Ar,namespaceURI:qn,value:is}=gn,Fm=$r(Ar),Wb=is,yn=Ar==="value"?Wb:$K(Wb);if(Ee.attrName=Fm,Ee.attrValue=yn,Ee.keepAttr=!0,Ee.forceKeepAttr=void 0,os(L.uponSanitizeAttribute,N,Ee),yn=Ee.attrValue,xi&&(Fm==="id"||Fm==="name")&&(Vc(Ar,N),yn=ca+yn),ie&&Zn(/((--!?|])>)|<\/(style|title)/i,yn)){Vc(Ar,N);continue}if(Ee.forceKeepAttr)continue;if(!Ee.keepAttr){Vc(Ar,N);continue}if(!R&&Zn(/\/>/i,yn)){Vc(Ar,N);continue}ue&&jb([q,$,K],nE=>{yn=Bh(yn,nE," ")});let rE=$r(N.nodeName);if(!Q6(rE,Fm,yn)){Vc(Ar,N);continue}if(T&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!qn)switch(g.getAttributeType(rE,Fm)){case"TrustedHTML":{yn=T.createHTML(yn);break}case"TrustedScriptURL":{yn=T.createScriptURL(yn);break}}if(yn!==Wb)try{qn?N.setAttributeNS(qn,Ar,yn):N.setAttribute(Ar,yn),Hb(N)?pa(N):kO(r.removed)}catch(nE){Vc(Ar,N)}}os(L.afterSanitizeAttributes,N,null)},vk=function we(N){let ae=null,Ee=J6(N);for(os(L.beforeSanitizeShadowDOM,N,null);ae=Ee.nextNode();)os(L.uponSanitizeShadowNode,ae,null),X6(ae),tE(ae),ae.content instanceof i&&we(ae.content);os(L.afterSanitizeShadowDOM,N,null)};return r.sanitize=function(we){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,Ee=null,tr=null,gn=null;if(Je=!we,Je&&(we="<!-->"),typeof we!="string"&&!Y6(we))if(typeof we.toString=="function"){if(we=we.toString(),typeof we!="string")throw _h("dirty is not a string, aborting")}else throw _h("toString is not a function");if(!r.isSupported)return we;if(Le||Zb(N),r.removed=[],typeof we=="string"&&(da=!1),da){if(we.nodeName){let is=$r(we.nodeName);if(!ve[is]||Pe[is])throw _h("root node is forbidden and cannot be sanitized in-place")}}else if(we instanceof l)ae=K6("<!---->"),Ee=ae.ownerDocument.importNode(we,!0),Ee.nodeType===Rh.element&&Ee.nodeName==="BODY"||Ee.nodeName==="HTML"?ae=Ee:ae.appendChild(Ee);else{if(!Ce&&!ue&&!se&&we.indexOf("<")===-1)return T&&We?T.createHTML(we):we;if(ae=K6(we),!ae)return Ce?null:We?A:""}ae&&Et&&pa(ae.firstChild);let Ar=J6(da?we:ae);for(;tr=Ar.nextNode();)X6(tr),tE(tr),tr.content instanceof i&&vk(tr.content);if(da)return we;if(Ce){if(xe)for(gn=O.call(ae.ownerDocument);ae.firstChild;)gn.appendChild(ae.firstChild);else gn=ae;return(de.shadowroot||de.shadowrootmode)&&(gn=G.call(n,gn,!0)),gn}let qn=se?ae.outerHTML:ae.innerHTML;return se&&ve["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&Zn(VO,ae.ownerDocument.doctype.name)&&(qn="<!DOCTYPE "+ae.ownerDocument.doctype.name+">\n"+qn),ue&&jb([q,$,K],is=>{qn=Bh(qn,is," ")}),T&&We?T.createHTML(qn):qn},r.setConfig=function(){let we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zb(we),Le=!0},r.clearConfig=function(){$c=null,Le=!1},r.isValidAttribute=function(we,N,ae){$c||Zb({});let Ee=$r(we),tr=$r(N);return Q6(Ee,tr,ae)},r.addHook=function(we,N){typeof N=="function"&&kh(L[we],N)},r.removeHook=function(we,N){if(N!==void 0){let ae=UK(L[we],N);return ae===-1?void 0:zK(L[we],ae,1)[0]}return kO(L[we])},r.removeHooks=function(we){L[we]=[]},r.removeAllHooks=function(){L=UO()},r}var HO=ZO();var oJ={"connection-stairs-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>',"connection-elevator-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>',"point-of-interest-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>',"door-12x12":'<svg viewBox="0 0 13 12">\n <path\n stroke="none"\n d="M4.02533 0.662341H9.61421C9.95171 0.662341 10.2264 0.937033 10.2264 1.27453V10.726C10.2264 11.0639 9.95218 11.3382 9.61421 11.3382H4.02533C3.69721 11.3382 3.42674 11.078 3.41408 10.7504V1.24696C3.4272 0.919297 3.69721 0.659149 4.02533 0.659149V0.662341ZM5.96969 5.22798H6.64563V6.7725H5.96969V5.22798ZM4.94219 1.39218L7.31267 2.6541C7.43501 2.71973 7.50533 2.84488 7.50533 2.97473C7.50721 4.99181 7.50674 7.00877 7.50674 9.02585C7.50674 9.17679 7.41487 9.30663 7.28361 9.36195L4.94217 10.6084H9.49653V1.39227L4.94219 1.39218Z"\n />\n </svg>',"building-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n d="M11.2374 9.75H10.5V4.5C10.5 4.30109 10.421 4.11032 10.2804 3.96967C10.1397 3.82902 9.94894 3.75 9.75003 3.75H7.68753C7.6378 3.75 7.59011 3.76976 7.55495 3.80492C7.51978 3.84008 7.50003 3.88777 7.50003 3.9375V9.75H6.75003V1.51922C6.75127 1.4024 6.72592 1.28683 6.67589 1.18125C6.62587 1.07567 6.55248 0.982864 6.46128 0.909845C6.33697 0.812924 6.18528 0.757635 6.02776 0.751829C5.87024 0.746023 5.71489 0.789995 5.58378 0.877501L1.83378 3.375C1.73091 3.44364 1.6466 3.53664 1.58837 3.64574C1.53014 3.75484 1.4998 3.87665 1.50003 4.00031V9.75H0.762687C0.66578 9.74857 0.571927 9.78389 0.500006 9.84885C0.428085 9.91382 0.383432 10.0036 0.37503 10.1002C0.371625 10.1515 0.378802 10.2029 0.396116 10.2513C0.413431 10.2997 0.440513 10.344 0.47568 10.3815C0.510847 10.419 0.553349 10.4489 0.600545 10.4693C0.647741 10.4897 0.698623 10.5001 0.75003 10.5H11.25C11.3014 10.5001 11.3523 10.4897 11.3995 10.4693C11.4467 10.4489 11.4892 10.419 11.5244 10.3815C11.5595 10.344 11.5866 10.2997 11.6039 10.2513C11.6213 10.2029 11.6284 10.1515 11.625 10.1002C11.6166 10.0036 11.572 9.91382 11.5001 9.84885C11.4281 9.78389 11.3343 9.74857 11.2374 9.75ZM3.56253 8.625C3.56264 8.67641 3.55219 8.72729 3.53181 8.77449C3.51143 8.82168 3.48156 8.86418 3.44406 8.89935C3.40657 8.93452 3.36224 8.9616 3.31383 8.97892C3.26543 8.99623 3.21398 9.00341 3.16269 9C3.06605 8.99159 2.9762 8.94688 2.91122 8.87485C2.84624 8.80283 2.81098 8.70886 2.81253 8.61188V7.88766C2.81121 7.79078 2.84657 7.69699 2.91151 7.62509C2.97645 7.55319 3.06618 7.50851 3.16269 7.5C3.21398 7.4966 3.26543 7.50377 3.31383 7.52109C3.36224 7.5384 3.40657 7.56548 3.44406 7.60065C3.48156 7.63582 3.51143 7.67832 3.53181 7.72552C3.55219 7.77271 3.56264 7.82359 3.56253 7.875V8.625ZM3.56253 6C3.56264 6.05141 3.55219 6.10229 3.53181 6.14949C3.51143 6.19668 3.48156 6.23918 3.44406 6.27435C3.40657 6.30952 3.36224 6.3366 3.31383 6.35392C3.26543 6.37123 3.21398 6.37841 3.16269 6.375C3.06609 6.36649 2.9763 6.32174 2.91135 6.24974C2.84639 6.17774 2.81109 6.08383 2.81253 5.98688V5.26266C2.81121 5.16578 2.84657 5.07199 2.91151 5.00009C2.97645 4.92819 3.06618 4.88351 3.16269 4.875C3.21398 4.8716 3.26543 4.87877 3.31383 4.89609C3.36224 4.9134 3.40657 4.94048 3.44406 4.97565C3.48156 5.01082 3.51143 5.05332 3.53181 5.10052C3.55219 5.14771 3.56264 5.19859 3.56253 5.25V6ZM5.43753 8.625C5.43764 8.67641 5.42719 8.72729 5.40681 8.77449C5.38643 8.82168 5.35656 8.86418 5.31906 8.89935C5.28157 8.93452 5.23724 8.9616 5.18883 8.97892C5.14043 8.99623 5.08898 9.00341 5.03769 9C4.94122 8.9916 4.8515 8.94702 4.78654 8.8752C4.72159 8.80338 4.68622 8.70964 4.68753 8.61281V7.88766C4.68633 7.79086 4.72174 7.69718 4.78667 7.62539C4.8516 7.55359 4.94126 7.50897 5.03769 7.50047C5.08898 7.49706 5.14043 7.50424 5.18883 7.52156C5.23724 7.53887 5.28157 7.56595 5.31906 7.60112C5.35656 7.63629 5.38643 7.67879 5.40681 7.72598C5.42719 7.77318 5.43764 7.82406 5.43753 7.87547V8.625ZM5.43753 6C5.43764 6.05141 5.42719 6.10229 5.40681 6.14949C5.38643 6.19668 5.35656 6.23918 5.31906 6.27435C5.28157 6.30952 5.23724 6.3366 5.18883 6.35392C5.14043 6.37123 5.08898 6.37841 5.03769 6.375C4.94126 6.3665 4.8516 6.32188 4.78667 6.25008C4.72174 6.17829 4.68633 6.08461 4.68753 5.98781V5.26266C4.68633 5.16586 4.72174 5.07218 4.78667 5.00039C4.8516 4.92859 4.94126 4.88397 5.03769 4.87547C5.08898 4.87206 5.14043 4.87924 5.18883 4.89656C5.23724 4.91387 5.28157 4.94095 5.31906 4.97612C5.35656 5.01129 5.38643 5.05379 5.40681 5.10098C5.42719 5.14818 5.43764 5.19906 5.43753 5.25047V6Z"\n stroke="none"\n />\n </svg>',"ladder-12x12":'<svg viewBox="0 0 12 12">\n <g id="surface1">\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.34375 0.375 L 2.53125 0.375 L 2.625 11.53125 L 2.34375 11.625 L 2.25 0.46875 Z M 2.34375 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 9.46875 0.375 L 9.65625 0.375 L 9.75 11.53125 L 9.46875 11.625 L 9.375 0.46875 Z M 9.46875 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 2.25 L 2.25 1.875 L 9.75 1.875 L 9.75 2.25 Z M 2.25 2.25 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 4.875 L 2.25 4.5 L 9.75 4.5 L 9.75 4.875 Z M 2.25 4.875 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 7.5 L 2.25 7.125 L 9.75 7.125 L 9.75 7.5 Z M 2.25 7.5 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 10.125 L 2.25 9.75 L 9.75 9.75 L 9.75 10.125 Z M 2.25 10.125 "/>\n </g>\n </svg>'},iJ=/<svg([^>]*)>/g;function WO(e,r,t){let n=oJ[e];return n?n.replace(iJ,'<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:'.concat(r,"; width:").concat(t,"px; height:").concat(t,'px">')):null}function aJ(e){return HO.sanitize(e,{USE_PROFILES:{svg:!0}})}function sJ(e,r){let o=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;return o==null||o.tagName==="parsererror"||o.tagName.toLowerCase()!=="svg"?(z.error("Failed to parse SVG",{svg:e,tagName:o==null?void 0:o.tagName}),e):(r!=null&&(o.setAttribute("color",r),o.querySelectorAll("*").forEach(l=>{(l.getAttribute("fill")!=null||l.tagName==="path")&&l.getAttribute("fill")!=="none"&&l.setAttribute("fill","currentColor"),l.getAttribute("stroke")!=null&&l.getAttribute("stroke")!=="none"&&l.setAttribute("stroke","currentColor")})),new XMLSerializer().serializeToString(o))}async function qO(e,r){let t="";try{if(e.trim()==="")throw new Error("URL is empty!");(r==null?void 0:r.style)==="fill"&&(e=e.replace(".svg","-fill.svg"));let n=await So()(e),o=n.headers.get("content-type");if(o!=null&&o.includes("image/svg+xml")){let i=await n.text();return t=aJ(i),(r==null?void 0:r.color)!=null&&(t=sJ(t,r.color)),{icon:t,type:"svg"}}else{if(o!=null&&o.includes("image"))return{icon:e,type:"image"};throw new Error("Expected SVG or Image content, but received: ".concat(o))}}catch(n){return z.error("Failed to fetch icon from ".concat(e,"."),n),null}}p();function KO(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Restroom")))}function JO(e){return e.locationProfiles.some(r=>r.categories.some(t=>t.name.includes("Parking")))}var XO=new Set(["connection","point-of-interest","space","object","door","facade"]),Uc={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},Sm={elevator:"connection-elevator-12x12",escalator:"connection-stairs-12x12",stairs:"connection-stairs-12x12",point:"point-of-interest-12x12",door:"door-12x12",building:"building-12x12",ladder:"ladder-12x12"};function uJ(e){let r=null;if(Ao.is(e))switch(e.type){case"elevator":r=Sm.elevator;break;case"ladder":r=Sm.ladder;break;case"escalator":case"stairs":default:r=Sm.stairs}else Mo.is(e)?r=Sm.point:_n.is(e)?r=Sm.door:Yr.is(e)&&(r=Sm.building);return r!=null?WO(r,"#FFFFFF",12):null}function YO(e){return Ao.is(e)?Uc.connection:Yr.is(e)?Uc.default:KO(e)?Uc.washroom:JO(e)?Uc.parking:Mo.is(e)?Uc.point:_n.is(e)?Uc.door:Uc.default}async function lJ(e,r){var o;let t=null,n="locationProfiles"in e?(o=e.locationProfiles.find(i=>i.icon!=null))==null?void 0:o.icon:null;if((n==null?void 0:n.url)!=null&&(t=await qO(n.url,{color:r.color,style:"fill"})),t==null){let i=uJ(e);i!=null&&(t={icon:i,type:"svg"})}return t}function cJ(e){return Ao.is(e)||_n.is(e)?"low":Mo.is(e)||Yr.is(e)?"high":"medium"}async function dJ(e){let r={appearance:{color:YO(e),pinOutlineColor:YO(e),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:cJ(e),interactive:!0},t=await lJ(e,{color:"#FFFFFF"});return t!=null&&(r.appearance.icon=t.icon,t.type==="svg"?Yr.is(e)&&(r.appearance.iconSize=30,r.appearance.iconPadding=10):t.type==="image"&&(r.appearance.iconSize=48,r.appearance.iconPadding=2,r.appearance.pinOutlineColor="#FFFFFF",r.rank="high")),r}async function QO(e,r){return(await Promise.all(r.map(async n=>{let o=[];if(!zl(n))return o;let i=await dJ(n);return Ao.is(n)?o=n.coordinates.map(a=>e.Labels.add(a,n.name,i)):Yr.is(n)?n.spaces.length>0&&n.floorStack.name!=null&&n.floorStack.name!==""&&o.push(e.Labels.add(n.spaces[0],n.floorStack.name,i)):PO(n)&&v2(n)&&o.push(e.Labels.add(n,n.name,i)),o}))).flat()}async function ek(e,r){let t=e.getMapDataInternal();if(!t)throw new Error("Map data not found");let n=t.getAllOfTypes(XO,r),o=t.getAllOfTypes(wO,r),i=t.getAllOfTypes(AO,r),[a,l]=await Promise.all([n.length>0?QO(e,n):[],o.length>0?MO(e,o):[],i.length>0?FO(e,i):[]]);return{labels:a,markers:l}}var Gb=.05,jh,Uh,Nh=class extends Ge{constructor(t,n,o){super();f(this,"core");f(this,"mapObjects",[]);f(this,"id");f(this,"mapDataExternal",{});f(this,"mapsByFloorId",{});f(this,"mapData");f(this,"currentMap");f(this,"hiddenOutdoorGeometries",[]);f(this,"lastFacadeIntersected");D(this,jh,!1);D(this,Uh,!1);f(this,"mapView");f(this,"externalPubSub");f(this,"Camera");f(this,"Labels");f(this,"Text3D");f(this,"Markers");f(this,"Models");f(this,"Paths");f(this,"Exporter");f(this,"Navigation");f(this,"Outdoor");f(this,"Shapes");f(this,"Style");f(this,"Image3D");f(this,"update",()=>{this.core.render()});this.core=t,this.mapView=n,this.externalPubSub=o,this.Camera=new ih(this),this.id=this.core.addGroupContainer("root").id.toString();let i=new ph("outdoors-container",void 0,void 0,this);this.mapObjects.push(i),this.currentMap=i,this.core.on("pre-render",()=>{o.publish("pre-render")}),this.core.on("post-render",()=>{o.publish("post-render")}),this.core.on("resize",()=>{o.publish("resize")}),this.core.on("render-error",({error:d})=>{o.publish("render-error",{error:new iE(d instanceof Error?d.message:"Unknown error")})});let a=d=>{let m=this.getMapDataObject(d);switch(m==null?void 0:m.__type){case"facade":return m;case"floor":return m.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let m=new Set;for(let h of d){let g=a(h);g&&m.add(g)}o.publish("facades-in-view-change",{facades:Array.from(m)})}),this.core.getSystems().renderSystem.on("camera-state-change",()=>{o.publish("state-change-internal",{Camera:this.getCameraState()})});let l=new eh(this.Camera,{precision:7});this.core.on("camera-change",()=>{o.publish("camera-change",l)}),this.core.on("pan-bounds-change",d=>{o.publish("camera-bounds-change",E1(d,this.core.convert3DMapPositionToCoordinate))});let u=d=>m=>{let h=[],g=[],x=[],E=[];m.labels.forEach(P=>{let O=this.Labels.getById(P.toString());O&&h.push(O.label)}),m.markers.forEach(P=>{let O=this.Markers.getById(P.toString())||this.Navigation.getMarkerById(P.toString());O&&g.push(O.marker)}),m.models.forEach(P=>{let O=this.Models.getById(P.toString());O&&x.push(O.model)}),m.paths.forEach(P=>{let O=this.Paths.getById(P.toString());O&&E.push(O)});let v=m.geometry,I;v.length>0&&(I=v.map(P=>{var O;return(O=this.getMapDataInternal())==null?void 0:O.getById("space",P)}).filter(Boolean)[0],I||(I=v.map(P=>{var O;return(O=this.getMapDataInternal())==null?void 0:O.getById("object",P)}).filter(Boolean)[0]),I||(I=v.map(P=>{var O;return(O=this.getMapDataInternal())==null?void 0:O.getById("area",P)}).filter(Boolean)[0]),I||(I=v.map(P=>this.Shapes.getById(P)).filter(Boolean)[0]));let C=m.containers.reduce((P,O)=>{var G;let _=(G=this.getMapDataInternal())==null?void 0:G.getById("floor",O);return _&&no.is(_)&&P.push(_),P},[]),S,T=0;if(C.length>0){S=C[0].id;let P=this.core.getState(S);T=m.coordinate[2]?m.coordinate[2]-P.altitude:T}let A;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!1})}),I&&gr.is(I)&&(A=v.map(P=>{var O;return(O=this.getMapDataInternal())==null?void 0:O.facadesBySpaceId[P]}).filter(Boolean)[0],A&&A.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!0})})),this.lastFacadeIntersected=A;let F={coordinate:new De({latitude:m.coordinate[1],longitude:m.coordinate[0],floorId:S,verticalOffset:T}),spaces:I&&gr.is(I)?[I]:[],objects:I&&oo.is(I)?[I]:[],areas:I&&oi.is(I)?[I]:[],shapes:I&&eu.is(I)?[I]:[],markers:g,labels:h,models:x,paths:E,floors:C,facades:A?[A]:[]};"pointerEvent"in m&&(F.pointerEvent=m.pointerEvent),o.publish(d,F)};this.core.on("hover",u("hover")),this.core.on("click",u("click")),this.core.on("user-interaction-start",()=>{o.publish("user-interaction-start")}),this.core.on("user-interaction-end",()=>{o.publish("user-interaction-end")});let c={currentMapGetter:()=>this.currentMap};this.Markers=new mh(c),this.Models=new yh(c),this.Labels=new uh(c),this.Text3D=new wh(c),this.Exporter=new sh(c),this.Paths=new vh(c),this.Navigation=new oh(this),this.on("navigation-state-change",d=>{this.externalPubSub.publish("state-change-internal",{Navigation:d})}),this.on("navigation-connection-click",d=>{this.externalPubSub.publish("navigation-connection-click",d)}),this.on("navigation-active-path-change",d=>{this.externalPubSub.publish("navigation-active-path-change",d)}),this.Outdoor=new Im(this.core,this.hiddenOutdoorGeometries),this.Outdoor.enabled&&(this.core.on("outdoor-view-loaded",()=>{o.publish("outdoor-view-loaded")}),this.core.on("outdoor-style-loaded",()=>{o.publish("outdoor-style-loaded")})),this.Image3D=new hh(c),this.Shapes=new Ih(c),this.Style=new Ch(c)}get manualFloorVisibility(){return s(this,jh)}set manualFloorVisibility(t){M(this,jh,t),this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:t})}get hidePathsNotOnCurrentFloor(){return s(this,Uh)}set hidePathsNotOnCurrentFloor(t){var n;M(this,Uh,t),(n=this.currentMap)==null||n.updatePathLayersVisibility()}preloadFloors(t){t.forEach(n=>{n instanceof no&&this.core.setState(n.id,{preloadGeometry:!0})})}updateState(t,n){var a,l;if(n==null||typeof n!="object")return;let o=(l=(a=this.currentMap.options)==null?void 0:a.disableUpdateStateValidation)!=null?l:!1;if(t==="interior-walls"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(yr);if(d){let m=d.layers.get(ju);m&&this.core.hasState(m)&&this.core.setState(m,m6(Ut(p6,n,{warn:!0,disableValidation:o}),this.core.getState(m)))}});return}if(t==="exterior-walls"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(yr);if(d){let m=d.layers.get(Ua);m&&this.core.hasState(m)&&this.core.setState(m,m6(Ut(p6,n,{warn:!0,disableValidation:o}),this.core.getState(m)))}});return}if(t==="interior-doors"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(yr);if(d){let m=d.layers.get(gp);m&&this.core.hasState(m)&&this.core.setState(m,cb(Ut(lb,n,{warn:!0,disableValidation:o}),this.core.getState(m)))}});return}if(t==="exterior-doors"){this.currentMap.floors.forEach(c=>{let d=c.layers.get(yr);if(d){let m=d.layers.get(yp);m&&this.core.hasState(m)&&this.core.setState(m,cb(Ut(lb,n,{warn:!0,disableValidation:o}),this.core.getState(m)))}});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(i.__type!==Qi.__type&&!this.core.hasState(i.id)){z.warn('Failed to update state for "'.concat(i.id,'". No ').concat(i.__type," found with that ID."));return}if(Qs.is(i))return this.core.setState(i.id,hP(Ut(mP,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(Ka.is(i))return this.core.setState(i.id,bP(Ut(gP,n,{warn:!0,disableValidation:o}),this.core.getState(i.id)));if(gr.is(i)||oo.is(i)){let c=this.core.getState(i.id);c!=null&&this.core.setState(i.id,pP(Ut(o6,n,{warn:!0,disableValidation:o}),c))}if(oi.is(i)&&this.core.setState(i.id,Ut(o6,n,{warn:!0,disableValidation:o})),Ac.is(i)&&this.core.setState(i.id,Ut(PP,n,{warn:!0,disableValidation:o})),_n.is(i)&&this.core.setState(i.id,cb(Ut(lb,n,{warn:!0,disableValidation:o}),this.core.getState(i.id))),eu.is(i)&&this.core.setState(i.id,CP(Ut(c6,n,{warn:!0,disableValidation:o}))),Pc.is(i)){let u=Ut(BP,n,{warn:!0,disableValidation:o}),{position:c,scale:d,rotation:m}=u,g=tn(u,["position","scale","rotation"]);c&&(g.position=[c.longitude,c.latitude,c.verticalOffset]),d!=null&&(Array.isArray(d)?g.scale=d:g.scale=[d,d,d]),m!=null&&(Array.isArray(m)?g.rotation=m:g.rotation=[m,m,m]),c&&i.updateTarget(c),this.core.setState(i.id,g)}if(no.is(i)){let c=this.currentMap.floorsById.get(i.id);if(c==null)return;let d=Ut(uP,n,{warn:!0,disableValidation:o});this.core.setState(i.id,d);let m=c.layers.get(yr);m!=null&&"geometry"in n&&n.geometry&&this.core.setState(m.containerId,Ut(tP,n.geometry,{warn:!0,disableValidation:o}));let h=c.layers.get(za);if(h!=null&&"labels"in n&&n.labels){let S=Ut(rP,n.labels,{warn:!0,disableValidation:o});"enabled"in S&&typeof S.enabled=="boolean"&&h.setVisible(S.enabled)}let g=c.layers.get(Gi);if(g!=null&&"markers"in n&&n.markers){let S=Ut(nP,n.markers,{warn:!0,disableValidation:o});"enabled"in S&&typeof S.enabled=="boolean"&&g.setVisible(S.enabled)}let x=c.layers.get(bp);x!=null&&"footprint"in n&&n.footprint&&this.core.setState(x.containerId,Ut(eP,n.footprint,{warn:!0,disableValidation:o}));let E=c.layers.get(Kl);if(E!=null&&"occlusion"in n&&n.occlusion){let S=Ut(iP,n.occlusion,{warn:!0,disableValidation:o});"enabled"in S&&typeof S.enabled=="boolean"&&E.setVisible(S.enabled)}let v=c.layers.get(vp);if(v!=null&&"images"in n&&n.images){let S=Ut(oP,n.images,{warn:!0,disableValidation:o});"visible"in S&&typeof S.visible=="boolean"&&v.setVisible(S.visible)}let I=c.layers.get(Ga);if(I!=null&&"paths"in n&&n.paths!=null){let S=Ut(aP,n.paths,{warn:!0,disableValidation:o});S.visible!=null&&typeof S.visible=="boolean"&&I.setVisible(S.visible)}let C=c.layers.get(Jl);if(C!=null&&"areas"in n&&n.areas!=null){let S=Ut(sP,n.areas,{warn:!0,disableValidation:o});S.visible!=null&&typeof S.visible=="boolean"&&C.setVisible(S.visible)}}if(Yr.is(i)){let c=this.core.getState(i.id);for(let d of c.children)d.type==="group-container"&&this.core.setState(d.id,Ut(V8,n,{warn:!0,disableValidation:o}))}if(il.is(i)&&this.core.setState(i.id,Ut(wP,n,{warn:!0,disableValidation:o})),Qi.is(i))for(let c of i.segments)this.core.setState(c.id,Ut(u6,n,{warn:!0,disableValidation:o}));nl.is(i)&&this.core.setState(i.id,Ut(u6,n,{warn:!0,disableValidation:o}))}}getMapDataObject(t){var n;return(n=this.getMapDataInternal())==null?void 0:n.getMapDataById(t)}getMapDataInternal(){if(this.mapData)return Ym(this.mapData)}getMapData(){return this.mapData}addMap(t,n){return new Promise(o=>{var h,g,x,E;let i;try{i=Ym(t)}catch(v){z.error("Error adding map",v),o(t);return}this.mapDataExternal[t.mapName]=t,this.mapData=t;let{mvf:a}=i,l=a["manifest.geojson"].features[0].geometry.coordinates;this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:new De(l[1],l[0])});let u=a["manifest.geojson"].features[0].properties.name,c=new ph("mapObject-".concat(u),i,n,this);this.currentMap=c,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId);let d=this.core.getBoundingArea(c.currentFloor.id);d==null&&z.error("Could not determine bounding box for map:",c.currentFloor.id);let m=(g=(h=n==null?void 0:n.outdoorView)==null?void 0:h.layersHiddenByGeometry)!=null?g:[];if(m.length>0){let v,I=[];for(let C of c.floorStacksById.values())if(C.defaultFloor.footprint&&C.defaultFloor.footprint.geometry!=null&&((x=C.defaultFloor.footprint.geometry)==null?void 0:x.coordinates.length)>0){let S=C.defaultFloor.footprint,T=I1(S);v==null?v=T:cA(v,T),I.push(S)}I.length>0&&v!=null&&(this.core.hideOutdoorLayersIntersectingPolygons(v,I,m),this.hiddenOutdoorGeometries.push([v,I,m]))}if(this.mapObjects.push(c),i.getMVFFeatureByType("floor").forEach(v=>{this.mapsByFloorId[v.id]=c}),c.on("floor-change-start",v=>{var I,C,S,T;this.externalPubSub.publish("floor-change-start",{reason:v.reason,floor:(C=(I=this.getMapDataInternal())==null?void 0:I.getById("floor",v.floorId))!=null?C:this.currentFloor,previousFloor:(T=(S=this.getMapDataInternal())==null?void 0:S.getById("floor",v.previousFloorId))!=null?T:this.currentFloor})}),c.on("floor-change",v=>{var I,C;this.externalPubSub.publish("floor-change",{reason:v.reason,floor:this.currentFloor,previousFloor:(C=(I=this.getMapDataInternal())==null?void 0:I.getById("floor",v.previousFloorId))!=null?C:this.currentFloor}),this.externalPubSub.publish("state-change-internal",{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack})}),(n==null?void 0:n.zoomLevel)!=null)this.core.camera.setZoomLevel(n.zoomLevel),o(t);else if(this.core.mode!=="outdoors-overlay"&&d){let v=(E=n==null?void 0:n.screenOffsets)!=null?E:{top:Gb*this.core.canvasHeight,left:Gb*this.core.canvasWidth,right:Gb*this.core.canvasWidth,bottom:Gb*this.core.canvasHeight};this.core.camera.focusOn(d,{duration:YM,padding:v}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),o(t)})}else o(t)})}setFloor(t,n){return this.currentMap.setFloor(Vf(t),n)}setFloorStack(t,n){return this.currentMap.setFloorStack(Vf(t),n)}updateWatermark(t){this.core.updateWatermark(t)}get currentFloorStack(){var o;let t=this.currentMap.currentFloorStack.id;if(!t)throw new Vr("Missing currentFloorStack.");let n=(o=this.mapData)==null?void 0:o.getById("floor-stack",t);if(!n)throw new Vr("FloorStack was not found in map data.");return n}get currentFloor(){var o;let t=this.currentMap.currentFloor.id;if(!t)throw new Vr("Missing currentFloor object from GeoJsonApi");let n=(o=this.mapData)==null?void 0:o.getById("floor",t);if(!n)throw new Vr("Missing currentFloor");return n}getState(t){var i,a;typeof t=="object"&&Qi.is(t)&&z.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let n=lA(t,this),o=this.core.getState(n);if(o){if(["interior-walls","exterior-walls"].includes(t)&&o.type==="geometry-group")return FP(o);if(["interior-doors","exterior-doors"].includes(t)&&o.type==="geometry-group")return G8(o);if(o.type==="geometry")return dP(o);if(o.type==="label"&&o.options.appearance&&o.options.rank!==void 0&&o.options.interactive!==void 0)return fP(o);if(o.type==="marker"&&((i=o.options)==null?void 0:i.rank)!==void 0&&o.options.interactive!==void 0)return yP(o,(a=this.Markers.getById(o.id.toString()))==null?void 0:a.marker);if(o.type==="model")return _P(o);if(o.type==="image")return OP(o);if(o.type==="text3d")return MP(o);if(o.type==="geometry-group"&&t&&typeof t!="string"&&eu.is(t))return EP(o);if(o.type==="path")return xP(o);if(o.type==="group-container"&&typeof t!="string"&&no.is(t))return lP(o,this.currentMap.floorsById.get(t.id),this.core);if(o.type==="group-container"&&o.children.length>0&&typeof t!="string"&&Yr.is(t)){let l=this.core.getState(o.children[0].id);return Z8(l)}}}setHoverColor(t){this.core.setState({hoverColor:t})}getHoverColor(){let t=this.core.getState();return(t==null?void 0:t.type)==="map-view"?t.hoverColor:void 0}createCoordinateFromScreenCoordinate(t,n,o){var c;if(o!=null){let d=this.core.projectScreenXYToCoordinate(t,n,!0);return d?new De(d.coordinate[1],d.coordinate[0],o.id):void 0}let i=this.core.projectScreenXYToCoordinate(t,n);if(i==null||i.coordinate==null)return;let{coordinate:a,groupContainers:l}=i,u=(c=l==null?void 0:l.find(d=>{let m=d.userData.entityId.toString();return m.includes("f_")||m.includes("m_")}))==null?void 0:c.userData.entityId.toString();return new De(a[1],a[0],u)}getScreenCoordinateFromCoordinate(t){var o,i,a;let n=0;if(t.floorId!=null){let l=(o=this.mapData)==null?void 0:o.getById("floor",t.floorId);l!=null&&(n=(a=(i=this.getState(l))==null?void 0:i.altitude)!=null?a:0)}return this.core.projectCoordinateToScreenXY([t.longitude,t.latitude,n])}isInView(t){return this.core.isInView(typeof t=="string"?t:t.id)}getInView(t,n){let o=this.core.queryGeometry2DInView({screenOffsets:n==null?void 0:n.screenOffsets,fullyContains:n==null?void 0:n.fullyContains});if(o.length===0)return[];let i=[];switch(t){case Qs.__type:i=o.map(a=>this.Labels.getById(a)).filter(a=>a!=null).map(a=>a.label);break;case Ka.__type:i=o.map(a=>this.Markers.getById(a)).filter(a=>a!=null).map(a=>a.marker)}return i}async __EXPERIMENTAL__auto(t){return await ek(this,t)}tween(t){let n=new Wi(t);return this.core.getExternalTweenGroup().add(n),this.core.render(),n}removeTween(t){this.core.getExternalTweenGroup().remove(t)}tweenGroup(){return this.core.getExternalTweenGroup()}get __core(){return this.core}getCameraState(){return this.core.camera.getState()}getNavigationState(){return{isMultiFloor:this.Navigation.isMultiFloor,floorStacks:this.Navigation.floorStacks,floors:this.Navigation.floors,activeDirections:this.Navigation.activeDirections,activePath:this.Navigation.activePath,paths:this.Navigation.paths}}getAllState(){return{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack,Camera:this.getCameraState(),Navigation:this.getNavigationState(),manualFloorVisibility:this.manualFloorVisibility}}publishAllState(){this.externalPubSub.publish("state-change-internal",this.getAllState())}clear(){this.Navigation.clear(),this.Shapes.removeAll(),this.Paths.removeAll(),this.Models.removeAll(),this.Markers.removeAll(),this.Image3D.removeAll(),this.Labels.removeAll()}destroy(){this.clear(),this.core.destroy()}getOptimalVisualDistanceBetweenFloors(t,n=!1){let o=this.currentMap;if(!o){z.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(t.length<2){z.warn("Cannot compute optimal visual distance between floors. Must provide at least 2 floors.");return}let i=o.renderer.getInternalState().geometry3DMap.get(t[0].id),a=o.renderer.getInternalState().geometry3DMap.get(t[1].id);if(!i||!a){z.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}if(Kc(i,"group-container"),Kc(a,"group-container"),n){let u=new Tr;u.setFromObject(i);let c=new Tr;if(c.setFromObject(a),i.children.forEach(v=>{v instanceof Ze&&v.userData.debugBox&&nr(v)}),a.children.forEach(v=>{v instanceof Ze&&v.userData.debugBox&&nr(v)}),!gl(u)||!gl(c))return;let d=new Si(u.max.x-u.min.x,u.max.y-u.min.y,u.max.z-u.min.z),m=new Fr({color:255,transparent:!0,opacity:.5}),h=new Ze(d,m);h.position.set((u.min.x+u.max.x)/2,(u.min.y+u.max.y)/2,(u.min.z+u.max.z)/2),h.userData.debugBox=!0;let g=new Si(c.max.x-c.min.x,c.max.y-c.min.y,c.max.z-c.min.z),x=new Fr({color:"cyan",transparent:!0,opacity:.5}),E=new Ze(g,x);E.position.set((c.min.x+c.max.x)/2,(c.min.y+c.max.y)/2,(c.min.z+c.max.z)/2),E.userData.debugBox=!0,i.add(h),a.add(E)}let l=o.renderer.computeMinZOffsetBetweenContainers(i,a);if(l!==-1)return l}};jh=new WeakMap,Uh=new WeakMap;function pJ(e){if(e===""){GI(""),zI("");return}zI("".concat(e,"/").concat(uv)),GI("".concat(e,"/").concat(sv))}p();var $b=class{constructor(r){f(this,"state");f(this,"update");this.update=r.Debug.update.bind(r.Debug),this.state=r.Debug.state}};p();import ts from"zod";var tk=ts.strictObject({environment:ts.union([ts.literal("basic"),ts.literal(!1)]).optional(),text3d:ts.object({hoverColor:ts.string().optional()}).optional(),geometry:ts.object({hoverColor:ts.string().optional()}).optional(),backgroundColor:ts.string().optional(),backgroundAlpha:ts.number().optional()});p();var G6=Vh(xk(),1);var mJ=(e,r)=>{let t={},n=(o,i,a)=>{for(let l in i){let u=o[l],c=i[l];typeof c=="object"&&!Array.isArray(c)&&c!==null&&typeof u=="object"&&!Array.isArray(u)&&u!==null?(a[l]={},n(u,c,a[l])):a[l]=u}};return n(e,r,t),t},rk=(e,r)=>{let t=mJ(e,r),n=(0,G6.default)({},t,r),o=(0,G6.default)({},t),i=(a,l,u,c=o)=>{for(let d in l){let m=a[d],h=l[d];if(typeof h=="number"&&typeof m=="number")c[d]=m+(h-m)*u;else if(typeof h=="string"&&typeof m=="string"){if(Rm(m)&&Rm(h)){let g=Yb(m),x=Yb(h);g&&x?c[d]=ME([g[0]+(x[0]-g[0])*u,g[1]+(x[1]-g[1])*u,g[2]+(x[2]-g[2])*u]):z.warn('Color "'.concat(d,'" could not be animated!'))}}else typeof h=="object"&&h!==null&&typeof m=="object"&&m!==null?i(m,h,u,c[d]):z.warn('Value "'.concat(d,'" could not be animated!'))}};return a=>(a=Math.min(Math.max(a,0),1),a===0?e:a===1?n:(i(t,r,a),o))};var zc,fe,co,zh=class{constructor(r){D(this,zc);D(this,fe);D(this,co);f(this,"Camera");f(this,"Labels");f(this,"Text3D");f(this,"Markers");f(this,"Image3D");f(this,"Models");f(this,"Paths");f(this,"Exporter");f(this,"Navigation");f(this,"Style");f(this,"Shapes");f(this,"Outdoor");f(this,"update",()=>{s(this,fe).core.render()});f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,fe).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_SYNC(r,t,n))!=null?i:void 0});f(this,"getDirections",(r,t,n)=>{var o,i;return(i=(o=s(this,fe).getMapData())==null?void 0:o.getDirections(r,t,n))!=null?i:Promise.resolve(void 0)});f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(r,t,n)=>{var o,i;return(i=(o=s(this,fe).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(r,t,n))!=null?i:void 0});f(this,"getDirectionsMultiDestination",(r,t,n)=>{var o,i;return(i=(o=s(this,fe).getMapData())==null?void 0:o.getDirectionsMultiDestination(r,t,n))!=null?i:Promise.resolve(void 0)});f(this,"on",(r,t)=>{s(this,zc).on(r,t)});f(this,"off",(r,t)=>{s(this,zc).off(r,t)});f(this,"Debug");M(this,zc,new Ge),M(this,co,r);let t=new Nh(r,this,s(this,zc));M(this,fe,t),this.Camera=s(this,fe).Camera,this.Markers=s(this,fe).Markers,this.Models=s(this,fe).Models,this.Labels=s(this,fe).Labels,this.Text3D=s(this,fe).Text3D,this.Exporter=s(this,fe).Exporter,this.Paths=s(this,fe).Paths,this.Navigation=s(this,fe).Navigation,this.Shapes=s(this,fe).Shapes,this.Style=s(this,fe).Style,this.Outdoor=s(this,fe).Outdoor,this.Image3D=s(this,fe).Image3D,s(this,co).container.dataset.version=y.env.npm_package_version,this.Debug=new $b(s(this,fe).core)}updateState(r,t){return s(this,fe).updateState(r,t)}animateState(r,t,n){var u;let o=s(this,fe).getState(r);if(o==null)return z.warn("Cannot animate state of ".concat(r,".")),new Promise(d=>d({result:"completed"}));let i=rk(o,t),a=s(this,fe).tween({percent:0}).to({percent:1},(u=n==null?void 0:n.duration)!=null?u:1e3).onUpdate(({percent:c})=>{s(this,fe).updateState(r,i(c))});n!=null&&n.easing&&n.easing in Ha&&a.easing(Ha[n.easing]);let l=new Promise(c=>{a.onComplete(()=>{s(this,fe).removeTween(a),c({result:"completed"})}).onStop(()=>{s(this,fe).removeTween(a),c({result:"cancelled"})}),a.start()});return l.cancel=()=>{a.stop(),s(this,fe).updateState(r,i(0))},l}updateGlobalState(r){var t,n,o,i;try{tk.parse(r)}catch(a){z.error("updateGlobalState",a);return}if(typeof r=="object"){let a={};if((t=r.text3d)!=null&&t.hoverColor&&(a.text3dHoverColor=r.text3d.hoverColor),(n=r.geometry)!=null&&n.hoverColor&&(a.hoverColor=r.geometry.hoverColor),r.backgroundColor||r.backgroundAlpha!==void 0){let l=(o=r.backgroundColor)!=null?o:s(this,fe).core.backgroundColor,u=(i=r.backgroundAlpha)!=null?i:s(this,fe).core.backgroundAlpha;s(this,fe).core.setBackgroundColor(l,u)}r.environment!=null&&s(this,fe).core.setEnvironment(r.environment),s(this,fe).core.setState(a)}}get options(){return eA(s(this,fe).currentMap.options)}getGlobalState(){let r=s(this,fe).core.getState();return{backgroundColor:s(this,fe).core.backgroundColor,backgroundAlpha:s(this,fe).core.backgroundAlpha,environment:s(this,fe).core.getEnvironment(),geometry:{hoverColor:r.hoverColor},text3d:{hoverColor:r.text3dHoverColor}}}getMapData(){if(s(this,fe).mapData==null)throw new Vr("MapData not found.");return s(this,fe).mapData}getDimensions(){return{width:s(this,co).canvasWidth,height:s(this,co).canvasHeight}}addMap(r,t){return s(this,fe).addMap(r,t)}setFloor(r,t){return s(this,fe).setFloor(r,t==null?void 0:t.context)}setFloorStack(r,t){return s(this,fe).setFloorStack(r,t==null?void 0:t.context)}preloadFloors(r){s(this,fe).preloadFloors(r)}tween(r){return s(this,fe).tween(r)}removeTween(r){s(this,fe).removeTween(r)}get tweenGroup(){return s(this,fe).tweenGroup()}get currentFloorStack(){return s(this,fe).currentFloorStack}get currentFloor(){return s(this,fe).currentFloor}updateWatermark(r){s(this,fe).updateWatermark(r)}getState(r){return s(this,fe).getState(r)}setHoverColor(r){s(this,fe).setHoverColor(r)}getHoverColor(){return s(this,fe).getHoverColor()}convertAltitudeToMercatorZoomLevel(r){return s(this,fe).core.getSystems().cameraSystem.convertAltitudeToZoomLevel(r)}convertMercatorZoomLevelToAltitude(r){return s(this,fe).core.getSystems().cameraSystem.convertZoomLevelToAltitude(r)}isInView(r){return s(this,fe).isInView(r)}getInView(r,t){return s(this,fe).getInView(r,t)}getMetersPerPixel(){return s(this,fe).core.getMetersPerPixel()}getDistance(r,t){var n;return(n=s(this,fe).getMapData())==null?void 0:n.getDistance(r,t)}createCoordinate(r,t,n){return typeof r=="object"?new De(r):new De(r,t,n==null?void 0:n.id)}createCoordinateFromScreenCoordinate(r,t,n){return s(this,fe).createCoordinateFromScreenCoordinate(r,t,n)}getScreenCoordinateFromCoordinate(r){return s(this,fe).getScreenCoordinateFromCoordinate(r)}__EXPERIMENTAL__auto(r){return s(this,fe).__EXPERIMENTAL__auto(r)}get __core(){if(y.env.INTERNAL==="true")return s(this,fe).core;throw new Error("__core is not available.")}get container(){return s(this,co).container}publishAllState(){s(this,fe).publishAllState()}clear(){s(this,fe).clear()}destroy(){s(this,fe).destroy()}async enableDebug(r={}){let{Inspector:t}=await import("./inspector-B32KFAD4.js");await new t(this,s(this,fe)).enable(r)}async takeScreenshot(r){var o;let t={withOutdoorContext:(o=r==null?void 0:r.withOutdoorContext)!=null?o:!1},n=s(this,co).rendererDomElement;if(t.withOutdoorContext){let i=s(this,co).map;if(!i)return await s(this,co).renderSync(),n.toDataURL("image/png");i.loaded()||await new Promise(c=>{i.once("idle",c)});let a=i.getCanvas(),l=document.createElement("canvas"),u=l.getContext("2d");if(l.width=n.width,l.height=n.height,!u)throw new Error("Failed to get 2D context for composite canvas");return u.drawImage(a,0,0,l.width,l.height),u.drawImage(n,0,0,l.width,l.height),l.toDataURL("image/png")}return await s(this,co).renderSync(),n.toDataURL("image/png")}get manualFloorVisibility(){return s(this,fe).manualFloorVisibility}set manualFloorVisibility(r){s(this,fe).manualFloorVisibility=r}getOptimalVisualDistanceBetweenFloors(r){return s(this,fe).getOptimalVisualDistanceBetweenFloors(r)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return s(this,fe).hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(r){s(this,fe).hidePathsNotOnCurrentFloor=!!r}registerPlugin(r){s(this,co).registerPlugin(r)}unregisterPlugin(r){s(this,co).unregisterPlugin(r)}};zc=new WeakMap,fe=new WeakMap,co=new WeakMap;p();var fJ=1e3*60*60*2,pl,Tm,Kt,rs,ua,vi,la,wm,Mm,Gh,er,nk,ok,Dm,Vb,$6,V6,Z6,Am=class{constructor(r,t){D(this,er);D(this,pl,new Ge);D(this,Tm);D(this,Kt);D(this,rs);D(this,ua);D(this,vi);D(this,la);D(this,wm);D(this,Mm);D(this,Gh,()=>{"key"in s(this,Kt)&&"secret"in s(this,Kt)&&Q(this,er,Dm).call(this),Q(this,er,Vb).call(this)});f(this,"on",(r,t)=>s(this,pl).on(r,t));f(this,"off",(r,t)=>s(this,pl).off(r,t));M(this,Tm,r),M(this,Kt,t)}setMapIds(r){M(this,Tm,r)}setEnterprise(r){s(this,Kt).enterprise=r}async readySync(){var o;if((!("key"in s(this,Kt))||!("secret"in s(this,Kt)))&&!("accessToken"in s(this,Kt))){z.error("No API keys or access token provided! Cannot preload tokens.");return}let r=[Q(this,er,Dm).call(this),null];s(this,Kt).enterprise||(r[1]=this.getSasTokensAsync());let[t,n]=await Promise.all(r);Q(this,er,Z6).call(this),Q(this,er,$6).call(this,t),n!=null&&Q(this,er,V6).call(this,n),Lm()&&((o=globalThis.addEventListener)==null||o.call(globalThis,"focus",s(this,Gh)))}async refreshing(){let r=[];return s(this,rs)!=null&&r.push(s(this,rs)),s(this,ua)!=null&&r.push(s(this,ua)),Promise.all(r)}getAccessTokenAsync(){return Q(this,er,Dm).call(this)}getSasTokensAsync(){return Q(this,er,Vb).call(this)}getAccessToken(){return s(this,vi)==null?(z.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):s(this,vi)}getSasToken(r){return this.isEnterpriseMode()?(z.error("SAS tokens are not available in the enterprise mode!"),{token:""}):s(this,la)==null?(z.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):r in s(this,la).tokens?s(this,la).tokens[r]:(z.error("SAS token for map ".concat(r," not found!")),{token:""})}isEnterpriseMode(){var r;return(r=s(this,Kt).enterprise)!=null?r:!1}destroy(){Q(this,er,Z6).call(this),s(this,pl).destroy(),Lm()&&globalThis.removeEventListener("focus",s(this,Gh))}};pl=new WeakMap,Tm=new WeakMap,Kt=new WeakMap,rs=new WeakMap,ua=new WeakMap,vi=new WeakMap,la=new WeakMap,wm=new WeakMap,Mm=new WeakMap,Gh=new WeakMap,er=new WeakSet,nk=function(r){var n;let t=r.token!==((n=s(this,vi))==null?void 0:n.token);M(this,vi,r),t&&s(this,pl).publish("access-token-refreshed",{accessToken:r})},ok=function(r){var n;let t=JSON.stringify(r.tokens)!==JSON.stringify((n=s(this,la))==null?void 0:n.tokens);M(this,la,r),t&&s(this,pl).publish("sas-tokens-refreshed",{sasTokens:r.tokens})},Dm=async function(r=!1){var t;if("accessToken"in s(this,Kt)&&typeof s(this,Kt).accessToken=="string"){let n={token:s(this,Kt).accessToken,expires:Date.now()+72e5};return M(this,vi,n),n}if(!("key"in s(this,Kt))||!("secret"in s(this,Kt))||typeof s(this,Kt).key!="string"||typeof s(this,Kt).secret!="string")throw new Error("No API keys or access token provided!");return s(this,rs)!=null?s(this,rs):s(this,vi)!=null&&s(this,vi).expires!=null&&s(this,vi).expires>Date.now()&&!r?s(this,vi):(M(this,rs,Nf(H(w({},s(this,Kt)),{key:s(this,Kt).key,secret:s(this,Kt).secret}),(t=s(this,Kt).enterprise)!=null?t:!1).then(n=>{let o={token:n.accessToken,expires:n.expiresTimestamp*1e3};return Q(this,er,nk).call(this,o),o}).catch(n=>{throw n}).finally(()=>{M(this,rs,void 0)})),s(this,rs))},Vb=async function(r=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:s(this,ua)!=null?s(this,ua):s(this,la)!=null&&s(this,la).expires>Date.now()&&!r?s(this,la):(M(this,ua,new Promise((t,n)=>{Q(this,er,Dm).call(this).then(o=>{let i={},a=s(this,Tm).map(l=>Rx(H(w({},s(this,Kt)),{mapId:l}),o.token).then(u=>{i[l]={token:u.token,expires:u.expires}}).catch(u=>{z.error("Error getting SAS token for map ".concat(l,":"),u)}));Promise.all(a).then(()=>{let l={tokens:i,expires:Math.min(...Object.values(i).map(u=>{var c;return(c=u.expires)!=null?c:1/0}))};Q(this,er,ok).call(this,l),t(l)})}).catch(o=>{n(o)})})),s(this,ua).catch(t=>{throw t}).finally(()=>{M(this,ua,void 0)}),s(this,ua))},$6=function(r){if(!("key"in s(this,Kt))||!("secret"in s(this,Kt)))return;let t=r.expires!=null?r.expires-Date.now():fJ;isFinite(t)&&M(this,wm,setTimeout(()=>{Q(this,er,Dm).call(this,!0).then(n=>{Q(this,er,$6).call(this,n)})},t-uM))},V6=function(r){let t=r.expires-Date.now();isFinite(t)&&M(this,Mm,setTimeout(()=>{Q(this,er,Vb).call(this,!0).then(n=>{Q(this,er,V6).call(this,n)})},t-dM))},Z6=function(){s(this,wm)!=null&&clearTimeout(s(this,wm)),s(this,Mm)!=null&&clearTimeout(s(this,Mm))};p();var hJ=async(e,r)=>{var x,E,v,I,C,S,T,A;let t=(v="mvfVersion"in(r!=null?r:{})?r==null?void 0:r.mvfVersion:void 0)!=null?v:"options"in e&&"version"in((x=e.options)!=null?x:{})?(E=e.options)==null?void 0:E.version:void 0,n=H(w({prefetchTokens:!0},r||{}),{mvfVersion:t}),o,i=Bu();i.updateByUserOption(n);let a={};if("type"in e&&typeof e.type=="string"){if(a.enterprise=(I=e.options)==null?void 0:I.enterprise,e.type==="binary"&&e.main instanceof Uint8Array){o=await u1(e.main,n.mvfVersion),a.languagePacks=[];for(let F of(C=e.languagePacks)!=null?C:[])F.localePack instanceof Uint8Array&&a.languagePacks.push({language:F.language,localePack:await Xd(F.localePack)})}else if(e.type==="json")o=e.main,a.languagePacks=(S=e.languagePacks)!=null?S:[];else throw new Error("Invalid backup type");e.type==="binary"&&e.main instanceof Uint8Array&&(a.binaryBundle=e.main)}else o=e,a.enterprise=o.enterprise!=null;i.setEnterprise((T=a.enterprise)!=null?T:!1);let l=s1(o),u=l.length>0?l:[n.mapId];n.baseAuthUri=i.getBaseAuthUri();let c=new Am(u,H(w({},n),{enterprise:a.enterprise})),d;if("accessToken"in n&&n.accessToken)d=n.accessToken;else if("key"in n&&"secret"in n){let F;try{F=await c.getAccessTokenAsync()}catch(P){z.error("Failed getting token during hydrateMapData",P)}d=(F==null?void 0:F.token)||""}if(a.outdoorViewToken=d,a.env=i,a.getMapDataOptions=n,n.prefetchTokens)try{await c.readySync()}catch(F){z.error("Failed to ready token manager!",F)}u0()&&(a.enterprise&&z.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),n.mvfVersion!=="3.0.0"&&z.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let m=new mc(o,a);d&&m.Analytics.init(H(w({accessToken:d,mapId:n.mapId,key:"key"in n?n.key:void 0,secret:"secret"in n?n.secret:void 0},n.analytics),{baseUri:i.getAnalyticsBaseUri(),context:(A=n.analytics)==null?void 0:A.context}));let h=new Jm(m),g=m.findPreferredLanguage({languageCode:n.language,fallbackToNavigatorLanguage:!1});if(g)try{await h.changeLanguage(g.code)}catch(F){}return typeof(r==null?void 0:r.onMVFParsed)=="function"&&r.onMVFParsed(o),h};p();var ik=(e,{id:r}={})=>{let t=Array.isArray(e)?e:[e];if(!t.every(i=>typeof i=="string"))return;let n=t.join(""),o=null;if(r){let i=document.getElementById(r);i instanceof HTMLStyleElement&&(o=i)}o==null&&(o=document.createElement("style")),r&&r!==""&&(o.id=r),o.textContent=n,document.head.appendChild(o)};var ak=":root {\n --pin-shadow-hover-scale: 0.9;\n --pin-shadow-width: 12px;\n --pin-shadow-height: 5px;\n --pin-shadow-opacity: 0.35;\n --pin-drop-animation-duration-ms: 250ms;\n}\n\n@keyframes drop-pin {\n 0% {\n transform: translateY(-200%);\n }\n\n 100% {\n transform: translateY(0);\n }\n}\n\n@keyframes pin-shadow {\n 0% {\n transform: scale(var(--pin-shadow-hover-scale));\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n.mappedin-dropped-pin-wrapper {\n position: relative;\n\n width: fit-content;\n height: fit-content;\n width: 36px;\n height: 42px;\n\n & svg {\n position: absolute;\n left: calc(50% - var(--pin-shadow-width));\n animation: drop-pin var(--pin-drop-animation-duration-ms) ease-in;\n }\n\n & > .pin-shadow {\n position: absolute;\n left: calc(50% - (var(--pin-shadow-width) / 2));\n bottom: 0;\n\n height: var(--pin-shadow-height);\n width: var(--pin-shadow-width);\n border-radius: 100%;\n\n opacity: var(--pin-shadow-opacity);\n\n animation: pin-shadow 250ms ease-in;\n }\n}\n\n@keyframes bounce {\n 0% {\n transform: translateY(-10px);\n opacity: 0;\n }\n 12.5% {\n transform: translateY(0);\n opacity: 1;\n }\n 25% {\n transform: translateY(0);\n }\n 37.5% {\n transform: translateY(-10px);\n }\n 50% {\n transform: translateY(0);\n }\n 62.5% {\n transform: translateY(-10px);\n }\n 75% {\n transform: translateY(0);\n }\n 87.5% {\n transform: translateY(-10px);\n }\n 100% {\n transform: translateY(0);\n }\n}\n\n.mappedin-connection-marker {\n position: relative;\n display: flex;\n\n .bouncey {\n animation: bounce 2.5s linear;\n }\n\n .arrow--down {\n transform: rotate(180deg);\n }\n\n .connection-circle {\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 2px solid white;\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);\n background: #595959;\n }\n}\n";var sk=".mappedin-marker {\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n font-weight: normal;\n top: 0;\n position: absolute;\n font-weight: bold;\n color: black;\n display: flex;\n flex-direction: row;\n will-change: transform, opacity;\n transition: opacity 150ms ease-in-out;\n justify-content: center;\n opacity: 0;\n}\n\n/* Low priority pin strategy styles */\n\n/* Hide child elements as well */\n.mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {\n visibility: hidden;\n}\n\n/* Create the pin using ::before pseudo-element */\n.mappedin-marker::before {\n content: '';\n display: none;\n border-radius: 50%;\n position: relative;\n /* Default values - will be overridden by inline styles */\n width: var(--mappedin-pin-size, 2px);\n height: var(--mappedin-pin-size, 2px);\n background-color: var(--pin-color, #666);\n}\n\n.mappedin-marker[data-placement='hidden']::before {\n display: block;\n}\n";var uk=".mappedin__smart-collision-engine__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n /* Enables colliders to use translate3D */\n transform-style: preserve-3d;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n}\n\n.mappedin__smart-collision-engine-debug__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n will-change: opacity;\n &.interacting {\n opacity: 0.2;\n }\n}\n";var lk=".mappedin-map {\n .mappedin-interactive {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n\n &.mappedin-interaction-hover {\n cursor: pointer;\n }\n }\n}\n";var ck=".mappedin-map {\n .mappedin-control-container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n\n .mappedin-ctrl-top-left,\n .mappedin-ctrl-top-right,\n .mappedin-ctrl-bottom-left,\n .mappedin-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n }\n\n .mappedin-ctrl-top-left {\n top: 0;\n left: 0;\n }\n\n .mappedin-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n .mappedin-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n }\n\n .mappedin-ctrl-bottom-right {\n bottom: 0;\n right: 0;\n }\n\n .mappedin-ctrl-attrib {\n display: block;\n position: relative;\n pointer-events: auto;\n font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;\n padding: 3px 5px 1px 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n min-width: 11px;\n min-height: 11px;\n user-select: none;\n\n summary.mappedin-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n summary.mappedin-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n &.mappedin-compact .mappedin-ctrl-attrib-button,\n &.mappedin-compact-show .mappedin-ctrl-attrib-inner {\n display: inline-block;\n }\n\n &.mappedin-compact {\n background-color: transparent;\n }\n\n &.mappedin-compact-show {\n min-width: 15px;\n min-height: 15px;\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 0.5);\n }\n }\n\n .mappedin-ctrl-attrib-top-left {\n float: left;\n border-bottom-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-top-right {\n float: right;\n border-bottom-left-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-left {\n float: left;\n border-top-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-right {\n float: right;\n border-top-left-radius: 4px;\n }\n .mappedin-ctrl-attrib-top-left,\n .mappedin-ctrl-attrib-bottom-left {\n padding: 3px 5px 1px 20px;\n }\n\n .mappedin-ctrl-attrib-inner {\n display: inline-block;\n margin-right: 12px;\n }\n\n .mappedin-ctrl-attrib-inner,\n .mappedin-ctrl-attrib-inner a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n }\n\n .mappedin-ctrl-attrib-inner-bold,\n .mappedin-ctrl-attrib-inner-bold a {\n font-weight: bold;\n }\n\n .mappedin-ctrl-attrib-inner a:hover {\n color: #017ef1;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .mappedin-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 15px;\n height: 15px;\n box-sizing: border-box;\n border-radius: 50%;\n top: 0;\n right: 2px;\n border: 1px;\n }\n .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,\n .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {\n left: 2px;\n }\n }\n}\n";var dk='.maplibregl-map {\n font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;\n overflow: hidden;\n position: relative;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n}\n\n.maplibregl-canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.maplibregl-map:fullscreen {\n width: 100%;\n height: 100%;\n}\n\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass {\n touch-action: none;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive,\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass {\n cursor: grab;\n user-select: none;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer {\n cursor: pointer;\n}\n\n.maplibregl-canvas-container.maplibregl-interactive:active,\n.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active {\n cursor: grabbing;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas {\n touch-action: pan-x pan-y;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-drag-pan,\n.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas {\n touch-action: pinch-zoom;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,\n.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas {\n touch-action: none;\n}\n\n.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,\n.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas {\n touch-action: pan-x pan-y;\n}\n\n.maplibregl-ctrl-top-left,\n.maplibregl-ctrl-top-right,\n.maplibregl-ctrl-bottom-left,\n.maplibregl-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n}\n\n.maplibregl-ctrl-top-left {\n top: 0;\n left: 0;\n}\n\n.maplibregl-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n.maplibregl-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.maplibregl-ctrl-bottom-right {\n right: 0;\n bottom: 0;\n}\n\n.maplibregl-ctrl {\n clear: both;\n pointer-events: auto;\n\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n transform: translate(0, 0);\n}\n\n.maplibregl-ctrl-top-left .maplibregl-ctrl {\n margin: 10px 0 0 10px;\n float: left;\n}\n\n.maplibregl-ctrl-top-right .maplibregl-ctrl {\n margin: 10px 10px 0 0;\n float: right;\n}\n\n.maplibregl-ctrl-bottom-left .maplibregl-ctrl {\n margin: 0 0 10px 10px;\n float: left;\n}\n\n.maplibregl-ctrl-bottom-right .maplibregl-ctrl {\n margin: 0 10px 10px 0;\n float: right;\n}\n\n.maplibregl-ctrl-group {\n border-radius: 4px;\n background: #fff;\n}\n\n.maplibregl-ctrl-group:not(:empty) {\n box-shadow: 0 0 0 2px rgb(0 0 0 / 10%);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl-group:not(:empty) {\n box-shadow: 0 0 0 2px ButtonText;\n }\n}\n\n.maplibregl-ctrl-group button {\n width: 29px;\n height: 29px;\n display: block;\n padding: 0;\n outline: none;\n border: 0;\n box-sizing: border-box;\n background-color: transparent;\n cursor: pointer;\n}\n\n.maplibregl-ctrl-group button + button {\n border-top: 1px solid #ddd;\n}\n\n.maplibregl-ctrl button .maplibregl-ctrl-icon {\n display: block;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-position: center center;\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl-icon {\n background-color: transparent;\n }\n\n .maplibregl-ctrl-group button + button {\n border-top: 1px solid ButtonText;\n }\n}\n\n/* https://bugzilla.mozilla.org/show_bug.cgi?id=140562 */\n.maplibregl-ctrl button::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.maplibregl-ctrl-attrib-button:focus,\n.maplibregl-ctrl-group button:focus {\n box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);\n}\n\n.maplibregl-ctrl button:disabled {\n cursor: not-allowed;\n}\n\n.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon {\n opacity: 0.25;\n}\n\n@media (hover: hover) {\n .maplibregl-ctrl button:not(:disabled):hover {\n background-color: rgb(0 0 0/5%);\n }\n}\n\n.maplibregl-ctrl button:not(:disabled):active {\n background-color: rgb(0 0 0/5%);\n}\n\n.maplibregl-ctrl-group button:focus:focus-visible {\n box-shadow: 0 0 2px 2px rgb(0 150 255 / 100%);\n}\n\n.maplibregl-ctrl-group button:focus:not(:focus-visible) {\n box-shadow: none;\n}\n\n.maplibregl-ctrl-group button:focus:first-child {\n border-radius: 4px 4px 0 0;\n}\n\n.maplibregl-ctrl-group button:focus:last-child {\n border-radius: 0 0 4px 4px;\n}\n\n.maplibregl-ctrl-group button:focus:only-child {\n border-radius: inherit;\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #333);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #333);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #fff);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #fff);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #000);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #000);\n }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #333);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg");\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #fff);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #fff);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #000);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #000);\n }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #333);\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n @svg-load ctrl-compass-white url("svg/maplibregl-ctrl-compass.svg") {\n fill: #fff;\n #south { fill: #999; }\n }\n\n background-image: svg-inline(ctrl-compass-white);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {\n background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #000);\n }\n}\n\n@svg-load ctrl-globe url("svg/maplibregl-ctrl-globe.svg") {\n stroke: #333;\n}\n\n@svg-load ctrl-globe-enabled url("svg/maplibregl-ctrl-globe.svg") {\n stroke: #33b5e5;\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-globe);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-globe-enabled);\n}\n\n@svg-load ctrl-terrain url("svg/maplibregl-ctrl-terrain.svg") {\n fill: #333;\n \n}\n\n@svg-load ctrl-terrain-enabled url("svg/maplibregl-ctrl-terrain.svg") {\n fill: #33b5e5;\n \n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-terrain);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-terrain-enabled);\n}\n\n@svg-load ctrl-geolocate url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #333;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-white url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #fff;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-black url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #000;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-disabled url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #aaa;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-disabled-white url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #999;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-disabled-black url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #666;\n #stroke { fill: #f00; }\n}\n\n@svg-load ctrl-geolocate-active url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #33b5e5;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-active-error url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #e58978;\n #stroke { display: none; }\n}\n\n@svg-load ctrl-geolocate-background url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #33b5e5;\n #stroke { display: none; }\n #dot { display: none; }\n}\n\n@svg-load ctrl-geolocate-background-error url("svg/maplibregl-ctrl-geolocate.svg") {\n fill: #e54e33;\n #stroke { display: none; }\n #dot { display: none; }\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active-error);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background-error);\n}\n\n.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon {\n animation: maplibregl-spin 2s infinite linear;\n}\n\n@media (forced-colors: active) {\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-white);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled-white);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-active-error);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-background-error);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-black);\n }\n\n .maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon {\n background-image: svg-inline(ctrl-geolocate-disabled-black);\n }\n}\n\n@keyframes maplibregl-spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\na.maplibregl-ctrl-logo {\n width: 88px;\n height: 23px;\n margin: 0 0 -4px -4px;\n display: block;\n background-repeat: no-repeat;\n cursor: pointer;\n overflow: hidden;\n background-image: svg-load("svg/maplibregl-ctrl-logo.svg");\n}\n\na.maplibregl-ctrl-logo.maplibregl-compact {\n width: 14px;\n}\n\n@media (forced-colors: active) {\n a.maplibregl-ctrl-logo {\n @svg-load ctrl-logo-white url("svg/maplibregl-ctrl-logo.svg") {\n #outline { opacity: 1; }\n #fill { opacity: 1; }\n }\n\n background-color: transparent;\n background-image: svg-inline(ctrl-logo-white);\n }\n}\n\n@media (forced-colors: active) and (prefers-color-scheme: light) {\n a.maplibregl-ctrl-logo {\n @svg-load ctrl-logo-black url("svg/maplibregl-ctrl-logo.svg") {\n #outline { opacity: 1; fill: #fff; stroke: #fff; }\n #fill { opacity: 1; fill: #000; }\n }\n\n background-image: svg-inline(ctrl-logo-black);\n }\n}\n\n.maplibregl-ctrl.maplibregl-ctrl-attrib {\n padding: 0 5px;\n background-color: rgb(255 255 255 / 50%);\n margin: 0;\n}\n\n@media screen {\n .maplibregl-ctrl-attrib.maplibregl-compact {\n min-height: 20px;\n padding: 2px 24px 2px 0;\n margin: 10px;\n position: relative;\n background-color: #fff;\n color: #000;\n border-radius: 12px;\n box-sizing: content-box;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact-show {\n padding: 2px 28px 2px 8px;\n visibility: visible;\n }\n\n .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact-show,\n .maplibregl-ctrl-bottom-left > .maplibregl-ctrl-attrib.maplibregl-compact-show {\n padding: 2px 8px 2px 28px;\n border-radius: 12px;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {\n display: none;\n }\n\n .maplibregl-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");\n background-color: rgb(255 255 255 / 50%);\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n border-radius: 12px;\n outline: none;\n top: 0;\n right: 0;\n border: 0;\n }\n\n .maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n .maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n .maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button,\n .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button {\n left: 0;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,\n .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {\n display: block;\n }\n\n .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {\n background-color: rgb(0 0 0 / 5%);\n }\n\n .maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n bottom: 0;\n right: 0;\n }\n\n .maplibregl-ctrl-top-right > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n top: 0;\n right: 0;\n }\n\n .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n top: 0;\n left: 0;\n }\n\n .maplibregl-ctrl-bottom-left > .maplibregl-ctrl-attrib.maplibregl-compact::after {\n bottom: 0;\n left: 0;\n }\n}\n\n@media screen and (forced-colors: active) {\n .maplibregl-ctrl-attrib.maplibregl-compact::after {\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg", fill=#fff);\n }\n}\n\n@media screen and (forced-colors: active) and (prefers-color-scheme: light) {\n .maplibregl-ctrl-attrib.maplibregl-compact::after {\n background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");\n }\n}\n\n.maplibregl-ctrl-attrib a {\n color: rgb(0 0 0 / 75%);\n text-decoration: none;\n}\n\n.maplibregl-ctrl-attrib a:hover {\n color: inherit;\n text-decoration: underline;\n}\n\n.maplibregl-attrib-empty {\n display: none;\n}\n\n.maplibregl-ctrl-scale {\n background-color: rgb(255 255 255 / 75%);\n font-size: 10px;\n border-width: medium 2px 2px;\n border-style: none solid solid;\n border-color: #333;\n padding: 0 5px;\n color: #333;\n box-sizing: border-box;\n}\n\n.maplibregl-popup {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n will-change: transform;\n pointer-events: none;\n}\n\n.maplibregl-popup-anchor-top,\n.maplibregl-popup-anchor-top-left,\n.maplibregl-popup-anchor-top-right {\n flex-direction: column;\n}\n\n.maplibregl-popup-anchor-bottom,\n.maplibregl-popup-anchor-bottom-left,\n.maplibregl-popup-anchor-bottom-right {\n flex-direction: column-reverse;\n}\n\n.maplibregl-popup-anchor-left {\n flex-direction: row;\n}\n\n.maplibregl-popup-anchor-right {\n flex-direction: row-reverse;\n}\n\n.maplibregl-popup-tip {\n width: 0;\n height: 0;\n border: 10px solid transparent;\n z-index: 1;\n}\n\n.maplibregl-popup-anchor-top .maplibregl-popup-tip {\n align-self: center;\n border-top: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-top-left .maplibregl-popup-tip {\n align-self: flex-start;\n border-top: none;\n border-left: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {\n align-self: flex-end;\n border-top: none;\n border-right: none;\n border-bottom-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {\n align-self: center;\n border-bottom: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip {\n align-self: flex-start;\n border-bottom: none;\n border-left: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {\n align-self: flex-end;\n border-bottom: none;\n border-right: none;\n border-top-color: #fff;\n}\n\n.maplibregl-popup-anchor-left .maplibregl-popup-tip {\n align-self: center;\n border-left: none;\n border-right-color: #fff;\n}\n\n.maplibregl-popup-anchor-right .maplibregl-popup-tip {\n align-self: center;\n border-right: none;\n border-left-color: #fff;\n}\n\n.maplibregl-popup-close-button {\n position: absolute;\n right: 0;\n top: 0;\n border: 0;\n border-radius: 0 3px 0 0;\n cursor: pointer;\n background-color: transparent;\n}\n\n.maplibregl-popup-close-button:hover {\n background-color: rgb(0 0 0 / 5%);\n}\n\n.maplibregl-popup-content {\n position: relative;\n background: #fff;\n border-radius: 3px;\n box-shadow: 0 1px 2px rgb(0 0 0 / 10%);\n padding: 15px 10px;\n pointer-events: auto;\n}\n\n.maplibregl-popup-anchor-top-left .maplibregl-popup-content {\n border-top-left-radius: 0;\n}\n\n.maplibregl-popup-anchor-top-right .maplibregl-popup-content {\n border-top-right-radius: 0;\n}\n\n.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content {\n border-bottom-left-radius: 0;\n}\n\n.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content {\n border-bottom-right-radius: 0;\n}\n\n.maplibregl-popup-track-pointer {\n display: none;\n}\n\n.maplibregl-popup-track-pointer * {\n pointer-events: none;\n user-select: none;\n}\n\n.maplibregl-map:hover .maplibregl-popup-track-pointer {\n display: flex;\n}\n\n.maplibregl-map:active .maplibregl-popup-track-pointer {\n display: none;\n}\n\n.maplibregl-marker {\n position: absolute;\n top: 0;\n left: 0;\n will-change: transform;\n transition: opacity 0.2s;\n}\n\n.maplibregl-user-location-dot {\n background-color: #1da1f2;\n width: 15px;\n height: 15px;\n border-radius: 50%;\n}\n\n.maplibregl-user-location-dot::before {\n background-color: #1da1f2;\n content: "";\n width: 15px;\n height: 15px;\n border-radius: 50%;\n position: absolute;\n animation: maplibregl-user-location-dot-pulse 2s infinite;\n}\n\n.maplibregl-user-location-dot::after {\n border-radius: 50%;\n border: 2px solid #fff;\n content: "";\n height: 19px;\n left: -2px;\n position: absolute;\n top: -2px;\n width: 19px;\n box-sizing: border-box;\n box-shadow: 0 0 3px rgb(0 0 0 / 35%);\n}\n\n@keyframes maplibregl-user-location-dot-pulse {\n 0% { transform: scale(1); opacity: 1; }\n 70% { transform: scale(3); opacity: 0; }\n 100% { transform: scale(1); opacity: 0; }\n}\n\n.maplibregl-user-location-dot-stale {\n background-color: #aaa;\n}\n\n.maplibregl-user-location-dot-stale::after {\n display: none;\n}\n\n.maplibregl-user-location-accuracy-circle {\n background-color: #1da1f233;\n width: 1px;\n height: 1px;\n border-radius: 100%;\n}\n\n.maplibregl-crosshair,\n.maplibregl-crosshair .maplibregl-interactive,\n.maplibregl-crosshair .maplibregl-interactive:active {\n cursor: crosshair;\n}\n\n.maplibregl-boxzoom {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n background: #fff;\n border: 2px dotted #202020;\n opacity: 0.5;\n}\n\n.maplibregl-cooperative-gesture-screen {\n background: rgba(0 0 0 / 40%);\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: white;\n padding: 1rem;\n font-size: 1.4em;\n line-height: 1.2;\n opacity: 0;\n pointer-events: none;\n transition: opacity 1s ease 1s;\n z-index: 99999;\n}\n\n.maplibregl-cooperative-gesture-screen.maplibregl-show {\n opacity: 1;\n transition: opacity 0.05s;\n}\n\n.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {\n display: none;\n}\n\n@media (hover: none), (pointer: coarse) {\n .maplibregl-cooperative-gesture-screen .maplibregl-desktop-message {\n display: none;\n }\n\n .maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {\n display: block;\n }\n}\n\n.maplibregl-pseudo-fullscreen {\n position: fixed !important;\n width: 100% !important;\n height: 100% !important;\n top: 0 !important;\n left: 0 !important;\n z-index: 99999;\n}\n';var pk=".mappedin-annotation-marker {\n --mappedin-annotation-border-radius: 5px;\n --mappedin-annotation-border-width: 2px;\n --mappedin-annotation-background-color: #ffffff;\n --mappedin-annotation-scale: 0.7;\n\n position: relative;\n box-sizing: border-box;\n border-radius: var(--mappedin-annotation-border-radius);\n border: var(--mappedin-annotation-border-width) solid var(--mappedin-annotation-background-color);\n\n transform: scale(var(--mappedin-annotation-scale)) translateY(0rem);\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.25);\n\n img {\n position: absolute;\n image-rendering: crisp-edges;\n top: 0px;\n\n object-fit: contain;\n border-radius: calc(var(--mappedin-annotation-border-radius) - var(--mappedin-annotation-border-width));\n }\n}\n";p();function CJ(e){var r,t;if(!(!e.languages||!Lm()||!((t=(r=globalThis.navigator)==null?void 0:r.languages)!=null&&t.length)))for(let n=0;n<globalThis.navigator.languages.length;n++){let o=e.languages.find(i=>i.code.toLowerCase()===globalThis.navigator.languages[n].toLowerCase());if(o)return{code:o.code,name:o.name}}}function tI(e,r){var a,l,u;let t=(a=r==null?void 0:r.languageCode)!=null?a:"",n=(l=r==null?void 0:r.fallbackToNavigatorLanguage)!=null?l:!0,o=(u=e==null?void 0:e.languages)==null?void 0:u.find(c=>c.code.toLowerCase()===t.toLowerCase()),i;if(o)i=o;else if(n==null||n)try{let c=CJ(e);c&&(i=c)}catch(c){z.error("fallbackToNavigatorLanguage is set, however, there was an error getting the navigator language",c)}return i!=null?i:e.defaultLanguage}var SJ=[ak,sk,uk,lk,ck,dk,pk],mk;function I$e(e){mk=e}var E$e=async(e,r)=>{let t,n=Bu();r&&n.updateByUserOption(r);try{r&&(t=(await Nf(H(w({},r),{baseAuthUri:n.getBaseAuthUri()}))).accessToken)}catch(a){z.warn("Getting access token failed. Outdoor map disabled.",a)}let o=new mc(e,{outdoorViewToken:t,languagePacks:r==null?void 0:r.languagePacks,env:n});return new Jm(o)},fk=!1;function C$e(e){fk=e}var hk=!1;function S$e(e){hk=e}function u0(){return hk}var DJ=async e=>{var v,I;let r=fk,t,n=Bu();n.updateByUserOption(e);let o=H(w({prefetchTokens:!0},e),{fallbackToNavigatorLanguage:(v=e.fallbackToNavigatorLanguage)!=null?v:!0}),i=new Am([o.mapId],o);if("accessToken"in o&&o.accessToken){t=o.accessToken;let{aud:C,sub:S}=ag(t);(XM.some(T=>C.includes(T))||S&&S.startsWith("client"))&&(r=!0,n.setEnterprise(r),i.setEnterprise(r))}else if("key"in o&&"secret"in o){if(o.key.startsWith("mipk_"))throw new Error("Partner API keys detected! \n\nPartner API keys should not be passed directly to the SDK. See https://developer.mappedin.com/docs/rest-apis/partner for more details.");o.key.startsWith("mik_")||(r=!0,n.setEnterprise(r),i.setEnterprise(r)),o.baseAuthUri=n.getBaseAuthUri();let C;try{C=await i.getAccessTokenAsync(),t=C==null?void 0:C.token}catch(S){throw z.warn("Get access token failed",S.message),new Error("Get access token failed: "+S.message)}}else throw new Error("Missing key or secret.");o.layoutId!=null&&(r?o.layoutId!=="draft"&&z.warn('Invalid layoutId! Use "draft" to load draft data or leave unspecified to load live data.'):z.warn("layoutId is currently unsupported!")),o.baseUri=n.getBaseUri();let a=performance.now(),l,u;if(r){let C=H(w({},o),{venue:o.mapId,clientId:o.key,clientSecret:o.secret,version:"1.0.0",perspective:o.viewId,useDraftData:o.layoutId==="draft"}),S=await Wx(C);l=S.compressed,u=S.localePacks}else l=await qx(o,t);let c=performance.now(),d=await u1(l,o.mvfVersion),m=performance.now();typeof e.onMVFParsed=="function"&&e.onMVFParsed(d);let h=s1(d);if(h.length>0?i.setMapIds(h):i.setMapIds([o.mapId]),o.prefetchTokens)try{await i.readySync()}catch(C){z.error("Failed to ready token manager!",C)}u0()&&(r&&z.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),o.mvfVersion!=="3.0.0"&&z.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let g=new mc(d,{env:n,outdoorViewToken:t,tokenManager:i,enterprise:r,localePacksUrls:u,binaryBundle:l,getMapDataOptions:o}),x=new Jm(g,{search:e.search});g.Analytics.init(H(w({accessToken:t,mapId:o.mapId,key:"key"in o?o.key:void 0,secret:"secret"in o?o.secret:void 0},o.analytics),{baseUri:n.getAnalyticsBaseUri(),context:(I=o.analytics)==null?void 0:I.context})),g.Analytics.sendGetMapDataEvent({parseDuration:m-c,downloadDuration:c-a,viewId:o.viewId});let E=g.findPreferredLanguage({languageCode:o.language,fallbackToNavigatorLanguage:o.fallbackToNavigatorLanguage});if(E)try{await x.changeLanguage(E.code)}catch(C){}return x},D$e=DJ,TJ=async()=>{if(fc===""||eb==="")return!1;let e=[fetch(fc,{mode:"same-origin"}),fetch(eb,{mode:"same-origin"})],[r,t]=[{ok:!1},{ok:!1}];try{[r,t]=await Promise.all(e)}catch(n){}return{collision:r.ok,maplibre:t.ok}},wJ=async(e,r,t)=>{var h,g,x,E,v,I,C,S,T,A,F,P,O,_,G,L;let n=performance.now(),o=T2(t,r);o&&D2(o),((h=o.injectStyles)==null||h)&&ik(SJ,{id:"mappedin__styles"});let i=QM((g=r.outdoorViewToken)!=null?g:""),a=Ym(r);(x=o.outdoorView)!=null&&x.style&&a.envControl.updateTileServerBaseUrl((E=o.outdoorView)==null?void 0:E.style);let l=!1,u=!1,c=await TJ();c&&(c.collision||(l=!0),c.maplibre||(u=!0));let d=await x8(e,{center:[r.mapCenter.longitude,r.mapCenter.latitude],bearing:o.bearing,pitch:o.pitch,zoomLevel:o.zoomLevel,backgroundAlpha:(v=o.style)==null?void 0:v.backgroundAlpha,backgroundColor:(I=o.style)==null?void 0:I.backgroundColor,outdoorView:!u&&((C=o.outdoorView)!=null&&C.token)?{headers:{"x-mappedin-tiles-key":(S=o.outdoorView)==null?void 0:S.token},style:r.getEnv().tileServerUri,enabled:!!((T=o.outdoorView)!=null&&T.enabled),lowDpi:(A=o.outdoorView)==null?void 0:A.lowDpi}:void 0,watermark:H(w({},o.watermark),{visible:(P=(F=o.watermark)==null?void 0:F.visible)!=null?P:!a.enterpriseMode&&!i.remove_watermark,onClick:mk||void 0}),attribution:o.attribution,antialias:typeof o.antialiasing=="boolean"?o.antialiasing:!!((O=o.antialiasing)!=null&&O.enabled),accessToken:r.outdoorViewToken,occlusionEnabled:!0,transformImageRequest:a.enterpriseMode?void 0:a.transformImageRequest,naturalBearing:r.naturalBearing,imagePlacementOptions:o.imagePlacementOptions,onWebGLContextCreationError:o.onWebGLContextCreationError,onWebGLContextLost:o.onWebGLContextLost,onWebGLContextRestored:o.onWebGLContextRestored,onWebGLRendererError:o.onWebGLRendererError,useStandaloneCamera:(_=o.useStandaloneCamera)!=null?_:!1,useWorkers:!((G=o.disableWorkers)!=null&&G),useCollisionWorker:!l,disableUpdateStateValidation:(L=o.disableUpdateStateValidation)!=null?L:!1}),m=new zh(d);return await m.addMap(r,o),a.Analytics.sendMapViewLoadedEvent({firstRenderDuration:performance.now()-n,dimension:m.getDimensions(),collisionWorkerDisabled:l,outdoorsWorkerDisabled:u}),m},T$e=()=>y.env.npm_package_version,w$e=wJ;export{De as a,ni as b,Ul as c,Bs as d,oi as e,_n as f,gr as g,no as h,gZ as i,Ao as j,oo as k,Mo as l,zi as m,g1 as n,Yr as o,ja as p,y1 as q,N2 as r,DM as s,Kx as t,u1 as u,oA as v,j2 as w,iA as x,v1 as y,x1 as z,Vu as A,ic as B,b1 as C,sF as D,Ha as E,_W as F,XI as G,XW as H,i6 as I,a6 as J,pJ as K,zh as L,hJ as M,tI as N,I$e as O,E$e as P,C$e as Q,S$e as R,u0 as S,DJ as T,D$e as U,TJ as V,wJ as W,T$e as X,w$e as Y};
|