@mappedin/maplibre-overlay 6.0.1-beta.58 → 6.0.1-beta.59
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/lib/esm/{GLTFExporter-ZNG777AV.js → GLTFExporter-JJK7H6NT.js} +1 -1
- package/lib/esm/{GLTFLoader-QD4ZLTRH.js → GLTFLoader-WKP6OR25.js} +1 -1
- package/lib/esm/{chunk-UUZZ5QFY.js → chunk-AYTY2WDR.js} +1 -1
- package/lib/esm/chunk-NVXDKAHA.js +1 -0
- package/lib/esm/{chunk-4CVJGNXB.js → chunk-W37QTIXX.js} +1 -1
- package/lib/esm/index.d.ts +23108 -205
- package/lib/esm/index.js +1 -1
- package/lib/esm/{text3d-ED63KWOZ.js → text3d-WTIRW2XV.js} +1 -1
- package/package.json +7 -5
- package/lib/esm/chunk-HZWE2CIJ.js +0 -1
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ky,$a as s4,A as wy,Aa as Io,B as Co,Ba as qy,C as Ay,Ca as Lr,D as Fy,Da as Jy,E as ie,Ea as Xy,F as la,Fa as Yy,G as Lu,Ga as ap,H as Oy,Ha as Qy,I as ai,Ia as up,J as By,Ja as sp,K as ui,Ka as $c,L as tp,La as e4,M as zi,Ma as t4,N as et,Na as r4,O as Lc,Oa as n4,P as Ru,Pa as cp,Q as Hr,Qa as i4,R as rp,Ra as $i,S as Py,Sa as Gc,T as ma,Ta as lp,U as My,Ua as o4,V as Nu,Va as a4,W as ju,Wa as ga,X as Ty,Xa as mp,Ya as Zc,Z as Rc,Za as u4,_ as Nc,_a as dp,a as Hd,aa as _y,ab as c4,b as Qg,ba as np,bb as l4,c as Kd,ca as Ly,cb as m4,d as Jd,da as ip,db as d4,e as Xd,ea as Ry,eb as p4,f as Tc,fa as Ny,fb as f4,g as kc,ga as da,gb as Nn,h as Eo,ha as jy,hb as h4,i as by,ia as Uy,ib as Rt,j as vy,ja as jc,jb as g4,k as Yd,ka as op,kb as y4,l as Ui,la as zy,lb as jn,m as xy,ma as Uu,mb as b4,n as De,na as pa,nb as Tt,o as Qd,oa as Uc,ob as bn,p as Rn,pa as fa,pb as Ut,q as Ey,qa as ha,r as Cy,ra as $y,s as sa,sa as Gy,t as Iy,ta as zc,u as _c,ua as Zy,v as ep,va as Vy,w as ca,wa as Wy,x as Te,xa as Hy,y as Dy,ya as Ky,z as Sy,za as zu}from"./chunk-HZWE2CIJ.js";import{a as Kr}from"./chunk-UUZZ5QFY.js";import{$a as Mc,B as vc,D as xc,Da as my,E as Li,Ea as oa,F as Ec,Fa as dy,G as Cc,Ga as aa,H as Ic,Ha as ua,I as Dc,Ia as yn,Ja as Bc,K as ny,Ka as py,L as Fe,La as ku,M as Ie,Na as _u,Q as iy,R as oy,S as ay,T as Sc,U as ue,V as Qt,W as uy,X as _r,Xa as Pc,Y as ia,Z as xo,_ as Mt,a as l,aa as cr,ab as fy,b as y,ba as vr,ca as wc,d as bc,da as Oe,e as vo,ea as Ri,eb as hy,f as Pu,g as oi,ga as Ni,gb as Ln,h as ey,ha as sy,i as Mu,ia as qd,ib as gy,ja as Ac,ka as ji,kb as yy,r as ty,sa as _n,t as ry,ta as cy,ua as Fc,va as Oc,wa as ly,ya as Tu}from"./chunk-4CVJGNXB.js";import{a as R,b as xe,c as o,d as yc,e as yo,g as bo,h as _i,i as Xg,j as f,k as s,l as _,m as W,n as dt,o as Yg,p as K}from"./chunk-LUJQR5EH.js";var uE=bo((lh,mh)=>{l();(function(e,t){typeof lh=="object"&&typeof mh<"u"?mh.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(lh,function(){"use strict";var e=o(function(n,i){if(n===void 0&&(n=[]),i===void 0&&(i=t),this.data=n,this.length=this.data.length,this.compare=i,this.length>0)for(var a=(this.length>>1)-1;a>=0;a--)this._down(a)},"TinyQueue");e.prototype.push=o(function(n){this.data.push(n),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var n=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),n}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(n){for(var i=this,a=i.data,u=i.compare,c=a[n];n>0;){var m=n-1>>1,d=a[m];if(u(c,d)>=0)break;a[n]=d,n=m}a[n]=c},"_up"),e.prototype._down=o(function(n){for(var i=this,a=i.data,u=i.compare,c=this.length>>1,m=a[n];n<c;){var d=(n<<1)+1,h=a[d],g=d+1;if(g<this.length&&u(a[g],h)<0&&(d=g,h=a[g]),u(h,m)>=0)break;a[n]=h,n=d}a[n]=m},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var cE=bo((fce,dh)=>{"use strict";l();var Am=uE();Am.default&&(Am=Am.default);dh.exports=sE;dh.exports.default=sE;function sE(e,t,r){t=t||1;for(var n,i,a,u,c=0;c<e[0].length;c++){var m=e[0][c];(!c||m[0]<n)&&(n=m[0]),(!c||m[1]<i)&&(i=m[1]),(!c||m[0]>a)&&(a=m[0]),(!c||m[1]>u)&&(u=m[1])}var d=a-n,h=u-i,g=Math.min(d,h),v=g/2;if(g===0){var b=[n,i];return b.distance=0,b}for(var S=new Am(void 0,TO),O=n;O<a;O+=g)for(var x=i;x<u;x+=g)S.push(new ro(O+v,x+v,v,e));var E=_O(e),I=new ro(n+d/2,i+h/2,0,e);I.d>E.d&&(E=I);for(var D=S.length;S.length;){var C=S.pop();C.d>E.d&&(E=C,r&&console.log("found best %d after %d probes",Math.round(1e4*C.d)/1e4,D)),!(C.max-E.d<=t)&&(v=C.h/2,S.push(new ro(C.x-v,C.y-v,v,e)),S.push(new ro(C.x+v,C.y-v,v,e)),S.push(new ro(C.x-v,C.y+v,v,e)),S.push(new ro(C.x+v,C.y+v,v,e)),D+=4)}r&&(console.log("num probes: "+D),console.log("best distance: "+E.d));var A=[E.x,E.y];return A.distance=E.d,A}o(sE,"polylabel");function TO(e,t){return t.max-e.max}o(TO,"compareMax");function ro(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=kO(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(ro,"Cell");function kO(e,t,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var u=r[a],c=0,m=u.length,d=m-1;c<m;d=c++){var h=u[c],g=u[d];h[1]>t!=g[1]>t&&e<(g[0]-h[0])*(t-h[1])/(g[1]-h[1])+h[0]&&(n=!n),i=Math.min(i,LO(e,t,h,g))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(kO,"pointToPolygonDist");function _O(e){for(var t=0,r=0,n=0,i=e[0],a=0,u=i.length,c=u-1;a<u;c=a++){var m=i[a],d=i[c],h=m[0]*d[1]-d[0]*m[1];r+=(m[0]+d[0])*h,n+=(m[1]+d[1])*h,t+=h*3}return t===0?new ro(i[0][0],i[0][1],0,e):new ro(r/t,n/t,0,e)}o(_O,"getCentroidCell");function LO(e,t,r,n){var i=r[0],a=r[1],u=n[0]-i,c=n[1]-a;if(u!==0||c!==0){var m=((e-i)*u+(t-a)*c)/(u*u+c*c);m>1?(i=n[0],a=n[1]):m>0&&(i+=u*m,a+=c*m)}return u=e-i,c=t-a,u*u+c*c}o(LO,"getSegDistSq")});var XE=bo((yg,bg)=>{l();(function(e,t){typeof yg=="object"&&typeof bg<"u"?bg.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(yg,function(){"use strict";function e(x,E,I,D,C){o(function A(T,k,j,U,G){for(;U>j;){if(U-j>600){var $=U-j+1,X=k-j+1,V=Math.log($),Y=.5*Math.exp(2*V/3),oe=.5*Math.sqrt(V*Y*($-Y)/$)*(X-$/2<0?-1:1),Z=Math.max(j,Math.floor(k-X*Y/$+oe)),ee=Math.min(U,Math.floor(k+($-X)*Y/$+oe));A(T,k,Z,ee,G)}var te=T[k],Q=j,de=U;for(t(T,j,k),G(T[U],te)>0&&t(T,j,U);Q<de;){for(t(T,Q,de),Q++,de--;G(T[Q],te)<0;)Q++;for(;G(T[de],te)>0;)de--}G(T[j],te)===0?t(T,j,de):t(T,++de,U),de<=k&&(j=de+1),k<=de&&(U=de-1)}},"t")(x,E,I||0,D||x.length-1,C||r)}o(e,"t");function t(x,E,I){var D=x[E];x[E]=x[I],x[I]=D}o(t,"i");function r(x,E){return x<E?-1:x>E?1:0}o(r,"n");var n=o(function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function i(x,E,I){if(!I)return E.indexOf(x);for(var D=0;D<E.length;D++)if(I(x,E[D]))return D;return-1}o(i,"e");function a(x,E){u(x,0,x.children.length,E,x)}o(a,"a");function u(x,E,I,D,C){C||(C=S(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var A=E;A<I;A++){var T=x.children[A];c(C,x.leaf?D(T):T)}return C}o(u,"h");function c(x,E){return x.minX=Math.min(x.minX,E.minX),x.minY=Math.min(x.minY,E.minY),x.maxX=Math.max(x.maxX,E.maxX),x.maxY=Math.max(x.maxY,E.maxY),x}o(c,"o");function m(x,E){return x.minX-E.minX}o(m,"s");function d(x,E){return x.minY-E.minY}o(d,"l");function h(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}o(h,"f");function g(x){return x.maxX-x.minX+(x.maxY-x.minY)}o(g,"u");function v(x,E){return x.minX<=E.minX&&x.minY<=E.minY&&E.maxX<=x.maxX&&E.maxY<=x.maxY}o(v,"m");function b(x,E){return E.minX<=x.maxX&&E.minY<=x.maxY&&E.maxX>=x.minX&&E.maxY>=x.minY}o(b,"c");function S(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}o(S,"p");function O(x,E,I,D,C){for(var A=[E,I];A.length;)if(!((I=A.pop())-(E=A.pop())<=D)){var T=E+Math.ceil((I-E)/D/2)*D;e(x,T,E,I,C),A.push(E,T,T,I)}}return o(O,"d"),n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(x){var E=this.data,I=[];if(!b(x,E))return I;for(var D=this.toBBox,C=[];E;){for(var A=0;A<E.children.length;A++){var T=E.children[A],k=E.leaf?D(T):T;b(x,k)&&(E.leaf?I.push(T):v(x,k)?this._all(T,I):C.push(T))}E=C.pop()}return I},n.prototype.collides=function(x){var E=this.data;if(!b(x,E))return!1;for(var I=[];E;){for(var D=0;D<E.children.length;D++){var C=E.children[D],A=E.leaf?this.toBBox(C):C;if(b(x,A)){if(E.leaf||v(x,A))return!0;I.push(C)}}E=I.pop()}return!1},n.prototype.load=function(x){if(!x||!x.length)return this;if(x.length<this._minEntries){for(var E=0;E<x.length;E++)this.insert(x[E]);return this}var I=this._build(x.slice(),0,x.length-1,0);if(this.data.children.length)if(this.data.height===I.height)this._splitRoot(this.data,I);else{if(this.data.height<I.height){var D=this.data;this.data=I,I=D}this._insert(I,this.data.height-I.height-1,!0)}else this.data=I;return this},n.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},n.prototype.clear=function(){return this.data=S([]),this},n.prototype.remove=function(x,E){if(!x)return this;for(var I,D,C,A=this.data,T=this.toBBox(x),k=[],j=[];A||k.length;){if(A||(A=k.pop(),D=k[k.length-1],I=j.pop(),C=!0),A.leaf){var U=i(x,A.children,E);if(U!==-1)return A.children.splice(U,1),k.push(A),this._condense(k),this}C||A.leaf||!v(A,T)?D?(I++,A=D.children[I],C=!1):A=null:(k.push(A),j.push(I),I=0,D=A,A=A.children[0])}return this},n.prototype.toBBox=function(x){return x},n.prototype.compareMinX=function(x,E){return x.minX-E.minX},n.prototype.compareMinY=function(x,E){return x.minY-E.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(x){return this.data=x,this},n.prototype._all=function(x,E){for(var I=[];x;)x.leaf?E.push.apply(E,x.children):I.push.apply(I,x.children),x=I.pop();return E},n.prototype._build=function(x,E,I,D){var C,A=I-E+1,T=this._maxEntries;if(A<=T)return a(C=S(x.slice(E,I+1)),this.toBBox),C;D||(D=Math.ceil(Math.log(A)/Math.log(T)),T=Math.ceil(A/Math.pow(T,D-1))),(C=S([])).leaf=!1,C.height=D;var k=Math.ceil(A/T),j=k*Math.ceil(Math.sqrt(T));O(x,E,I,j,this.compareMinX);for(var U=E;U<=I;U+=j){var G=Math.min(U+j-1,I);O(x,U,G,k,this.compareMinY);for(var $=U;$<=G;$+=k){var X=Math.min($+k-1,G);C.children.push(this._build(x,$,X,D-1))}}return a(C,this.toBBox),C},n.prototype._chooseSubtree=function(x,E,I,D){for(;D.push(E),!E.leaf&&D.length-1!==I;){for(var C=1/0,A=1/0,T=void 0,k=0;k<E.children.length;k++){var j=E.children[k],U=h(j),G=($=x,X=j,(Math.max(X.maxX,$.maxX)-Math.min(X.minX,$.minX))*(Math.max(X.maxY,$.maxY)-Math.min(X.minY,$.minY))-U);G<A?(A=G,C=U<C?U:C,T=j):G===A&&U<C&&(C=U,T=j)}E=T||E.children[0]}var $,X;return E},n.prototype._insert=function(x,E,I){var D=I?x:this.toBBox(x),C=[],A=this._chooseSubtree(D,this.data,E,C);for(A.children.push(x),c(A,D);E>=0&&C[E].children.length>this._maxEntries;)this._split(C,E),E--;this._adjustParentBBoxes(D,C,E)},n.prototype._split=function(x,E){var I=x[E],D=I.children.length,C=this._minEntries;this._chooseSplitAxis(I,C,D);var A=this._chooseSplitIndex(I,C,D),T=S(I.children.splice(A,I.children.length-A));T.height=I.height,T.leaf=I.leaf,a(I,this.toBBox),a(T,this.toBBox),E?x[E-1].children.push(T):this._splitRoot(I,T)},n.prototype._splitRoot=function(x,E){this.data=S([x,E]),this.data.height=x.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(x,E,I){for(var D,C,A,T,k,j,U,G=1/0,$=1/0,X=E;X<=I-E;X++){var V=u(x,0,X,this.toBBox),Y=u(x,X,I,this.toBBox),oe=(C=V,A=Y,T=void 0,k=void 0,j=void 0,U=void 0,T=Math.max(C.minX,A.minX),k=Math.max(C.minY,A.minY),j=Math.min(C.maxX,A.maxX),U=Math.min(C.maxY,A.maxY),Math.max(0,j-T)*Math.max(0,U-k)),Z=h(V)+h(Y);oe<G?(G=oe,D=X,$=Z<$?Z:$):oe===G&&Z<$&&($=Z,D=X)}return D||I-E},n.prototype._chooseSplitAxis=function(x,E,I){var D=x.leaf?this.compareMinX:m,C=x.leaf?this.compareMinY:d;this._allDistMargin(x,E,I,D)<this._allDistMargin(x,E,I,C)&&x.children.sort(D)},n.prototype._allDistMargin=function(x,E,I,D){x.children.sort(D);for(var C=this.toBBox,A=u(x,0,E,C),T=u(x,I-E,I,C),k=g(A)+g(T),j=E;j<I-E;j++){var U=x.children[j];c(A,x.leaf?C(U):U),k+=g(A)}for(var G=I-E-1;G>=E;G--){var $=x.children[G];c(T,x.leaf?C($):$),k+=g(T)}return k},n.prototype._adjustParentBBoxes=function(x,E,I){for(var D=I;D>=0;D--)c(E[D],x)},n.prototype._condense=function(x){for(var E=x.length-1,I=void 0;E>=0;E--)x[E].children.length===0?E>0?(I=x[E-1].children).splice(I.indexOf(x[E]),1):this.clear():a(x[E],this.toBBox)},n})});var Ig=bo(he=>{"use strict";l();Object.defineProperty(he,"__esModule",{value:!0});he.earthRadius=63710088e-1;he.factors={centimeters:he.earthRadius*100,centimetres:he.earthRadius*100,degrees:he.earthRadius/111325,feet:he.earthRadius*3.28084,inches:he.earthRadius*39.37,kilometers:he.earthRadius/1e3,kilometres:he.earthRadius/1e3,meters:he.earthRadius,metres:he.earthRadius,miles:he.earthRadius/1609.344,millimeters:he.earthRadius*1e3,millimetres:he.earthRadius*1e3,nauticalmiles:he.earthRadius/1852,radians:1,yards:he.earthRadius*1.0936};he.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/he.earthRadius,yards:1.0936133};he.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 po(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(po,"feature");he.feature=po;function oP(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return vg(t).geometry;case"LineString":return Eg(t).geometry;case"Polygon":return xg(t).geometry;case"MultiPoint":return QE(t).geometry;case"MultiLineString":return YE(t).geometry;case"MultiPolygon":return e6(t).geometry;default:throw new Error(e+" is invalid")}}o(oP,"geometry");he.geometry=oP;function vg(e,t,r){if(r===void 0&&(r={}),!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(!Ed(e[0])||!Ed(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return po(n,t,r)}o(vg,"point");he.point=vg;function aP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return vg(n,t)}),r)}o(aP,"points");he.points=aP;function xg(e,t,r){r===void 0&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var u=0;u<a[a.length-1].length;u++)if(a[a.length-1][u]!==a[0][u])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:e};return po(c,t,r)}o(xg,"polygon");he.polygon=xg;function uP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return xg(n,t)}),r)}o(uP,"polygons");he.polygons=uP;function Eg(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return po(n,t,r)}o(Eg,"lineString");he.lineString=Eg;function sP(e,t,r){return r===void 0&&(r={}),Cd(e.map(function(n){return Eg(n,t)}),r)}o(sP,"lineStrings");he.lineStrings=sP;function Cd(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o(Cd,"featureCollection");he.featureCollection=Cd;function YE(e,t,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:e};return po(n,t,r)}o(YE,"multiLineString");he.multiLineString=YE;function QE(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return po(n,t,r)}o(QE,"multiPoint");he.multiPoint=QE;function e6(e,t,r){r===void 0&&(r={});var n={type:"MultiPolygon",coordinates:e};return po(n,t,r)}o(e6,"multiPolygon");he.multiPolygon=e6;function cP(e,t,r){r===void 0&&(r={});var n={type:"GeometryCollection",geometries:e};return po(n,t,r)}o(cP,"geometryCollection");he.geometryCollection=cP;function lP(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}o(lP,"round");he.round=lP;function t6(e,t){t===void 0&&(t="kilometers");var r=he.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(t6,"radiansToLength");he.radiansToLength=t6;function Cg(e,t){t===void 0&&(t="kilometers");var r=he.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(Cg,"lengthToRadians");he.lengthToRadians=Cg;function mP(e,t){return r6(Cg(e,t))}o(mP,"lengthToDegrees");he.lengthToDegrees=mP;function dP(e){var t=e%360;return t<0&&(t+=360),t}o(dP,"bearingToAzimuth");he.bearingToAzimuth=dP;function r6(e){var t=e%(2*Math.PI);return t*180/Math.PI}o(r6,"radiansToDegrees");he.radiansToDegrees=r6;function pP(e){var t=e%360;return t*Math.PI/180}o(pP,"degreesToRadians");he.degreesToRadians=pP;function fP(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return t6(Cg(e,t),r)}o(fP,"convertLength");he.convertLength=fP;function hP(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=he.areaFactors[t];if(!n)throw new Error("invalid original units");var i=he.areaFactors[r];if(!i)throw new Error("invalid final units");return e/n*i}o(hP,"convertArea");he.convertArea=hP;function Ed(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(Ed,"isNumber");he.isNumber=Ed;function gP(e){return!!e&&e.constructor===Object}o(gP,"isObject");he.isObject=gP;function yP(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(t){if(!Ed(t))throw new Error("bbox must only contain numbers")})}o(yP,"validateBBox");he.validateBBox=yP;function bP(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")}o(bP,"validateId");he.validateId=bP});var Sg=bo(Vt=>{"use strict";l();Object.defineProperty(Vt,"__esModule",{value:!0});var br=Ig();function Js(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,h=0,g=0,v,b=e.type,S=b==="FeatureCollection",O=b==="Feature",x=S?e.features.length:1,E=0;E<x;E++){d=S?e.features[E].geometry:O?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var I=0;I<c;I++){var D=0,C=0;if(u=v?d.geometries[I]:d,u!==null){m=u.coordinates;var A=u.type;switch(h=r&&(A==="Polygon"||A==="MultiPolygon")?1:0,A){case null:break;case"Point":if(t(m,g,E,D,C)===!1)return!1;g++,D++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,E,D,C)===!1)return!1;g++,A==="MultiPoint"&&D++}A==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-h;i++){if(t(m[n][i],g,E,D,C)===!1)return!1;g++}A==="MultiLineString"&&D++,A==="Polygon"&&C++}A==="Polygon"&&D++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-h;a++){if(t(m[n][i][a],g,E,D,C)===!1)return!1;g++}C++}D++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(Js(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(Js,"coordEach");function vP(e,t,r,n){var i=r;return Js(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(vP,"coordReduce");function n6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(n6,"propEach");function xP(e,t,r){var n=r;return n6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(xP,"propReduce");function i6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(i6,"featureEach");function EP(e,t,r){var n=r;return i6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(EP,"featureReduce");function CP(e){var t=[];return Js(e,function(r){t.push(r)}),t}o(CP,"coordAll");function Dg(e,t){var r,n,i,a,u,c,m,d,h,g,v=0,b=e.type==="FeatureCollection",S=e.type==="Feature",O=b?e.features.length:1;for(r=0;r<O;r++){for(c=b?e.features[r].geometry:S?e.geometry:e,d=b?e.features[r].properties:S?e.properties:{},h=b?e.features[r].bbox:S?e.bbox:void 0,g=b?e.features[r].id:S?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,h,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,h,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,h,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(Dg,"geomEach");function IP(e,t,r){var n=r;return Dg(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(IP,"geomReduce");function Id(e,t){Dg(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(br.feature(r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var h=r.coordinates[d],g={type:m,coordinates:h};if(t(br.feature(g,i),n,d)===!1)return!1}})}o(Id,"flattenEach");function DP(e,t,r){var n=r;return Id(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(DP,"flattenReduce");function o6(e,t){Id(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,h=0;if(Js(r,function(g,v,b,S,O){if(c===void 0||n>m||S>d||O>h){c=g,m=n,d=S,h=O,a=0;return}var x=br.lineString([c,g],r.properties);if(t(x,n,i,O,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(o6,"segmentEach");function SP(e,t,r){var n=r,i=!1;return o6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(SP,"segmentReduce");function a6(e,t){if(!e)throw new Error("geojson is required");Id(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(br.lineString(u[c],r.properties),n,i,c)===!1)return!1;break}}})}o(a6,"lineEach");function wP(e,t,r){var n=r;return a6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(wP,"lineReduce");function AP(e,t){if(t=t||{},!br.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),br.lineString([m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),br.lineString([m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),br.lineString([m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),br.lineString([m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(AP,"findSegment");function FP(e,t){if(t=t||{},!br.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return br.point(m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),br.point(m[n],u,t);case"LineString":return a<0&&(a=m.length+a),br.point(m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),br.point(m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),br.point(m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),br.point(m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(FP,"findPoint");Vt.coordAll=CP;Vt.coordEach=Js;Vt.coordReduce=vP;Vt.featureEach=i6;Vt.featureReduce=EP;Vt.findPoint=FP;Vt.findSegment=AP;Vt.flattenEach=Id;Vt.flattenReduce=DP;Vt.geomEach=Dg;Vt.geomReduce=IP;Vt.lineEach=a6;Vt.lineReduce=wP;Vt.propEach=n6;Vt.propReduce=xP;Vt.segmentEach=o6;Vt.segmentReduce=SP});var u6=bo(Ag=>{"use strict";l();Object.defineProperty(Ag,"__esModule",{value:!0});var OP=Sg();function wg(e){var t=[1/0,1/0,-1/0,-1/0];return OP.coordEach(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}o(wg,"bbox");wg.default=wg;Ag.default=wg});var d6=bo((_ye,Fg)=>{l();var ni=XE(),c6=Ig(),l6=Sg(),bu=u6().default,BP=l6.featureEach,Tye=l6.coordEach,kye=c6.polygon,s6=c6.featureCollection;function m6(e){var t=new ni(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:bu(r),ni.prototype.insert.call(this,r)},t.load=function(r){var n=[];return Array.isArray(r)?r.forEach(function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:bu(i),n.push(i)}):BP(r,function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:bu(i),n.push(i)}),ni.prototype.load.call(this,n)},t.remove=function(r,n){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:bu(r),ni.prototype.remove.call(this,r,n)},t.clear=function(){return ni.prototype.clear.call(this)},t.search=function(r){var n=ni.prototype.search.call(this,this.toBBox(r));return s6(n)},t.collides=function(r){return ni.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=ni.prototype.all.call(this);return s6(r)},t.toJSON=function(){return ni.prototype.toJSON.call(this)},t.fromJSON=function(r){return ni.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var n;if(r.bbox)n=r.bbox;else if(Array.isArray(r)&&r.length===4)n=r;else if(Array.isArray(r)&&r.length===6)n=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")n=bu(r);else if(r.type==="FeatureCollection")n=bu(r);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}o(m6,"geojsonRbush");Fg.exports=m6;Fg.exports.default=m6});l();import{MapView as rM}from"@mappedin/mappedin-js";l();l();l();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:o(function(){return this},"get"),configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var v4="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=";l();l();var K6=!1;function x4(){return K6}o(x4,"isTestMode");var pp=class pp{constructor(t){f(this,"backgroundAlpha",1);f(this,"backgroundColor",new Mt);f(this,"width",0);f(this,"height",0);f(this,"options",{});f(this,"renderer");f(this,"enabledLayers",new Set([0,1]));f(this,"handleWebGLContextCreationError",o(t=>{var r,n;(n=(r=this.options).onWebGLContextCreationError)==null||n.call(r,t)},"handleWebGLContextCreationError"));f(this,"handleWebGLContextLost",o(t=>{var r,n;(n=(r=this.options).onWebGLContextLost)==null||n.call(r,t)},"handleWebGLContextLost"));f(this,"handleWebGLContextRestored",o(t=>{var r,n;(n=(r=this.options).onWebGLContextRestored)==null||n.call(r,t)},"handleWebGLContextRestored"));var r,n,i,a,u;try{this.options=t,x4()?(this.renderer={setSize:o(()=>{},"setSize"),state:{reset:o(()=>{},"reset")},properties:{get:o(()=>{},"get")},getSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getSize"),getDrawingBufferSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getDrawingBufferSize"),getClearAlpha:o(()=>1,"getClearAlpha"),getClearColor:o(()=>new Mt,"getClearColor"),autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:o(()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),"getContext"),readRenderTargetPixelsAsync:o(()=>Promise.resolve([]),"readRenderTargetPixelsAsync"),setRenderTarget:o(()=>{},"setRenderTarget"),setClearColor:o(()=>{},"setClearColor"),clear:o(()=>{},"clear"),render:o(()=>{},"render"),clearStencil:o(()=>{},"clearStencil"),clearDepth:o(()=>{},"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 yy({canvas:t.canvas,alpha:t.alpha||!1,stencil:!0,antialias:typeof t.antialias=="boolean"?t.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new Mt((r=t.backgroundColor)!=null?r:"#ffffff"),this.backgroundAlpha=(n=t.backgroundAlpha)!=null?n:1}catch(c){De.error(c),t.onWebGLRendererError&&t.onWebGLRendererError(c)}(i=this.domElement())==null||i.addEventListener("webglcontextlost",this.handleWebGLContextLost),(a=this.domElement())==null||a.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(u=this.domElement())==null||u.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var t,r,n,i,a;this.renderer&&((r=(t=this.renderer).dispose)==null||r.call(t)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}render(t,r){if(this.renderer){this.renderer.state.reset(),r.layers.disableAll();for(let n of this.enabledLayers.values())r.layers.enable(n);this.renderer.clearStencil(),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,r),this.renderer.clearDepth(),r.layers.disableAll(),r.layers.enable(Hr.ALWAYS_ON_TOP_PATHS),this.renderer.render(t,r),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){y.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};o(pp,"Renderer");var Vc=pp;l();l();var E4='"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';l();l();l();l();l();function C4(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}o(C4,"contains");l();function I4(e,t){let[r,n]=t;return r>=e.x&&r<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}o(I4,"intersectPoint");l();function D4(e,t){let r=t.x,n=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x,c=e.y,m=e.x+e.w,d=e.y+e.h;return r<m&&u<i&&n<d&&c<a}o(D4,"intersects");l();function si(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}o(si,"appendItems");l();var fp=class fp{constructor(t,r,n,i,a){f(this,"x");f(this,"y");f(this,"w");f(this,"h");f(this,"userData");this.userData=typeof a>"u"?null:a,this.x=t,this.y=r,this.w=n,this.h=i}contains(t){return t===this?!1:C4(this,t)}intersects(t){return D4(this,t)}intersectsPoint(t){return I4(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.8)",t.fillRect(this.x,this.y,this.w,this.h)}};o(fp,"Rectangle");var Se=fp;var Do=class Do{constructor(t,r){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=r,this.boundary=t}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:t,y:r,w:n,h:i}=this.boundary;this.topLeft=new Do(new Se(t,r,n/2,i/2),this),this.topRight=new Do(new Se(t+n/2,r,n/2,i/2),this),this.bottomLeft=new Do(new Se(t,r+i/2,n/2,i/2),this),this.bottomRight=new Do(new Se(t+n/2,r+i/2,n/2,i/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(si(r,this.topLeft.queryRect(t)),si(r,this.topRight.queryRect(t)),si(r,this.bottomLeft.queryRect(t)),si(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(si(r,this.topLeft.queryPoint(t)),si(r,this.topRight.queryPoint(t)),si(r,this.bottomLeft.queryPoint(t)),si(r,this.bottomRight.queryPoint(t))),r}insert(t){return(this.parent?!this.boundary.contains(t):!this.boundary.intersects(t))?!1:this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0)}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};o(Do,"QuadTree");var qr=Do;l();function S4(e,t,r){let n,i,a,u=null,c=0;r||(r={});let m=o(function(){c=r.leading===!1?0:Date.now(),u=null,a=e.apply(n,i),u||(n=i=null)},"later");return function(){let d=Date.now();!c&&r.leading===!1&&(c=d);let h=t-(d-c);return n=globalThis,i=arguments,h<=0||h>t?(u&&(clearTimeout(u),u=null),c=d,a=e.apply(n,i),u||(n=i=null)):!u&&r.trailing!==!1&&(u=setTimeout(m,h)),a}}o(S4,"throttle");function w4(e){let t=e[0].map(r=>{let n=r[0].map(i=>({index:i[4],boundingBox:[i[0],i[1],i[2],i[3]]}));return{enabledAndVisible:r[1]===1,rank:r[2]===1?la:0,x:r[3],y:r[4],shouldCollideWithScreenEdges:r[5]===1,bboxes:n,lockedToStrategyIndex:r[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:t,devicePixelRatio:e[1]}}o(w4,"unpackMessage");l();var hp=9,Gi=200,Wc=10;function A4(e,t,r,n,i,a,u="-1"){var T,k;let c=1/0,m=1/0,d=-1/0,h=-1/0,g=new Se(-Wc,0,5,r),v=new Se(-Wc,0,t,5),b=new Se(t-5,0,t+Wc,r),S=new Se(0,r-5,t,r+Wc),O=q6(t,r,n,i,a),x=[g,v,b,S],E=new Se(-Gi,-Gi,t+Gi*2,r+Gi*2);for(let j of e){let U,G;for(let $=0;$<j.bboxes.length;$++){if(j.bboxes[$]==null||(U=j.bboxes[$].boundingBox,G=j.bboxes[$].index,j.lockedToStrategyIndex!==-1&&G!==j.lockedToStrategyIndex))continue;let[X,V,Y,oe]=U,[Z,ee,te,Q]=[j.y-X,j.y+V,j.x-Y,j.x+oe],de=te,je=Z,Me=Q-te,Ve=ee-Z;c=Math.min(c,de)-Gi,m=Math.min(m,je)-Gi,d=Math.max(d,de+Me)+Gi,h=Math.max(h,je+Ve)+Gi,j.bboxes[$].boundingRect=new Se(de,je,Me,Ve)}}let I=new qr(new Se(c,m,d-c,h-m)),D={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},C=0;for(let j=0;j<e.length;j++){let U=e[j];((k=(T=U.bboxes)==null?void 0:T[0])==null?void 0:k.index)===hp&&(D.staticColliders.push(U.bboxes[0].boundingRect),I.insert(U.bboxes[0].boundingRect),C++)}e=e.slice(C,e.length);let A;for(let j=0;j<e.length;j++)if(A=e[j],D.colliders[j]=[-1,0],A.enabledAndVisible){let[U,G,$]=[1/0,-1,void 0];for(let{index:X,boundingRect:V}of A.bboxes){if(V==null)continue;let Y=[];if(Y=I.queryRect(V).filter(Z=>V.intersects(Z)),A.shouldCollideWithScreenEdges&&x.forEach(Z=>{V.intersects(Z)&&Y.push(Z)}),V.intersects(O)){D.colliders[j]=[-1,0,V];break}if(Y.length<=U&&($=V,G=X,U=Y.length),Y.length===0){I.insert(V),D.colliders[j]=[X,E.contains(V)?0:1,V];break}}A.rank===la&&$!=null&&(I.insert($),D.colliders[j]=[G,E.contains($)?0:1,$])}else D.colliders[j]=[-1,0];return D}o(A4,"processColliders");function q6(e,t,r,n,i){switch(i){case"top-left":return new Se(0,0,r,n);case"top-right":return new Se(e-r,0,r,n);case"bottom-left":return new Se(0,t-n,r,n);case"bottom-right":return new Se(e-r,t-n,r,n);case"center":return new Se((e-r)/2,(t-n)/2,r,n);case"top":return new Se((e-r)/2,0,r,n);case"bottom":return new Se((e-r)/2,t-n,r,n);case"left":return new Se(0,(t-n)/2,r,n);case"right":return new Se(e-r,(t-n)/2,r,n);default:return new Se(0,t-n,r,n)}}o(q6,"getWatermarkBoundary");l();var gp=class gp{constructor(){f(this,"onerror",o(()=>{},"onerror"));f(this,"onmessage",o(()=>{},"onmessage"));f(this,"postMessage",o(t=>{let r=w4(t);this.onmessage({data:A4(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId)})},"postMessage"));f(this,"terminate",o(()=>{},"terminate"))}};o(gp,"SyncWorker");var $u=gp;l();l();globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var t=performance.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:o(function(){return Math.max(0,50-(performance.now()-t))},"timeRemaining")})},0)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){clearTimeout(e)};l();l();l();l();l();l();l();l();l();l();l();function yp(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")}o(yp,"getCoord");function So(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")}o(So,"getCoords");function ya(e){return e.type==="Feature"?e.geometry:e}o(ya,"getGeom");function Zi(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=yp(e),i=ya(t),a=i.type,u=t.bbox,c=i.coordinates;if(u&&J6(n,u)===!1)return!1;a==="Polygon"&&(c=[c]);for(var m=!1,d=0;d<c.length&&!m;d++)if(F4(n,c[d][0],r.ignoreBoundary)){for(var h=!1,g=1;g<c[d].length&&!h;)F4(n,c[d][g],!r.ignoreBoundary)&&(h=!0),g++;h||(m=!0)}return m}o(Zi,"booleanPointInPolygon");function F4(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var u=t[i][0],c=t[i][1],m=t[a][0],d=t[a][1],h=e[1]*(u-m)+c*(m-e[0])+d*(e[0]-u)===0&&(u-e[0])*(m-e[0])<=0&&(c-e[1])*(d-e[1])<=0;if(h)return!r;var g=c>e[1]!=d>e[1]&&e[0]<(m-u)*(e[1]-c)/(d-c)+u;g&&(n=!n)}return n}o(F4,"inRing");function J6(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}o(J6,"inBBox");l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();var _e={};_i(_e,{HasPropertyKey:()=>e2,IsArray:()=>lr,IsAsyncIterator:()=>bp,IsBigInt:()=>Gu,IsBoolean:()=>Vi,IsDate:()=>wo,IsFunction:()=>vp,IsIterator:()=>xp,IsNull:()=>Ep,IsNumber:()=>vn,IsObject:()=>at,IsRegExp:()=>Zu,IsString:()=>pt,IsSymbol:()=>Cp,IsUint8Array:()=>ci,IsUndefined:()=>xt});l();function e2(e,t){return t in e}o(e2,"HasPropertyKey");function bp(e){return at(e)&&!lr(e)&&!ci(e)&&Symbol.asyncIterator in e}o(bp,"IsAsyncIterator");function lr(e){return Array.isArray(e)}o(lr,"IsArray");function Gu(e){return typeof e=="bigint"}o(Gu,"IsBigInt");function Vi(e){return typeof e=="boolean"}o(Vi,"IsBoolean");function wo(e){return e instanceof globalThis.Date}o(wo,"IsDate");function vp(e){return typeof e=="function"}o(vp,"IsFunction");function xp(e){return at(e)&&!lr(e)&&!ci(e)&&Symbol.iterator in e}o(xp,"IsIterator");function Ep(e){return e===null}o(Ep,"IsNull");function vn(e){return typeof e=="number"}o(vn,"IsNumber");function at(e){return typeof e=="object"&&e!==null}o(at,"IsObject");function Zu(e){return e instanceof globalThis.RegExp}o(Zu,"IsRegExp");function pt(e){return typeof e=="string"}o(pt,"IsString");function Cp(e){return typeof e=="symbol"}o(Cp,"IsSymbol");function ci(e){return e instanceof globalThis.Uint8Array}o(ci,"IsUint8Array");function xt(e){return e===void 0}o(xt,"IsUndefined");function t2(e){return e.map(t=>Hc(t))}o(t2,"ArrayType");function r2(e){return new Date(e.getTime())}o(r2,"DateType");function n2(e){return new Uint8Array(e)}o(n2,"Uint8ArrayType");function i2(e){return new RegExp(e.source,e.flags)}o(i2,"RegExpType");function o2(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Hc(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Hc(e[r]);return t}o(o2,"ObjectType");function Hc(e){return lr(e)?t2(e):wo(e)?r2(e):ci(e)?n2(e):Zu(e)?i2(e):at(e)?o2(e):e}o(Hc,"Visit");function ht(e){return Hc(e)}o(ht,"Clone");function B4(e){return e.map(t=>Vu(t))}o(B4,"CloneRest");function Vu(e,t){return t===void 0?ht(e):ht(R(R({},t),e))}o(Vu,"CloneType");l();l();l();function Kc(e){return Ee(e)&&Symbol.asyncIterator in e}o(Kc,"IsAsyncIterator");function qc(e){return Ee(e)&&Symbol.iterator in e}o(qc,"IsIterator");function Ip(e){return Ee(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(Ip,"IsStandardObject");function Jc(e){return e instanceof Promise}o(Jc,"IsPromise");function xr(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(xr,"IsDate");function P4(e){return e instanceof globalThis.Map}o(P4,"IsMap");function M4(e){return e instanceof globalThis.Set}o(M4,"IsSet");function Jr(e){return ArrayBuffer.isView(e)}o(Jr,"IsTypedArray");function ba(e){return e instanceof globalThis.Uint8Array}o(ba,"IsUint8Array");function ge(e,t){return t in e}o(ge,"HasPropertyKey");function Ee(e){return e!==null&&typeof e=="object"}o(Ee,"IsObject");function ve(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ve,"IsArray");function Et(e){return e===void 0}o(Et,"IsUndefined");function li(e){return e===null}o(li,"IsNull");function Un(e){return typeof e=="boolean"}o(Un,"IsBoolean");function pe(e){return typeof e=="number"}o(pe,"IsNumber");function Xc(e){return Number.isInteger(e)}o(Xc,"IsInteger");function er(e){return typeof e=="bigint"}o(er,"IsBigInt");function Le(e){return typeof e=="string"}o(Le,"IsString");function Wi(e){return typeof e=="function"}o(Wi,"IsFunction");function mi(e){return typeof e=="symbol"}o(mi,"IsSymbol");function tr(e){return er(e)||Un(e)||li(e)||pe(e)||Le(e)||mi(e)||Et(e)}o(tr,"IsValueType");var Ye;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(u,c){return e.ExactOptionalPropertyTypes?c in u:u[c]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){let c=Ee(u);return e.AllowArrayObject?c:c&&!ve(u)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return r(u)&&!(u instanceof Date)&&!(u instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return e.AllowNaN?pe(u):Number.isFinite(u)}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){let c=Et(u);return e.AllowNullVoid?c||u===null:c}o(a,"IsVoidLike"),e.IsVoidLike=a})(Ye||(Ye={}));l();function a2(e){return globalThis.Object.freeze(e).map(t=>Wu(t))}o(a2,"ImmutableArray");function u2(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Wu(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Wu(e[r]);return globalThis.Object.freeze(t)}o(u2,"ImmutableObject");function Wu(e){return lr(e)?a2(e):wo(e)?e:ci(e)?e:Zu(e)?e:at(e)?u2(e):e}o(Wu,"Immutable");function H(e,t){let r=t!==void 0?R(R({},t),e):e;switch(Ye.InstanceMode){case"freeze":return Wu(r);case"clone":return ht(r);default:return r}}o(H,"CreateType");l();var Dp=class Dp extends Error{constructor(t){super(t)}};o(Dp,"TypeBoxError");var fe=Dp;l();l();l();var gt=Symbol.for("TypeBox.Transform"),di=Symbol.for("TypeBox.Readonly"),Er=Symbol.for("TypeBox.Optional"),Xr=Symbol.for("TypeBox.Hint"),L=Symbol.for("TypeBox.Kind");function T4(e){return at(e)&&e[di]==="Readonly"}o(T4,"IsReadonly");function zn(e){return at(e)&&e[Er]==="Optional"}o(zn,"IsOptional");function Sp(e){return Ue(e,"Any")}o(Sp,"IsAny");function pi(e){return Ue(e,"Array")}o(pi,"IsArray");function Hu(e){return Ue(e,"AsyncIterator")}o(Hu,"IsAsyncIterator");function wp(e){return Ue(e,"BigInt")}o(wp,"IsBigInt");function Ap(e){return Ue(e,"Boolean")}o(Ap,"IsBoolean");function Ku(e){return Ue(e,"Constructor")}o(Ku,"IsConstructor");function s2(e){return Ue(e,"Date")}o(s2,"IsDate");function qu(e){return Ue(e,"Function")}o(qu,"IsFunction");function Ao(e){return Ue(e,"Integer")}o(Ao,"IsInteger");function kt(e){return Ue(e,"Intersect")}o(kt,"IsIntersect");function Ju(e){return Ue(e,"Iterator")}o(Ju,"IsIterator");function Ue(e,t){return at(e)&&L in e&&e[L]===t}o(Ue,"IsKindOf");function fi(e){return Ue(e,"Literal")}o(fi,"IsLiteral");function Rr(e){return Ue(e,"MappedKey")}o(Rr,"IsMappedKey");function yt(e){return Ue(e,"MappedResult")}o(yt,"IsMappedResult");function Hi(e){return Ue(e,"Never")}o(Hi,"IsNever");function c2(e){return Ue(e,"Not")}o(c2,"IsNot");function l2(e){return Ue(e,"Null")}o(l2,"IsNull");function Fo(e){return Ue(e,"Number")}o(Fo,"IsNumber");function zt(e){return Ue(e,"Object")}o(zt,"IsObject");function Oo(e){return Ue(e,"Promise")}o(Oo,"IsPromise");function Fp(e){return Ue(e,"Record")}o(Fp,"IsRecord");function Op(e){return Ue(e,"Ref")}o(Op,"IsRef");function Bp(e){return Ue(e,"RegExp")}o(Bp,"IsRegExp");function Xu(e){return Ue(e,"String")}o(Xu,"IsString");function m2(e){return Ue(e,"Symbol")}o(m2,"IsSymbol");function Nr(e){return Ue(e,"TemplateLiteral")}o(Nr,"IsTemplateLiteral");function d2(e){return Ue(e,"This")}o(d2,"IsThis");function va(e){return at(e)&> in e}o(va,"IsTransform");function xn(e){return Ue(e,"Tuple")}o(xn,"IsTuple");function p2(e){return Ue(e,"Undefined")}o(p2,"IsUndefined");function We(e){return Ue(e,"Union")}o(We,"IsUnion");function f2(e){return Ue(e,"Uint8Array")}o(f2,"IsUint8Array");function h2(e){return Ue(e,"Unknown")}o(h2,"IsUnknown");function g2(e){return Ue(e,"Unsafe")}o(g2,"IsUnsafe");function y2(e){return Ue(e,"Void")}o(y2,"IsVoid");function Ki(e){return at(e)&&L in e&&pt(e[L])}o(Ki,"IsKind");function En(e){return Sp(e)||pi(e)||Ap(e)||wp(e)||Hu(e)||Ku(e)||s2(e)||qu(e)||Ao(e)||kt(e)||Ju(e)||fi(e)||Rr(e)||yt(e)||Hi(e)||c2(e)||l2(e)||Fo(e)||zt(e)||Oo(e)||Fp(e)||Op(e)||Bp(e)||Xu(e)||m2(e)||Nr(e)||d2(e)||xn(e)||p2(e)||We(e)||f2(e)||h2(e)||g2(e)||y2(e)||Ki(e)}o(En,"IsSchema");var w={};_i(w,{IsAny:()=>R4,IsArray:()=>N4,IsAsyncIterator:()=>j4,IsBigInt:()=>U4,IsBoolean:()=>z4,IsConstructor:()=>$4,IsDate:()=>G4,IsFunction:()=>Z4,IsInteger:()=>V4,IsIntersect:()=>W4,IsIterator:()=>H4,IsKind:()=>y1,IsKindOf:()=>Ne,IsLiteral:()=>Qu,IsLiteralBoolean:()=>I2,IsLiteralNumber:()=>q4,IsLiteralString:()=>K4,IsLiteralValue:()=>J4,IsMappedKey:()=>X4,IsMappedResult:()=>Y4,IsNever:()=>Q4,IsNot:()=>e1,IsNull:()=>t1,IsNumber:()=>r1,IsObject:()=>n1,IsOptional:()=>C2,IsPromise:()=>i1,IsProperties:()=>kp,IsReadonly:()=>E2,IsRecord:()=>o1,IsRecursive:()=>D2,IsRef:()=>a1,IsRegExp:()=>u1,IsSchema:()=>Re,IsString:()=>s1,IsSymbol:()=>c1,IsTemplateLiteral:()=>l1,IsThis:()=>m1,IsTransform:()=>ft,IsTuple:()=>d1,IsUint8Array:()=>p1,IsUndefined:()=>xa,IsUnion:()=>_p,IsUnionLiteral:()=>S2,IsUnknown:()=>f1,IsUnsafe:()=>h1,IsVoid:()=>g1,TypeGuardUnknownTypeError:()=>Pp});l();var Lp=class Lp extends fe{};o(Lp,"TypeGuardUnknownTypeError");var Pp=Lp,b2=["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 k4(e){try{return new RegExp(e),!0}catch(t){return!1}}o(k4,"IsPattern");function Mp(e){if(!pt(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(Mp,"IsControlCharacterFree");function _4(e){return Tp(e)||Re(e)}o(_4,"IsAdditionalProperties");function Yu(e){return xt(e)||Gu(e)}o(Yu,"IsOptionalBigInt");function mt(e){return xt(e)||vn(e)}o(mt,"IsOptionalNumber");function Tp(e){return xt(e)||Vi(e)}o(Tp,"IsOptionalBoolean");function tt(e){return xt(e)||pt(e)}o(tt,"IsOptionalString");function v2(e){return xt(e)||pt(e)&&Mp(e)&&k4(e)}o(v2,"IsOptionalPattern");function x2(e){return xt(e)||pt(e)&&Mp(e)}o(x2,"IsOptionalFormat");function L4(e){return xt(e)||Re(e)}o(L4,"IsOptionalSchema");function E2(e){return at(e)&&e[di]==="Readonly"}o(E2,"IsReadonly");function C2(e){return at(e)&&e[Er]==="Optional"}o(C2,"IsOptional");function R4(e){return Ne(e,"Any")&&tt(e.$id)}o(R4,"IsAny");function N4(e){return Ne(e,"Array")&&e.type==="array"&&tt(e.$id)&&Re(e.items)&&mt(e.minItems)&&mt(e.maxItems)&&Tp(e.uniqueItems)&&L4(e.contains)&&mt(e.minContains)&&mt(e.maxContains)}o(N4,"IsArray");function j4(e){return Ne(e,"AsyncIterator")&&e.type==="AsyncIterator"&&tt(e.$id)&&Re(e.items)}o(j4,"IsAsyncIterator");function U4(e){return Ne(e,"BigInt")&&e.type==="bigint"&&tt(e.$id)&&Yu(e.exclusiveMaximum)&&Yu(e.exclusiveMinimum)&&Yu(e.maximum)&&Yu(e.minimum)&&Yu(e.multipleOf)}o(U4,"IsBigInt");function z4(e){return Ne(e,"Boolean")&&e.type==="boolean"&&tt(e.$id)}o(z4,"IsBoolean");function $4(e){return Ne(e,"Constructor")&&e.type==="Constructor"&&tt(e.$id)&&lr(e.parameters)&&e.parameters.every(t=>Re(t))&&Re(e.returns)}o($4,"IsConstructor");function G4(e){return Ne(e,"Date")&&e.type==="Date"&&tt(e.$id)&&mt(e.exclusiveMaximumTimestamp)&&mt(e.exclusiveMinimumTimestamp)&&mt(e.maximumTimestamp)&&mt(e.minimumTimestamp)&&mt(e.multipleOfTimestamp)}o(G4,"IsDate");function Z4(e){return Ne(e,"Function")&&e.type==="Function"&&tt(e.$id)&&lr(e.parameters)&&e.parameters.every(t=>Re(t))&&Re(e.returns)}o(Z4,"IsFunction");function V4(e){return Ne(e,"Integer")&&e.type==="integer"&&tt(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(V4,"IsInteger");function kp(e){return at(e)&&Object.entries(e).every(([t,r])=>Mp(t)&&Re(r))}o(kp,"IsProperties");function W4(e){return Ne(e,"Intersect")&&!(pt(e.type)&&e.type!=="object")&&lr(e.allOf)&&e.allOf.every(t=>Re(t)&&!ft(t))&&tt(e.type)&&(Tp(e.unevaluatedProperties)||L4(e.unevaluatedProperties))&&tt(e.$id)}o(W4,"IsIntersect");function H4(e){return Ne(e,"Iterator")&&e.type==="Iterator"&&tt(e.$id)&&Re(e.items)}o(H4,"IsIterator");function Ne(e,t){return at(e)&&L in e&&e[L]===t}o(Ne,"IsKindOf");function K4(e){return Qu(e)&&pt(e.const)}o(K4,"IsLiteralString");function q4(e){return Qu(e)&&vn(e.const)}o(q4,"IsLiteralNumber");function I2(e){return Qu(e)&&Vi(e.const)}o(I2,"IsLiteralBoolean");function Qu(e){return Ne(e,"Literal")&&tt(e.$id)&&J4(e.const)}o(Qu,"IsLiteral");function J4(e){return Vi(e)||vn(e)||pt(e)}o(J4,"IsLiteralValue");function X4(e){return Ne(e,"MappedKey")&&lr(e.keys)&&e.keys.every(t=>vn(t)||pt(t))}o(X4,"IsMappedKey");function Y4(e){return Ne(e,"MappedResult")&&kp(e.properties)}o(Y4,"IsMappedResult");function Q4(e){return Ne(e,"Never")&&at(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(Q4,"IsNever");function e1(e){return Ne(e,"Not")&&Re(e.not)}o(e1,"IsNot");function t1(e){return Ne(e,"Null")&&e.type==="null"&&tt(e.$id)}o(t1,"IsNull");function r1(e){return Ne(e,"Number")&&e.type==="number"&&tt(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(r1,"IsNumber");function n1(e){return Ne(e,"Object")&&e.type==="object"&&tt(e.$id)&&kp(e.properties)&&_4(e.additionalProperties)&&mt(e.minProperties)&&mt(e.maxProperties)}o(n1,"IsObject");function i1(e){return Ne(e,"Promise")&&e.type==="Promise"&&tt(e.$id)&&Re(e.item)}o(i1,"IsPromise");function o1(e){return Ne(e,"Record")&&e.type==="object"&&tt(e.$id)&&_4(e.additionalProperties)&&at(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&k4(r[0])&&at(t.patternProperties)&&Re(t.patternProperties[r[0]])})(e)}o(o1,"IsRecord");function D2(e){return at(e)&&Xr in e&&e[Xr]==="Recursive"}o(D2,"IsRecursive");function a1(e){return Ne(e,"Ref")&&tt(e.$id)&&pt(e.$ref)}o(a1,"IsRef");function u1(e){return Ne(e,"RegExp")&&tt(e.$id)&&pt(e.source)&&pt(e.flags)&&mt(e.maxLength)&&mt(e.minLength)}o(u1,"IsRegExp");function s1(e){return Ne(e,"String")&&e.type==="string"&&tt(e.$id)&&mt(e.minLength)&&mt(e.maxLength)&&v2(e.pattern)&&x2(e.format)}o(s1,"IsString");function c1(e){return Ne(e,"Symbol")&&e.type==="symbol"&&tt(e.$id)}o(c1,"IsSymbol");function l1(e){return Ne(e,"TemplateLiteral")&&e.type==="string"&&pt(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(l1,"IsTemplateLiteral");function m1(e){return Ne(e,"This")&&tt(e.$id)&&pt(e.$ref)}o(m1,"IsThis");function ft(e){return at(e)&> in e}o(ft,"IsTransform");function d1(e){return Ne(e,"Tuple")&&e.type==="array"&&tt(e.$id)&&vn(e.minItems)&&vn(e.maxItems)&&e.minItems===e.maxItems&&(xt(e.items)&&xt(e.additionalItems)&&e.minItems===0||lr(e.items)&&e.items.every(t=>Re(t)))}o(d1,"IsTuple");function xa(e){return Ne(e,"Undefined")&&e.type==="undefined"&&tt(e.$id)}o(xa,"IsUndefined");function S2(e){return _p(e)&&e.anyOf.every(t=>K4(t)||q4(t))}o(S2,"IsUnionLiteral");function _p(e){return Ne(e,"Union")&&tt(e.$id)&&at(e)&&lr(e.anyOf)&&e.anyOf.every(t=>Re(t))}o(_p,"IsUnion");function p1(e){return Ne(e,"Uint8Array")&&e.type==="Uint8Array"&&tt(e.$id)&&mt(e.minByteLength)&&mt(e.maxByteLength)}o(p1,"IsUint8Array");function f1(e){return Ne(e,"Unknown")&&tt(e.$id)}o(f1,"IsUnknown");function h1(e){return Ne(e,"Unsafe")}o(h1,"IsUnsafe");function g1(e){return Ne(e,"Void")&&e.type==="void"&&tt(e.$id)}o(g1,"IsVoid");function y1(e){return at(e)&&L in e&&pt(e[L])&&!b2.includes(e[L])}o(y1,"IsKind");function Re(e){return at(e)&&(R4(e)||N4(e)||z4(e)||U4(e)||j4(e)||$4(e)||G4(e)||Z4(e)||V4(e)||W4(e)||H4(e)||Qu(e)||X4(e)||Y4(e)||Q4(e)||e1(e)||t1(e)||r1(e)||n1(e)||i1(e)||o1(e)||a1(e)||u1(e)||s1(e)||c1(e)||l1(e)||m1(e)||d1(e)||xa(e)||_p(e)||p1(e)||f1(e)||h1(e)||g1(e)||y1(e))}o(Re,"IsSchema");l();var Rp="(true|false)",es="(0|[1-9][0-9]*)",Np="(.*)",w2="(?!.*)",i8="^".concat(Rp,"$"),hi="^".concat(es,"$"),gi="^".concat(Np,"$"),b1="^".concat(w2,"$");l();var Cr={};_i(Cr,{Clear:()=>F2,Delete:()=>O2,Entries:()=>A2,Get:()=>M2,Has:()=>B2,Set:()=>P2});l();var Ea=new Map;function A2(){return new Map(Ea)}o(A2,"Entries");function F2(){return Ea.clear()}o(F2,"Clear");function O2(e){return Ea.delete(e)}o(O2,"Delete");function B2(e){return Ea.has(e)}o(B2,"Has");function P2(e,t){Ea.set(e,t)}o(P2,"Set");function M2(e){return Ea.get(e)}o(M2,"Get");var $t={};_i($t,{Clear:()=>k2,Delete:()=>_2,Entries:()=>T2,Get:()=>N2,Has:()=>L2,Set:()=>R2});l();var Ca=new Map;function T2(){return new Map(Ca)}o(T2,"Entries");function k2(){return Ca.clear()}o(k2,"Clear");function _2(e){return Ca.delete(e)}o(_2,"Delete");function L2(e){return Ca.has(e)}o(L2,"Has");function R2(e,t){Ca.set(e,t)}o(R2,"Set");function N2(e){return Ca.get(e)}o(N2,"Get");l();function v1(e,t){return e.includes(t)}o(v1,"SetIncludes");function x1(e){return[...new Set(e)]}o(x1,"SetDistinct");function j2(e,t){return e.filter(r=>t.includes(r))}o(j2,"SetIntersect");function U2(e,t){return e.reduce((r,n)=>j2(r,n),t)}o(U2,"SetIntersectManyResolve");function E1(e){return e.length===1?e[0]:e.length>1?U2(e.slice(1),e[0]):[]}o(E1,"SetIntersectMany");function C1(e){let t=[];for(let r of e)t.push(...r);return t}o(C1,"SetUnionMany");l();function qi(e){return H({[L]:"Any"},e)}o(qi,"Any");l();function Yc(e,t){return H({[L]:"Array",type:"array",items:e},t)}o(Yc,"Array");l();function Qc(e,t){return H({[L]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(Qc,"AsyncIterator");l();l();l();function z2(e,t){let i=e,{[t]:r}=i;return yo(i,[yc(t)])}o(z2,"DiscardKey");function At(e,t){return t.reduce((r,n)=>z2(r,n),e)}o(At,"Discard");l();function rt(e){return H({[L]:"Never",not:{}},e)}o(rt,"Never");l();l();function ze(e){return H({[L]:"MappedResult",properties:e})}o(ze,"MappedResult");l();l();function el(e,t,r){return H({[L]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(el,"Constructor");l();function Ji(e,t,r){return H({[L]:"Function",type:"Function",parameters:e,returns:t},r)}o(Ji,"Function");l();l();l();l();function ts(e,t){return H({[L]:"Union",anyOf:e},t)}o(ts,"UnionCreate");function $2(e){return e.some(t=>zn(t))}o($2,"IsUnionOptional");function I1(e){return e.map(t=>zn(t)?G2(t):t)}o(I1,"RemoveOptionalFromRest");function G2(e){return At(e,[Er])}o(G2,"RemoveOptionalFromType");function Z2(e,t){return $2(e)?Or(ts(I1(e),t)):ts(I1(e),t)}o(Z2,"ResolveUnion");function $n(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):Z2(e,t)}o($n,"UnionEvaluated");l();function nt(e,t){return e.length===0?rt(t):e.length===1?H(e[0],t):ts(e,t)}o(nt,"Union");l();l();l();var Up=class Up extends fe{};o(Up,"TemplateLiteralParserError");var tl=Up;function V2(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(V2,"Unescape");function jp(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(jp,"IsNonEscaped");function yi(e,t){return jp(e,t,"(")}o(yi,"IsOpenParen");function rs(e,t){return jp(e,t,")")}o(rs,"IsCloseParen");function D1(e,t){return jp(e,t,"|")}o(D1,"IsSeparator");function W2(e){if(!(yi(e,0)&&rs(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(yi(e,r)&&(t+=1),rs(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(W2,"IsGroup");function H2(e){return e.slice(1,e.length-1)}o(H2,"InGroup");function K2(e){let t=0;for(let r=0;r<e.length;r++)if(yi(e,r)&&(t+=1),rs(e,r)&&(t-=1),D1(e,r)&&t===0)return!0;return!1}o(K2,"IsPrecedenceOr");function q2(e){for(let t=0;t<e.length;t++)if(yi(e,t))return!0;return!1}o(q2,"IsPrecedenceAnd");function J2(e){let[t,r]=[0,0],n=[];for(let a=0;a<e.length;a++)if(yi(e,a)&&(t+=1),rs(e,a)&&(t-=1),D1(e,a)&&t===0){let u=e.slice(r,a);u.length>0&&n.push(Ia(u)),r=a+1}let i=e.slice(r);return i.length>0&&n.push(Ia(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(J2,"Or");function X2(e){function t(i,a){if(!yi(i,a))throw new tl("TemplateLiteralParser: Index must point to open parens");let u=0;for(let c=a;c<i.length;c++)if(yi(i,c)&&(u+=1),rs(i,c)&&(u-=1),u===0)return[a,c];throw new tl("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,a){for(let u=a;u<i.length;u++)if(yi(i,u))return[a,u];return[a,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(yi(e,i)){let[a,u]=t(e,i),c=e.slice(a,u+1);n.push(Ia(c)),i=u}else{let[a,u]=r(e,i),c=e.slice(a,u);c.length>0&&n.push(Ia(c)),i=u-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(X2,"And");function Ia(e){return W2(e)?Ia(H2(e)):K2(e)?J2(e):q2(e)?X2(e):{type:"const",const:V2(e)}}o(Ia,"TemplateLiteralParse");function Da(e){return Ia(e.slice(1,e.length-1))}o(Da,"TemplateLiteralParseExact");var $p=class $p extends fe{};o($p,"TemplateLiteralFiniteError");var zp=$p;function Y2(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]*"}o(Y2,"IsNumberExpression");function Q2(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"}o(Q2,"IsBooleanExpression");function eC(e){return e.type==="const"&&e.const===".*"}o(eC,"IsStringExpression");function Bo(e){return Y2(e)||eC(e)?!1:Q2(e)?!0:e.type==="and"?e.expr.every(t=>Bo(t)):e.type==="or"?e.expr.every(t=>Bo(t)):e.type==="const"?!0:(()=>{throw new zp("Unknown expression type")})()}o(Bo,"IsTemplateLiteralExpressionFinite");function rl(e){let t=Da(e.pattern);return Bo(t)}o(rl,"IsTemplateLiteralFinite");l();var Zp=class Zp extends fe{};o(Zp,"TemplateLiteralGenerateError");var Gp=Zp;function*S1(e){if(e.length===1)return yield*K(e[0]);for(let t of e[0])for(let r of S1(e.slice(1)))yield"".concat(t).concat(r)}o(S1,"GenerateReduce");function*tC(e){return yield*K(S1(e.expr.map(t=>[...ns(t)])))}o(tC,"GenerateAnd");function*rC(e){for(let t of e.expr)yield*K(ns(t))}o(rC,"GenerateOr");function*nC(e){return yield e.const}o(nC,"GenerateConst");function*ns(e){return e.type==="and"?yield*K(tC(e)):e.type==="or"?yield*K(rC(e)):e.type==="const"?yield*K(nC(e)):(()=>{throw new Gp("Unknown expression")})()}o(ns,"TemplateLiteralExpressionGenerate");function Sa(e){let t=Da(e.pattern);return Bo(t)?[...ns(t)]:[]}o(Sa,"TemplateLiteralGenerate");l();l();function Ke(e,t){return H({[L]:"Literal",const:e,type:typeof e},t)}o(Ke,"Literal");l();function nl(e){return H({[L]:"Boolean",type:"boolean"},e)}o(nl,"Boolean");l();function wa(e){return H({[L]:"BigInt",type:"bigint"},e)}o(wa,"BigInt");l();function Gn(e){return H({[L]:"Number",type:"number"},e)}o(Gn,"Number");l();function Yr(e){return H({[L]:"String",type:"string"},e)}o(Yr,"String");function*iC(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield nl():t==="number"?yield Gn():t==="bigint"?yield wa():t==="string"?yield Yr():yield(()=>{let r=t.split("|").map(n=>Ke(n.trim()));return r.length===0?rt():r.length===1?r[0]:$n(r)})()}o(iC,"FromUnion");function*oC(e){if(e[1]!=="{"){let t=Ke("$"),r=Vp(e.slice(1));return yield*K([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=iC(e.slice(2,t)),n=Vp(e.slice(t+1));return yield*K([...r,...n])}yield Ke(e)}o(oC,"FromTerminal");function*Vp(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=Ke(e.slice(0,t)),n=oC(e.slice(t));return yield*K([r,...n])}yield Ke(e)}o(Vp,"FromSyntax");function w1(e){return[...Vp(e)]}o(w1,"TemplateLiteralSyntax");l();var Kp=class Kp extends fe{};o(Kp,"TemplateLiteralPatternError");var Wp=Kp;function aC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(aC,"Escape");function A1(e,t){return Nr(e)?e.pattern.slice(1,e.pattern.length-1):We(e)?"(".concat(e.anyOf.map(r=>A1(r,t)).join("|"),")"):Fo(e)?"".concat(t).concat(es):Ao(e)?"".concat(t).concat(es):wp(e)?"".concat(t).concat(es):Xu(e)?"".concat(t).concat(Np):fi(e)?"".concat(t).concat(aC(e.const.toString())):Ap(e)?"".concat(t).concat(Rp):(()=>{throw new Wp("Unexpected Kind '".concat(e[L],"'"))})()}o(A1,"Visit");function Hp(e){return"^".concat(e.map(t=>A1(t,"")).join(""),"$")}o(Hp,"TemplateLiteralPattern");l();function Po(e){let r=Sa(e).map(n=>Ke(n));return $n(r)}o(Po,"TemplateLiteralToUnion");l();function il(e,t){let r=pt(e)?Hp(w1(e)):Hp(e);return H({[L]:"TemplateLiteral",type:"string",pattern:r},t)}o(il,"TemplateLiteral");function uC(e){return Sa(e).map(r=>r.toString())}o(uC,"FromTemplateLiteral");function sC(e){let t=[];for(let r of e)t.push(...Br(r));return t}o(sC,"FromUnion");function cC(e){return[e.toString()]}o(cC,"FromLiteral");function Br(e){return[...new Set(Nr(e)?uC(e):We(e)?sC(e.anyOf):fi(e)?cC(e.const):Fo(e)?["[number]"]:Ao(e)?["[number]"]:[])]}o(Br,"IndexPropertyKeys");l();function lC(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Aa(e,Br(t[i]),r);return n}o(lC,"FromProperties");function mC(e,t,r){return lC(e,t.properties,r)}o(mC,"FromMappedResult");function F1(e,t,r){let n=mC(e,t,r);return ze(n)}o(F1,"IndexFromMappedResult");function B1(e,t){return e.map(r=>P1(r,t))}o(B1,"FromRest");function dC(e){return e.filter(t=>!Hi(t))}o(dC,"FromIntersectRest");function pC(e,t){return ol(dC(B1(e,t)))}o(pC,"FromIntersect");function fC(e){return e.some(t=>Hi(t))?[]:e}o(fC,"FromUnionRest");function hC(e,t){return $n(fC(B1(e,t)))}o(hC,"FromUnion");function gC(e,t){return t in e?e[t]:t==="[number]"?$n(e):rt()}o(gC,"FromTuple");function yC(e,t){return t==="[number]"?e:rt()}o(yC,"FromArray");function bC(e,t){return t in e?e[t]:rt()}o(bC,"FromProperty");function P1(e,t){var r;return kt(e)?pC(e.allOf,t):We(e)?hC(e.anyOf,t):xn(e)?gC((r=e.items)!=null?r:[],t):pi(e)?yC(e.items,t):zt(e)?bC(e.properties,t):rt()}o(P1,"IndexFromPropertyKey");function is(e,t){return t.map(r=>P1(e,r))}o(is,"IndexFromPropertyKeys");function O1(e,t){return $n(is(e,t))}o(O1,"FromSchema");function Aa(e,t,r){return yt(t)?F1(e,t,r):Rr(t)?M1(e,t,r):H(En(t)?O1(e,Br(t)):O1(e,t),r)}o(Aa,"Index");function vC(e,t,r){return{[t]:Aa(e,[t],ht(r))}}o(vC,"MappedIndexPropertyKey");function xC(e,t,r){return t.reduce((n,i)=>R(R({},n),vC(e,i,r)),{})}o(xC,"MappedIndexPropertyKeys");function EC(e,t,r){return xC(e,t.keys,r)}o(EC,"MappedIndexProperties");function M1(e,t,r){let n=EC(e,t,r);return ze(n)}o(M1,"IndexFromMappedKey");l();function al(e,t){return H({[L]:"Iterator",type:"Iterator",items:e},t)}o(al,"Iterator");l();function CC(e){let t=[];for(let r in e)zn(e[r])||t.push(r);return t}o(CC,"RequiredKeys");function IC(e,t){let r=CC(e),n=r.length>0?{[L]:"Object",type:"object",properties:e,required:r}:{[L]:"Object",type:"object",properties:e};return H(n,t)}o(IC,"_Object");var ut=IC;l();function ul(e,t){return H({[L]:"Promise",type:"Promise",item:e},t)}o(ul,"Promise");l();l();function DC(e){return H(At(e,[di]))}o(DC,"RemoveReadonly");function SC(e){return H(xe(R({},e),{[di]:"Readonly"}))}o(SC,"AddReadonly");function wC(e,t){return t===!1?DC(e):SC(e)}o(wC,"ReadonlyWithFlag");function Qr(e,t){let r=t!=null?t:!0;return yt(e)?T1(e,r):wC(e,r)}o(Qr,"Readonly");function AC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Qr(e[n],t);return r}o(AC,"FromProperties");function FC(e,t){return AC(e.properties,t)}o(FC,"FromMappedResult");function T1(e,t){let r=FC(e,t);return ze(r)}o(T1,"ReadonlyFromMappedResult");l();function Zn(e,t){return H(e.length>0?{[L]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[L]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(Zn,"Tuple");function k1(e,t){return e in t?en(e,t[e]):ze(t)}o(k1,"FromMappedResult");function OC(e){return{[e]:Ke(e)}}o(OC,"MappedKeyToKnownMappedResultProperties");function BC(e){let t={};for(let r of e)t[r]=Ke(r);return t}o(BC,"MappedKeyToUnknownMappedResultProperties");function PC(e,t){return v1(t,e)?OC(e):BC(t)}o(PC,"MappedKeyToMappedResultProperties");function MC(e,t){let r=PC(e,t);return k1(e,r)}o(MC,"FromMappedKey");function os(e,t){return t.map(r=>en(e,r))}o(os,"FromRest");function TC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=en(e,t[n]);return r}o(TC,"FromProperties");function en(e,t){var n;let r=R({},t);return zn(t)?Or(en(e,At(t,[Er]))):T4(t)?Qr(en(e,At(t,[di]))):yt(t)?k1(e,t.properties):Rr(t)?MC(e,t.keys):Ku(t)?el(os(e,t.parameters),en(e,t.returns),r):qu(t)?Ji(os(e,t.parameters),en(e,t.returns),r):Hu(t)?Qc(en(e,t.items),r):Ju(t)?al(en(e,t.items),r):kt(t)?Pr(os(e,t.allOf),r):We(t)?nt(os(e,t.anyOf),r):xn(t)?Zn(os(e,(n=t.items)!=null?n:[]),r):zt(t)?ut(TC(e,t.properties),r):pi(t)?Yc(en(e,t.items),r):Oo(t)?ul(en(e,t.item),r):t}o(en,"FromSchemaType");function kC(e,t){let r={};for(let n of e)r[n]=en(n,t);return r}o(kC,"MappedFunctionReturnType");function _1(e,t,r){let n=En(e)?Br(e):e,i=t({[L]:"MappedKey",keys:n}),a=kC(n,i);return ut(a,r)}o(_1,"Mapped");l();function _C(e){return H(At(e,[Er]))}o(_C,"RemoveOptional");function LC(e){return H(xe(R({},e),{[Er]:"Optional"}))}o(LC,"AddOptional");function RC(e,t){return t===!1?_C(e):LC(e)}o(RC,"OptionalWithFlag");function Or(e,t){let r=t!=null?t:!0;return yt(e)?L1(e,r):RC(e,r)}o(Or,"Optional");function NC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Or(e[n],t);return r}o(NC,"FromProperties");function jC(e,t){return NC(e.properties,t)}o(jC,"FromMappedResult");function L1(e,t){let r=jC(e,t);return ze(r)}o(L1,"OptionalFromMappedResult");l();function as(e,t={}){let r=e.every(i=>zt(i)),n=En(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return H(t.unevaluatedProperties===!1||En(t.unevaluatedProperties)||r?xe(R({},n),{[L]:"Intersect",type:"object",allOf:e}):xe(R({},n),{[L]:"Intersect",allOf:e}),t)}o(as,"IntersectCreate");function UC(e){return e.every(t=>zn(t))}o(UC,"IsIntersectOptional");function zC(e){return At(e,[Er])}o(zC,"RemoveOptionalFromType");function R1(e){return e.map(t=>zn(t)?zC(t):t)}o(R1,"RemoveOptionalFromRest");function $C(e,t){return UC(e)?Or(as(R1(e),t)):as(R1(e),t)}o($C,"ResolveIntersect");function ol(e,t={}){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>va(r)))throw new Error("Cannot intersect transform types");return $C(e,t)}o(ol,"IntersectEvaluated");l();function Pr(e,t){if(e.length===0)return rt(t);if(e.length===1)return H(e[0],t);if(e.some(r=>va(r)))throw new Error("Cannot intersect transform types");return as(e,t)}o(Pr,"Intersect");function N1(e){return e.map(t=>qp(t))}o(N1,"FromRest");function GC(e){return Pr(N1(e))}o(GC,"FromIntersect");function ZC(e){return nt(N1(e))}o(ZC,"FromUnion");function VC(e){return qp(e)}o(VC,"FromPromise");function qp(e){return kt(e)?GC(e.allOf):We(e)?ZC(e.anyOf):Oo(e)?VC(e.item):e}o(qp,"AwaitedResolve");function j1(e,t){return H(qp(e),t)}o(j1,"Awaited");l();l();l();l();function U1(e){let t=[];for(let r of e)t.push(Kt(r));return t}o(U1,"FromRest");function WC(e){let t=U1(e);return C1(t)}o(WC,"FromIntersect");function HC(e){let t=U1(e);return E1(t)}o(HC,"FromUnion");function KC(e){return e.map((t,r)=>r.toString())}o(KC,"FromTuple");function qC(e){return["[number]"]}o(qC,"FromArray");function JC(e){return globalThis.Object.getOwnPropertyNames(e)}o(JC,"FromProperties");function XC(e){return Jp?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(XC,"FromPatternProperties");function Kt(e){var t;return kt(e)?WC(e.allOf):We(e)?HC(e.anyOf):xn(e)?KC((t=e.items)!=null?t:[]):pi(e)?qC(e.items):zt(e)?JC(e.properties):Fp(e)?XC(e.patternProperties):[]}o(Kt,"KeyOfPropertyKeys");var Jp=!1;function bi(e){Jp=!0;let t=Kt(e);Jp=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(bi,"KeyOfPattern");function YC(e){return e.map(t=>t==="[number]"?Gn():Ke(t))}o(YC,"KeyOfPropertyKeysToRest");function sl(e,t){if(yt(e))return z1(e,t);{let r=Kt(e),n=YC(r),i=$n(n);return H(i,t)}}o(sl,"KeyOf");function QC(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=sl(e[n],ht(t));return r}o(QC,"FromProperties");function eI(e,t){return QC(e.properties,t)}o(eI,"FromMappedResult");function z1(e,t){let r=eI(e,t);return ze(r)}o(z1,"KeyOfFromMappedResult");l();function Xi(e){let t=Kt(e),r=is(e,t);return t.map((n,i)=>[t[i],r[i]])}o(Xi,"KeyOfPropertyEntries");function tI(e){let t=[];for(let r of e)t.push(...Kt(r));return x1(t)}o(tI,"CompositeKeys");function rI(e){return e.filter(t=>!Hi(t))}o(rI,"FilterNever");function nI(e,t){let r=[];for(let n of e)r.push(...is(n,[t]));return rI(r)}o(nI,"CompositeProperty");function iI(e,t){let r={};for(let n of t)r[n]=ol(nI(e,n));return r}o(iI,"CompositeProperties");function $1(e,t){let r=tI(e),n=iI(e,r);return ut(n,t)}o($1,"Composite");l();l();function cl(e){return H({[L]:"Date",type:"Date"},e)}o(cl,"Date");l();function ll(e){return H({[L]:"Null",type:"null"},e)}o(ll,"Null");l();function ml(e){return H({[L]:"Symbol",type:"symbol"},e)}o(ml,"Symbol");l();function dl(e){return H({[L]:"Undefined",type:"undefined"},e)}o(dl,"Undefined");l();function pl(e){return H({[L]:"Uint8Array",type:"Uint8Array"},e)}o(pl,"Uint8Array");l();function vi(e){return H({[L]:"Unknown"},e)}o(vi,"Unknown");function oI(e){return e.map(t=>Xp(t,!1))}o(oI,"FromArray");function aI(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Qr(Xp(e[r],!1));return t}o(aI,"FromProperties");function fl(e,t){return t===!0?e:Qr(e)}o(fl,"ConditionalReadonly");function Xp(e,t){return bp(e)?fl(qi(),t):xp(e)?fl(qi(),t):lr(e)?Qr(Zn(oI(e))):ci(e)?pl():wo(e)?cl():at(e)?fl(ut(aI(e)),t):vp(e)?fl(Ji([],vi()),t):xt(e)?dl():Ep(e)?ll():Cp(e)?ml():Gu(e)?wa():vn(e)?Ke(e):Vi(e)?Ke(e):pt(e)?Ke(e):ut({})}o(Xp,"FromValue");function G1(e,t){return H(Xp(e,!0),t)}o(G1,"Const");l();function Z1(e,t){return Zn(e.parameters,t)}o(Z1,"ConstructorParameters");l();function us(e,t){return e.map(r=>Cn(r,t))}o(us,"FromRest");function uI(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Cn(e[n],t);return r}o(uI,"FromProperties");function sI(e,t){return e.parameters=us(e.parameters,t),e.returns=Cn(e.returns,t),e}o(sI,"FromConstructor");function cI(e,t){return e.parameters=us(e.parameters,t),e.returns=Cn(e.returns,t),e}o(cI,"FromFunction");function lI(e,t){return e.allOf=us(e.allOf,t),e}o(lI,"FromIntersect");function mI(e,t){return e.anyOf=us(e.anyOf,t),e}o(mI,"FromUnion");function dI(e,t){return xt(e.items)||(e.items=us(e.items,t)),e}o(dI,"FromTuple");function pI(e,t){return e.items=Cn(e.items,t),e}o(pI,"FromArray");function fI(e,t){return e.properties=uI(e.properties,t),e}o(fI,"FromObject");function hI(e,t){return e.item=Cn(e.item,t),e}o(hI,"FromPromise");function gI(e,t){return e.items=Cn(e.items,t),e}o(gI,"FromAsyncIterator");function yI(e,t){return e.items=Cn(e.items,t),e}o(yI,"FromIterator");function bI(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=At(r,["$id"]);return Cn(n,t)}o(bI,"FromRef");function vI(e,t){return Ku(e)?sI(e,t):qu(e)?cI(e,t):kt(e)?lI(e,t):We(e)?mI(e,t):xn(e)?dI(e,t):pi(e)?pI(e,t):zt(e)?fI(e,t):Oo(e)?hI(e,t):Hu(e)?gI(e,t):Ju(e)?yI(e,t):Op(e)?bI(e,t):e}o(vI,"DerefResolve");function Cn(e,t){return vI(Vu(e),B4(t))}o(Cn,"Deref");l();function V1(e,t){if(xt(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),i=[...new Set(r)].map(a=>Ke(a));return nt(i,xe(R({},t),{[Xr]:"Enum"}))}o(V1,"Enum");l();l();l();var i0=class i0 extends fe{};o(i0,"ExtendsResolverError");var Qp=i0,z;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(z||(z={}));function tn(e){return e===z.False?e:z.True}o(tn,"IntoBooleanResult");function Fa(e){throw new Qp(e)}o(Fa,"Throw");function Nt(e){return w.IsNever(e)||w.IsIntersect(e)||w.IsUnion(e)||w.IsUnknown(e)||w.IsAny(e)}o(Nt,"IsStructuralRight");function jt(e,t){return w.IsNever(t)?Y1(e,t):w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsUnknown(t)?rb(e,t):w.IsAny(t)?r0(e,t):Fa("StructuralRight")}o(jt,"StructuralRight");function r0(e,t){return z.True}o(r0,"FromAnyRight");function xI(e,t){return w.IsIntersect(t)?hl(e,t):w.IsUnion(t)&&t.anyOf.some(r=>w.IsAny(r)||w.IsUnknown(r))?z.True:w.IsUnion(t)?z.Union:w.IsUnknown(t)||w.IsAny(t)?z.True:z.Union}o(xI,"FromAny");function EI(e,t){return w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:w.IsNever(e)?z.True:z.False}o(EI,"FromArrayRight");function CI(e,t){return w.IsObject(t)&&gl(t)?z.True:Nt(t)?jt(e,t):w.IsArray(t)?tn(it(e.items,t.items)):z.False}o(CI,"FromArray");function II(e,t){return Nt(t)?jt(e,t):w.IsAsyncIterator(t)?tn(it(e.items,t.items)):z.False}o(II,"FromAsyncIterator");function DI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsBigInt(t)?z.True:z.False}o(DI,"FromBigInt");function J1(e,t){return w.IsLiteralBoolean(e)||w.IsBoolean(e)?z.True:z.False}o(J1,"FromBooleanRight");function SI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsBoolean(t)?z.True:z.False}o(SI,"FromBoolean");function wI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsConstructor(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>tn(it(t.parameters[n],r))===z.True)?tn(it(e.returns,t.returns)):z.False:z.False}o(wI,"FromConstructor");function AI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsDate(t)?z.True:z.False}o(AI,"FromDate");function FI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsFunction(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>tn(it(t.parameters[n],r))===z.True)?tn(it(e.returns,t.returns)):z.False:z.False}o(FI,"FromFunction");function X1(e,t){return w.IsLiteral(e)&&_e.IsNumber(e.const)||w.IsNumber(e)||w.IsInteger(e)?z.True:z.False}o(X1,"FromIntegerRight");function OI(e,t){return w.IsInteger(t)||w.IsNumber(t)?z.True:Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):z.False}o(OI,"FromInteger");function hl(e,t){return t.allOf.every(r=>it(e,r)===z.True)?z.True:z.False}o(hl,"FromIntersectRight");function BI(e,t){return e.allOf.some(r=>it(r,t)===z.True)?z.True:z.False}o(BI,"FromIntersect");function PI(e,t){return Nt(t)?jt(e,t):w.IsIterator(t)?tn(it(e.items,t.items)):z.False}o(PI,"FromIterator");function MI(e,t){return w.IsLiteral(t)&&t.const===e.const?z.True:Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsString(t)?tb(e,t):w.IsNumber(t)?Q1(e,t):w.IsInteger(t)?X1(e,t):w.IsBoolean(t)?J1(e,t):z.False}o(MI,"FromLiteral");function Y1(e,t){return z.False}o(Y1,"FromNeverRight");function TI(e,t){return z.True}o(TI,"FromNever");function W1(e){let[t,r]=[e,0];for(;w.IsNot(t);)t=t.not,r+=1;return r%2===0?t:vi()}o(W1,"UnwrapTNot");function kI(e,t){return w.IsNot(e)?it(W1(e),t):w.IsNot(t)?it(e,W1(t)):Fa("Invalid fallthrough for Not")}o(kI,"FromNot");function _I(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsNull(t)?z.True:z.False}o(_I,"FromNull");function Q1(e,t){return w.IsLiteralNumber(e)||w.IsNumber(e)||w.IsInteger(e)?z.True:z.False}o(Q1,"FromNumberRight");function LI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsInteger(t)||w.IsNumber(t)?z.True:z.False}o(LI,"FromNumber");function Mr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(Mr,"IsObjectPropertyCount");function H1(e){return gl(e)}o(H1,"IsObjectStringLike");function K1(e){return Mr(e,0)||Mr(e,1)&&"description"in e.properties&&w.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(w.IsString(e.properties.description.anyOf[0])&&w.IsUndefined(e.properties.description.anyOf[1])||w.IsString(e.properties.description.anyOf[1])&&w.IsUndefined(e.properties.description.anyOf[0]))}o(K1,"IsObjectSymbolLike");function Yp(e){return Mr(e,0)}o(Yp,"IsObjectNumberLike");function q1(e){return Mr(e,0)}o(q1,"IsObjectBooleanLike");function RI(e){return Mr(e,0)}o(RI,"IsObjectBigIntLike");function NI(e){return Mr(e,0)}o(NI,"IsObjectDateLike");function jI(e){return gl(e)}o(jI,"IsObjectUint8ArrayLike");function UI(e){let t=Gn();return Mr(e,0)||Mr(e,1)&&"length"in e.properties&&tn(it(e.properties.length,t))===z.True}o(UI,"IsObjectFunctionLike");function zI(e){return Mr(e,0)}o(zI,"IsObjectConstructorLike");function gl(e){let t=Gn();return Mr(e,0)||Mr(e,1)&&"length"in e.properties&&tn(it(e.properties.length,t))===z.True}o(gl,"IsObjectArrayLike");function $I(e){let t=Ji([qi()],qi());return Mr(e,0)||Mr(e,1)&&"then"in e.properties&&tn(it(e.properties.then,t))===z.True}o($I,"IsObjectPromiseLike");function eb(e,t){return it(e,t)===z.False||w.IsOptional(e)&&!w.IsOptional(t)?z.False:z.True}o(eb,"Property");function mr(e,t){return w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:w.IsNever(e)||w.IsLiteralString(e)&&H1(t)||w.IsLiteralNumber(e)&&Yp(t)||w.IsLiteralBoolean(e)&&q1(t)||w.IsSymbol(e)&&K1(t)||w.IsBigInt(e)&&RI(t)||w.IsString(e)&&H1(t)||w.IsSymbol(e)&&K1(t)||w.IsNumber(e)&&Yp(t)||w.IsInteger(e)&&Yp(t)||w.IsBoolean(e)&&q1(t)||w.IsUint8Array(e)&&jI(t)||w.IsDate(e)&&NI(t)||w.IsConstructor(e)&&zI(t)||w.IsFunction(e)&&UI(t)?z.True:w.IsRecord(e)&&w.IsString(e0(e))?t[Xr]==="Record"?z.True:z.False:w.IsRecord(e)&&w.IsNumber(e0(e))?Mr(t,0)?z.True:z.False:z.False}o(mr,"FromObjectRight");function GI(e,t){return Nt(t)?jt(e,t):w.IsRecord(t)?rn(e,t):w.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!w.IsOptional(t.properties[r]))return z.False;if(w.IsOptional(t.properties[r]))return z.True;if(eb(e.properties[r],t.properties[r])===z.False)return z.False}return z.True})():z.False}o(GI,"FromObject");function ZI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)&&$I(t)?z.True:w.IsPromise(t)?tn(it(e.item,t.item)):z.False}o(ZI,"FromPromise");function e0(e){return hi in e.patternProperties?Gn():gi in e.patternProperties?Yr():Fa("Unknown record key pattern")}o(e0,"RecordKey");function t0(e){return hi in e.patternProperties?e.patternProperties[hi]:gi in e.patternProperties?e.patternProperties[gi]:Fa("Unable to get record value schema")}o(t0,"RecordValue");function rn(e,t){let[r,n]=[e0(t),t0(t)];return w.IsLiteralString(e)&&w.IsNumber(r)&&tn(it(e,n))===z.True?z.True:w.IsUint8Array(e)&&w.IsNumber(r)||w.IsString(e)&&w.IsNumber(r)||w.IsArray(e)&&w.IsNumber(r)?it(e,n):w.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(eb(n,e.properties[i])===z.False)return z.False;return z.True})():z.False}o(rn,"FromRecordRight");function VI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?it(t0(e),t0(t)):z.False}o(VI,"FromRecord");function WI(e,t){let r=w.IsRegExp(e)?Yr():e,n=w.IsRegExp(t)?Yr():t;return it(r,n)}o(WI,"FromRegExp");function tb(e,t){return w.IsLiteral(e)&&_e.IsString(e.const)||w.IsString(e)?z.True:z.False}o(tb,"FromStringRight");function HI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsString(t)?z.True:z.False}o(HI,"FromString");function KI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsSymbol(t)?z.True:z.False}o(KI,"FromSymbol");function qI(e,t){return w.IsTemplateLiteral(e)?it(Po(e),t):w.IsTemplateLiteral(t)?it(e,Po(t)):Fa("Invalid fallthrough for TemplateLiteral")}o(qI,"FromTemplateLiteral");function JI(e,t){return w.IsArray(t)&&e.items!==void 0&&e.items.every(r=>it(r,t.items)===z.True)}o(JI,"IsArrayOfTuple");function XI(e,t){return w.IsNever(e)?z.True:w.IsUnknown(e)?z.False:w.IsAny(e)?z.Union:z.False}o(XI,"FromTupleRight");function YI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)&&gl(t)||w.IsArray(t)&&JI(e,t)?z.True:w.IsTuple(t)?_e.IsUndefined(e.items)&&!_e.IsUndefined(t.items)||!_e.IsUndefined(e.items)&&_e.IsUndefined(t.items)?z.False:_e.IsUndefined(e.items)&&!_e.IsUndefined(t.items)||e.items.every((r,n)=>it(r,t.items[n])===z.True)?z.True:z.False:z.False}o(YI,"FromTuple");function QI(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsUint8Array(t)?z.True:z.False}o(QI,"FromUint8Array");function eD(e,t){return Nt(t)?jt(e,t):w.IsObject(t)?mr(e,t):w.IsRecord(t)?rn(e,t):w.IsVoid(t)?nD(e,t):w.IsUndefined(t)?z.True:z.False}o(eD,"FromUndefined");function n0(e,t){return t.anyOf.some(r=>it(e,r)===z.True)?z.True:z.False}o(n0,"FromUnionRight");function tD(e,t){return e.anyOf.every(r=>it(r,t)===z.True)?z.True:z.False}o(tD,"FromUnion");function rb(e,t){return z.True}o(rb,"FromUnknownRight");function rD(e,t){return w.IsNever(t)?Y1(e,t):w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsAny(t)?r0(e,t):w.IsString(t)?tb(e,t):w.IsNumber(t)?Q1(e,t):w.IsInteger(t)?X1(e,t):w.IsBoolean(t)?J1(e,t):w.IsArray(t)?EI(e,t):w.IsTuple(t)?XI(e,t):w.IsObject(t)?mr(e,t):w.IsUnknown(t)?z.True:z.False}o(rD,"FromUnknown");function nD(e,t){return w.IsUndefined(e)||w.IsUndefined(e)?z.True:z.False}o(nD,"FromVoidRight");function iD(e,t){return w.IsIntersect(t)?hl(e,t):w.IsUnion(t)?n0(e,t):w.IsUnknown(t)?rb(e,t):w.IsAny(t)?r0(e,t):w.IsObject(t)?mr(e,t):w.IsVoid(t)?z.True:z.False}o(iD,"FromVoid");function it(e,t){return w.IsTemplateLiteral(e)||w.IsTemplateLiteral(t)?qI(e,t):w.IsRegExp(e)||w.IsRegExp(t)?WI(e,t):w.IsNot(e)||w.IsNot(t)?kI(e,t):w.IsAny(e)?xI(e,t):w.IsArray(e)?CI(e,t):w.IsBigInt(e)?DI(e,t):w.IsBoolean(e)?SI(e,t):w.IsAsyncIterator(e)?II(e,t):w.IsConstructor(e)?wI(e,t):w.IsDate(e)?AI(e,t):w.IsFunction(e)?FI(e,t):w.IsInteger(e)?OI(e,t):w.IsIntersect(e)?BI(e,t):w.IsIterator(e)?PI(e,t):w.IsLiteral(e)?MI(e,t):w.IsNever(e)?TI(e,t):w.IsNull(e)?_I(e,t):w.IsNumber(e)?LI(e,t):w.IsObject(e)?GI(e,t):w.IsRecord(e)?VI(e,t):w.IsString(e)?HI(e,t):w.IsSymbol(e)?KI(e,t):w.IsTuple(e)?YI(e,t):w.IsPromise(e)?ZI(e,t):w.IsUint8Array(e)?QI(e,t):w.IsUndefined(e)?eD(e,t):w.IsUnion(e)?tD(e,t):w.IsUnknown(e)?rD(e,t):w.IsVoid(e)?iD(e,t):Fa("Unknown left type operand '".concat(e[L],"'"))}o(it,"Visit");function Yi(e,t){return it(e,t)}o(Yi,"ExtendsCheck");l();l();l();function oD(e,t,r,n,i){let a={};for(let u of globalThis.Object.getOwnPropertyNames(e))a[u]=Oa(e[u],t,r,n,ht(i));return a}o(oD,"FromProperties");function aD(e,t,r,n,i){return oD(e.properties,t,r,n,i)}o(aD,"FromMappedResult");function nb(e,t,r,n,i){let a=aD(e,t,r,n,i);return ze(a)}o(nb,"ExtendsFromMappedResult");function uD(e,t,r,n){let i=Yi(e,t);return i===z.Union?nt([r,n]):i===z.True?r:n}o(uD,"ExtendsResolve");function Oa(e,t,r,n,i){return yt(e)?nb(e,t,r,n,i):Rr(e)?H(ib(e,t,r,n,i)):H(uD(e,t,r,n),i)}o(Oa,"Extends");function sD(e,t,r,n,i){return{[e]:Oa(Ke(e),t,r,n,ht(i))}}o(sD,"FromPropertyKey");function cD(e,t,r,n,i){return e.reduce((a,u)=>R(R({},a),sD(u,t,r,n,i)),{})}o(cD,"FromPropertyKeys");function lD(e,t,r,n,i){return cD(e.keys,t,r,n,i)}o(lD,"FromMappedKey");function ib(e,t,r,n,i){let a=lD(e,t,r,n,i);return ze(a)}o(ib,"ExtendsFromMappedKey");l();function mD(e){return e.allOf.every(t=>xi(t))}o(mD,"Intersect");function dD(e){return e.anyOf.some(t=>xi(t))}o(dD,"Union");function pD(e){return!xi(e.not)}o(pD,"Not");function xi(e){return e[L]==="Intersect"?mD(e):e[L]==="Union"?dD(e):e[L]==="Not"?pD(e):e[L]==="Undefined"}o(xi,"ExtendsUndefinedCheck");l();function ob(e,t){return Ba(Po(e),t)}o(ob,"ExcludeFromTemplateLiteral");function fD(e,t){let r=e.filter(n=>Yi(n,t)===z.False);return r.length===1?r[0]:nt(r)}o(fD,"ExcludeRest");function Ba(e,t,r={}){return Nr(e)?H(ob(e,t),r):yt(e)?H(ab(e,t),r):H(We(e)?fD(e.anyOf,t):Yi(e,t)!==z.False?rt():e,r)}o(Ba,"Exclude");function hD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Ba(e[n],t);return r}o(hD,"FromProperties");function gD(e,t){return hD(e.properties,t)}o(gD,"FromMappedResult");function ab(e,t){let r=gD(e,t);return ze(r)}o(ab,"ExcludeFromMappedResult");l();l();l();function ub(e,t){return Pa(Po(e),t)}o(ub,"ExtractFromTemplateLiteral");function yD(e,t){let r=e.filter(n=>Yi(n,t)!==z.False);return r.length===1?r[0]:nt(r)}o(yD,"ExtractRest");function Pa(e,t,r){return Nr(e)?H(ub(e,t),r):yt(e)?H(sb(e,t),r):H(We(e)?yD(e.anyOf,t):Yi(e,t)!==z.False?e:rt(),r)}o(Pa,"Extract");function bD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Pa(e[n],t);return r}o(bD,"FromProperties");function vD(e,t){return bD(e.properties,t)}o(vD,"FromMappedResult");function sb(e,t){let r=vD(e,t);return ze(r)}o(sb,"ExtractFromMappedResult");l();function cb(e,t){return H(e.returns,t)}o(cb,"InstanceType");l();function lb(e){return H({[L]:"Integer",type:"integer"},e)}o(lb,"Integer");l();l();l();function xD(e,t,r){return{[e]:In(Ke(e),t,ht(r))}}o(xD,"MappedIntrinsicPropertyKey");function ED(e,t,r){return e.reduce((i,a)=>R(R({},i),xD(a,t,r)),{})}o(ED,"MappedIntrinsicPropertyKeys");function CD(e,t,r){return ED(e.keys,t,r)}o(CD,"MappedIntrinsicProperties");function mb(e,t,r){let n=CD(e,t,r);return ze(n)}o(mb,"IntrinsicFromMappedKey");function ID(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(ID,"ApplyUncapitalize");function DD(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(DD,"ApplyCapitalize");function SD(e){return e.toUpperCase()}o(SD,"ApplyUppercase");function wD(e){return e.toLowerCase()}o(wD,"ApplyLowercase");function AD(e,t,r){let n=Da(e.pattern);if(!Bo(n))return xe(R({},e),{pattern:db(e.pattern,t)});let u=[...ns(n)].map(d=>Ke(d)),c=pb(u,t),m=nt(c);return il([m],r)}o(AD,"FromTemplateLiteral");function db(e,t){return typeof e=="string"?t==="Uncapitalize"?ID(e):t==="Capitalize"?DD(e):t==="Uppercase"?SD(e):t==="Lowercase"?wD(e):e:e.toString()}o(db,"FromLiteralValue");function pb(e,t){return e.map(r=>In(r,t))}o(pb,"FromRest");function In(e,t,r={}){return Rr(e)?mb(e,t,r):Nr(e)?AD(e,t,r):We(e)?nt(pb(e.anyOf,t),r):fi(e)?Ke(db(e.const,t),r):H(e,r)}o(In,"Intrinsic");function fb(e,t={}){return In(e,"Capitalize",t)}o(fb,"Capitalize");l();function hb(e,t={}){return In(e,"Lowercase",t)}o(hb,"Lowercase");l();function gb(e,t={}){return In(e,"Uncapitalize",t)}o(gb,"Uncapitalize");l();function yb(e,t={}){return In(e,"Uppercase",t)}o(yb,"Uppercase");l();function bb(e,t){return H({[L]:"Not",not:e},t)}o(bb,"Not");l();l();l();function FD(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ma(e[i],t,ht(r));return n}o(FD,"FromProperties");function OD(e,t,r){return FD(e.properties,t,r)}o(OD,"FromMappedResult");function vb(e,t,r){let n=OD(e,t,r);return ze(n)}o(vb,"OmitFromMappedResult");function BD(e,t){return e.map(r=>o0(r,t))}o(BD,"FromIntersect");function PD(e,t){return e.map(r=>o0(r,t))}o(PD,"FromUnion");function MD(e,t){let i=e,{[t]:r}=i;return yo(i,[yc(t)])}o(MD,"FromProperty");function TD(e,t){return t.reduce((r,n)=>MD(r,n),e)}o(TD,"FromProperties");function kD(e,t){let r=At(e,[gt,"$id","required","properties"]),n=TD(e.properties,t);return ut(n,r)}o(kD,"FromObject");function o0(e,t){return kt(e)?Pr(BD(e.allOf,t)):We(e)?nt(PD(e.anyOf,t)):zt(e)?kD(e,t):ut({})}o(o0,"OmitResolve");function Ma(e,t,r){if(Rr(t))return xb(e,t,r);if(yt(e))return vb(e,t,r);let n=En(t)?Br(t):t;return H(R(R({},o0(e,n)),r))}o(Ma,"Omit");function _D(e,t,r){return{[t]:Ma(e,[t],ht(r))}}o(_D,"FromPropertyKey");function LD(e,t,r){return t.reduce((n,i)=>R(R({},n),_D(e,i,r)),{})}o(LD,"FromPropertyKeys");function RD(e,t,r){return LD(e,t.keys,r)}o(RD,"FromMappedKey");function xb(e,t,r){let n=RD(e,t,r);return ze(n)}o(xb,"OmitFromMappedKey");l();function Eb(e,t){return Zn(e.parameters,t)}o(Eb,"Parameters");l();l();function Cb(e){return e.map(t=>Ib(t))}o(Cb,"FromRest");function ND(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Or(e[r]);return t}o(ND,"FromProperties");function jD(e){let t=At(e,[gt,"$id","required","properties"]),r=ND(e.properties);return ut(r,t)}o(jD,"FromObject");function Ib(e){return kt(e)?Pr(Cb(e.allOf)):We(e)?nt(Cb(e.anyOf)):zt(e)?jD(e):ut({})}o(Ib,"PartialResolve");function yl(e,t){return yt(e)?Db(e,t):H(R(R({},Ib(e)),t))}o(yl,"Partial");function UD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=yl(e[n],ht(t));return r}o(UD,"FromProperties");function zD(e,t){return UD(e.properties,t)}o(zD,"FromMappedResult");function Db(e,t){let r=zD(e,t);return ze(r)}o(Db,"PartialFromMappedResult");l();l();l();function $D(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ta(e[i],t,ht(r));return n}o($D,"FromProperties");function GD(e,t,r){return $D(e.properties,t,r)}o(GD,"FromMappedResult");function Sb(e,t,r){let n=GD(e,t,r);return ze(n)}o(Sb,"PickFromMappedResult");function ZD(e,t){return e.map(r=>a0(r,t))}o(ZD,"FromIntersect");function VD(e,t){return e.map(r=>a0(r,t))}o(VD,"FromUnion");function WD(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(WD,"FromProperties");function HD(e,t){let r=At(e,[gt,"$id","required","properties"]),n=WD(e.properties,t);return ut(n,r)}o(HD,"FromObject");function a0(e,t){return kt(e)?Pr(ZD(e.allOf,t)):We(e)?nt(VD(e.anyOf,t)):zt(e)?HD(e,t):ut({})}o(a0,"PickResolve");function Ta(e,t,r){if(Rr(t))return wb(e,t,r);if(yt(e))return Sb(e,t,r);let n=En(t)?Br(t):t;return H(R(R({},a0(e,n)),r))}o(Ta,"Pick");function KD(e,t,r){return{[t]:Ta(e,[t],ht(r))}}o(KD,"FromPropertyKey");function qD(e,t,r){return t.reduce((n,i)=>R(R({},n),KD(e,i,r)),{})}o(qD,"FromPropertyKeys");function JD(e,t,r){return qD(e,t.keys,r)}o(JD,"FromMappedKey");function wb(e,t,r){let n=JD(e,t,r);return ze(n)}o(wb,"PickFromMappedKey");l();function Ab(e){return Qr(Or(e))}o(Ab,"ReadonlyOptional");l();function Mo(e,t,r){return H({[L]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(Mo,"RecordCreateFromPattern");function u0(e,t,r){let n={};for(let i of e)n[i]=t;return ut(n,xe(R({},r),{[Xr]:"Record"}))}o(u0,"RecordCreateFromKeys");function XD(e,t,r){return rl(e)?u0(Br(e),t,r):Mo(e.pattern,t,r)}o(XD,"FromTemplateLiteralKey");function YD(e,t,r){return u0(Br(nt(e)),t,r)}o(YD,"FromUnionKey");function QD(e,t,r){return u0([e.toString()],t,r)}o(QD,"FromLiteralKey");function eS(e,t,r){return Mo(e.source,t,r)}o(eS,"FromRegExpKey");function tS(e,t,r){let n=xt(e.pattern)?gi:e.pattern;return Mo(n,t,r)}o(tS,"FromStringKey");function rS(e,t,r){return Mo(gi,t,r)}o(rS,"FromAnyKey");function nS(e,t,r){return Mo(b1,t,r)}o(nS,"FromNeverKey");function iS(e,t,r){return Mo(hi,t,r)}o(iS,"FromIntegerKey");function oS(e,t,r){return Mo(hi,t,r)}o(oS,"FromNumberKey");function Fb(e,t,r={}){return We(e)?YD(e.anyOf,t,r):Nr(e)?XD(e,t,r):fi(e)?QD(e.const,t,r):Ao(e)?iS(e,t,r):Fo(e)?oS(e,t,r):Bp(e)?eS(e,t,r):Xu(e)?tS(e,t,r):Sp(e)?rS(e,t,r):Hi(e)?nS(e,t,r):rt(r)}o(Fb,"Record");l();var aS=0;function Ob(e,t={}){xt(t.$id)&&(t.$id="T".concat(aS++));let r=Vu(e({[L]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,H(R({[Xr]:"Recursive"},r),t)}o(Ob,"Recursive");l();function Bb(e,t){if(pt(e))return H({[L]:"Ref",$ref:e},t);if(xt(e.$id))throw new Error("Reference target type must specify an $id");return H({[L]:"Ref",$ref:e.$id},t)}o(Bb,"Ref");l();function Pb(e,t){let r=pt(e)?new globalThis.RegExp(e):e;return H({[L]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(Pb,"RegExp");l();l();function Mb(e){return e.map(t=>Tb(t))}o(Mb,"FromRest");function uS(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=At(e[r],[Er]);return t}o(uS,"FromProperties");function sS(e){let t=At(e,[gt,"$id","required","properties"]),r=uS(e.properties);return ut(r,t)}o(sS,"FromObject");function Tb(e){return kt(e)?Pr(Mb(e.allOf)):We(e)?nt(Mb(e.anyOf)):zt(e)?sS(e):ut({})}o(Tb,"RequiredResolve");function bl(e,t){return yt(e)?kb(e,t):H(R(R({},Tb(e)),t))}o(bl,"Required");function cS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=bl(e[n],t);return r}o(cS,"FromProperties");function lS(e,t){return cS(e.properties,t)}o(lS,"FromMappedResult");function kb(e,t){let r=lS(e,t);return ze(r)}o(kb,"RequiredFromMappedResult");l();function mS(e){var t;return kt(e)?e.allOf:We(e)?e.anyOf:xn(e)?(t=e.items)!=null?t:[]:[]}o(mS,"RestResolve");function _b(e){return mS(e)}o(_b,"Rest");l();function Lb(e,t){return H(e.returns,t)}o(Lb,"ReturnType");l();function Rb(e){return JSON.parse(JSON.stringify(e))}o(Rb,"Strict");l();var l0=class l0{constructor(t){this.schema=t}Decode(t){return new c0(this.schema,t)}};o(l0,"TransformDecodeBuilder");var s0=l0,m0=class m0{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let a={Encode:o(u=>r[gt].Encode(t(u)),"Encode"),Decode:o(u=>this.decode(r[gt].Decode(u)),"Decode")};return xe(R({},r),{[gt]:a})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return xe(R({},r),{[gt]:n})}Encode(t){return va(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(m0,"TransformEncodeBuilder");var c0=m0;function Nb(e){return new s0(e)}o(Nb,"Transform");l();function vl(e={}){var t;return H({[L]:(t=e[L])!=null?t:"Unsafe"},e)}o(vl,"Unsafe");l();function jb(e){return H({[L]:"Void",type:"void"},e)}o(jb,"Void");l();var d0={};_i(d0,{Any:()=>qi,Array:()=>Yc,AsyncIterator:()=>Qc,Awaited:()=>j1,BigInt:()=>wa,Boolean:()=>nl,Capitalize:()=>fb,Composite:()=>$1,Const:()=>G1,Constructor:()=>el,ConstructorParameters:()=>Z1,Date:()=>cl,Deref:()=>Cn,Enum:()=>V1,Exclude:()=>Ba,Extends:()=>Oa,Extract:()=>Pa,Function:()=>Ji,Index:()=>Aa,InstanceType:()=>cb,Integer:()=>lb,Intersect:()=>Pr,Iterator:()=>al,KeyOf:()=>sl,Literal:()=>Ke,Lowercase:()=>hb,Mapped:()=>_1,Never:()=>rt,Not:()=>bb,Null:()=>ll,Number:()=>Gn,Object:()=>ut,Omit:()=>Ma,Optional:()=>Or,Parameters:()=>Eb,Partial:()=>yl,Pick:()=>Ta,Promise:()=>ul,Readonly:()=>Qr,ReadonlyOptional:()=>Ab,Record:()=>Fb,Recursive:()=>Ob,Ref:()=>Bb,RegExp:()=>Pb,Required:()=>bl,Rest:()=>_b,ReturnType:()=>Lb,Strict:()=>Rb,String:()=>Yr,Symbol:()=>ml,TemplateLiteral:()=>il,Transform:()=>Nb,Tuple:()=>Zn,Uint8Array:()=>pl,Uncapitalize:()=>gb,Undefined:()=>dl,Union:()=>nt,Unknown:()=>vi,Unsafe:()=>vl,Uppercase:()=>yb,Void:()=>jb});l();var p=d0;l();var ss=p.Object({externalId:p.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:p.String({description:"The name of the entity."}),shortName:p.String({description:"A short name for the entity."}),description:p.String({description:"A description of the entity."}),icon:p.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),p0=p.Partial(ss,{$id:"Details",description:"Additional information about a given entity."}),jr=p.Object({details:p.Optional(p.Ref(p0))},{$id:"WithDetails"}),To=o(e=>{let t=[...e].sort(),r=p.Pick(ss,e),n=p.Omit(ss,e);return p.Object({details:p.Intersect([r,p.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),f0=[ss,p0];l();var ka=p.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),_a=p.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),ko=p.Tuple([p.Ref(ka),p.Ref(_a)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),dr=p.Object({type:p.Literal("Point"),coordinates:p.Ref(ko)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),xl=p.Object({type:p.Literal("MultiPoint"),coordinates:p.Array(p.Ref(ko))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),El=p.Object({type:p.Literal("LineString"),coordinates:p.Array(p.Ref(ko),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Cl=p.Object({type:p.Literal("MultiLineString"),coordinates:p.Array(p.Array(p.Ref(ko),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),Ub=p.Array(p.Ref(ko),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),h0=p.Array(p.Ref(Ub),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),La=p.Object({type:p.Literal("Polygon"),coordinates:p.Ref(h0)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),Ra=p.Object({type:p.Literal("MultiPolygon"),coordinates:p.Array(p.Ref(h0))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),rr=o((e,t,r)=>p.Object({type:p.Literal("Feature"),geometry:e,properties:t},r),"Feature"),Ir=o((e,t,r)=>p.Object({type:p.Literal("FeatureCollection"),features:p.Array(e,r)},t),"FeatureCollection"),g0=[ka,_a,ko,dr,xl,El,Cl,Ub,h0,La,Ra];l();var Ft=o((e,t)=>p.Unsafe(p.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),"Ident"),pr=Ft("g","GeometryId"),ke=Ft("f","FloorId"),y0=[pr,ke];l();l();l();var b0=class b0{constructor(t){f(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(b0,"OptionIterator");var Il=b0,v0=class v0{constructor(t){f(this,"_tag","Some");f(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return zb(t(this.value))}mapAsync(t){return t(this.value).then(r=>zb(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:Qi()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?Qi():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return se(this.value)}okOrElse(t){return se(this.value)}iter(){return new Il(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Na([this.value,t.value]):Qi()}zipWith(t,r){return t.isSome()?Na(r(this.value,t.value)):Qi()}get[Symbol.toStringTag](){return"Some"}};o(v0,"Some");var Dl=v0,x0=class x0{constructor(){f(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return ce(t)}okOrElse(t){return ce(t())}iter(){return new Il(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(x0,"None");var Sl=x0,Na=o(e=>new Dl(e),"some"),Qi=o(()=>new Sl,"none"),zb=o(e=>e instanceof Dl||e instanceof Sl?e:e==null?Qi():Na(e),"option");var I0=class I0{constructor(t){f(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(I0,"ResultIterator");var wl=I0,D0=class D0{constructor(t){f(this,"_tag","Ok");f(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Na(this.value)}err(){return Qi()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return se(t(this.value))}async mapAsync(t){return t(this.value).then(se)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new wl(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(D0,"Ok");var E0=D0,Al=class Al{constructor(t){f(this,"_tag","Err");f(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return Qi()}err(){return Na(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new wl(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new Al(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(Al,"Err");var C0=Al,se=o(e=>new E0(e),"ok"),ce=o(e=>new C0(e),"err");l();var Tr;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(Tr||(Tr={}));l();l();l();l();var w0=class w0 extends fe{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(w0,"TypeSystemDuplicateTypeKind");var S0=w0,A0=class A0 extends fe{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(A0,"TypeSystemDuplicateFormat");var cs=A0,Fl;(function(e){function t(n,i){if($t.Has(n))throw new S0(n);return $t.Set(n,i),(a={})=>vl(xe(R({},a),{[L]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(Cr.Has(n))throw new cs(n);return Cr.Set(n,i),n}o(r,"Format"),e.Format=r})(Fl||(Fl={}));l();function dS(e){switch(e.errorType){case N.ArrayContains:return"Expected array to contain at least one matching value";case N.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case N.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case N.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case N.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case N.ArrayUniqueItems:return"Expected array elements to be unique";case N.Array:return"Expected array";case N.AsyncIterator:return"Expected AsyncIterator";case N.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case N.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case N.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case N.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case N.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case N.BigInt:return"Expected bigint";case N.Boolean:return"Expected boolean";case N.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case N.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case N.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case N.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case N.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case N.Date:return"Expected Date";case N.Function:return"Expected function";case N.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case N.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case N.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case N.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case N.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case N.Integer:return"Expected integer";case N.IntersectUnevaluatedProperties:return"Unexpected property";case N.Intersect:return"Expected all values to match";case N.Iterator:return"Expected Iterator";case N.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case N.Never:return"Never";case N.Not:return"Value should not match";case N.Null:return"Expected null";case N.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case N.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case N.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case N.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case N.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case N.Number:return"Expected number";case N.Object:return"Expected object";case N.ObjectAdditionalProperties:return"Unexpected property";case N.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case N.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case N.ObjectRequiredProperty:return"Expected required property";case N.Promise:return"Expected Promise";case N.RegExp:return"Expected string to match regular expression";case N.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case N.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case N.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case N.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case N.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case N.String:return"Expected string";case N.Symbol:return"Expected symbol";case N.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case N.Tuple:return"Expected tuple";case N.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case N.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case N.Uint8Array:return"Expected Uint8Array";case N.Undefined:return"Expected undefined";case N.Union:return"Expected union value";case N.Void:return"Expected void";case N.Kind:return"Expected kind '".concat(e.schema[L],"'");default:return"Unknown error type"}}o(dS,"DefaultErrorFunction");var pS=dS;function $b(){return pS}o($b,"GetErrorFunction");l();var O0=class O0 extends fe{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(O0,"TypeDereferenceError");var F0=O0;function fS(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new F0(e);return $e(r,t)}o(fS,"Resolve");function nn(e,t){return!Le(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(nn,"Pushref");function $e(e,t){return e[L]==="This"||e[L]==="Ref"?fS(e,t):e}o($e,"Deref");l();var P0=class P0 extends fe{constructor(t){super("Unable to hash value"),this.value=t}};o(P0,"ValueHashError");var B0=P0,Ur;(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"})(Ur||(Ur={}));var ja=BigInt("14695981039346656037"),[hS,gS]=[BigInt("1099511628211"),BigInt("18446744073709551616")],yS=Array.from({length:256}).map((e,t)=>BigInt(t)),Gb=new Float64Array(1),Zb=new DataView(Gb.buffer),Vb=new Uint8Array(Gb.buffer);function*bS(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(bS,"NumberToBytes");function vS(e){fr(Ur.Array);for(let t of e)Ua(t)}o(vS,"ArrayType");function xS(e){fr(Ur.Boolean),fr(e?1:0)}o(xS,"BooleanType");function ES(e){fr(Ur.BigInt),Zb.setBigInt64(0,e);for(let t of Vb)fr(t)}o(ES,"BigIntType");function CS(e){fr(Ur.Date),Ua(e.getTime())}o(CS,"DateType");function IS(e){fr(Ur.Null)}o(IS,"NullType");function DS(e){fr(Ur.Number),Zb.setFloat64(0,e);for(let t of Vb)fr(t)}o(DS,"NumberType");function SS(e){fr(Ur.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Ua(t),Ua(e[t])}o(SS,"ObjectType");function wS(e){fr(Ur.String);for(let t=0;t<e.length;t++)for(let r of bS(e.charCodeAt(t)))fr(r)}o(wS,"StringType");function AS(e){fr(Ur.Symbol),Ua(e.description)}o(AS,"SymbolType");function FS(e){fr(Ur.Uint8Array);for(let t=0;t<e.length;t++)fr(e[t])}o(FS,"Uint8ArrayType");function OS(e){return fr(Ur.Undefined)}o(OS,"UndefinedType");function Ua(e){if(ve(e))return vS(e);if(Un(e))return xS(e);if(er(e))return ES(e);if(xr(e))return CS(e);if(li(e))return IS(e);if(pe(e))return DS(e);if(Ee(e))return SS(e);if(Le(e))return wS(e);if(mi(e))return AS(e);if(ba(e))return FS(e);if(Et(e))return OS(e);throw new B0(e)}o(Ua,"Visit");function fr(e){ja=ja^yS[e],ja=ja*hS%gS}o(fr,"FNV1A64");function eo(e){return ja=BigInt("14695981039346656037"),Ua(e),ja}o(eo,"Hash");l();var T0=class T0 extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(T0,"ValueCheckUnknownTypeError");var M0=T0;function BS(e){return e[L]==="Any"||e[L]==="Unknown"}o(BS,"IsAnyOrUnknown");function Be(e){return e!==void 0}o(Be,"IsDefined");function PS(e,t,r){return!0}o(PS,"FromAny");function MS(e,t,r){if(!ve(r)||Be(e.minItems)&&!(r.length>=e.minItems)||Be(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(a=>nr(e.items,t,a))||e.uniqueItems===!0&&!function(){let a=new Set;for(let u of r){let c=eo(u);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(Be(e.contains)||pe(e.minContains)||pe(e.maxContains)))return!0;let n=Be(e.contains)?e.contains:rt(),i=r.reduce((a,u)=>nr(n,t,u)?a+1:a,0);return!(i===0||pe(e.minContains)&&i<e.minContains||pe(e.maxContains)&&i>e.maxContains)}o(MS,"FromArray");function TS(e,t,r){return Kc(r)}o(TS,"FromAsyncIterator");function kS(e,t,r){return!(!er(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(kS,"FromBigInt");function _S(e,t,r){return Un(r)}o(_S,"FromBoolean");function LS(e,t,r){return nr(e.returns,t,r.prototype)}o(LS,"FromConstructor");function RS(e,t,r){return!(!xr(r)||Be(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||Be(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||Be(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||Be(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||Be(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(RS,"FromDate");function NS(e,t,r){return Wi(r)}o(NS,"FromFunction");function jS(e,t,r){return!(!Xc(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(jS,"FromInteger");function US(e,t,r){let n=e.allOf.every(i=>nr(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(bi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u));return n&&a}else if(Re(e.unevaluatedProperties)){let i=new RegExp(bi(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u)||nr(e.unevaluatedProperties,t,r[u]));return n&&a}else return n}o(US,"FromIntersect");function zS(e,t,r){return qc(r)}o(zS,"FromIterator");function $S(e,t,r){return r===e.const}o($S,"FromLiteral");function GS(e,t,r){return!1}o(GS,"FromNever");function ZS(e,t,r){return!nr(e.not,t,r)}o(ZS,"FromNot");function VS(e,t,r){return li(r)}o(VS,"FromNull");function WS(e,t,r){return!(!Ye.IsNumberLike(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(WS,"FromNumber");function HS(e,t,r){if(!Ye.IsObjectLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let a=e.properties[i];if(e.required&&e.required.includes(i)){if(!nr(a,t,r[i])||(xi(a)||BS(a))&&!(i in r))return!1}else if(Ye.IsExactOptionalProperty(r,i)&&!nr(a,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(a=>n.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(a=>n.includes(a)||nr(e.additionalProperties,t,r[a])):!0}o(HS,"FromObject");function KS(e,t,r){return Jc(r)}o(KS,"FromPromise");function qS(e,t,r){if(!Ye.IsRecordLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],a=new RegExp(n),u=Object.entries(r).every(([d,h])=>a.test(d)?nr(i,t,h):!0),c=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,h])=>a.test(d)?!0:nr(e.additionalProperties,t,h)):!0,m=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>a.test(d)):!0;return u&&c&&m}o(qS,"FromRecord");function JS(e,t,r){return nr($e(e,t),t,r)}o(JS,"FromRef");function XS(e,t,r){let n=new RegExp(e.source,e.flags);return Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(XS,"FromRegExp");function YS(e,t,r){return!Le(r)||Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)||Be(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:Be(e.format)?Cr.Has(e.format)?Cr.Get(e.format)(r):!1:!0}o(YS,"FromString");function QS(e,t,r){return mi(r)}o(QS,"FromSymbol");function ew(e,t,r){return Le(r)&&new RegExp(e.pattern).test(r)}o(ew,"FromTemplateLiteral");function tw(e,t,r){return nr($e(e,t),t,r)}o(tw,"FromThis");function rw(e,t,r){if(!ve(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!nr(e.items[n],t,r[n]))return!1;return!0}o(rw,"FromTuple");function nw(e,t,r){return Et(r)}o(nw,"FromUndefined");function iw(e,t,r){return e.anyOf.some(n=>nr(n,t,r))}o(iw,"FromUnion");function ow(e,t,r){return!(!ba(r)||Be(e.maxByteLength)&&!(r.length<=e.maxByteLength)||Be(e.minByteLength)&&!(r.length>=e.minByteLength))}o(ow,"FromUint8Array");function aw(e,t,r){return!0}o(aw,"FromUnknown");function uw(e,t,r){return Ye.IsVoidLike(r)}o(uw,"FromVoid");function sw(e,t,r){return $t.Has(e[L])?$t.Get(e[L])(e,r):!1}o(sw,"FromKind");function nr(e,t,r){let n=Be(e.$id)?[...t,e]:t,i=e;switch(i[L]){case"Any":return PS(i,n,r);case"Array":return MS(i,n,r);case"AsyncIterator":return TS(i,n,r);case"BigInt":return kS(i,n,r);case"Boolean":return _S(i,n,r);case"Constructor":return LS(i,n,r);case"Date":return RS(i,n,r);case"Function":return NS(i,n,r);case"Integer":return jS(i,n,r);case"Intersect":return US(i,n,r);case"Iterator":return zS(i,n,r);case"Literal":return $S(i,n,r);case"Never":return GS(i,n,r);case"Not":return ZS(i,n,r);case"Null":return VS(i,n,r);case"Number":return WS(i,n,r);case"Object":return HS(i,n,r);case"Promise":return KS(i,n,r);case"Record":return qS(i,n,r);case"Ref":return JS(i,n,r);case"RegExp":return XS(i,n,r);case"String":return YS(i,n,r);case"Symbol":return QS(i,n,r);case"TemplateLiteral":return ew(i,n,r);case"This":return tw(i,n,r);case"Tuple":return rw(i,n,r);case"Undefined":return nw(i,n,r);case"Union":return iw(i,n,r);case"Uint8Array":return ow(i,n,r);case"Unknown":return aw(i,n,r);case"Void":return uw(i,n,r);default:if(!$t.Has(i[L]))throw new M0(i);return sw(i,n,r)}}o(nr,"Visit");function we(...e){return e.length===3?nr(e[0],e[1],e[2]):nr(e[0],[],e[1])}o(we,"Check");var N;(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"})(N||(N={}));var _0=class _0 extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(_0,"ValueErrorsUnknownTypeError");var k0=_0;function Ei(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(Ei,"EscapeKey");function Pe(e){return e!==void 0}o(Pe,"IsDefined");var L0=class L0{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(L0,"ValueErrorIterator");var on=L0;function ne(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:$b()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(ne,"Create");function*cw(e,t,r,n){}o(cw,"FromAny");function*lw(e,t,r,n){if(!ve(n))return yield ne(N.Array,e,r,n);Pe(e.minItems)&&!(n.length>=e.minItems)&&(yield ne(N.ArrayMinItems,e,r,n)),Pe(e.maxItems)&&!(n.length<=e.maxItems)&&(yield ne(N.ArrayMaxItems,e,r,n));for(let u=0;u<n.length;u++)yield*K(ir(e.items,t,"".concat(r,"/").concat(u),n[u]));if(e.uniqueItems===!0&&!function(){let u=new Set;for(let c of n){let m=eo(c);if(u.has(m))return!1;u.add(m)}return!0}()&&(yield ne(N.ArrayUniqueItems,e,r,n)),!(Pe(e.contains)||Pe(e.minContains)||Pe(e.maxContains)))return;let i=Pe(e.contains)?e.contains:rt(),a=n.reduce((u,c,m)=>ir(i,t,"".concat(r).concat(m),c).next().done===!0?u+1:u,0);a===0&&(yield ne(N.ArrayContains,e,r,n)),pe(e.minContains)&&a<e.minContains&&(yield ne(N.ArrayMinContains,e,r,n)),pe(e.maxContains)&&a>e.maxContains&&(yield ne(N.ArrayMaxContains,e,r,n))}o(lw,"FromArray");function*mw(e,t,r,n){Kc(n)||(yield ne(N.AsyncIterator,e,r,n))}o(mw,"FromAsyncIterator");function*dw(e,t,r,n){if(!er(n))return yield ne(N.BigInt,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.BigIntExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.BigIntExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.BigIntMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.BigIntMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield ne(N.BigIntMultipleOf,e,r,n))}o(dw,"FromBigInt");function*pw(e,t,r,n){Un(n)||(yield ne(N.Boolean,e,r,n))}o(pw,"FromBoolean");function*fw(e,t,r,n){yield*K(ir(e.returns,t,r,n.prototype))}o(fw,"FromConstructor");function*hw(e,t,r,n){if(!xr(n))return yield ne(N.Date,e,r,n);Pe(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield ne(N.DateExclusiveMaximumTimestamp,e,r,n)),Pe(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield ne(N.DateExclusiveMinimumTimestamp,e,r,n)),Pe(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield ne(N.DateMaximumTimestamp,e,r,n)),Pe(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield ne(N.DateMinimumTimestamp,e,r,n)),Pe(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield ne(N.DateMultipleOfTimestamp,e,r,n))}o(hw,"FromDate");function*gw(e,t,r,n){Wi(n)||(yield ne(N.Function,e,r,n))}o(gw,"FromFunction");function*yw(e,t,r,n){if(!Xc(n))return yield ne(N.Integer,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.IntegerExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.IntegerExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.IntegerMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.IntegerMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==0&&(yield ne(N.IntegerMultipleOf,e,r,n))}o(yw,"FromInteger");function*bw(e,t,r,n){let i=!1;for(let a of e.allOf)for(let u of ir(a,t,r,n))i=!0,yield u;if(i)return yield ne(N.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let a=new RegExp(bi(e));for(let u of Object.getOwnPropertyNames(n))a.test(u)||(yield ne(N.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(u),n))}if(typeof e.unevaluatedProperties=="object"){let a=new RegExp(bi(e));for(let u of Object.getOwnPropertyNames(n))if(!a.test(u)){let c=ir(e.unevaluatedProperties,t,"".concat(r,"/").concat(u),n[u]).next();c.done||(yield c.value)}}}o(bw,"FromIntersect");function*vw(e,t,r,n){qc(n)||(yield ne(N.Iterator,e,r,n))}o(vw,"FromIterator");function*xw(e,t,r,n){n!==e.const&&(yield ne(N.Literal,e,r,n))}o(xw,"FromLiteral");function*Ew(e,t,r,n){yield ne(N.Never,e,r,n)}o(Ew,"FromNever");function*Cw(e,t,r,n){ir(e.not,t,r,n).next().done===!0&&(yield ne(N.Not,e,r,n))}o(Cw,"FromNot");function*Iw(e,t,r,n){li(n)||(yield ne(N.Null,e,r,n))}o(Iw,"FromNull");function*Dw(e,t,r,n){if(!Ye.IsNumberLike(n))return yield ne(N.Number,e,r,n);Pe(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield ne(N.NumberExclusiveMaximum,e,r,n)),Pe(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield ne(N.NumberExclusiveMinimum,e,r,n)),Pe(e.maximum)&&!(n<=e.maximum)&&(yield ne(N.NumberMaximum,e,r,n)),Pe(e.minimum)&&!(n>=e.minimum)&&(yield ne(N.NumberMinimum,e,r,n)),Pe(e.multipleOf)&&n%e.multipleOf!==0&&(yield ne(N.NumberMultipleOf,e,r,n))}o(Dw,"FromNumber");function*Sw(e,t,r,n){if(!Ye.IsObjectLike(n))return yield ne(N.Object,e,r,n);Pe(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ne(N.ObjectMinProperties,e,r,n)),Pe(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ne(N.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),u=Object.getOwnPropertyNames(n);for(let c of i)u.includes(c)||(yield ne(N.ObjectRequiredProperty,e.properties[c],"".concat(r,"/").concat(Ei(c)),void 0));if(e.additionalProperties===!1)for(let c of u)a.includes(c)||(yield ne(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Ei(c)),n[c]));if(typeof e.additionalProperties=="object")for(let c of u)a.includes(c)||(yield*K(ir(e.additionalProperties,t,"".concat(r,"/").concat(Ei(c)),n[c])));for(let c of a){let m=e.properties[c];e.required&&e.required.includes(c)?(yield*K(ir(m,t,"".concat(r,"/").concat(Ei(c)),n[c])),xi(e)&&!(c in n)&&(yield ne(N.ObjectRequiredProperty,m,"".concat(r,"/").concat(Ei(c)),void 0))):Ye.IsExactOptionalProperty(n,c)&&(yield*K(ir(m,t,"".concat(r,"/").concat(Ei(c)),n[c])))}}o(Sw,"FromObject");function*ww(e,t,r,n){Jc(n)||(yield ne(N.Promise,e,r,n))}o(ww,"FromPromise");function*Aw(e,t,r,n){if(!Ye.IsRecordLike(n))return yield ne(N.Object,e,r,n);Pe(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield ne(N.ObjectMinProperties,e,r,n)),Pe(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield ne(N.ObjectMaxProperties,e,r,n));let[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let[c,m]of Object.entries(n))u.test(c)&&(yield*K(ir(a,t,"".concat(r,"/").concat(Ei(c)),m)));if(typeof e.additionalProperties=="object")for(let[c,m]of Object.entries(n))u.test(c)||(yield*K(ir(e.additionalProperties,t,"".concat(r,"/").concat(Ei(c)),m)));if(e.additionalProperties===!1){for(let[c,m]of Object.entries(n))if(!u.test(c))return yield ne(N.ObjectAdditionalProperties,e,"".concat(r,"/").concat(Ei(c)),m)}}o(Aw,"FromRecord");function*Fw(e,t,r,n){yield*K(ir($e(e,t),t,r,n))}o(Fw,"FromRef");function*Ow(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);if(Pe(e.minLength)&&!(n.length>=e.minLength)&&(yield ne(N.StringMinLength,e,r,n)),Pe(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ne(N.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield ne(N.RegExp,e,r,n)}o(Ow,"FromRegExp");function*Bw(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);Pe(e.minLength)&&!(n.length>=e.minLength)&&(yield ne(N.StringMinLength,e,r,n)),Pe(e.maxLength)&&!(n.length<=e.maxLength)&&(yield ne(N.StringMaxLength,e,r,n)),Le(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield ne(N.StringPattern,e,r,n))),Le(e.format)&&(Cr.Has(e.format)?Cr.Get(e.format)(n)||(yield ne(N.StringFormat,e,r,n)):yield ne(N.StringFormatUnknown,e,r,n))}o(Bw,"FromString");function*Pw(e,t,r,n){mi(n)||(yield ne(N.Symbol,e,r,n))}o(Pw,"FromSymbol");function*Mw(e,t,r,n){if(!Le(n))return yield ne(N.String,e,r,n);new RegExp(e.pattern).test(n)||(yield ne(N.StringPattern,e,r,n))}o(Mw,"FromTemplateLiteral");function*Tw(e,t,r,n){yield*K(ir($e(e,t),t,r,n))}o(Tw,"FromThis");function*kw(e,t,r,n){if(!ve(n))return yield ne(N.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield ne(N.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield ne(N.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*K(ir(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(kw,"FromTuple");function*_w(e,t,r,n){Et(n)||(yield ne(N.Undefined,e,r,n))}o(_w,"FromUndefined");function*Lw(e,t,r,n){if(we(e,t,n))return;let i=e.anyOf.map(a=>new on(ir(a,t,r,n)));yield ne(N.Union,e,r,n,i)}o(Lw,"FromUnion");function*Rw(e,t,r,n){if(!ba(n))return yield ne(N.Uint8Array,e,r,n);Pe(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield ne(N.Uint8ArrayMaxByteLength,e,r,n)),Pe(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield ne(N.Uint8ArrayMinByteLength,e,r,n))}o(Rw,"FromUint8Array");function*Nw(e,t,r,n){}o(Nw,"FromUnknown");function*jw(e,t,r,n){Ye.IsVoidLike(n)||(yield ne(N.Void,e,r,n))}o(jw,"FromVoid");function*Uw(e,t,r,n){$t.Get(e[L])(e,n)||(yield ne(N.Kind,e,r,n))}o(Uw,"FromKind");function*ir(e,t,r,n){let i=Pe(e.$id)?[...t,e]:t,a=e;switch(a[L]){case"Any":return yield*K(cw(a,i,r,n));case"Array":return yield*K(lw(a,i,r,n));case"AsyncIterator":return yield*K(mw(a,i,r,n));case"BigInt":return yield*K(dw(a,i,r,n));case"Boolean":return yield*K(pw(a,i,r,n));case"Constructor":return yield*K(fw(a,i,r,n));case"Date":return yield*K(hw(a,i,r,n));case"Function":return yield*K(gw(a,i,r,n));case"Integer":return yield*K(yw(a,i,r,n));case"Intersect":return yield*K(bw(a,i,r,n));case"Iterator":return yield*K(vw(a,i,r,n));case"Literal":return yield*K(xw(a,i,r,n));case"Never":return yield*K(Ew(a,i,r,n));case"Not":return yield*K(Cw(a,i,r,n));case"Null":return yield*K(Iw(a,i,r,n));case"Number":return yield*K(Dw(a,i,r,n));case"Object":return yield*K(Sw(a,i,r,n));case"Promise":return yield*K(ww(a,i,r,n));case"Record":return yield*K(Aw(a,i,r,n));case"Ref":return yield*K(Fw(a,i,r,n));case"RegExp":return yield*K(Ow(a,i,r,n));case"String":return yield*K(Bw(a,i,r,n));case"Symbol":return yield*K(Pw(a,i,r,n));case"TemplateLiteral":return yield*K(Mw(a,i,r,n));case"This":return yield*K(Tw(a,i,r,n));case"Tuple":return yield*K(kw(a,i,r,n));case"Undefined":return yield*K(_w(a,i,r,n));case"Union":return yield*K(Lw(a,i,r,n));case"Uint8Array":return yield*K(Rw(a,i,r,n));case"Unknown":return yield*K(Nw(a,i,r,n));case"Void":return yield*K(jw(a,i,r,n));default:if(!$t.Has(a[L]))throw new k0(e);return yield*K(Uw(a,i,r,n))}}o(ir,"Visit");function Vn(...e){let t=e.length===3?ir(e[0],e[1],"",e[2]):ir(e[0],[],"",e[1]);return new on(t)}o(Vn,"Errors");l();l();var zw=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Hb=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},R0,Ol,Kb,j0=class j0 extends fe{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),R0.add(this),Ol.set(this,void 0),zw(this,Ol,t,"f"),this.error=r}Errors(){return new on(Hb(this,R0,"m",Kb).call(this))}};o(j0,"AssertError");var N0=j0;Ol=new WeakMap,R0=new WeakSet,Kb=o(function*(){this.error&&(yield this.error),yield*K(Hb(this,Ol,"f"))},"_AssertError_Iterator");function Wb(e,t,r){if(!we(e,t,r))throw new N0(Vn(e,t,r))}o(Wb,"AssertValue");function Bl(...e){return e.length===3?Wb(e[0],e[1],e[2]):Wb(e[0],[],e[1])}o(Bl,"Assert");l();l();l();function $w(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ge(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ge(e[r]);return t}o($w,"FromObject");function Gw(e){return e.map(t=>Ge(t))}o(Gw,"FromArray");function Zw(e){return e.slice()}o(Zw,"FromTypedArray");function Vw(e){return new Map(Ge([...e.entries()]))}o(Vw,"FromMap");function Ww(e){return new Set(Ge([...e.entries()]))}o(Ww,"FromSet");function Hw(e){return new Date(e.toISOString())}o(Hw,"FromDate");function Ge(e){if(ve(e))return Gw(e);if(xr(e))return Hw(e);if(Jr(e))return Zw(e);if(P4(e))return Vw(e);if(M4(e))return Ww(e);if(Ee(e))return $w(e);if(tr(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Ge,"Clone");var U0=class U0 extends fe{constructor(t,r){super(r),this.schema=t}};o(U0,"ValueCreateError");var zr=U0;function Ze(e){return Wi(e)?e():Ge(e)}o(Ze,"FromDefault");function Kw(e,t){return ge(e,"default")?Ze(e.default):{}}o(Kw,"FromAny");function qw(e,t){if(e.uniqueItems===!0&&!ge(e,"default"))throw new zr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ge(e,"default"))throw new zr(e,"Array with the contains constraint requires a default value");return"default"in e?Ze(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>$r(e.items,t)):[]}o(qw,"FromArray");function Jw(e,t){return ge(e,"default")?Ze(e.default):function(){return Yg(this,null,function*(){})}()}o(Jw,"FromAsyncIterator");function Xw(e,t){return ge(e,"default")?Ze(e.default):BigInt(0)}o(Xw,"FromBigInt");function Yw(e,t){return ge(e,"default")?Ze(e.default):!1}o(Yw,"FromBoolean");function Qw(e,t){if(ge(e,"default"))return Ze(e.default);{let r=$r(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let a=this;a[n]=i}}}:class{}}}o(Qw,"FromConstructor");function eA(e,t){return ge(e,"default")?Ze(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(eA,"FromDate");function tA(e,t){return ge(e,"default")?Ze(e.default):()=>$r(e.returns,t)}o(tA,"FromFunction");function rA(e,t){return ge(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(rA,"FromInteger");function nA(e,t){if(ge(e,"default"))return Ze(e.default);{let r=e.allOf.reduce((n,i)=>{let a=$r(i,t);return typeof a=="object"?R(R({},n),a):a},{});if(!we(e,t,r))throw new zr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(nA,"FromIntersect");function iA(e,t){return ge(e,"default")?Ze(e.default):function*(){}()}o(iA,"FromIterator");function oA(e,t){return ge(e,"default")?Ze(e.default):e.const}o(oA,"FromLiteral");function aA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"Never types cannot be created. Consider using a default value.")}o(aA,"FromNever");function uA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"Not types must have a default value")}o(uA,"FromNot");function sA(e,t){return ge(e,"default")?Ze(e.default):null}o(sA,"FromNull");function cA(e,t){return ge(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(cA,"FromNumber");function lA(e,t){if(ge(e,"default"))return Ze(e.default);{let r=new Set(e.required),n={};for(let[i,a]of Object.entries(e.properties))r.has(i)&&(n[i]=$r(a,t));return n}}o(lA,"FromObject");function mA(e,t){return ge(e,"default")?Ze(e.default):Promise.resolve($r(e.item,t))}o(mA,"FromPromise");function dA(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(ge(e,"default"))return Ze(e.default);if(r===gi||r===hi)return{};{let i=r.slice(1,r.length-1).split("|"),a={};for(let u of i)a[u]=$r(n,t);return a}}o(dA,"FromRecord");function pA(e,t){return ge(e,"default")?Ze(e.default):$r($e(e,t),t)}o(pA,"FromRef");function fA(e,t){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"RegExp types cannot be created. Consider using a default value.")}o(fA,"FromRegExp");function hA(e,t){if(e.pattern!==void 0){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ge(e,"default"))return Ze(e.default);throw new zr(e,"String types with formats must specify a default value")}else return ge(e,"default")?Ze(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(hA,"FromString");function gA(e,t){return ge(e,"default")?Ze(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(gA,"FromSymbol");function yA(e,t){if(ge(e,"default"))return Ze(e.default);if(!rl(e))throw new zr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Sa(e)[0]}o(yA,"FromTemplateLiteral");function bA(e,t){if(qb++>wA)throw new zr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ge(e,"default")?Ze(e.default):$r($e(e,t),t)}o(bA,"FromThis");function vA(e,t){return ge(e,"default")?Ze(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>$r(e.items[n],t))}o(vA,"FromTuple");function xA(e,t){if(ge(e,"default"))return Ze(e.default)}o(xA,"FromUndefined");function EA(e,t){if(ge(e,"default"))return Ze(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return $r(e.anyOf[0],t)}o(EA,"FromUnion");function CA(e,t){return ge(e,"default")?Ze(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(CA,"FromUint8Array");function IA(e,t){return ge(e,"default")?Ze(e.default):{}}o(IA,"FromUnknown");function DA(e,t){if(ge(e,"default"))return Ze(e.default)}o(DA,"FromVoid");function SA(e,t){if(ge(e,"default"))return Ze(e.default);throw new Error("User defined types must specify a default value")}o(SA,"FromKind");function $r(e,t){let r=nn(e,t),n=e;switch(n[L]){case"Any":return Kw(n,r);case"Array":return qw(n,r);case"AsyncIterator":return Jw(n,r);case"BigInt":return Xw(n,r);case"Boolean":return Yw(n,r);case"Constructor":return Qw(n,r);case"Date":return eA(n,r);case"Function":return tA(n,r);case"Integer":return rA(n,r);case"Intersect":return nA(n,r);case"Iterator":return iA(n,r);case"Literal":return oA(n,r);case"Never":return aA(n,r);case"Not":return uA(n,r);case"Null":return sA(n,r);case"Number":return cA(n,r);case"Object":return lA(n,r);case"Promise":return mA(n,r);case"Record":return dA(n,r);case"Ref":return pA(n,r);case"RegExp":return fA(n,r);case"String":return hA(n,r);case"Symbol":return gA(n,r);case"TemplateLiteral":return yA(n,r);case"This":return bA(n,r);case"Tuple":return vA(n,r);case"Undefined":return xA(n,r);case"Union":return EA(n,r);case"Uint8Array":return CA(n,r);case"Unknown":return IA(n,r);case"Void":return DA(n,r);default:if(!$t.Has(n[L]))throw new zr(n,"Unknown type");return SA(n,r)}}o($r,"Visit");var wA=512,qb=0;function an(...e){return qb=0,e.length===2?$r(e[0],e[1]):$r(e[0],[])}o(an,"Create");var $0=class $0 extends fe{constructor(t,r){super(r),this.schema=t}};o($0,"ValueCastError");var Pl=$0;function AA(e,t,r){if(e[L]==="Object"&&typeof r=="object"&&!li(r)){let n=e,i=Object.getOwnPropertyNames(r),a=Object.entries(n.properties),[u,c]=[1/a.length,a.length];return a.reduce((m,[d,h])=>{let g=h[L]==="Literal"&&h.const===r[d]?c:0,v=we(h,t,r[d])?u:0,b=i.includes(d)?u:0;return m+(g+v+b)},0)}else return we(e,t,r)?1:0}o(AA,"ScoreUnion");function FA(e,t,r){let n=e.anyOf.map(u=>$e(u,t)),[i,a]=[n[0],0];for(let u of n){let c=AA(u,t,r);c>a&&(i=u,a=c)}return i}o(FA,"SelectUnion");function OA(e,t,r){if("default"in e)return typeof r=="function"?e.default:Ge(e.default);{let n=FA(e,t,r);return z0(n,t,r)}}o(OA,"CastUnion");function BA(e,t,r){return we(e,t,r)?Ge(r):an(e,t)}o(BA,"DefaultClone");function PA(e,t,r){return we(e,t,r)?r:an(e,t)}o(PA,"Default");function MA(e,t,r){if(we(e,t,r))return Ge(r);let n=ve(r)?Ge(r):an(e,t),i=pe(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,u=(pe(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(m=>Wn(e.items,t,m));if(e.uniqueItems!==!0)return u;let c=[...new Set(u)];if(!we(e,t,c))throw new Pl(e,"Array cast produced invalid data due to uniqueItems constraint");return c}o(MA,"FromArray");function TA(e,t,r){if(we(e,t,r))return an(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[a,u]of Object.entries(e.returns.properties))!n.has(a)&&r.prototype[a]===void 0||(i.prototype[a]=Wn(u,t,r.prototype[a]));return i}o(TA,"FromConstructor");function kA(e,t,r){let n=an(e,t),i=Ee(n)&&Ee(r)?R(R({},n),r):r;return we(e,t,i)?i:an(e,t)}o(kA,"FromIntersect");function _A(e,t,r){throw new Pl(e,"Never types cannot be cast")}o(_A,"FromNever");function LA(e,t,r){if(we(e,t,r))return r;if(r===null||typeof r!="object")return an(e,t);let n=new Set(e.required||[]),i={};for(let[a,u]of Object.entries(e.properties))!n.has(a)&&r[a]===void 0||(i[a]=Wn(u,t,r[a]));if(typeof e.additionalProperties=="object"){let a=Object.getOwnPropertyNames(e.properties);for(let u of Object.getOwnPropertyNames(r))a.includes(u)||(i[u]=Wn(e.additionalProperties,t,r[u]))}return i}o(LA,"FromObject");function RA(e,t,r){if(we(e,t,r))return Ge(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return an(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],a={};for(let[u,c]of Object.entries(r))a[u]=Wn(i,t,c);return a}o(RA,"FromRecord");function NA(e,t,r){return Wn($e(e,t),t,r)}o(NA,"FromRef");function jA(e,t,r){return Wn($e(e,t),t,r)}o(jA,"FromThis");function UA(e,t,r){return we(e,t,r)?Ge(r):ve(r)?e.items===void 0?[]:e.items.map((n,i)=>Wn(n,t,r[i])):an(e,t)}o(UA,"FromTuple");function zA(e,t,r){return we(e,t,r)?Ge(r):OA(e,t,r)}o(zA,"FromUnion");function Wn(e,t,r){let n=Le(e.$id)?[...t,e]:t,i=e;switch(e[L]){case"Array":return MA(i,n,r);case"Constructor":return TA(i,n,r);case"Intersect":return kA(i,n,r);case"Never":return _A(i,n,r);case"Object":return LA(i,n,r);case"Record":return RA(i,n,r);case"Ref":return NA(i,n,r);case"This":return jA(i,n,r);case"Tuple":return UA(i,n,r);case"Union":return zA(i,n,r);case"Date":case"Symbol":case"Uint8Array":return BA(e,t,r);default:return PA(i,n,r)}}o(Wn,"Visit");function z0(...e){return e.length===3?Wn(e[0],e[1],e[2]):Wn(e[0],[],e[1])}o(z0,"Cast");l();function $A(e){return Ki(e)&&e[L]!=="Unsafe"}o($A,"IsCheckable");function GA(e,t,r){return ve(r)?r.map(n=>Gr(e.items,t,n)):r}o(GA,"FromArray");function ZA(e,t,r){let n=e.unevaluatedProperties,a=e.allOf.map(c=>Gr(c,t,Ge(r))).reduce((c,m)=>Ee(m)?R(R({},c),m):m,{});if(!Ee(r)||!Ee(a)||!Ki(n))return a;let u=Kt(e);for(let c of Object.getOwnPropertyNames(r))u.includes(c)||we(n,t,r[c])&&(a[c]=Gr(n,t,r[c]));return a}o(ZA,"FromIntersect");function VA(e,t,r){if(!Ee(r)||ve(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(ge(e.properties,i)){r[i]=Gr(e.properties[i],t,r[i]);continue}if(Ki(n)&&we(n,t,r[i])){r[i]=Gr(n,t,r[i]);continue}delete r[i]}return r}o(VA,"FromObject");function WA(e,t,r){if(!Ee(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of i){if(c.test(m)){r[m]=Gr(u,t,r[m]);continue}if(Ki(n)&&we(n,t,r[m])){r[m]=Gr(n,t,r[m]);continue}delete r[m]}return r}o(WA,"FromRecord");function HA(e,t,r){return Gr($e(e,t),t,r)}o(HA,"FromRef");function KA(e,t,r){return Gr($e(e,t),t,r)}o(KA,"FromThis");function qA(e,t,r){if(!ve(r))return r;if(Et(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=Gr(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(qA,"FromTuple");function JA(e,t,r){for(let n of e.anyOf)if($A(n)&&we(n,t,r))return Gr(n,t,r);return r}o(JA,"FromUnion");function Gr(e,t,r){let n=Le(e.$id)?[...t,e]:t,i=e;switch(i[L]){case"Array":return GA(i,n,r);case"Intersect":return ZA(i,n,r);case"Object":return VA(i,n,r);case"Record":return WA(i,n,r);case"Ref":return HA(i,n,r);case"This":return KA(i,n,r);case"Tuple":return qA(i,n,r);case"Union":return JA(i,n,r);default:return r}}o(Gr,"Visit");function Ml(...e){return e.length===3?Gr(e[0],e[1],e[2]):Gr(e[0],[],e[1])}o(Ml,"Clean");l();function Tl(e){return Le(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(Tl,"IsStringNumeric");function XA(e){return er(e)||Un(e)||pe(e)}o(XA,"IsValueToString");function ls(e){return e===!0||pe(e)&&e===1||er(e)&&e===BigInt("1")||Le(e)&&(e.toLowerCase()==="true"||e==="1")}o(ls,"IsValueTrue");function ms(e){return e===!1||pe(e)&&(e===0||Object.is(e,-0))||er(e)&&e===BigInt("0")||Le(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(ms,"IsValueFalse");function YA(e){return Le(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(YA,"IsTimeStringWithTimeZone");function QA(e){return Le(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(QA,"IsTimeStringWithoutTimeZone");function e5(e){return Le(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)}o(e5,"IsDateTimeStringWithTimeZone");function t5(e){return Le(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)}o(t5,"IsDateTimeStringWithoutTimeZone");function r5(e){return Le(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(r5,"IsDateString");function n5(e,t){let r=Xb(e);return r===t?r:e}o(n5,"TryConvertLiteralString");function i5(e,t){let r=Yb(e);return r===t?r:e}o(i5,"TryConvertLiteralNumber");function o5(e,t){let r=Jb(e);return r===t?r:e}o(o5,"TryConvertLiteralBoolean");function a5(e,t){return Le(e.const)?n5(t,e.const):pe(e.const)?i5(t,e.const):Un(e.const)?o5(t,e.const):t}o(a5,"TryConvertLiteral");function Jb(e){return ls(e)?!0:ms(e)?!1:e}o(Jb,"TryConvertBoolean");function u5(e){let t=o(r=>r.split(".")[0],"truncateInteger");return Tl(e)?BigInt(t(e)):pe(e)?BigInt(Math.trunc(e)):ms(e)?BigInt(0):ls(e)?BigInt(1):e}o(u5,"TryConvertBigInt");function Xb(e){return XA(e)?e.toString():mi(e)&&e.description!==void 0?e.description.toString():e}o(Xb,"TryConvertString");function Yb(e){return Tl(e)?parseFloat(e):ls(e)?1:ms(e)?0:e}o(Yb,"TryConvertNumber");function s5(e){return Tl(e)?parseInt(e):pe(e)?e|0:ls(e)?1:ms(e)?0:e}o(s5,"TryConvertInteger");function c5(e){return Le(e)&&e.toLowerCase()==="null"?null:e}o(c5,"TryConvertNull");function l5(e){return Le(e)&&e==="undefined"?void 0:e}o(l5,"TryConvertUndefined");function m5(e){return xr(e)?e:pe(e)?new Date(e):ls(e)?new Date(1):ms(e)?new Date(0):Tl(e)?new Date(parseInt(e)):QA(e)?new Date("1970-01-01T".concat(e,".000Z")):YA(e)?new Date("1970-01-01T".concat(e)):t5(e)?new Date("".concat(e,".000Z")):e5(e)?new Date(e):r5(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(m5,"TryConvertDate");function d5(e,t,r){return(ve(r)?r:[r]).map(i=>Hn(e.items,t,i))}o(d5,"FromArray");function p5(e,t,r){return u5(r)}o(p5,"FromBigInt");function f5(e,t,r){return Jb(r)}o(f5,"FromBoolean");function h5(e,t,r){return m5(r)}o(h5,"FromDate");function g5(e,t,r){return s5(r)}o(g5,"FromInteger");function y5(e,t,r){return e.allOf.reduce((n,i)=>Hn(i,t,n),r)}o(y5,"FromIntersect");function b5(e,t,r){return a5(e,r)}o(b5,"FromLiteral");function v5(e,t,r){return c5(r)}o(v5,"FromNull");function x5(e,t,r){return Yb(r)}o(x5,"FromNumber");function E5(e,t,r){if(!Ee(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))ge(r,n)&&(r[n]=Hn(e.properties[n],t,r[n]));return r}o(E5,"FromObject");function C5(e,t,r){if(!Ee(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=e.patternProperties[i];for(let[u,c]of Object.entries(r))r[u]=Hn(a,t,c);return r}o(C5,"FromRecord");function I5(e,t,r){return Hn($e(e,t),t,r)}o(I5,"FromRef");function D5(e,t,r){return Xb(r)}o(D5,"FromString");function S5(e,t,r){return Le(r)||pe(r)?Symbol(r):r}o(S5,"FromSymbol");function w5(e,t,r){return Hn($e(e,t),t,r)}o(w5,"FromThis");function A5(e,t,r){return ve(r)&&!Et(e.items)?r.map((i,a)=>a<e.items.length?Hn(e.items[a],t,i):i):r}o(A5,"FromTuple");function F5(e,t,r){return l5(r)}o(F5,"FromUndefined");function O5(e,t,r){for(let n of e.anyOf){let i=Hn(n,t,Ge(r));if(we(n,t,i))return i}return r}o(O5,"FromUnion");function Hn(e,t,r){let n=nn(e,t),i=e;switch(e[L]){case"Array":return d5(i,n,r);case"BigInt":return p5(i,n,r);case"Boolean":return f5(i,n,r);case"Date":return h5(i,n,r);case"Integer":return g5(i,n,r);case"Intersect":return y5(i,n,r);case"Literal":return b5(i,n,r);case"Null":return v5(i,n,r);case"Number":return x5(i,n,r);case"Object":return E5(i,n,r);case"Record":return C5(i,n,r);case"Ref":return I5(i,n,r);case"String":return D5(i,n,r);case"Symbol":return S5(i,n,r);case"This":return w5(i,n,r);case"Tuple":return A5(i,n,r);case"Undefined":return F5(i,n,r);case"Union":return O5(i,n,r);default:return r}}o(Hn,"Visit");function kl(...e){return e.length===3?Hn(e[0],e[1],e[2]):Hn(e[0],[],e[1])}o(kl,"Convert");l();l();var G0=class G0 extends fe{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(G0,"TransformDecodeCheckError");var za=G0,Z0=class Z0 extends fe{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(Z0,"TransformDecodeError");var _o=Z0;function Ct(e,t,r){try{return ft(e)?e[gt].Decode(r):r}catch(n){throw new _o(e,t,r,n)}}o(Ct,"Default");function B5(e,t,r,n){return ve(n)?Ct(e,r,n.map((i,a)=>Kn(e.items,t,"".concat(r,"/").concat(a),i))):Ct(e,r,n)}o(B5,"FromArray");function P5(e,t,r,n){if(!Ee(n)||tr(n))return Ct(e,r,n);let i=Xi(e),a=i.map(h=>h[0]),u=R({},n);for(let[h,g]of i)h in u&&(u[h]=Kn(g,t,"".concat(r,"/").concat(h),u[h]));if(!ft(e.unevaluatedProperties))return Ct(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.unevaluatedProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=Ct(m,"".concat(r,"/").concat(h),d[h]));return Ct(e,r,d)}o(P5,"FromIntersect");function M5(e,t,r,n){return Ct(e,r,Kn(e.not,t,r,n))}o(M5,"FromNot");function T5(e,t,r,n){if(!Ee(n))return Ct(e,r,n);let i=Kt(e),a=R({},n);for(let d of i)ge(a,d)&&(Et(a[d])&&(!xa(e.properties[d])||Ye.IsExactOptionalProperty(a,d))||(a[d]=Kn(e.properties[d],t,"".concat(r,"/").concat(d),a[d])));if(!Re(e.additionalProperties))return Ct(e,r,a);let u=Object.getOwnPropertyNames(a),c=e.additionalProperties,m=R({},a);for(let d of u)i.includes(d)||(m[d]=Ct(c,"".concat(r,"/").concat(d),m[d]));return Ct(e,r,m)}o(T5,"FromObject");function k5(e,t,r,n){if(!Ee(n))return Ct(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=R({},n);for(let h of Object.getOwnPropertyNames(n))a.test(h)&&(u[h]=Kn(e.patternProperties[i],t,"".concat(r,"/").concat(h),u[h]));if(!Re(e.additionalProperties))return Ct(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.test(h)||(d[h]=Ct(m,"".concat(r,"/").concat(h),d[h]));return Ct(e,r,d)}o(k5,"FromRecord");function _5(e,t,r,n){let i=$e(e,t);return Ct(e,r,Kn(i,t,r,n))}o(_5,"FromRef");function L5(e,t,r,n){let i=$e(e,t);return Ct(e,r,Kn(i,t,r,n))}o(L5,"FromThis");function R5(e,t,r,n){return ve(n)&&ve(e.items)?Ct(e,r,e.items.map((i,a)=>Kn(i,t,"".concat(r,"/").concat(a),n[a]))):Ct(e,r,n)}o(R5,"FromTuple");function N5(e,t,r,n){for(let i of e.anyOf){if(!we(i,t,n))continue;let a=Kn(i,t,r,n);return Ct(e,r,a)}return Ct(e,r,n)}o(N5,"FromUnion");function Kn(e,t,r,n){let i=nn(e,t),a=e;switch(e[L]){case"Array":return B5(a,i,r,n);case"Intersect":return P5(a,i,r,n);case"Not":return M5(a,i,r,n);case"Object":return T5(a,i,r,n);case"Record":return k5(a,i,r,n);case"Ref":return _5(a,i,r,n);case"Symbol":return Ct(a,r,n);case"This":return L5(a,i,r,n);case"Tuple":return R5(a,i,r,n);case"Union":return N5(a,i,r,n);default:return Ct(a,r,n)}}o(Kn,"Visit");function $a(e,t,r){return Kn(e,t,"",r)}o($a,"TransformDecode");l();var V0=class V0 extends fe{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(V0,"TransformEncodeCheckError");var Ga=V0,W0=class W0 extends fe{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(W0,"TransformEncodeError");var Lo=W0;function hr(e,t,r){try{return ft(e)?e[gt].Encode(r):r}catch(n){throw new Lo(e,t,r,n)}}o(hr,"Default");function j5(e,t,r,n){let i=hr(e,r,n);return ve(i)?i.map((a,u)=>qn(e.items,t,"".concat(r,"/").concat(u),a)):i}o(j5,"FromArray");function U5(e,t,r,n){let i=hr(e,r,n);if(!Ee(n)||tr(n))return i;let a=Xi(e),u=a.map(g=>g[0]),c=R({},i);for(let[g,v]of a)g in c&&(c[g]=qn(v,t,"".concat(r,"/").concat(g),c[g]));if(!ft(e.unevaluatedProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=hr(d,"".concat(r,"/").concat(g),h[g]));return h}o(U5,"FromIntersect");function z5(e,t,r,n){return hr(e.not,r,hr(e,r,n))}o(z5,"FromNot");function $5(e,t,r,n){let i=hr(e,r,n);if(!Ee(i))return i;let a=Kt(e),u=R({},i);for(let h of a)ge(u,h)&&(Et(u[h])&&(!xa(e.properties[h])||Ye.IsExactOptionalProperty(u,h))||(u[h]=qn(e.properties[h],t,"".concat(r,"/").concat(h),u[h])));if(!Re(e.additionalProperties))return u;let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=hr(m,"".concat(r,"/").concat(h),d[h]));return d}o($5,"FromObject");function G5(e,t,r,n){let i=hr(e,r,n);if(!Ee(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},i);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=qn(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g]));if(!Re(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.test(g)||(h[g]=hr(d,"".concat(r,"/").concat(g),h[g]));return h}o(G5,"FromRecord");function Z5(e,t,r,n){let i=$e(e,t),a=qn(i,t,r,n);return hr(e,r,a)}o(Z5,"FromRef");function V5(e,t,r,n){let i=$e(e,t),a=qn(i,t,r,n);return hr(e,r,a)}o(V5,"FromThis");function W5(e,t,r,n){let i=hr(e,r,n);return ve(e.items)?e.items.map((a,u)=>qn(a,t,"".concat(r,"/").concat(u),i[u])):[]}o(W5,"FromTuple");function H5(e,t,r,n){for(let i of e.anyOf){if(!we(i,t,n))continue;let a=qn(i,t,r,n);return hr(e,r,a)}for(let i of e.anyOf){let a=qn(i,t,r,n);if(we(e,t,a))return hr(e,r,a)}return hr(e,r,n)}o(H5,"FromUnion");function qn(e,t,r,n){let i=nn(e,t),a=e;switch(e[L]){case"Array":return j5(a,i,r,n);case"Intersect":return U5(a,i,r,n);case"Not":return z5(a,i,r,n);case"Object":return $5(a,i,r,n);case"Record":return G5(a,i,r,n);case"Ref":return Z5(a,i,r,n);case"This":return V5(a,i,r,n);case"Tuple":return W5(a,i,r,n);case"Union":return H5(a,i,r,n);default:return hr(a,r,n)}}o(qn,"Visit");function _l(e,t,r){return qn(e,t,"",r)}o(_l,"TransformEncode");l();function K5(e,t){return ft(e)||qt(e.items,t)}o(K5,"FromArray");function q5(e,t){return ft(e)||qt(e.items,t)}o(q5,"FromAsyncIterator");function J5(e,t){return ft(e)||qt(e.returns,t)||e.parameters.some(r=>qt(r,t))}o(J5,"FromConstructor");function X5(e,t){return ft(e)||qt(e.returns,t)||e.parameters.some(r=>qt(r,t))}o(X5,"FromFunction");function Y5(e,t){return ft(e)||ft(e.unevaluatedProperties)||e.allOf.some(r=>qt(r,t))}o(Y5,"FromIntersect");function Q5(e,t){return ft(e)||qt(e.items,t)}o(Q5,"FromIterator");function eF(e,t){return ft(e)||qt(e.not,t)}o(eF,"FromNot");function tF(e,t){return ft(e)||Object.values(e.properties).some(r=>qt(r,t))||Re(e.additionalProperties)&&qt(e.additionalProperties,t)}o(tF,"FromObject");function rF(e,t){return ft(e)||qt(e.item,t)}o(rF,"FromPromise");function nF(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return ft(e)||qt(n,t)||Re(e.additionalProperties)&&ft(e.additionalProperties)}o(nF,"FromRecord");function iF(e,t){return ft(e)?!0:qt($e(e,t),t)}o(iF,"FromRef");function oF(e,t){return ft(e)?!0:qt($e(e,t),t)}o(oF,"FromThis");function aF(e,t){return ft(e)||!Et(e.items)&&e.items.some(r=>qt(r,t))}o(aF,"FromTuple");function uF(e,t){return ft(e)||e.anyOf.some(r=>qt(r,t))}o(uF,"FromUnion");function qt(e,t){let r=nn(e,t),n=e;if(e.$id&&H0.has(e.$id))return!1;switch(e.$id&&H0.add(e.$id),e[L]){case"Array":return K5(n,r);case"AsyncIterator":return q5(n,r);case"Constructor":return J5(n,r);case"Function":return X5(n,r);case"Intersect":return Y5(n,r);case"Iterator":return Q5(n,r);case"Not":return eF(n,r);case"Object":return tF(n,r);case"Promise":return rF(n,r);case"Record":return nF(n,r);case"Ref":return iF(n,r);case"This":return oF(n,r);case"Tuple":return aF(n,r);case"Union":return uF(n,r);default:return ft(e)}}o(qt,"Visit");var H0=new Set;function Jn(e,t){return H0.clear(),qt(e,t)}o(Jn,"HasTransform");function Qb(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!we(t,r,n))throw new za(t,n,Vn(t,r,n).First());return Jn(t,r)?$a(t,r,n):n}o(Qb,"Decode");l();function Ci(e,t){let r=ge(e,"default")?e.default:void 0,n=Wi(r)?r():Ge(r);return Et(t)?n:Ee(t)&&Ee(n)?Object.assign(n,t):t}o(Ci,"ValueOrDefault");function K0(e){return Ki(e)&&"default"in e}o(K0,"HasDefaultProperty");function sF(e,t,r){let n=Ci(e,r);if(!ve(n))return n;for(let i=0;i<n.length;i++)n[i]=Zr(e.items,t,n[i]);return n}o(sF,"FromArray");function cF(e,t,r){return xr(r)?r:Ci(e,r)}o(cF,"FromDate");function lF(e,t,r){let n=Ci(e,r);return e.allOf.reduce((i,a)=>{let u=Zr(a,t,n);return Ee(u)?R(R({},i),u):u},{})}o(lF,"FromIntersect");function mF(e,t,r){let n=Ci(e,r);if(!Ee(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let a of i){let u=Zr(e.properties[a],t,n[a]);Et(u)||(n[a]=Zr(e.properties[a],t,n[a]))}if(!K0(e.additionalProperties))return n;for(let a of Object.getOwnPropertyNames(n))i.includes(a)||(n[a]=Zr(e.additionalProperties,t,n[a]));return n}o(mF,"FromObject");function dF(e,t,r){let n=Ci(e,r);if(!Ee(n))return n;let i=e.additionalProperties,[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of Object.getOwnPropertyNames(n))c.test(m)&&K0(u)&&(n[m]=Zr(u,t,n[m]));if(!K0(i))return n;for(let m of Object.getOwnPropertyNames(n))c.test(m)||(n[m]=Zr(i,t,n[m]));return n}o(dF,"FromRecord");function pF(e,t,r){return Zr($e(e,t),t,Ci(e,r))}o(pF,"FromRef");function fF(e,t,r){return Zr($e(e,t),t,r)}o(fF,"FromThis");function hF(e,t,r){let n=Ci(e,r);if(!ve(n)||Et(e.items))return n;let[i,a]=[e.items,Math.max(e.items.length,n.length)];for(let u=0;u<a;u++)u<i.length&&(n[u]=Zr(i[u],t,n[u]));return n}o(hF,"FromTuple");function gF(e,t,r){let n=Ci(e,r);for(let i of e.anyOf){let a=Zr(i,t,Ge(n));if(we(i,t,a))return a}return n}o(gF,"FromUnion");function Zr(e,t,r){let n=nn(e,t),i=e;switch(i[L]){case"Array":return sF(i,n,r);case"Date":return cF(i,n,r);case"Intersect":return lF(i,n,r);case"Object":return mF(i,n,r);case"Record":return dF(i,n,r);case"Ref":return pF(i,n,r);case"This":return fF(i,n,r);case"Tuple":return hF(i,n,r);case"Union":return gF(i,n,r);default:return Ci(i,r)}}o(Zr,"Visit");function Ll(...e){return e.length===3?Zr(e[0],e[1],e[2]):Zr(e[0],[],e[1])}o(Ll,"Default");l();l();var un={};_i(un,{Delete:()=>bF,Format:()=>ds,Get:()=>xF,Has:()=>vF,Set:()=>yF,ValuePointerRootDeleteError:()=>Nl,ValuePointerRootSetError:()=>Rl});l();var q0=class q0 extends fe{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(q0,"ValuePointerRootSetError");var Rl=q0,J0=class J0 extends fe{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(J0,"ValuePointerRootDeleteError");var Nl=J0;function ev(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(ev,"Escape");function*ds(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield ev(e.slice(t,r))),t=n+1):r=n;yield ev(e.slice(t))}o(ds,"Format");function yF(e,t,r){if(t==="")throw new Rl(e,t,r);let[n,i,a]=[null,e,""];for(let u of ds(t))i[u]===void 0&&(i[u]={}),n=i,i=i[u],a=u;n[a]=r}o(yF,"Set");function bF(e,t){if(t==="")throw new Nl(e,t);let[r,n,i]=[null,e,""];for(let a of ds(t)){if(n[a]===void 0||n[a]===null)return;r=n,n=n[a],i=a}if(Array.isArray(r)){let a=parseInt(i);r.splice(a,1)}else delete r[i]}o(bF,"Delete");function vF(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let a of ds(t)){if(n[a]===void 0)return!1;r=n,n=n[a],i=a}return Object.getOwnPropertyNames(r).includes(i)}o(vF,"Has");function xF(e,t){if(t==="")return e;let r=e;for(let n of ds(t)){if(r[n]===void 0)return;r=r[n]}return r}o(xF,"Get");l();function EF(e,t){if(!Ee(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>Ro(e[i],t[i]))}o(EF,"ObjectType");function CF(e,t){return xr(t)&&e.getTime()===t.getTime()}o(CF,"DateType");function IF(e,t){return!ve(t)||e.length!==t.length?!1:e.every((r,n)=>Ro(r,t[n]))}o(IF,"ArrayType");function DF(e,t){return!Jr(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>Ro(r,t[n]))}o(DF,"TypedArrayType");function SF(e,t){return e===t}o(SF,"ValueType");function Ro(e,t){if(xr(e))return CF(e,t);if(Jr(e))return DF(e,t);if(ve(e))return IF(e,t);if(Ee(e))return EF(e,t);if(tr(e))return SF(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Ro,"Equal");var wF=ut({type:Ke("insert"),path:Yr(),value:vi()}),AF=ut({type:Ke("update"),path:Yr(),value:vi()}),FF=ut({type:Ke("delete"),path:Yr()}),rv=nt([wF,AF,FF]),X0=class X0 extends fe{constructor(t,r){super(r),this.value=t}};o(X0,"ValueDiffError");var jl=X0;function Ul(e,t){return{type:"update",path:e,value:t}}o(Ul,"CreateUpdate");function nv(e,t){return{type:"insert",path:e,value:t}}o(nv,"CreateInsert");function iv(e){return{type:"delete",path:e}}o(iv,"CreateDelete");function tv(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new jl(e,"Cannot diff objects with symbols")}o(tv,"AssertDiffable");function*OF(e,t,r){if(tv(t),tv(r),!Ip(r))return yield Ul(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let a of i)ge(t,a)||(yield nv("".concat(e,"/").concat(a),r[a]));for(let a of n)ge(r,a)&&(Ro(t,r)||(yield*K(zl("".concat(e,"/").concat(a),t[a],r[a]))));for(let a of n)ge(r,a)||(yield iv("".concat(e,"/").concat(a)))}o(OF,"ObjectType");function*BF(e,t,r){if(!ve(r))return yield Ul(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(zl("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield nv("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield iv("".concat(e,"/").concat(n)))}o(BF,"ArrayType");function*PF(e,t,r){if(!Jr(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield Ul(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(zl("".concat(e,"/").concat(n),t[n],r[n]))}o(PF,"TypedArrayType");function*MF(e,t,r){t!==r&&(yield Ul(e,r))}o(MF,"ValueType");function*zl(e,t,r){if(Ip(t))return yield*K(OF(e,t,r));if(ve(t))return yield*K(BF(e,t,r));if(Jr(t))return yield*K(PF(e,t,r));if(tr(t))return yield*K(MF(e,t,r));throw new jl(t,"Unable to diff value")}o(zl,"Visit");function ov(e,t){return[...zl("",e,t)]}o(ov,"Diff");function TF(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(TF,"IsRootUpdate");function kF(e){return e.length===0}o(kF,"IsIdentity");function av(e,t){if(TF(t))return Ge(t[0].value);if(kF(t))return Ge(e);let r=Ge(e);for(let n of t)switch(n.type){case"insert":{un.Set(r,n.path,n.value);break}case"update":{un.Set(r,n.path,n.value);break}case"delete":{un.Delete(r,n.path);break}}return r}o(av,"Patch");l();function uv(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=Jn(t,r)?_l(t,r,n):n;if(!we(t,r,i))throw new Ga(t,i,Vn(t,r,i).First());return i}o(uv,"Encode");l();var Q0=class Q0 extends fe{constructor(t){super(t)}};o(Q0,"ValueMutateError");var $l=Q0;function _F(e,t,r,n){if(!Ee(r))un.Set(e,t,Ge(n));else{let i=Object.getOwnPropertyNames(r),a=Object.getOwnPropertyNames(n);for(let u of i)a.includes(u)||delete r[u];for(let u of a)i.includes(u)||(r[u]=null);for(let u of a)Y0(e,"".concat(t,"/").concat(u),r[u],n[u])}}o(_F,"ObjectType");function LF(e,t,r,n){if(!ve(r))un.Set(e,t,Ge(n));else{for(let i=0;i<n.length;i++)Y0(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(LF,"ArrayType");function RF(e,t,r,n){if(Jr(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else un.Set(e,t,Ge(n))}o(RF,"TypedArrayType");function NF(e,t,r,n){r!==n&&un.Set(e,t,n)}o(NF,"ValueType");function Y0(e,t,r,n){if(ve(n))return LF(e,t,r,n);if(Jr(n))return RF(e,t,r,n);if(Ee(n))return _F(e,t,r,n);if(tr(n))return NF(e,t,r,n)}o(Y0,"Visit");function sv(e){return Jr(e)||tr(e)}o(sv,"IsNonMutableValue");function jF(e,t){return Ee(e)&&ve(t)||ve(e)&&Ee(t)}o(jF,"IsMismatchedValue");function cv(e,t){if(sv(e)||sv(t))throw new $l("Only object and array types can be mutated at the root level");if(jF(e,t))throw new $l("Cannot assign due type mismatch of assignable values");Y0(e,"",e,t)}o(cv,"Mutate");l();var UF=[(e,t,r)=>Ge(r),(e,t,r)=>Ll(e,t,r),(e,t,r)=>Ml(e,t,r),(e,t,r)=>kl(e,t,r),(e,t,r)=>(Bl(e,t,r),r),(e,t,r)=>Jn(e,t)?$a(e,t,r):r];function lv(e,t,r){return UF.reduce((n,i)=>i(e,t,n),r)}o(lv,"ParseValue");function mv(...e){return e.length===3?lv(e[0],e[1],e[2]):lv(e[0],[],e[1])}o(mv,"Parse");l();var sn={};_i(sn,{Assert:()=>Bl,Cast:()=>z0,Check:()=>we,Clean:()=>Ml,Clone:()=>Ge,Convert:()=>kl,Create:()=>an,Decode:()=>Qb,Default:()=>Ll,Diff:()=>ov,Edit:()=>rv,Encode:()=>uv,Equal:()=>Ro,Errors:()=>Vn,Hash:()=>eo,Mutate:()=>cv,Parse:()=>mv,Patch:()=>av,ValueErrorIterator:()=>on});l();l();var dv={},zF=o(function(e,t,r,n,i){var a=new Worker(dv[t]||(dv[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(u){var c=u.data,m=c.$e$;if(m){var d=new Error(m[0]);d.code=m[1],d.stack=m[2],i(d,null)}else i(null,c)},a.postMessage(r,n),a},"wk"),st=Uint8Array,Dr=Uint16Array,gs=Int32Array,Ka=new st([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]),qa=new st([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]),ps=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hv=o(function(e,t){for(var r=new Dr(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new gs(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},"freb"),gv=hv(Ka,2),af=gv.b,Hl=gv.r;af[28]=258,Hl[258]=28;var yv=hv(qa,0),bv=yv.b,tf=yv.r,fs=new Dr(32768);for(Je=0;Je<32768;++Je)Ii=(Je&43690)>>1|(Je&21845)<<1,Ii=(Ii&52428)>>2|(Ii&13107)<<2,Ii=(Ii&61680)>>4|(Ii&3855)<<4,fs[Je]=((Ii&65280)>>8|(Ii&255)<<8)>>1;var Ii,Je,ln=o(function(e,t,r){for(var n=e.length,i=0,a=new Dr(t);i<n;++i)e[i]&&++a[e[i]-1];var u=new Dr(t);for(i=1;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;var c;if(r){c=new Dr(1<<t);var m=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],h=t-e[i],g=u[e[i]-1]++<<h,v=g|(1<<h)-1;g<=v;++g)c[fs[g]>>m]=d}else for(c=new Dr(n),i=0;i<n;++i)e[i]&&(c[i]=fs[u[e[i]-1]++]>>15-e[i]);return c},"hMap"),Di=new st(288);for(Je=0;Je<144;++Je)Di[Je]=8;var Je;for(Je=144;Je<256;++Je)Di[Je]=9;var Je;for(Je=256;Je<280;++Je)Di[Je]=7;var Je;for(Je=280;Je<288;++Je)Di[Je]=8;var Je,Wa=new st(32);for(Je=0;Je<32;++Je)Wa[Je]=5;var Je,vv=ln(Di,9,0),xv=ln(Di,9,1),Ev=ln(Wa,5,0),Cv=ln(Wa,5,1),Zl=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),cn=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Vl=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),ys=o(function(e){return(e+7)/8|0},"shft"),to=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},"slc"),Xl={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},Iv=["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"],It=o(function(e,t,r){var n=new Error(t||Iv[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,It),!r)throw n;return n},"err"),Dv=o(function(e,t,r,n){var i=e.length,a=n?n.length:0;if(!i||t.f&&!t.l)return r||new st(0);var u=!r,c=u||t.i!=2,m=t.i;u&&(r=new st(i*3));var d=o(function(B){var ae=r.length;if(B>ae){var J=new st(Math.max(ae*2,B));J.set(r),r=J}},"cbuf"),h=t.f||0,g=t.p||0,v=t.b||0,b=t.l,S=t.d,O=t.m,x=t.n,E=i*8;do{if(!b){h=cn(e,g,1);var I=cn(e,g+1,3);if(g+=3,I)if(I==1)b=xv,S=Cv,O=9,x=5;else if(I==2){var T=cn(e,g,31)+257,k=cn(e,g+10,15)+4,j=T+cn(e,g+5,31)+1;g+=14;for(var U=new st(j),G=new st(19),$=0;$<k;++$)G[ps[$]]=cn(e,g+$*3,7);g+=k*3;for(var X=Zl(G),V=(1<<X)-1,Y=ln(G,X,1),$=0;$<j;){var oe=Y[cn(e,g,V)];g+=oe&15;var D=oe>>4;if(D<16)U[$++]=D;else{var Z=0,ee=0;for(D==16?(ee=3+cn(e,g,3),g+=2,Z=U[$-1]):D==17?(ee=3+cn(e,g,7),g+=3):D==18&&(ee=11+cn(e,g,127),g+=7);ee--;)U[$++]=Z}}var te=U.subarray(0,T),Q=U.subarray(T);O=Zl(te),x=Zl(Q),b=ln(te,O,1),S=ln(Q,x,1)}else It(1);else{var D=ys(g)+4,C=e[D-4]|e[D-3]<<8,A=D+C;if(A>i){m&&It(0);break}c&&d(v+C),r.set(e.subarray(D,A),v),t.b=v+=C,t.p=g=A*8,t.f=h;continue}if(g>E){m&&It(0);break}}c&&d(v+131072);for(var de=(1<<O)-1,je=(1<<x)-1,Me=g;;Me=g){var Z=b[Vl(e,g)&de],Ve=Z>>4;if(g+=Z&15,g>E){m&&It(0);break}if(Z||It(2),Ve<256)r[v++]=Ve;else if(Ve==256){Me=g,b=null;break}else{var qe=Ve-254;if(Ve>264){var $=Ve-257,Ae=Ka[$];qe=cn(e,g,(1<<Ae)-1)+af[$],g+=Ae}var ot=S[Vl(e,g)&je],Pt=ot>>4;ot||It(3),g+=ot&15;var Q=bv[Pt];if(Pt>3){var Ae=qa[Pt];Q+=Vl(e,g)&(1<<Ae)-1,g+=Ae}if(g>E){m&&It(0);break}c&&d(v+131072);var Ht=v+qe;if(v<Q){var F=a-Q,q=Math.min(Q,Ht);for(F+v<0&&It(3);v<q;++v)r[v]=n[F+v]}for(;v<Ht;++v)r[v]=r[v-Q]}}t.l=b,t.p=Me,t.b=v,t.f=h,b&&(h=1,t.m=O,t.d=S,t.n=x)}while(!h);return v!=r.length&&u?to(r,0,v):r.subarray(0,v)},"inflt"),Xn=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),Za=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),Wl=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:sf,l:0};if(i==1){var u=new st(r[0].s+1);return u[r[0].s]=1,{t:u,l:1}}r.sort(function(A,T){return A.f-T.f}),r.push({s:-1,f:25001});var c=r[0],m=r[1],d=0,h=1,g=2;for(r[0]={s:-1,f:c.f+m.f,l:c,r:m};h!=i-1;)c=r[r[d].f<r[g].f?d++:g++],m=r[d!=h&&r[d].f<r[g].f?d++:g++],r[h++]={s:-1,f:c.f+m.f,l:c,r:m};for(var v=a[0].s,n=1;n<i;++n)a[n].s>v&&(v=a[n].s);var b=new Dr(v+1),S=Kl(r[h-1],b,0);if(S>t){var n=0,O=0,x=S-t,E=1<<x;for(a.sort(function(T,k){return b[k.s]-b[T.s]||T.f-k.f});n<i;++n){var I=a[n].s;if(b[I]>t)O+=E-(1<<S-b[I]),b[I]=t;else break}for(O>>=x;O>0;){var D=a[n].s;b[D]<t?O-=1<<t-b[D]++-1:++n}for(;n>=0&&O;--n){var C=a[n].s;b[C]==t&&(--b[C],++O)}S=t}return{t:new st(b),l:S}},"hTree"),Kl=o(function(e,t,r){return e.s==-1?Math.max(Kl(e.l,t,r+1),Kl(e.r,t,r+1)):t[e.s]=r},"ln"),rf=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Dr(++t),n=0,i=e[0],a=1,u=o(function(m){r[n++]=m},"w"),c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(i),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(i);a=1,i=e[c]}return{c:r.subarray(0,n),n:t}},"lc"),Va=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),uf=o(function(e,t,r){var n=r.length,i=ys(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},"wfblk"),nf=o(function(e,t,r,n,i,a,u,c,m,d,h){Xn(t,h++,r),++i[256];for(var g=Wl(i,15),v=g.t,b=g.l,S=Wl(a,15),O=S.t,x=S.l,E=rf(v),I=E.c,D=E.n,C=rf(O),A=C.c,T=C.n,k=new Dr(19),j=0;j<I.length;++j)++k[I[j]&31];for(var j=0;j<A.length;++j)++k[A[j]&31];for(var U=Wl(k,7),G=U.t,$=U.l,X=19;X>4&&!G[ps[X-1]];--X);var V=d+5<<3,Y=Va(i,Di)+Va(a,Wa)+u,oe=Va(i,v)+Va(a,O)+u+14+3*X+Va(k,G)+2*k[16]+3*k[17]+7*k[18];if(m>=0&&V<=Y&&V<=oe)return uf(t,h,e.subarray(m,m+d));var Z,ee,te,Q;if(Xn(t,h,1+(oe<Y)),h+=2,oe<Y){Z=ln(v,b,0),ee=v,te=ln(O,x,0),Q=O;var de=ln(G,$,0);Xn(t,h,D-257),Xn(t,h+5,T-1),Xn(t,h+10,X-4),h+=14;for(var j=0;j<X;++j)Xn(t,h+3*j,G[ps[j]]);h+=3*X;for(var je=[I,A],Me=0;Me<2;++Me)for(var Ve=je[Me],j=0;j<Ve.length;++j){var qe=Ve[j]&31;Xn(t,h,de[qe]),h+=G[qe],qe>15&&(Xn(t,h,Ve[j]>>5&127),h+=Ve[j]>>12)}}else Z=vv,ee=Di,te=Ev,Q=Wa;for(var j=0;j<c;++j){var Ae=n[j];if(Ae>255){var qe=Ae>>18&31;Za(t,h,Z[qe+257]),h+=ee[qe+257],qe>7&&(Xn(t,h,Ae>>23&31),h+=Ka[qe]);var ot=Ae&31;Za(t,h,te[ot]),h+=Q[ot],ot>3&&(Za(t,h,Ae>>5&8191),h+=qa[ot])}else Za(t,h,Z[Ae]),h+=ee[Ae]}return Za(t,h,Z[256]),h+ee[256]},"wblk"),Sv=new gs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sf=new st(0),wv=o(function(e,t,r,n,i,a){var u=a.z||e.length,c=new st(n+u+5*(1+Math.ceil(u/7e3))+i),m=c.subarray(n,c.length-i),d=a.l,h=(a.r||0)&7;if(t){h&&(m[0]=a.r>>3);for(var g=Sv[t-1],v=g>>13,b=g&8191,S=(1<<r)-1,O=a.p||new Dr(32768),x=a.h||new Dr(S+1),E=Math.ceil(r/3),I=2*E,D=o(function(re){return(e[re]^e[re+1]<<E^e[re+2]<<I)&S},"hsh"),C=new gs(25e3),A=new Dr(288),T=new Dr(32),k=0,j=0,U=a.i||0,G=0,$=a.w||0,X=0;U+2<u;++U){var V=D(U),Y=U&32767,oe=x[V];if(O[Y]=oe,x[V]=Y,$<=U){var Z=u-U;if((k>7e3||G>24576)&&(Z>423||!d)){h=nf(e,m,0,C,A,T,j,G,X,U-X,h),G=k=j=0,X=U;for(var ee=0;ee<286;++ee)A[ee]=0;for(var ee=0;ee<30;++ee)T[ee]=0}var te=2,Q=0,de=b,je=Y-oe&32767;if(Z>2&&V==D(U-je))for(var Me=Math.min(v,Z)-1,Ve=Math.min(32767,U),qe=Math.min(258,Z);je<=Ve&&--de&&Y!=oe;){if(e[U+te]==e[U+te-je]){for(var Ae=0;Ae<qe&&e[U+Ae]==e[U+Ae-je];++Ae);if(Ae>te){if(te=Ae,Q=je,Ae>Me)break;for(var ot=Math.min(je,Ae-2),Pt=0,ee=0;ee<ot;++ee){var Ht=U-je+ee&32767,F=O[Ht],q=Ht-F&32767;q>Pt&&(Pt=q,oe=Ht)}}}Y=oe,oe=O[Y],je+=Y-oe&32767}if(Q){C[G++]=268435456|Hl[te]<<18|tf[Q];var B=Hl[te]&31,ae=tf[Q]&31;j+=Ka[B]+qa[ae],++A[257+B],++T[ae],$=U+te,++k}else C[G++]=e[U],++A[e[U]]}}for(U=Math.max(U,$);U<u;++U)C[G++]=e[U],++A[e[U]];h=nf(e,m,d,C,A,T,j,G,X,U-X,h),d||(a.r=h&7|m[h/8|0]<<3,h-=7,a.h=x,a.p=O,a.i=U,a.w=$)}else{for(var U=a.w||0;U<u+d;U+=65535){var J=U+65535;J>=u&&(m[h/8|0]=d,J=u),h=uf(m,h+1,e.subarray(U,J))}a.i=u}return to(c,0,n+ys(h)+i)},"dflt"),$F=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),Av=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=$F[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var Fv=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),u=new st(a.length+e.length);u.set(a),u.set(e,a.length),e=u,i.w=a.length}return wv(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),Yl=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),pv=o(function(e,t,r){for(var n=e(),i=e.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),u=0;u<n.length;++u){var c=n[u],m=a[u];if(typeof c=="function"){t+=";"+m+"=";var d=c.toString();if(c.prototype)if(d.indexOf("[native code]")!=-1){var h=d.indexOf(" ",8)+1;t+=d.slice(h,d.indexOf("(",h))}else{t+=d;for(var g in c.prototype)t+=";"+m+".prototype."+g+"="+c.prototype[g].toString()}else t+=d}else r[m]=c}return t},"wcln"),Gl=[],GF=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),ZF=o(function(e,t,r,n){if(!Gl[r]){for(var i="",a={},u=e.length-1,c=0;c<u;++c)i=pv(e[c],i,a);Gl[r]={c:pv(e[u],i,a),e:a}}var m=Yl({},Gl[r].e);return zF(Gl[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,m,GF(m),n)},"wrkr"),VF=o(function(){return[st,Dr,gs,Ka,qa,ps,af,bv,xv,Cv,fs,Iv,ln,Zl,cn,Vl,ys,to,It,Dv,tm,Ql,Ov]},"bInflt"),WF=o(function(){return[st,Dr,gs,Ka,qa,ps,Hl,tf,vv,Di,Ev,Wa,fs,Sv,sf,ln,Xn,Za,Wl,Kl,rf,Va,uf,nf,ys,to,wv,Fv,em,Ql]},"bDflt");var Ql=o(function(e){return postMessage(e,[e.buffer])},"pbf"),Ov=o(function(e){return e&&{out:e.size&&new st(e.size),dictionary:e.dictionary}},"gopt"),Bv=o(function(e,t,r,n,i,a){var u=ZF(r,n,i,function(c,m){u.terminate(),a(c,m)});return u.postMessage([e,t],t.consume?[e.buffer]:[]),function(){u.terminate()}},"cbify");var Dn=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),ar=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),ef=o(function(e,t){return ar(e,t)+ar(e,t+4)*4294967296},"b8"),or=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function HF(e,t,r){return r||(r=t,t={}),typeof r!="function"&&It(7),Bv(e,t,[WF],function(n){return Ql(em(n.data[0],n.data[1]))},0,r)}o(HF,"deflate");function em(e,t){return Fv(e,t||{},0,0)}o(em,"deflateSync");function KF(e,t,r){return r||(r=t,t={}),typeof r!="function"&&It(7),Bv(e,t,[VF],function(n){return Ql(tm(n.data[0],Ov(n.data[1])))},1,r)}o(KF,"inflate");function tm(e,t){return Dv(e,{i:2},t&&t.out,t&&t.dictionary)}o(tm,"inflateSync");var cf=o(function(e,t,r,n){for(var i in e){var a=e[i],u=t+i,c=n;Array.isArray(a)&&(c=Yl(n,a[1]),a=a[0]),a instanceof st?r[u]=[a,c]:(r[u+="/"]=[new st(0),c],cf(a,u,r,n))}},"fltn"),fv=typeof TextEncoder<"u"&&new TextEncoder,of=typeof TextDecoder<"u"&&new TextDecoder,qF=0;try{of.decode(sf,{stream:!0}),qF=1}catch(e){}var JF=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:to(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function Ha(e,t){if(t){for(var r=new st(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(fv)return fv.encode(e);for(var i=e.length,a=new st(e.length+(e.length>>1)),u=0,c=o(function(h){a[u++]=h},"w"),n=0;n<i;++n){if(u+5>a.length){var m=new st(u+8+(i-n<<1));m.set(a),a=m}var d=e.charCodeAt(n);d<128||t?c(d):d<2048?(c(192|d>>6),c(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,c(240|d>>18),c(128|d>>12&63),c(128|d>>6&63),c(128|d&63)):(c(224|d>>12),c(128|d>>6&63),c(128|d&63))}return to(a,0,u)}o(Ha,"strToU8");function lf(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(of)return of.decode(e);var i=JF(e),a=i.s,r=i.r;return r.length&&It(8),a}}o(lf,"strFromU8");var Pv=o(function(e,t){return t+30+Dn(e,t+26)+Dn(e,t+28)},"slzh"),Mv=o(function(e,t,r){var n=Dn(e,t+28),i=lf(e.subarray(t+46,t+46+n),!(Dn(e,t+8)&2048)),a=t+46+n,u=ar(e,t+20),c=r&&u==4294967295?XF(e,a):[u,ar(e,t+24),ar(e,t+42)],m=c[0],d=c[1],h=c[2];return[Dn(e,t+10),m,d,i,a+Dn(e,t+30)+Dn(e,t+32),h]},"zh"),XF=o(function(e,t){for(;Dn(e,t)!=1;t+=4+Dn(e,t+2));return[ef(e,t+12),ef(e,t+4),ef(e,t+20)]},"z64e"),hs=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&It(9),t+=n+4}return t},"exfl"),ql=o(function(e,t,r,n,i,a,u,c){var m=n.length,d=r.extra,h=c&&c.length,g=hs(d);or(e,t,u!=null?33639248:67324752),t+=4,u!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var v=new Date(r.mtime==null?Date.now():r.mtime),b=v.getFullYear()-1980;if((b<0||b>119)&&It(10),or(e,t,b<<25|v.getMonth()+1<<21|v.getDate()<<16|v.getHours()<<11|v.getMinutes()<<5|v.getSeconds()>>1),t+=4,a!=-1&&(or(e,t,r.crc),or(e,t+4,a<0?-a-2:a),or(e,t+8,r.size)),or(e,t+12,m),or(e,t+14,g),t+=16,u!=null&&(or(e,t,h),or(e,t+6,r.attrs),or(e,t+10,u),t+=14),e.set(n,t),t+=m,g)for(var S in d){var O=d[S],x=O.length;or(e,t,+S),or(e,t+2,x),e.set(O,t+4),t+=4+x}return h&&(e.set(c,t),t+=h),t},"wzh"),Tv=o(function(e,t,r,n,i){or(e,t,101010256),or(e,t+8,r),or(e,t+10,r),or(e,t+12,n),or(e,t+16,i)},"wzf");function kv(e,t,r){r||(r=t,t={}),typeof r!="function"&&It(7);var n={};cf(e,"",n,t);var i=Object.keys(n),a=i.length,u=0,c=0,m=a,d=new Array(a),h=[],g=o(function(){for(var x=0;x<h.length;++x)h[x]()},"tAll"),v=o(function(x,E){Jl(function(){r(x,E)})},"cbd");Jl(function(){v=r});var b=o(function(){var x=new st(c+22),E=u,I=c-u;c=0;for(var D=0;D<m;++D){var C=d[D];try{var A=C.c.length;ql(x,c,C,C.f,C.u,A);var T=30+C.f.length+hs(C.extra),k=c+T;x.set(C.c,k),ql(x,u,C,C.f,C.u,A,c,C.m),u+=16+T+(C.m?C.m.length:0),c=k+A}catch(j){return v(j,null)}}Tv(x,u,d.length,I,E),v(null,x)},"cbf");a||b();for(var S=o(function(x){var E=i[x],I=n[E],D=I[0],C=I[1],A=Av(),T=D.length;A.p(D);var k=Ha(E),j=k.length,U=C.comment,G=U&&Ha(U),$=G&&G.length,X=hs(C.extra),V=C.level==0?0:8,Y=o(function(oe,Z){if(oe)g(),v(oe,null);else{var ee=Z.length;d[x]=Yl(C,{size:T,crc:A.d(),c:Z,f:k,m:G,u:j!=E.length||G&&U.length!=$,compression:V}),u+=30+j+X+ee,c+=76+2*(j+X)+($||0)+ee,--a||b()}},"cbl");if(j>65535&&Y(It(11,0,1),null),!V)Y(null,D);else if(T<16e4)try{Y(null,em(D,C))}catch(oe){Y(oe,null)}else h.push(HF(D,C,Y))},"_loop_1"),O=0;O<m;++O)S(O);return g}o(kv,"zip");function _v(e,t){t||(t={});var r={},n=[];cf(e,"",r,t);var i=0,a=0;for(var u in r){var c=r[u],m=c[0],d=c[1],h=d.level==0?0:8,g=Ha(u),v=g.length,b=d.comment,S=b&&Ha(b),O=S&&S.length,x=hs(d.extra);v>65535&&It(11);var E=h?em(m,d):m,I=E.length,D=Av();D.p(m),n.push(Yl(d,{size:m.length,crc:D.d(),c:E,f:g,m:S,u:v!=u.length||S&&b.length!=O,o:i,compression:h})),i+=30+v+x+I,a+=76+2*(v+x)+(O||0)+I}for(var C=new st(a+22),A=i,T=a-i,k=0;k<n.length;++k){var g=n[k];ql(C,g.o,g,g.f,g.u,g.c.length);var j=30+g.f.length+hs(g.extra);C.set(g.c,g.o+j),ql(C,i,g,g.f,g.u,g.c.length,g.o,g.m),i+=16+j+(g.m?g.m.length:0)}return Tv(C,i,n.length,T,A),C}o(_v,"zipSync");var Jl=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function Lv(e,t,r){r||(r=t,t={}),typeof r!="function"&&It(7);var n=[],i=o(function(){for(var x=0;x<n.length;++x)n[x]()},"tAll"),a={},u=o(function(x,E){Jl(function(){r(x,E)})},"cbd");Jl(function(){u=r});for(var c=e.length-22;ar(e,c)!=101010256;--c)if(!c||e.length-c>65558)return u(It(13,0,1),null),i;var m=Dn(e,c+8);if(m){var d=m,h=ar(e,c+16),g=h==4294967295||d==65535;if(g){var v=ar(e,c-12);g=ar(e,v)==101075792,g&&(d=m=ar(e,v+32),h=ar(e,v+48))}for(var b=t&&t.filter,S=o(function(x){var E=Mv(e,h,g),I=E[0],D=E[1],C=E[2],A=E[3],T=E[4],k=E[5],j=Pv(e,k);h=T;var U=o(function($,X){$?(i(),u($,null)):(X&&(a[A]=X),--m||u(null,a))},"cbl");if(!b||b({name:A,size:D,originalSize:C,compression:I}))if(!I)U(null,to(e,j,j+D));else if(I==8){var G=e.subarray(j,j+D);if(C<524288||D>.8*C)try{U(null,tm(G,{out:new st(C)}))}catch($){U($,null)}else n.push(KF(G,{size:C},U))}else U(It(14,"unknown compression type "+I,1),null);else U(null,null)},"_loop_3"),O=0;O<d;++O)S(O)}else u(null,{});return i}o(Lv,"unzip");function Rv(e,t){for(var r={},n=e.length-22;ar(e,n)!=101010256;--n)(!n||e.length-n>65558)&&It(13);var i=Dn(e,n+8);if(!i)return{};var a=ar(e,n+16),u=a==4294967295||i==65535;if(u){var c=ar(e,n-12);u=ar(e,c)==101075792,u&&(i=ar(e,c+32),a=ar(e,c+48))}for(var m=t&&t.filter,d=0;d<i;++d){var h=Mv(e,a,u),g=h[0],v=h[1],b=h[2],S=h[3],O=h[4],x=h[5],E=Pv(e,x);a=O,(!m||m({name:S,size:v,originalSize:b,compression:g}))&&(g?g==8?r[S]=tm(e.subarray(E,E+v),{out:new st(b)}):It(14,"unknown compression type "+g):r[S]=to(e,E,E+v))}return r}o(Rv,"unzipSync");l();var YF=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),QF=o(e=>e!=null,"notNull"),rm=o((e,t,r=0)=>{var n;if(w.IsNull(e))return"null";if(w.IsUndefined(e))return"undefined";if(w.IsString(e))return"<string>";if(w.IsNumber(e))return"<number>";if(w.IsBoolean(e))return"<boolean>";if(w.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(w.IsRef(e)){let i=t.find(a=>a.$id===e.$ref);return i==null?e.$ref:rm(i,t,r)}if(w.IsArray(e))return"".concat(rm(e.items,t,r+1),"[]");if(w.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let a="".concat(e.anyOf.map(u=>rm(u,t,r+1)).filter(QF).join(" | "));return r>0?"(".concat(a,")"):a}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),e7=o((e,t,r)=>{var a;let n=t.message;w.IsUnion(t.schema)&&(n="Expected one of: ".concat(rm(t.schema,r)));let i="#/definitions/".concat(e).concat((a=YF(t.path))!=null?a:"");return"".concat(i,": ").concat(n)},"errorHandler"),nm=o((e,t,r)=>{let n=t.First();if(n!=null)return e7(e,n,r)},"shortError");var Ja;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(Ja||(Ja={}));var mf=class mf extends Error{constructor(r,n){super(n);f(this,"name");f(this,"kind");this.name="CompressError",this.kind=r}};o(mf,"CompressError");var Xa=mf,t7=o(e=>new Xa(Ja.Archive,e.message),"flateErrorIntoCompressError"),r7=o(e=>{let t=Object.values(Xl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),n7=o((e,t,r)=>{var n;return new Xa(Ja.Validate,(n=nm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),i7=o(e=>new Xa(Ja.Encode,e.message),"encodeErrorIntoCompressError"),o7=o(e=>new Xa(Ja.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),bs=o((e,t,r)=>t instanceof Lo?i7(t):t instanceof on?n7(e,t,r):r7(t)?t7(t):o7(t),"intoCompressError");l();var Ya;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(Ya||(Ya={}));var df=class df extends Error{constructor(r,n){super(n);f(this,"name");f(this,"kind");this.name="DecompressError",this.kind=r}};o(df,"DecompressError");var Qa=df,a7=o(e=>new Qa(Ya.Unarchive,e.message),"flateErrorIntoDecompressError"),u7=o(e=>{let t=Object.values(Xl);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),s7=o((e,t,r)=>{var n;return new Qa(Ya.Validate,(n=nm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),c7=o(e=>new Qa(Ya.Decode,e.message),"decodeErrorIntoDecompressError"),l7=o(e=>new Qa(Ya.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),vs=o((e,t,r)=>t instanceof _o?c7(t):t instanceof on?s7(e,t,r):u7(t)?a7(t):l7(t),"intoDecompressError");var Nv=o(function*(e,t=""){if(e!=null){if(Array.isArray(e)){for(let r=0;r<e.length;r++)yield[t+"[".concat(r,"]"),e[r]];return}if("features"in e){for(let r=0;r<e.features.length;r++)yield[t===""?"features[".concat(r,"]"):"".concat(t,".features[").concat(r,"]"),e.features[r]];return}for(let[r,n]of Object.entries(e)){let i=t===""?r:"".concat(t,".").concat(r);yield*K(Nv(n,i))}}},"iterRecord"),m7=o((e,t)=>e===""?t:t.startsWith("[")?"".concat(e).concat(t):"".concat(e,".").concat(t),"getPath"),Ot=o((e,t,r)=>{let n=new Set;for(let[i,a]of Nv(e)){let u=t(a);if(n.has(u))return ce({kind:Tr.DuplicateIdError,properties:{id:u,path:m7(r,i)}});n.add(u)}return se(!0)},"ensureUniqueIds");var jv=o(e=>e.floors==null?ce({kind:Tr.FloorMissingError,properties:null}):Ot(e.floors.features,t=>t.properties.id,"floors"),"validateFloors");var Uv=p.Intersect([p.Object({id:p.Ref(ke),elevation:p.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:p.Optional(p.String({description:"The subtitle of the floor."})),maxHeight:p.Optional(p.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}))}),jr],{$id:"FloorProperties"}),zv=rr(p.Union([p.Ref(La),p.Ref(Ra),p.Null()]),p.Ref(Uv),{$id:"FloorFeature"}),$v=Ir(p.Ref(zv),{$id:"FloorCollection"}),d7=p.Object({floors:p.Ref($v)}),Gv={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),integrityCheck:jv,schema:d7,references:[Uv,zv,$v]};l();l();var Bt=o(e=>p.Unsafe(e),"PartialRecord");l();var Qe=o(e=>Object.keys(e),"typedKeys");l();l();var p7=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),Sn=o(e=>{let t=p7(e);return o(n=>{let i=t.get(n);return i==null?ce({kind:Tr.UnknownFloorError,properties:{floorId:n}}):se(i)},"floorLookup")},"createFloorLookup");var Zv=o(e=>{if(e.floors==null)return ce({kind:Tr.FloorMissingError,properties:null});if(e.geometry==null)return ce({kind:Tr.GeometryMissingError,properties:null});let t=Ot(e.geometry,n=>n.properties.id,"geometry");if(t.isErr())return t;let r=Sn(e);for(let n of Qe(e.geometry)){let i=r(n);if(i.isErr())return i}return se(!0)},"validateGeometry");var Vv=p.Intersect([p.Object({id:p.Ref(pr)}),jr],{$id:"GeometryProperties"}),Wv=rr(p.Union([p.Ref(dr),p.Ref(xl),p.Ref(El),p.Ref(Cl),p.Ref(La),p.Ref(Ra)]),p.Ref(Vv),{$id:"GeometryFeature"}),Hv=Ir(p.Ref(Wv),{$id:"GeometryCollection"}),f7=p.Object({geometry:Bt(p.Record(ke,p.Ref(Hv),{additionalProperties:!1}))},{$id:"GeometrySchema"}),h7=/^geometry\/(.*)\.geojson$/,Kv={name:"core:geometry",schema:f7,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Qe(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(h7))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[Vv,Wv,Hv],integrityCheck:Zv};l();var pf=p.Object({type:p.Literal("file"),name:p.String({description:"The name of the file."})},{$id:"ManifestFile"}),qv=p.Recursive(e=>p.Object({type:p.Literal("folder"),name:p.String({description:"The name of the folder."}),children:p.Array(p.Union([e,p.Ref(pf)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),Jv=p.Object({name:p.String({description:"The name of the map."}),version:p.Literal("3.0.0",{description:"The version of the manifest."}),orgId:p.Optional(p.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:p.Optional(p.String({description:"The identifier of the map that this MVF is for."})),contents:p.Array(p.Union([p.Ref(qv),p.Ref(pf)]),{minItems:1,description:"The contents of the MVF bundle."}),time:p.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:p.Optional(p.Unsafe(p.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:p.Optional(p.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:p.Optional(p.Ref(ke,{description:"The default floor ID of the map."})),language:p.Optional(p.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),Xv=Ir(rr(dr,p.Ref(Jv)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),g7=p.Object({manifest:p.Ref(Xv)}),Yv={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:g7,references:[pf,qv,Jv,Xv]};l();l();l();l();var hf=class hf extends fe{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));f(this,"schema");this.schema=r}};o(hf,"TypeDereferenceError");var ff=hf;function y7(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new ff(e);return No(r,t)}o(y7,"Resolve");function im(e,t){return!_e.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(im,"Pushref");function No(e,t){return e[L]==="This"||e[L]==="Ref"?y7(e,t):e}o(No,"Deref");l();function b7(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=Jn(t,r);return e.set(t,i),i}o(b7,"HasTransformCached");function om(){let e=new WeakMap;return{HasTransform:o((t,r)=>b7(e,t,r),"HasTransform")}}o(om,"CreateTransformCache");function Dt(e,t,r){try{return w.IsTransform(e)?e[gt].Decode(r):r}catch(n){throw new _o(e,t,r,n)}}o(Dt,"Default");function v7(e,t,r,n,i){return _e.IsArray(n)?Dt(e,r,n.map((a,u)=>Yn(e.items,t,"".concat(r,"/").concat(u),a,i))):Dt(e,r,n)}o(v7,"FromArray");function x7(e,t,r,n,i){if(!_e.IsObject(n)||tr(n))return Dt(e,r,n);let a=Xi(e),u=a.map(g=>g[0]),c=R({},n);for(let[g,v]of a)g in c&&(c[g]=Yn(v,t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsTransform(e.unevaluatedProperties))return Dt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=Dt(d,"".concat(r,"/").concat(g),h[g]));return Dt(e,r,h)}o(x7,"FromIntersect");function E7(e,t,r,n,i){return Dt(e,r,Yn(e.not,t,r,n,i))}o(E7,"FromNot");function C7(e,t,r,n,i){if(!_e.IsObject(n))return Dt(e,r,n);let a=Kt(e),u=R({},n);for(let h of a)_e.HasPropertyKey(u,h)&&(_e.IsUndefined(u[h])&&(!w.IsUndefined(e.properties[h])||Ye.IsExactOptionalProperty(u,h))||(u[h]=Yn(e.properties[h],t,"".concat(r,"/").concat(h),u[h],i)));if(!w.IsSchema(e.additionalProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=R({},u);for(let h of c)a.includes(h)||(d[h]=Dt(m,"".concat(r,"/").concat(h),d[h]));return Dt(e,r,d)}o(C7,"FromObject");function I7(e,t,r,n,i){if(!_e.IsObject(n))return Dt(e,r,n);let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=R({},n);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=Yn(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g],i));if(!w.IsSchema(e.additionalProperties))return Dt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.test(g)||(h[g]=Dt(d,"".concat(r,"/").concat(g),h[g]));return Dt(e,r,h)}o(I7,"FromRecord");function D7(e,t,r,n,i){let a=No(e,t);return Dt(e,r,Yn(a,t,r,n,i))}o(D7,"FromRef");function S7(e,t,r,n,i){let a=No(e,t);return Dt(e,r,Yn(a,t,r,n,i))}o(S7,"FromThis");function w7(e,t,r,n,i){return _e.IsArray(n)&&_e.IsArray(e.items)?Dt(e,r,e.items.map((a,u)=>Yn(a,t,"".concat(r,"/").concat(u),n[u],i))):Dt(e,r,n)}o(w7,"FromTuple");function A7(e,t,r,n,i){for(let a of e.anyOf){if(!sn.Check(a,t,n))continue;let u=Yn(a,t,r,n,i);return Dt(e,r,u)}return Dt(e,r,n)}o(A7,"FromUnion");function Yn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=im(e,t),u=e;switch(e[L]){case"Array":return v7(u,a,r,n,i);case"Intersect":return x7(u,a,r,n,i);case"Not":return E7(u,a,r,n,i);case"Object":return C7(u,a,r,n,i);case"Record":return I7(u,a,r,n,i);case"Ref":return D7(u,a,r,n,i);case"Symbol":return Dt(u,r,n);case"This":return S7(u,a,r,n,i);case"Tuple":return w7(u,a,r,n,i);case"Union":return A7(u,a,r,n,i);default:return Dt(u,r,n)}}o(Yn,"Visit");function Qv(e,t,r){let n=om();return Yn(e,t,"",r,n)}o(Qv,"FastTransformDecode");l();function gr(e,t,r){try{return w.IsTransform(e)?e[gt].Encode(r):r}catch(n){throw new Lo(e,t,r,n)}}o(gr,"Default");function F7(e,t,r,n,i){let a=gr(e,r,n);return _e.IsArray(a)?a.map((u,c)=>Qn(e.items,t,"".concat(r,"/").concat(c),u,i)):a}o(F7,"FromArray");function O7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(n)||tr(n))return a;let u=Xi(e),c=u.map(v=>v[0]),m=R({},a);for(let[v,b]of u)v in m&&(m[v]=Qn(b,t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsTransform(e.unevaluatedProperties))return m;let d=Object.getOwnPropertyNames(m),h=e.unevaluatedProperties,g=R({},m);for(let v of d)c.includes(v)||(g[v]=gr(h,"".concat(r,"/").concat(v),g[v]));return g}o(O7,"FromIntersect");function B7(e,t,r,n){return gr(e.not,r,gr(e,r,n))}o(B7,"FromNot");function P7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(a))return a;let u=Kt(e),c=R({},a);for(let g of u)_e.HasPropertyKey(c,g)&&(_e.IsUndefined(c[g])&&(!w.IsUndefined(e.properties[g])||Ye.IsExactOptionalProperty(c,g))||(c[g]=Qn(e.properties[g],t,"".concat(r,"/").concat(g),c[g],i)));if(!w.IsSchema(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,h=R({},c);for(let g of m)u.includes(g)||(h[g]=gr(d,"".concat(r,"/").concat(g),h[g]));return h}o(P7,"FromObject");function M7(e,t,r,n,i){let a=gr(e,r,n);if(!_e.IsObject(n))return a;let u=Object.getOwnPropertyNames(e.patternProperties)[0],c=new RegExp(u),m=R({},a);for(let v of Object.getOwnPropertyNames(n))c.test(v)&&(m[v]=Qn(e.patternProperties[u],t,"".concat(r,"/").concat(v),m[v],i));if(!w.IsSchema(e.additionalProperties))return m;let d=Object.getOwnPropertyNames(m),h=e.additionalProperties,g=R({},m);for(let v of d)c.test(v)||(g[v]=gr(h,"".concat(r,"/").concat(v),g[v]));return g}o(M7,"FromRecord");function T7(e,t,r,n,i){let a=No(e,t),u=Qn(a,t,r,n,i);return gr(e,r,u)}o(T7,"FromRef");function k7(e,t,r,n,i){let a=No(e,t),u=Qn(a,t,r,n,i);return gr(e,r,u)}o(k7,"FromThis");function _7(e,t,r,n,i){let a=gr(e,r,n);return _e.IsArray(e.items)?e.items.map((u,c)=>Qn(u,t,"".concat(r,"/").concat(c),a[c],i)):[]}o(_7,"FromTuple");function L7(e,t,r,n,i){for(let a of e.anyOf){if(!sn.Check(a,t,n))continue;let u=Qn(a,t,r,n,i);return gr(e,r,u)}for(let a of e.anyOf){let u=Qn(a,t,r,n,i);if(sn.Check(e,t,u))return gr(e,r,u)}return gr(e,r,n)}o(L7,"FromUnion");function Qn(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=im(e,t),u=e;switch(e[L]){case"Array":return F7(u,a,r,n,i);case"Intersect":return O7(u,a,r,n,i);case"Not":return B7(u,a,r,n);case"Object":return P7(u,a,r,n,i);case"Record":return M7(u,a,r,n,i);case"Ref":return T7(u,a,r,n,i);case"This":return k7(u,a,r,n,i);case"Tuple":return _7(u,a,r,n,i);case"Union":return L7(u,a,r,n,i);default:return gr(u,r,n)}}o(Qn,"Visit");function ex(e,t,r){let n=om();return Qn(e,t,"",r,n)}o(ex,"FastTransformEncode");l();var xf=class xf{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=Jn(t,r)}Code(){return this.code}Errors(t){return Vn(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new za(this.schema,t,this.Errors(t).First());return this.hasTransform?$a(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?_l(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Ga(this.schema,t,this.Errors(t).First());return r}};o(xf,"TypeCheck");var gf=xf,Si;(function(e){function t(a){return a===36}o(t,"DollarSign"),e.DollarSign=t;function r(a){return a===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(a){return a>=65&&a<=90||a>=97&&a<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(a){return a>=48&&a<=57}o(i,"IsNumeric"),e.IsNumeric=i})(Si||(Si={}));var am;(function(e){function t(a){return a.length===0?!1:Si.IsNumeric(a.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(a){if(t(a))return!1;for(let u=0;u<a.length;u++){let c=a.charCodeAt(u);if(!(Si.IsAlpha(c)||Si.IsNumeric(c)||Si.DollarSign(c)||Si.IsUnderscore(c)))return!1}return!0}o(r,"IsAccessor");function n(a){return a.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(a,u){return r(u)?"".concat(a,".").concat(u):"".concat(a,"['").concat(n(u),"']")}o(i,"Encode"),e.Encode=i})(am||(am={}));var yf;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);Si.IsNumeric(a)||Si.IsAlpha(a)?n.push(r.charAt(i)):n.push("_".concat(a,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(yf||(yf={}));var bf;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(bf||(bf={}));var Ef=class Ef extends fe{constructor(t){super("Unknown type"),this.schema=t}};o(Ef,"TypeCompilerUnknownTypeError");var vf=Ef,Cf=class Cf extends fe{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(Cf,"TypeCompilerTypeGuardError");var um=Cf,jo;(function(e){function t(u,c,m){return Ye.ExactOptionalPropertyTypes?"('".concat(c,"' in ").concat(u," ? ").concat(m," : true)"):"(".concat(am.Encode(u,c)," !== undefined ? ").concat(m," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null)"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,") && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return Ye.AllowNaN?"typeof ".concat(u," === 'number'"):"Number.isFinite(".concat(u,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){return Ye.AllowNullVoid?"(".concat(u," === undefined || ").concat(u," === null)"):"".concat(u," === undefined")}o(a,"IsVoidLike"),e.IsVoidLike=a})(jo||(jo={}));var sm;(function(e){function t(F){return F[L]==="Any"||F[L]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(F,q,B){yield"true"}o(r,"FromAny");function*n(F,q,B){yield"Array.isArray(".concat(B,")");let[ae,J]=[qe("value","any"),qe("acc","number")];pe(F.maxItems)&&(yield"".concat(B,".length <= ").concat(F.maxItems)),pe(F.minItems)&&(yield"".concat(B,".length >= ").concat(F.minItems));let re=de(F.items,q,"value");if(yield"".concat(B,".every((").concat(ae,") => ").concat(re,")"),Re(F.contains)||pe(F.minContains)||pe(F.maxContains)){let Ce=Re(F.contains)?F.contains:rt(),bt=de(Ce,q,"value"),ye=pe(F.minContains)?["(count >= ".concat(F.minContains,")")]:[],le=pe(F.maxContains)?["(count <= ".concat(F.maxContains,")")]:[],He="const count = value.reduce((".concat(J,", ").concat(ae,") => ").concat(bt," ? acc + 1 : acc, 0)"),Wr=["(count > 0)",...ye,...le].join(" && ");yield"((".concat(ae,") => { ").concat(He,"; return ").concat(Wr,"})(").concat(B,")")}if(F.uniqueItems===!0){let bt="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(ae,") => { ").concat(bt," )(").concat(B,")")}}o(n,"FromArray");function*i(F,q,B){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(B,")")}o(i,"FromAsyncIterator");function*a(F,q,B){yield"(typeof ".concat(B," === 'bigint')"),er(F.exclusiveMaximum)&&(yield"".concat(B," < BigInt(").concat(F.exclusiveMaximum,")")),er(F.exclusiveMinimum)&&(yield"".concat(B," > BigInt(").concat(F.exclusiveMinimum,")")),er(F.maximum)&&(yield"".concat(B," <= BigInt(").concat(F.maximum,")")),er(F.minimum)&&(yield"".concat(B," >= BigInt(").concat(F.minimum,")")),er(F.multipleOf)&&(yield"(".concat(B," % BigInt(").concat(F.multipleOf,")) === 0"))}o(a,"FromBigInt");function*u(F,q,B){yield"(typeof ".concat(B," === 'boolean')")}o(u,"FromBoolean");function*c(F,q,B){yield*K(te(F.returns,q,"".concat(B,".prototype")))}o(c,"FromConstructor");function*m(F,q,B){yield"(".concat(B," instanceof Date) && Number.isFinite(").concat(B,".getTime())"),pe(F.exclusiveMaximumTimestamp)&&(yield"".concat(B,".getTime() < ").concat(F.exclusiveMaximumTimestamp)),pe(F.exclusiveMinimumTimestamp)&&(yield"".concat(B,".getTime() > ").concat(F.exclusiveMinimumTimestamp)),pe(F.maximumTimestamp)&&(yield"".concat(B,".getTime() <= ").concat(F.maximumTimestamp)),pe(F.minimumTimestamp)&&(yield"".concat(B,".getTime() >= ").concat(F.minimumTimestamp)),pe(F.multipleOfTimestamp)&&(yield"(".concat(B,".getTime() % ").concat(F.multipleOfTimestamp,") === 0"))}o(m,"FromDate");function*d(F,q,B){yield"(typeof ".concat(B," === 'function')")}o(d,"FromFunction");function*h(F,q,B){yield"Number.isInteger(".concat(B,")"),pe(F.exclusiveMaximum)&&(yield"".concat(B," < ").concat(F.exclusiveMaximum)),pe(F.exclusiveMinimum)&&(yield"".concat(B," > ").concat(F.exclusiveMinimum)),pe(F.maximum)&&(yield"".concat(B," <= ").concat(F.maximum)),pe(F.minimum)&&(yield"".concat(B," >= ").concat(F.minimum)),pe(F.multipleOf)&&(yield"(".concat(B," % ").concat(F.multipleOf,") === 0"))}o(h,"FromInteger");function*g(F,q,B){let ae=F.allOf.map(J=>de(J,q,B)).join(" && ");if(F.unevaluatedProperties===!1){let J=Me("".concat(new RegExp(bi(F)),";")),re="Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".test(key))");yield"(".concat(ae," && ").concat(re,")")}else if(Re(F.unevaluatedProperties)){let J=Me("".concat(new RegExp(bi(F)),";")),re="Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".test(key) || ").concat(de(F.unevaluatedProperties,q,"".concat(B,"[key]")),")");yield"(".concat(ae," && ").concat(re,")")}else yield"(".concat(ae,")")}o(g,"FromIntersect");function*v(F,q,B){yield"(typeof value === 'object' && Symbol.iterator in ".concat(B,")")}o(v,"FromIterator");function*b(F,q,B){typeof F.const=="number"||typeof F.const=="boolean"?yield"(".concat(B," === ").concat(F.const,")"):yield"(".concat(B," === '").concat(bf.Escape(F.const),"')")}o(b,"FromLiteral");function*S(F,q,B){yield"false"}o(S,"FromNever");function*O(F,q,B){let ae=de(F.not,q,B);yield"(!".concat(ae,")")}o(O,"FromNot");function*x(F,q,B){yield"(".concat(B," === null)")}o(x,"FromNull");function*E(F,q,B){yield jo.IsNumberLike(B),pe(F.exclusiveMaximum)&&(yield"".concat(B," < ").concat(F.exclusiveMaximum)),pe(F.exclusiveMinimum)&&(yield"".concat(B," > ").concat(F.exclusiveMinimum)),pe(F.maximum)&&(yield"".concat(B," <= ").concat(F.maximum)),pe(F.minimum)&&(yield"".concat(B," >= ").concat(F.minimum)),pe(F.multipleOf)&&(yield"(".concat(B," % ").concat(F.multipleOf,") === 0"))}o(E,"FromNumber");function*I(F,q,B){yield jo.IsObjectLike(B),pe(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length >= ").concat(F.minProperties)),pe(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length <= ").concat(F.maxProperties));let ae=Object.getOwnPropertyNames(F.properties);for(let J of ae){let re=am.Encode(B,J),Ce=F.properties[J];if(F.required&&F.required.includes(J))yield*K(te(Ce,q,re)),(xi(Ce)||t(Ce))&&(yield"('".concat(J,"' in ").concat(B,")"));else{let bt=de(Ce,q,re);yield jo.IsExactOptionalProperty(B,J,bt)}}if(F.additionalProperties===!1)if(F.required&&F.required.length===ae.length)yield"Object.getOwnPropertyNames(".concat(B,").length === ").concat(ae.length);else{let J="[".concat(ae.map(re=>"'".concat(re,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(J,".includes(key))")}if(typeof F.additionalProperties=="object"){let J=de(F.additionalProperties,q,"".concat(B,"[key]")),re="[".concat(ae.map(Ce=>"'".concat(Ce,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(B,").every(key => ").concat(re,".includes(key) || ").concat(J,"))")}}o(I,"FromObject");function*D(F,q,B){yield"(typeof value === 'object' && typeof ".concat(B,".then === 'function')")}o(D,"FromPromise");function*C(F,q,B){yield jo.IsRecordLike(B),pe(F.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length >= ").concat(F.minProperties)),pe(F.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(B,").length <= ").concat(F.maxProperties));let[ae,J]=Object.entries(F.patternProperties)[0],re=Me("".concat(new RegExp(ae))),Ce=de(J,q,"value"),bt=Re(F.additionalProperties)?de(F.additionalProperties,q,B):F.additionalProperties===!1?"false":"true",ye="(".concat(re,".test(key) ? ").concat(Ce," : ").concat(bt,")");yield"(Object.entries(".concat(B,").every(([key, value]) => ").concat(ye,"))")}o(C,"FromRecord");function*A(F,q,B){let ae=$e(F,q);if(Q.functions.has(F.$ref))return yield"".concat(je(F.$ref),"(").concat(B,")");yield*K(te(ae,q,B))}o(A,"FromRef");function*T(F,q,B){let ae=Me("".concat(new RegExp(F.source,F.flags),";"));yield"(typeof ".concat(B," === 'string')"),pe(F.maxLength)&&(yield"".concat(B,".length <= ").concat(F.maxLength)),pe(F.minLength)&&(yield"".concat(B,".length >= ").concat(F.minLength)),yield"".concat(ae,".test(").concat(B,")")}o(T,"FromRegExp");function*k(F,q,B){if(yield"(typeof ".concat(B," === 'string')"),pe(F.maxLength)&&(yield"".concat(B,".length <= ").concat(F.maxLength)),pe(F.minLength)&&(yield"".concat(B,".length >= ").concat(F.minLength)),F.pattern!==void 0){let ae=Me("".concat(new RegExp(F.pattern),";"));yield"".concat(ae,".test(").concat(B,")")}F.format!==void 0&&(yield"format('".concat(F.format,"', ").concat(B,")"))}o(k,"FromString");function*j(F,q,B){yield"(typeof ".concat(B," === 'symbol')")}o(j,"FromSymbol");function*U(F,q,B){yield"(typeof ".concat(B," === 'string')");let ae=Me("".concat(new RegExp(F.pattern),";"));yield"".concat(ae,".test(").concat(B,")")}o(U,"FromTemplateLiteral");function*G(F,q,B){yield"".concat(je(F.$ref),"(").concat(B,")")}o(G,"FromThis");function*$(F,q,B){if(yield"Array.isArray(".concat(B,")"),F.items===void 0)return yield"".concat(B,".length === 0");yield"(".concat(B,".length === ").concat(F.maxItems,")");for(let ae=0;ae<F.items.length;ae++){let J=de(F.items[ae],q,"".concat(B,"[").concat(ae,"]"));yield"".concat(J)}}o($,"FromTuple");function*X(F,q,B){yield"".concat(B," === undefined")}o(X,"FromUndefined");function*V(F,q,B){let ae=F.anyOf.map(J=>de(J,q,B));yield"(".concat(ae.join(" || "),")")}o(V,"FromUnion");function*Y(F,q,B){yield"".concat(B," instanceof Uint8Array"),pe(F.maxByteLength)&&(yield"(".concat(B,".length <= ").concat(F.maxByteLength,")")),pe(F.minByteLength)&&(yield"(".concat(B,".length >= ").concat(F.minByteLength,")"))}o(Y,"FromUint8Array");function*oe(F,q,B){yield"true"}o(oe,"FromUnknown");function*Z(F,q,B){yield jo.IsVoidLike(B)}o(Z,"FromVoid");function*ee(F,q,B){let ae=Q.instances.size;Q.instances.set(ae,F),yield"kind('".concat(F[L],"', ").concat(ae,", ").concat(B,")")}o(ee,"FromKind");function*te(F,q,B,ae=!0){let J=Le(F.$id)?[...q,F]:q,re=F;if(ae&&Le(F.$id)){let Ce=je(F.$id);if(Q.functions.has(Ce))return yield"".concat(Ce,"(").concat(B,")");{let bt=Ve(Ce,F,q,"value",!1);return Q.functions.set(Ce,bt),yield"".concat(Ce,"(").concat(B,")")}}switch(re[L]){case"Any":return yield*K(r(re,J,B));case"Array":return yield*K(n(re,J,B));case"AsyncIterator":return yield*K(i(re,J,B));case"BigInt":return yield*K(a(re,J,B));case"Boolean":return yield*K(u(re,J,B));case"Constructor":return yield*K(c(re,J,B));case"Date":return yield*K(m(re,J,B));case"Function":return yield*K(d(re,J,B));case"Integer":return yield*K(h(re,J,B));case"Intersect":return yield*K(g(re,J,B));case"Iterator":return yield*K(v(re,J,B));case"Literal":return yield*K(b(re,J,B));case"Never":return yield*K(S(re,J,B));case"Not":return yield*K(O(re,J,B));case"Null":return yield*K(x(re,J,B));case"Number":return yield*K(E(re,J,B));case"Object":return yield*K(I(re,J,B));case"Promise":return yield*K(D(re,J,B));case"Record":return yield*K(C(re,J,B));case"Ref":return yield*K(A(re,J,B));case"RegExp":return yield*K(T(re,J,B));case"String":return yield*K(k(re,J,B));case"Symbol":return yield*K(j(re,J,B));case"TemplateLiteral":return yield*K(U(re,J,B));case"This":return yield*K(G(re,J,B));case"Tuple":return yield*K($(re,J,B));case"Undefined":return yield*K(X(re,J,B));case"Union":return yield*K(V(re,J,B));case"Uint8Array":return yield*K(Y(re,J,B));case"Unknown":return yield*K(oe(re,J,B));case"Void":return yield*K(Z(re,J,B));default:if(!$t.Has(re[L]))throw new vf(F);return yield*K(ee(re,J,B))}}o(te,"Visit");let Q={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function de(F,q,B,ae=!0){return"(".concat([...te(F,q,B,ae)].join(" && "),")")}o(de,"CreateExpression");function je(F){return"check_".concat(yf.Encode(F))}o(je,"CreateFunctionName");function Me(F){let q="local_".concat(Q.variables.size);return Q.variables.set(q,"const ".concat(q," = ").concat(F)),q}o(Me,"CreateVariable");function Ve(F,q,B,ae,J=!0){let[re,Ce]=["\n",He=>"".padStart(He," ")],bt=qe("value","any"),ye=Ae("boolean"),le=[...te(q,B,ae,J)].map(He=>"".concat(Ce(4)).concat(He)).join(" &&".concat(re));return"function ".concat(F,"(").concat(bt,")").concat(ye," {").concat(re).concat(Ce(2),"return (").concat(re).concat(le).concat(re).concat(Ce(2),")\n}")}o(Ve,"CreateFunction");function qe(F,q){let B=Q.language==="typescript"?": ".concat(q):"";return"".concat(F).concat(B)}o(qe,"CreateParameter");function Ae(F){return Q.language==="typescript"?": ".concat(F):""}o(Ae,"CreateReturns");function ot(F,q,B){let ae=Ve("check",F,q,"value"),J=qe("value","any"),re=Ae("boolean"),Ce=[...Q.functions.values()],bt=[...Q.variables.values()],ye=Le(F.$id)?"return function check(".concat(J,")").concat(re," {\n return ").concat(je(F.$id),"(value)\n}"):"return ".concat(ae);return[...bt,...Ce,ye].join("\n")}o(ot,"Build");function Pt(...F){let q={language:"javascript"},[B,ae,J]=F.length===2&&ve(F[1])?[F[0],F[1],q]:F.length===2&&!ve(F[1])?[F[0],[],F[1]]:F.length===3?[F[0],F[1],F[2]]:F.length===1?[F[0],[],q]:[null,[],q];if(Q.language=J.language,Q.variables.clear(),Q.functions.clear(),Q.instances.clear(),!Re(B))throw new um(B);for(let re of ae)if(!Re(re))throw new um(re);return ot(B,ae,J)}o(Pt,"Code"),e.Code=Pt;function Ht(F,q=[]){let B=Pt(F,q,{language:"javascript"}),ae=globalThis.Function("kind","format","hash",B),J=new Map(Q.instances);function re(le,He,Wr){if(!$t.Has(le)||!J.has(He))return!1;let Ou=$t.Get(le),Bu=J.get(He);return Ou(Bu,Wr)}o(re,"typeRegistryFunction");function Ce(le,He){return Cr.Has(le)?Cr.Get(le)(He):!1}o(Ce,"formatRegistryFunction");function bt(le){return eo(le)}o(bt,"hashFunction");let ye=ae(re,Ce,bt);return new gf(F,q,ye,B)}o(Ht,"Compile"),e.Compile=Ht})(sm||(sm={}));l();l();l();var R7=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,N7=[0,31,28,31,30,31,30,31,31,30,31,30,31],j7=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),cm=o(e=>{let t=R7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&j7(r)?29:N7[n])},"isDate");l();var U7=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,lm=o(e=>{let t=U7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],a=t[4],u=t[5]==="-"?-1:1,c=+(t[6]||0),m=+(t[7]||0);if(c>23||m>59||!a)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-m*u,h=r-c*u-(d<0?1:0);return(h===23||h===-1)&&(d===59||d===-1)&&i<61},"isTime");var z7=/t|\s/i,tx=o(e=>{let t=e.split(z7);return t.length===2&&cm(t[0])&&lm(t[1])},"isDateTime");l();var $7=/\/|:/,G7=/^(?:[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,rx=o(e=>$7.test(e)&&G7.test(e),"isUri");var Z7=[["date",cm],["time",lm],["date-time",tx],["uri",rx]],nx=o(()=>{for(let[e,t]of Z7)try{Fl.Format(e,t)}catch(r){if(r instanceof cs)continue;throw r}},"registerFormats");l();var If=p.Record(p.String(),p.Unknown(),{$id:"Extra"}),wn=p.Object({extra:p.Optional(p.Ref(If))}),Df=[If];l();l();l();l();l();l();var yr=o(e=>Object.entries(e),"typedEntries");var V7=o(e=>{var r;let t=new Map;for(let[n,i]of yr((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(a=>[a.properties.id,a])));return t},"createLookupMap"),Gt=o(e=>{let t=V7(e);return o((n,i)=>{let a=t.get(n);if(a==null)return ce({kind:Tr.UnknownFloorError,properties:{floorId:n}});let u=a.get(i);return u==null?ce({kind:Tr.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):se(u)},"geometryLookup")},"createGeometryLookup");l();var mn=p.Object({geometryId:p.Ref(pr)},{$id:"WithGeometryId"}),eu=p.Object({geometryIds:p.Array(p.Ref(pr))},{$id:"WithGeometryIds"}),Sf=[mn,eu];l();l();l();var ix=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var tu=o(e=>(...t)=>{try{return se(e(...t))}catch(r){return ce(ix(r))}},"safeFn");var ox=tu((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Ha(JSON.stringify(i.contents));return r}),wf=o(async(e,t,r)=>ox(e,t).andThenAsync(n=>new Promise(i=>{kv(n,xe(R({},r),{consume:!0}),(a,u)=>{i(a?ce(a):se(u))})})),"compress"),W7=tu(_v),Af=o((e,t,r)=>ox(e,t).andThen(n=>W7(n,r)),"compressSync");l();l();function mm(e,t,r=[]){let n=R({},e);for(let[i,a]of Object.entries(t))if(a!==void 0)if(i in n){let u=i;if(Array.isArray(a)&&a.length>0){let c=H7(a[0],r);if(c){let m=n[u];if(!Array.isArray(m))throw new Error("Expected array at ".concat(i,", got ").concat(typeof m));let d=new Map(a.map(v=>[ax(v,c),v])),g=m.map(v=>{let b=d.get(ax(v,c));return b?mm(v,b,r):v});n[u]=g}else n[u]=a}else{let c=n[u];typeof c=="object"&&c!==null&&typeof a=="object"&&a!==null?Object.keys(a).length===0?n[u]=a:n[u]=mm(c,a,r):n[i]=a}}else n[i]=a;return n}o(mm,"deepMergeOn");function H7(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,a]of Object.entries(n)){let u=r(a);if(u)return[i,...u]}return null}return o(r,"search"),r(e)}o(H7,"findIdentifierKey");function ax(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(ax,"getValueByKeyPath");var K7=o(e=>e,"identity"),q7=o(e=>JSON.parse(lf(e)),"jsonDecode"),ux=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,K7)!==void 0),"isFileExpected"),sx=tu((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let a of t){let u=a.fromBundle(n,i,q7);if(u){r=mm(r,u,[]);break}}}return r}),Ff=o(async(e,t)=>new Promise(r=>Lv(e,{filter:o(n=>ux(n,t),"filter")},(n,i)=>{r(n?ce(n):se(i))})).then(r=>r.andThen(n=>sx(n,t))),"decompress"),J7=tu(Rv),Of=o((e,t)=>J7(e,{filter:o(r=>ux(r,t),"filter")}).andThen(r=>sx(r,t)),"decompressSync");l();var X7=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),Y7=o(e=>{if(e.length<2)return!1;let t=e.filter(X7);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),dm=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&Y7(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,dm(r)])):Array.isArray(e)?e.map(dm):e,"fixDuplicateAllOf");l();var pm=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?xe(R({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,pm(r)])):Array.isArray(e)?e.map(pm):e,"prefixReferences");var ru;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(ru||(ru={}));var Q7=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),eO=o((...e)=>{let t=new Map;for(let r of Q7(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return ce({kind:ru.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return se(t)},"computeReferenceMap"),Jt,nu,Vr,ur,hm=class hm{constructor(t,r,n,i){_(this,Jt);_(this,nu);_(this,Vr,[]);_(this,ur);W(this,Jt,t),W(this,nu,r),W(this,Vr,n),W(this,ur,i),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(t,r="CoreMVF",n=!1){let i=p.Composite(t.extensions.map(u=>u.schema),{$id:r});if(!w.IsSchema(i))return ce({kind:ru.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:i});let a=eO(g0.values(),y0.values(),f0.values(),Df.values(),Bf.values(),Sf.values(),t.extensions.flatMap(u=>{var c;return(c=u.references)!=null?c:[]}).values());if(!a.isOk())return a;try{nx();let u=n?null:sm.Compile(i,[...a.value.values()]);return se(new hm(i,u,t.extensions,a.value))}catch(u){return u instanceof fe?ce({kind:ru.TypeboxError,message:u.message,original:u}):ce({kind:ru.UnknownError,message:"An unknown error occurred while compiling the schema",original:u})}}is(t){var r,n;return(n=(r=s(this,nu))==null?void 0:r.Check(t))!=null?n:sn.Check(s(this,Jt),[...s(this,ur).values()],t)}parse(t){var r,n;return this.is(t)?se(t):ce((n=(r=s(this,nu))==null?void 0:r.Errors(t))!=null?n:sn.Errors(s(this,Jt),[...s(this,ur).values()],t))}decode(t){try{return se(Qv(s(this,Jt),[...s(this,ur).values()],t))}catch(r){return ce(r)}}encode(t){try{return se(ex(s(this,Jt),[...s(this,ur).values()],t))}catch(r){return ce(r)}}verify(t){for(let r of s(this,Vr))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return ce(n.error)}return se(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([s(this,Jt),...s(this,ur).values()])),r=dm(pm({$id:"#/definitions/".concat((n=s(this,Jt).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>wf(r,s(this,Vr))).then(r=>r.mapErr(n=>{var i;return bs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>wf(r,s(this,Vr))).then(r=>r.mapErr(n=>{var i;return bs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}compressSync(t){return this.encode(t).andThen(r=>this.parse(r)).andThen(r=>Af(r,s(this,Vr))).mapErr(r=>{var n;return bs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}compressUnsafeSync(t){return this.encode(t).andThen(r=>Af(r,s(this,Vr))).mapErr(r=>{var n;return bs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}async decompress(t){return Ff(t,s(this,Vr)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return vs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}async decompressUnsafe(t){return Ff(t,s(this,Vr)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return vs((i=s(this,Jt).$id)!=null?i:"CoreMVF",n,[...s(this,ur).values()])}))}decompressSync(t){return Of(t,s(this,Vr)).andThen(r=>this.parse(r)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return vs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}decompressUnsafeSync(t){return Of(t,s(this,Vr)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return vs((n=s(this,Jt).$id)!=null?n:"CoreMVF",r,[...s(this,ur).values()])})}};Jt=new WeakMap,nu=new WeakMap,Vr=new WeakMap,ur=new WeakMap,o(hm,"MVFParser");var fm=hm;var iu,Pf=class Pf{constructor(){_(this,iu,[]);this.extend=this.extend.bind(this)}extend(t){return s(this,iu).push(t),this}extendOptional(t){let r=xe(R({},t),{schema:p.Partial(t.schema)});return s(this,iu).push(r),this}build(t){return fm.create(this,void 0,t==null?void 0:t.cspSafe)}get extensions(){return s(this,iu)}};iu=new WeakMap,o(Pf,"MVFParserBuilder");var gm=Pf;l();l();l();l();var ou=p.Object({geometryId:p.Ref(pr),floorId:p.Ref(ke)},{$id:"GeometryAnchor"}),tO=p.Object({geometryAnchor:p.Ref(ou)}),xs=o((e,t)=>p.Object({geometryAnchors:p.Array(p.Ref(ou),e)},t),"WithGeometryAnchors"),Bf=[ou];l();l();l();var cx=o((e,t)=>p.Unsafe(p.Transform(p.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),kr=o((e,t)=>{let r=cx(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(a=>[a,a])));return{schema:r,values:n,record:i}},"SafeStringEnum");var lx=o(()=>new gm().extend(Gv).extend(Kv).extend(Yv),"createParser");l();l();l();l();l();l();var Es;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(Es||(Es={}));var mx=o(e=>{var i;if(e.annotations==null)return se(!0);let t=Ot(e.annotations,a=>a.id,"annotations");if(t.isErr())return t;let r=Gt(e),n=new Set(Qe((i=e.annotationSymbols)!=null?i:{}));for(let a of Qe(e.annotations)){let u=e.annotations[a];if(u!=null)for(let c of u){if(!n.has(c.symbolKey))return ce({kind:Es.AnnotationUnknownSymbolError,properties:{annotationId:c.id,symbolKey:c.symbolKey}});let m=r(a,c.geometryId);if(m.isErr())return m;if(m.value.geometry.type!=="Point")return ce({kind:Es.AnnotationNonPointGeometryError,properties:{annotationId:c.id,floorId:a,geometryId:c.geometryId}})}}return se(!0)},"validateAnnotations");var dx=Ft("a","AnnotationId"),Mf=p.Intersect([mn,p.Object({id:p.Ref(dx,{description:"The unique identifier for the annotation."}),externalId:p.Optional(p.String({description:"The external identifier for the annotation."})),symbolKey:p.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),px=p.Object({url:p.String({format:"uri",description:"The URL for the symbol."}),name:p.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),rO=p.Object({annotations:Bt(p.Record(ke,p.Array(p.Ref(Mf)),{additionalProperties:!1})),annotationSymbols:Bt(p.Record(p.Index(Mf,["symbolKey"]),p.Ref(px)))},{$id:"AnnotationsSchema"}),nO=/^annotations\/(.*)\.json$/,fx={name:"ext:mvf-annotations",schema:rO,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Qe(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(nO))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[dx,Mf,px],integrityCheck:mx};l();l();l();var wi=Ft("lcat","LocationCategoryId"),Tf=p.Intersect([p.Object({id:p.Ref(wi),parent:p.Optional(p.Ref(wi))}),To(["name"]),wn],{$id:"LocationCategory"}),hx=[wi,Tf];l();l();var Uo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Uo||(Uo={}));var gx=o(e=>{var i,a,u,c,m,d,h,g,v;if(e.locationCategories==null&&e.locations==null)return se(!0);if(e.locationCategories!=null){let b=Ot(e.locationCategories,S=>S.id,"locationCategories");if(b.isErr())return b}if(e.locations!=null){let b=Ot(e.locations,S=>S.id,"locations");if(b.isErr())return b}if(e.locationInstances!=null){let b=Ot(e.locationInstances,S=>S.id,"locationInstances");if(b.isErr())return b}let t=new Set((a=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?a:[]);for(let b of(u=e.locationCategories)!=null?u:[])if(b.parent!=null&&!t.has(b.parent))return ce({kind:Uo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=Gt(e);for(let b of(c=e.locations)!=null?c:[]){for(let S of b.categories)if(!t.has(S))return ce({kind:Uo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of b.geometryAnchors){let O=r(S.floorId,S.geometryId);if(O.isErr())return O}}let n=new Set((d=(m=e.locations)==null?void 0:m.map(b=>b.id))!=null?d:[]);for(let b of(h=e.locationInstances)!=null?h:[]){if(!n.has(b.parentId))return ce({kind:Uo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let S of(g=b.categories)!=null?g:[])if(!t.has(S))return ce({kind:Uo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of(v=b.geometryAnchors)!=null?v:[]){let O=r(S.floorId,S.geometryId);if(O.isErr())return O}}return se(!0)},"validateLocations");l();var Ai=Ft("loc","LocationId"),ym=Ft("loci","LocationInstanceId"),yx=p.Object({name:p.String(),url:p.String({format:"uri"})},{$id:"LocationSocial"}),bx=p.Object({url:p.String({format:"uri"})},{$id:"LocationImage"}),kf=p.Object({label:p.String(),url:p.String({format:"uri"})},{$id:"LocationLink"}),_f=p.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),vx=p.Union([p.Literal("Sunday"),p.Literal("Monday"),p.Literal("Tuesday"),p.Literal("Wednesday"),p.Literal("Thursday"),p.Literal("Friday"),p.Literal("Saturday")],{$id:"OpeningHoursDay"}),iO="PublicHolidays",Lf=p.Union([vx,p.Literal(iO)],{$id:"OpeningHoursDayOrPublicHoliday"}),bm=p.Object({"@type":p.Optional(p.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:p.Optional(p.Ref(_f,{description:"The time the opening hours start"})),closes:p.Optional(p.Ref(_f,{description:"The time the opening hours end"})),dayOfWeek:p.Optional(p.Union([p.Ref(Lf),p.Array(p.Ref(Lf))],{description:"The days of the week the opening hours apply to"})),validFrom:p.Optional(p.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:p.Optional(p.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),vm=p.Intersect([p.Object({id:p.Ref(Ai),categories:p.Array(p.Ref(wi)),logo:p.Optional(p.String({format:"uri"})),phone:p.Optional(p.String()),social:p.Array(p.Ref(yx)),images:p.Array(p.Ref(bx)),links:p.Array(p.Ref(kf)),website:p.Optional(p.Ref(kf)),openingHours:p.Optional(p.Array(p.Ref(bm)))}),To(["name"]),xs(),wn],{$id:"Location"}),Rf=p.Intersect([p.Object({id:p.Ref(ym),parentId:p.Ref(Ai)}),p.Partial(p.Omit(vm,["id","parentId","details"])),jr],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),xm=[Ai,ym,yx,bx,kf,_f,vx,Lf,bm,vm,Rf];var oO=p.Object({locations:p.Array(p.Ref(vm)),locationCategories:p.Array(p.Ref(Tf)),locationInstances:p.Optional(p.Array(p.Ref(Rf)))},{$id:"LocationsExtensionSchema"}),xx="locations.json",Ex="location-categories.json",Cx="location-instances.json",Ix={name:"ext:locations",schema:oO,intoBundle:o(function*(e){e.locations!=null&&(yield{path:xx,contents:e.locations}),e.locationCategories!=null&&(yield{path:Ex,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:Cx,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===xx)return{locations:r(t)};if(e===Ex)return{locationCategories:r(t)};if(e===Cx)return{locationInstances:r(t)}},"fromBundle"),references:[...hx,...xm],integrityCheck:gx};l();l();var An;(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"})(An||(An={}));var Dx=o(e=>{var v,b,S,O,x,E,I,D,C,A,T,k,j,U,G,$,X,V,Y,oe;if(e.cms==null)return se(!0);let t=e.cms,r=Ot(e.cms.categories,Z=>Z.id,"cms.categories");if(r.isErr())return r;let n=new Set((b=(v=e.locationCategories)==null?void 0:v.map(Z=>Z.id))!=null?b:[]);for(let Z of(S=t.categories)!=null?S:[])if(!n.has(Z.categoryId))return ce({kind:An.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:Z.id,locationCategoryId:Z.categoryId}});let i=Ot(e.cms.locations,Z=>Z.id,"cms.locations");if(i.isErr())return i;let a=new Map((x=(O=e.locations)==null?void 0:O.map(Z=>[Z.id,Z]))!=null?x:[]);for(let Z of(E=t.locations)!=null?E:[]){if(!a.has(Z.locationId))return ce({kind:An.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId}});for(let ee of(I=Z.siblingGroups)!=null?I:[])for(let te of(D=ee.siblings)!=null?D:[])if(!a.has(te))return ce({kind:An.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:Z.id,siblingLocationId:te,label:ee.label}});if(Z.primaryCategory!=null){let ee=a.get(Z.locationId);if(ee!=null&&!ee.categories.includes(Z.primaryCategory))return ce({kind:An.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId,primaryCategory:Z.primaryCategory}})}}if(((C=t.venue)==null?void 0:C.topLocations)!=null){for(let Z of t.venue.topLocations)if(!a.has(Z))return ce({kind:An.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:Z}})}let u=new Set((T=(A=e.cms.locations)==null?void 0:A.map(Z=>Z.id))!=null?T:[]),c=Ot(e.cms.locationInstances,Z=>Z.id,"cms.locationInstances");if(c.isErr())return c;let m=new Set((j=(k=e.locationInstances)==null?void 0:k.map(Z=>Z.id))!=null?j:[]);for(let Z of(U=t.locationInstances)!=null?U:[]){if(!u.has(Z.parentId))return ce({kind:An.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:Z.id,enterpriseLocationId:Z.parentId}});if(!m.has(Z.locationInstanceId))return ce({kind:An.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:Z.id,locationInstanceId:Z.locationInstanceId}});for(let ee of(G=Z.siblingGroups)!=null?G:[])for(let te of($=ee.siblings)!=null?$:[])if(!a.has(te))return ce({kind:An.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:Z.id,siblingLocationId:te,label:ee.label}})}let d=Sn(e),h=Gt(e),g=Ot(e.cms.floorText,Z=>Z.properties.id,"cms.floorText");if(g.isErr())return g;for(let[Z,ee]of yr((X=t.floorText)!=null?X:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee.features){if(!("geometryId"in Q.properties))continue;let de=h(Z,Q.properties.geometryId);if(de.isErr())return de}}for(let[Z,ee]of yr((V=t.textures)!=null?V:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee){let de=h(Z,Q.geometryId);if(de.isErr())return de}}for(let[Z,ee]of yr((Y=t.layers)!=null?Y:{})){let te=d(Z);if(te.isErr())return te;for(let Q of Qe(ee!=null?ee:{})){let de=h(Z,Q);if(de.isErr())return de}}for(let[Z,ee]of yr((oe=t.textAreas)!=null?oe:{})){let te=d(Z);if(te.isErr())return te;for(let Q of ee.features)if("geometryId"in Q.properties){let de=h(Z,Q.properties.geometryId);if(de.isErr())return de}}return se(!0)},"validateCMS");l();l();var Cs=Ft("el","EnterpriseLocationId"),Nf=Ft("ec","EnterpriseCategoryId"),jf=Ft("eli","EnterpriseLocationInstanceId"),Uf=Ft("ev","EnterpriseVenueId"),zf=Ft("eft","EnterpriseFloorTextId"),Sx=[Cs,Nf,jf,Uf,zf];var wx=p.Object({id:p.Ref(Nf),categoryId:p.Ref(wi),color:p.Optional(p.String()),sortOrder:p.Number(),iconFromDefaultList:p.Optional(p.Union([p.String(),p.Null()])),picture:p.Optional(p.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),$f=p.Object({categories:p.Optional(p.Array(p.Ref(wx)))},{$id:"EnterpriseCategoriesSchema"}),Ax=[wx,$f];l();var Fx=kr(["left","center","right"]),aO=Fx.schema,mie=Fx.values,Gf=p.Object({id:p.Ref(zf),text:p.String(),visible:p.Boolean({default:!0}),fontSize:p.Number({default:12,exclusiveMinimum:0}),fontFamily:p.String({default:"Droid Sans"}),color:p.String({default:"black"}),rotation:p.Number({minimum:0,maximum:360}),align:aO},{$id:"FloorTextCommonProperties"}),Zf=p.Intersect([p.Ref(Gf),mn],{$id:"AnchoredFloorTextProperties"}),Vf=p.Intersect([p.Ref(Gf),p.Object({verticalOffset:p.Number()})],{$id:"FloatingFloorTextProperties"}),Ox=p.Union([p.Ref(Zf),p.Ref(Vf)],{$id:"FloorTextProperties"}),Bx=rr(dr,p.Ref(Ox),{$id:"FloorTextFeature"}),uO=rr(dr,p.Ref(Zf),{$id:"AnchoredFloorTextFeature"}),sO=rr(dr,p.Ref(Vf),{$id:"FloatingFloorTextFeature"}),Px=Ir(p.Ref(Bx),{$id:"EnterpriseFloorTextFeatureCollection"}),Mx=p.Record(ke,p.Ref(Px),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),Wf=p.Object({floorText:p.Optional(p.Ref(Mx))},{$id:"EnterpriseFloorTextSchema"}),Tx=[Gf,Zf,Vf,Ox,Bx,uO,sO,Px,Mx,Wf];l();var kx=Bt(p.Record(pr,p.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),_x=Bt(p.Record(ke,p.Ref(kx),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),Hf=p.Object({layers:p.Optional(p.Ref(_x))},{$id:"EnterpriseLayersSchema"}),Lx=[kx,_x,Hf];l();l();l();var Kf=kr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),cO=Kf.schema,Cie=Kf.values,Iie=Kf.record,qf=p.Object({type:cO,start:p.Optional(p.String({format:"date",description:"The start date of the state"})),end:p.Optional(p.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),Jf=p.Object({label:p.String(),siblings:p.Array(p.Ref(Ai))},{$id:"SiblingGroup"}),Em=p.Object({name:p.String(),code:p.String()},{$id:"Language"}),Rx=[qf,Jf,Em];var Cm=p.Object({id:p.Ref(Cs),locationId:p.Ref(Ai),cmsId:p.String(),type:p.String(),sortOrder:p.Number(),tags:p.Optional(p.Array(p.String())),picture:p.Optional(p.String({format:"uri",description:"The picture of the location"})),states:p.Optional(p.Array(p.Ref(qf),{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:p.Optional(p.Array(p.Ref(Jf))),gallery:p.Optional(p.Array(p.Object({caption:p.Optional(p.String()),image:p.String({format:"uri"}),embeddedUrl:p.Optional(p.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:p.Optional(p.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:p.Optional(p.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:p.Optional(p.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:p.Optional(p.Ref(wi))},{$id:"EnterpriseLocation"}),Xf=p.Object({locations:p.Optional(p.Array(p.Ref(Cm)))},{$id:"EnterpriseLocationsSchema"}),Nx=[Cm,Xf];var jx=p.Intersect([p.Object({id:p.Ref(jf),parentId:p.Ref(Cs),locationInstanceId:p.Ref(ym)}),p.Partial(p.Omit(Cm,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),Yf=p.Object({locationInstances:p.Optional(p.Array(p.Ref(jx)))},{$id:"EnterpriseLocationInstancesSchema"}),Ux=[jx,Yf];l();var Qf=kr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),zx=Qf.schema,$ie=Qf.values,Gie=Qf.record,eh=p.Object({maxWidth:p.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:p.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:p.Ref(zx),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),$x=p.Intersect([p.Ref(eh),mn],{$id:"EnterpriseAnchoredTextAreaProperties"}),Gx=p.Intersect([p.Ref(eh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),Zx=p.Union([$x,Gx],{$id:"EnterpriseTextAreaProperties"}),Vx=rr(p.Ref(dr),Zx,{$id:"EnterpriseTextAreaFeature"}),Wx=Ir(p.Ref(Vx),{$id:"EnterpriseTextAreaCollection"}),Hx=p.Record(ke,p.Ref(Wx),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),Kx=p.Object({textAreas:p.Optional(p.Ref(Hx))},{$id:"EnterpriseTextAreasSchema"}),qx=[zx,eh,$x,Gx,Zx,Vx,Wx,Hx];l();var th=p.Object({u:p.Number(),v:p.Number()},{$id:"EnterpriseTextureUV"}),rh=kr(["top","side"],{$id:"EnterpriseTextureFace"}),Jx=rh.schema,Kie=rh.values,qie=rh.record,nh=kr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),Xx=nh.schema,Jie=nh.values,Xie=nh.record,Yx=p.Tuple([ka,_a,ka,_a],{$id:"EnterpriseTextureBounds"}),Qx=p.Intersect([p.Object({repeat:p.Ref(th),offset:p.Ref(th),rotation:p.Number({minimum:0,maximum:360}),path:p.String({format:"uri"}),face:p.Ref(Jx),surface:p.Ref(Xx),bounds:p.Ref(Yx)},{$id:"EnterpriseTextureProperties"}),mn],{$id:"EnterpriseTexture"}),e3=p.Array(p.Ref(Qx),{$id:"EnterpriseTextures"}),t3=p.Record(ke,p.Ref(e3),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),ih=p.Object({textures:p.Optional(p.Ref(t3))},{$id:"EnterpriseTexturesSchema"}),r3=[Qx,e3,ih,th,Jx,Xx,Yx,t3];l();var n3=p.Intersect([p.Object({id:p.Ref(Uf),slug:p.String(),defaultLanguage:p.Ref(Em),languages:p.Array(p.Ref(Em)),countrycode:p.Optional(p.String()),logo:p.Optional(p.String({format:"uri"})),mappedinWebUrl:p.Optional(p.String({format:"uri"})),topLocations:p.Optional(p.Array(p.Ref(Ai))),operationHours:p.Optional(p.Array(p.Ref(bm))),coverImage:p.Optional(p.String({format:"uri"}))}),To(["name"]),wn],{$id:"EnterpriseVenue"}),oh=p.Object({venue:p.Optional(p.Ref(n3))},{$id:"EnterpriseVenueSchema"}),i3=[n3,oh];var a3=p.Intersect([oh,Xf,Yf,$f,ih,Wf,Hf,Kx],{$id:"CMSProperties"}),o3=p.Object({cms:p.Optional(p.Ref(a3))},{$id:"CMSExtensionSchema"}),lO=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,u3={name:"ext:cms",schema:o3,intoBundle:o(function*(e){var r,n,i,a,u,c;if(e.cms==null)return;let t=e.cms;for(let m of Qe(t))switch(m){case"floorText":for(let d of Qe((r=t.floorText)!=null?r:{}))yield{path:"cms/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of Qe((i=t.textures)!=null?i:{}))yield{path:"cms/textures/".concat(d,".json"),contents:((a=t.textures)!=null?a:{})[d]};continue;case"textAreas":for(let d of Qe((u=t.textAreas)!=null?u:{}))yield{path:"cms/textAreas/".concat(d,".geojson"),contents:((c=t.textAreas)!=null?c:{})[d]};continue;default:yield{path:"cms/".concat(m,".json"),contents:t[m]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(lO);if(!n)return;let[,i,a]=n,u=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{cms:{[i]:{[a]:u}}};default:return{cms:{[a]:u}}}},"fromBundle"),references:[a3,o3,...i3,...Nx,...Ux,...Ax,...r3,...Lx,...Tx,...qx,...Sx,...Rx,...xm],integrityCheck:Dx};l();l();l();l();var Fn;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Fn||(Fn={}));var s3=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return se(!0);let r=Object.entries(t).map(([a,u])=>R({key:a},u)).sort((a,u)=>a.index!==u.index?a.index-u.index:a.bit-u.bit),n=0,i=-1;for(let a of r){if(a.bit===i)return ce({kind:Fn.NavigationFlagDuplicateBit,properties:{index:a.index,bit:a.bit,path:"navigationFlags.".concat(a.key)}});if(a.index!=n){if(i!=31)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(a.index!=n+1||a.bit!=0)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=a.index,i=0}else{if(a.bit!==i+1)return ce({kind:Fn.NavigationFlagMissingDeclaration,properties:{index:a.index,bit:i+1,path:"navigationFlags"}});i=a.bit}}return se(!0)},"validateNavigationFlags");l();var c3=2**32-1,Is=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),au=o((e,t,r)=>{if(t.index==-1&&e.length===0)return se(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return ce({kind:Fn.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let a=e[i];if(i<t.index){if(a>c3)return ce({kind:Fn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:c3,path:r}});continue}else if(a>t.flag)return ce({kind:Fn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:t.flag,path:r}})}return se(!0)},"validateFlags");var mO=p.Object({index:p.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:p.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),l3=p.Intersect([mO,jr],{$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.'});var m3=p.Record(p.String(),l3,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),dO=p.Object({navigationFlags:p.Ref(m3)},{$id:"NavigationFlagsSchema"}),Im=p.Array(p.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),ah=p.Object({flags:p.Ref(Im)},{$id:"WithFlags"}),zo=p.Intersect([ou,ah],{$id:"FlaggedGeometryAnchor"}),pO=p.Object({geometryAnchor:zo},{$id:"WithFlaggedGeometryAnchor"}),fO=p.Object({geometryAnchors:p.Array(zo)},{$id:"WithFlaggedGeometryAnchors"}),d3={name:"ext:mvf-navigation-flags",schema:dO,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[l3,m3,Im,zo,pO,fO],integrityCheck:s3};l();var p3=o(e=>{if(e.connections==null)return se(!0);let t=Ot(e.connections,i=>i.id,"connections");if(t.isErr())return t;let r=Gt(e),n=Is(e);for(let[i,a]of e.connections.entries()){for(let[u,c]of a.entrances.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=au(c.flags,n,"connections[".concat(i,"].entrances[").concat(u,"]"));if(d.isErr())return d}for(let[u,c]of a.exits.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=au(c.flags,n,"connections[".concat(i,"].exits[").concat(u,"]"));if(d.isErr())return d}}return se(!0)},"validateConnections");var h3=Ft("c","ConnectionId"),{schema:hO,values:rae,record:nae}=kr(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),g3=hO;var y3=p.Intersect([p.Object({id:p.Ref(h3,{description:"The unique identifier for the connection."}),entrances:p.Array(p.Ref(zo)),exits:p.Array(p.Ref(zo)),entryCost:p.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:p.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:p.Ref(g3,{description:"The type of connection."})}),jr,wn],{$id:"ConnectionsProperties"}),b3=p.Array(p.Ref(y3),{$id:"ConnectionsCollection"}),gO=p.Object({connections:p.Ref(b3)},{$id:"ConnectionsExtensionSchema"}),f3="connections.json",v3={name:"ext:connections",schema:gO,intoBundle:o(function*(e){e.connections!=null&&(yield{path:f3,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===f3)return{connections:r(t)}},"fromBundle"),references:[y3,b3,g3,h3,zo,Im],integrityCheck:p3};l();l();var x3=o(e=>{if(e.defaultStyle==null)return se(!0);let t=Gt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return se(!0)},"validateDefaultStyle");var E3=p.Intersect([xs(),wn,p.Object({altitude:p.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:p.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:p.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:p.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:p.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:p.Optional(p.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),C3=p.Record(p.String(),p.Ref(E3),{$id:"DefaultStyleCollection",additionalProperties:!1}),yO=p.Object({defaultStyle:p.Ref(C3)},{$id:"DefaultStyleSchema"}),I3={name:"ext:mvf-default-style",schema:yO,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[E3,C3],integrityCheck:x3};l();l();l();l();var Dm;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Dm||(Dm={}));var D3=o(e=>{if(e.floorStacks==null)return se(!0);let t=Ot(e.floorStacks,n=>n.id,"floorStacks");if(t.isErr())return t;let r=Sn(e);for(let n of e.floorStacks){for(let i of n.floors){let a=r(i);if(a.isErr())return a}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return ce({kind:Dm.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return se(!0)},"validateFloorStacks");var Ds=Ft("fs","FloorStackId"),w3=p.Intersect([p.Object({id:p.Ref(Ds,{description:"The unique identifier for the floor stack."}),floors:p.Array(p.Ref(ke),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:p.Optional(p.Ref(ke,{description:"The default floor for the floor stack."}))}),jr],{$id:"FloorStacksProperties"}),A3=p.Array(p.Ref(w3),{$id:"FloorStackCollection"}),bO=p.Object({floorStacks:p.Ref(A3)},{$id:"FloorStackExtensionSchema"}),S3="floor-stacks.json",F3={name:"ext:floor-stacks",schema:bO,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:S3,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===S3)return{floorStacks:r(t)}},"fromBundle"),references:[Ds,w3,A3],integrityCheck:D3};l();l();var Ss;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(Ss||(Ss={}));var O3=o(e=>{if(e.facade==null)return se(!0);if(e.floorStacks==null)return ce({kind:Ss.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(i=>i.id)),r=Gt(e),n=Sn(e);for(let[i,a]of yr(e.facade)){if(a==null)continue;let u=n(i);if(u.isErr())return u;for(let c of a){let{floorStackId:m,geometryIds:d}=c;if(!t.has(m))return ce({kind:Ss.UnknownFloorStackError,properties:{floorStackId:m}});for(let h of d){let g=r(i,h);if(g.isErr())return g}}}return se(!0)},"validateFacade");var B3=p.Intersect([p.Object({floorStackId:p.Ref(Ds)}),eu],{$id:"Facade"}),vO=p.Object({facade:Bt(p.Record(ke,p.Array(p.Ref(B3)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),xO=/^facade\/(.*)\.json$/,P3={name:"ext:facade",schema:vO,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Qe(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(xO))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[Ds,B3],integrityCheck:O3};l();l();var M3=o(e=>{if(e.floorImages==null)return se(!0);let t=Gt(e);for(let[r,n]of yr(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let a=i.properties.geometryId,u=t(r,a);if(u.isErr())return u}return se(!0)},"validateFloorImages");var uh=p.Object({path:p.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:p.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:p.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),T3=p.Intersect([p.Ref(uh),mn],{$id:"AnchoredFloorImageProperties"}),k3=p.Intersect([p.Ref(uh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),_3=p.Union([T3,k3],{$id:"FloorImageProperties"}),L3=rr(p.Ref(dr),_3,{$id:"FloorImageFeature"}),R3=Ir(p.Ref(L3),{$id:"FloorImageCollection"}),EO=p.Object({floorImages:Bt(p.Record(ke,p.Ref(R3),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),CO=/^floorImages\/(.*)\.geojson$/,N3={name:"ext:floor-images",schema:EO,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Qe(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(CO))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[uh,T3,k3,_3,L3,R3],integrityCheck:M3};l();l();var j3=o(e=>{if(e.kinds==null)return se(!0);let t=Gt(e);for(let[r,n]of yr(e.kinds))if(n!=null)for(let i of Qe(n)){let a=t(r,i);if(a.isErr())return a}return se(!0)},"validateKinds");var{values:Sue,schema:IO,record:wue}=kr(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),U3=IO;var z3=Bt(p.Record(pr,p.Ref(U3),{additionalProperties:!1,$id:"GeometryKinds"})),DO=p.Object({kinds:Bt(p.Record(ke,p.Ref(z3),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),SO=/^kinds\/(.*)\.json$/,$3={name:"ext:kinds",schema:DO,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Qe(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(SO))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[U3,z3],integrityCheck:j3};l();l();l();var ws;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(ws||(ws={}));var G3=o(e=>{if(e.nodes==null)return se(!0);let t=Ot(e.nodes,i=>i.properties.id,"nodes");if(t.isErr())return t;let r=Gt(e),n=Is(e);for(let[i,a]of yr(e.nodes)){if(a==null)continue;let u=new Set(a.features.map(c=>c.properties.id));for(let[c,m]of a.features.entries()){for(let d of m.properties.geometryIds){let h=r(i,d);if(h.isErr())return h}for(let[d,h]of m.properties.neighbors.entries()){if(!u.has(h.id))return ce({kind:ws.UnknownNeighbor,properties:{floorId:i,nodeId:m.properties.id,neighborId:h.id}});if(h.id===m.properties.id)return ce({kind:ws.SelfReference,properties:{floorId:i,nodeId:m.properties.id}});let g=au(h.flags,n,'nodes["'.concat(i,'"].features[').concat(c,"].properties.neighbors[").concat(d,"]"));if(g.isErr())return g}}}return se(!0)},"validateNodes");var sh=Ft("n","NodeId"),Z3=p.Intersect([p.Object({id:p.Ref(sh,{description:"The unique identifier for the node."}),extraCost:p.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),ah],{$id:"NodeNeighbor"}),V3=p.Intersect([p.Object({id:p.Ref(sh,{description:"The unique identifier for the node."}),neighbors:p.Array(p.Ref(Z3),{description:"The neighbors of the node."})}),eu],{$id:"NodeProperties"}),W3=rr(p.Ref(dr),V3,{$id:"NodeFeature"}),H3=Ir(p.Ref(W3),{$id:"NodeCollection"}),wO=p.Object({nodes:Bt(p.Record(ke,p.Ref(H3),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),AO=/^nodes\/(.*)\.(geo)?json$/,K3={name:"ext:nodes",schema:wO,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Qe(e.nodes))yield{path:"nodes/".concat(t,".geojson"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(AO))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[sh,Z3,V3,W3,H3],integrityCheck:G3};l();l();l();var Sm;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(Sm||(Sm={}));var q3=o(e=>{if(e.outdoors==null)return se(!0);let t=Sn(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return ce({kind:Sm.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return se(!0)},"validateOutdoors");var X3=p.Object({floors:p.Array(p.Ref(ke),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),FO=p.Object({outdoors:p.Ref(X3)},{$id:"OutdoorsExtensionSchema"}),J3="outdoors.json",Y3={name:"ext:outdoors",schema:FO,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:J3,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===J3)return{outdoors:r(t)}},"fromBundle"),references:[X3],integrityCheck:q3};l();l();l();var wm;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(wm||(wm={}));var Q3=o(e=>{if(e.tileset==null)return se(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return ce({kind:wm.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return se(!0)},"validateTilesets");var ch=p.Object({key:p.String({minLength:1,description:"Unique identifier for the tileset style."}),name:p.String({minLength:1,description:"Display name of the tileset style."}),url:p.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),eE=p.Object({default:p.Ref(ch,{description:"The default tileset style, which should be used."}),others:p.Optional(p.Array(p.Ref(ch,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),OO=p.Object({tileset:p.Ref(eE)},{$id:"TilesetExtensionSchema"}),tE={name:"ext:mvf-tileset",schema:OO,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[ch,eE],integrityCheck:Q3};l();var rE=p.Object({},{$id:"WalkableProperties"}),nE=p.Object({},{$id:"NonWalkableProperties"}),iE=Bt(p.Record(pr,p.Ref(rE),{$id:"WalkableGeometries",additionalProperties:!1})),oE=Bt(p.Record(pr,p.Ref(nE),{$id:"NonWalkableGeometries",additionalProperties:!1})),BO=p.Object({walkable:Bt(p.Record(ke,p.Ref(iE),{additionalProperties:!1})),nonwalkable:Bt(p.Record(ke,p.Ref(oE),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),PO=/^walkable\/(.*)\.json$/,MO=/^nonwalkable\/(.*)\.json$/,aE={name:"ext:mvf-traversability",schema:BO,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Qe(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Qe(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var a,u;let n=(a=e.match(PO))==null?void 0:a[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(u=e.match(MO))==null?void 0:u[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[rE,nE,iE,oE]};l();l();l();l();l();l();l();l();l();l();l();var RO=Xg(cE(),1);l();l();l();l();var Ple=lx().extendOptional(d3).extendOptional(K3).extendOptional(v3).extendOptional($3).extendOptional(aE).extendOptional(I3).extendOptional(F3).extendOptional(Y3).extendOptional(tE).extendOptional(N3).extendOptional(P3).extendOptional(fx).extendOptional(Ix).extendOptional(u3).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");l();l();var ph="\xA9 Mappedin",jO="https://info.mappedin.com/feedback",hh=["top-left","top-right","bottom-left","bottom-right"],UO=640,zO=o(()=>"<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>","getAttributionButtonIcon"),fh={custom:[],position:"bottom-right",feedback:!0},uu,gh=class gh{constructor(t,r={}){f(this,"controlContainerEl");f(this,"controlPositions");f(this,"compact");_(this,uu);f(this,"attribContainerEl");f(this,"attribInnerEl");f(this,"attribButtonEl");f(this,"feedbackLinkEl");f(this,"attribHTML",ph);f(this,"customAttributions",[]);f(this,"toggleAttribution",o(t=>{this.attribContainerEl!=null&&(t.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",""))))},"toggleAttribution"));W(this,uu,!!r.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=hh.reduce((n,i)=>{let a=document.createElement("div");return a.classList.add("mappedin-ctrl-".concat(i)),this.controlContainerEl.appendChild(a),n[i]=a,n},{})}addAttributionControl(t=fh){var i;let r=t.position&&hh.includes(t.position)?t.position:fh.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(r)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].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=zO(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,uu)?ph:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((i=t.feedback)!=null?i:fh.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=jO,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)),t.custom&&(this.customAttributions=t.custom),this.updateAttributionDisplay()}updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=s(this,uu)?[ph]:[],n=t.style.sourceCaches;for(let i in n){let a=n[i];if(a.used||a.usedForTerrain){let u=a.getSource();u.attribution&&r.indexOf(u.attribution)<0&&r.push(u.attribution)}}r=r.filter(i=>String(i).trim()),r=r.filter((i,a)=>{for(let u=a+1;u<r.length;u++)if(r[u].indexOf(i)>=0)return!1;return!0}),this.attribHTML=r.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let t=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=t)}resizeAttribution(t){this.attribContainerEl&&(t<=UO||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(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};uu=new WeakMap,o(gh,"HTMLControlsSystem");var Fm=gh;l();l();var dn=Object.freeze({Linear:Object.freeze({None:o(function(e){return e},"None"),In:o(function(e){return e},"In"),Out:o(function(e){return e},"Out"),InOut:o(function(e){return e},"InOut")}),Quadratic:Object.freeze({In:o(function(e){return e*e},"In"),Out:o(function(e){return e*(2-e)},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},"InOut")}),Cubic:Object.freeze({In:o(function(e){return e*e*e},"In"),Out:o(function(e){return--e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},"InOut")}),Quartic:Object.freeze({In:o(function(e){return e*e*e*e},"In"),Out:o(function(e){return 1- --e*e*e*e},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},"InOut")}),Quintic:Object.freeze({In:o(function(e){return e*e*e*e*e},"In"),Out:o(function(e){return--e*e*e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},"InOut")}),Sinusoidal:Object.freeze({In:o(function(e){return 1-Math.sin((1-e)*Math.PI/2)},"In"),Out:o(function(e){return Math.sin(e*Math.PI/2)},"Out"),InOut:o(function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))},"InOut")}),Exponential:Object.freeze({In:o(function(e){return e===0?0:Math.pow(1024,e-1)},"In"),Out:o(function(e){return e===1?1:1-Math.pow(2,-10*e)},"Out"),InOut:o(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)},"InOut")}),Circular:Object.freeze({In:o(function(e){return 1-Math.sqrt(1-e*e)},"In"),Out:o(function(e){return Math.sqrt(1- --e*e)},"Out"),InOut:o(function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},"InOut")}),Elastic:Object.freeze({In:o(function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},"In"),Out:o(function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},"Out"),InOut:o(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)},"InOut")}),Back:Object.freeze({In:o(function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},"In"),Out:o(function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},"Out"),InOut:o(function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},"InOut")}),Bounce:Object.freeze({In:o(function(e){return 1-dn.Bounce.Out(1-e)},"In"),Out:o(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},"Out"),InOut:o(function(e){return e<.5?dn.Bounce.In(e*2)*.5:dn.Bounce.Out(e*2-1)*.5+.5},"InOut")}),generatePow:o(function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:o(function(t){return Math.pow(t,e)},"In"),Out:o(function(t){return 1-Math.pow(1-t,e)},"Out"),InOut:o(function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5},"InOut")}},"generatePow")}),As=o(function(){return performance.now()},"now"),Om=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return o(e,"Group"),e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(r){return t._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var u=a[i];(t=u._group)===null||t===void 0||t.remove(u),u._group=this,this._tweens[u.getId()]=u,this._tweensAddedDuringUpdate[u.getId()]=u}},e.prototype.remove=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,r){t===void 0&&(t=As()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var a=this._tweens[n[i]],u=!r;a&&a.update(t,u)===!1&&!r&&this.remove(a)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),su={Linear:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=su.Utils.Linear;return t<0?a(e[0],e[1],n):t>1?a(e[r],e[r-1],r-n):a(e[i],e[i+1>r?r:i+1],n-i)},"Linear"),Bezier:o(function(e,t){for(var r=0,n=e.length-1,i=Math.pow,a=su.Utils.Bernstein,u=0;u<=n;u++)r+=i(1-t,n-u)*i(t,u)*e[u]*a(n,u);return r},"Bezier"),CatmullRom:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=su.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(i=Math.floor(n=r*(1+t))),a(e[(i-1+r)%r],e[i],e[(i+1)%r],e[(i+2)%r],n-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[r]-(a(e[r],e[r],e[r-1],e[r-1],n-r)-e[r]):a(e[i?i-1:0],e[i],e[r<i+1?r:i+1],e[r<i+2?r:i+2],n-i)},"CatmullRom"),Utils:{Linear:o(function(e,t,r){return(t-e)*r+e},"Linear"),Bernstein:o(function(e,t){var r=su.Utils.Factorial;return r(e)/r(t)/r(e-t)},"Bernstein"),Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var n=t;n>1;n--)r*=n;return e[t]=r,r}}(),CatmullRom:o(function(e,t,r,n,i){var a=(r-e)*.5,u=(n-t)*.5,c=i*i,m=i*c;return(2*t-2*r+a+u)*m+(-3*t+3*r-2*a-u)*c+a*i+t},"CatmullRom")}},lE=function(){function e(){}return o(e,"Sequence"),e.nextId=function(){return e._nextId++},e._nextId=0,e}(),yh=new Om,mE=function(){function e(t,r){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=dn.Linear.None,this._interpolationFunction=su.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=lE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=yh,yh.add(this))}return o(e,"Tween"),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(t,r){if(r===void 0&&(r=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=t,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,r){if(t===void 0&&(t=As()),r===void 0&&(r=!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=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,r,n,i,a){for(var u in n){var c=t[u],m=Array.isArray(c),d=m?"array":typeof c,h=!m&&Array.isArray(n[u]);if(!(d==="undefined"||d==="function")){if(h){var g=n[u];if(g.length===0)continue;for(var v=[c],b=0,S=g.length;b<S;b+=1){var O=this._handleRelativeValue(c,g[b]);if(isNaN(O)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}v.push(O)}h&&(n[u]=v)}if((d==="object"||m)&&c&&!h){r[u]=m?[]:{};var x=c;for(var E in x)r[u][E]=x[E];i[u]=m?[]:{};var g=n[u];if(!this._isDynamic){var I={};for(var E in g)I[E]=g[E];n[u]=g=I}this._setupProperties(x,r[u],g,i[u],a)}else(typeof r[u]>"u"||a)&&(r[u]=c),m||(r[u]*=1),h?i[u]=n[u].slice().reverse():i[u]=r[u]||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(t){return t===void 0&&(t=As()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=As()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,r=this._chainedTweens.length;t<r;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=dn.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=su.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,r){var n=this,i;if(t===void 0&&(t=As()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<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 u=t-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),m=this._duration+this._repeat*c,d=o(function(){if(n._duration===0||u>m)return 1;var O=Math.trunc(u/c),x=u-O*c,E=Math.min(x/n._duration,1);return E===0&&u===n._duration?1:E},"calculateElapsedPortion"),h=d(),g=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var v=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=v);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*v,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,S=this._chainedTweens.length;b<S;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,r,n,i){for(var a in n)if(r[a]!==void 0){var u=r[a]||0,c=n[a],m=Array.isArray(t[a]),d=Array.isArray(c),h=!m&&d;h?t[a]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(t[a],u,c,i):(c=this._handleRelativeValue(u,c),typeof c=="number"&&(t[a]=u+(c-u)*i))}},e.prototype._handleRelativeValue=function(t,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?t+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(t){var r=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=r},e.autoStartOnUpdate=!1,e}();var Fme=lE.nextId,ei=yh,Ome=ei.getAll.bind(ei),Bme=ei.removeAll.bind(ei),Pme=ei.add.bind(ei),Mme=ei.remove.bind(ei),Tme=ei.update.bind(ei);l();l();l();l();l();var dE=o((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),pE=o((e,t)=>new Ie(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),bh=o((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),Fs=o((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),vh=o((e,t)=>new Ie((e.x+t.x)/2,(e.y+t.y)/2),"average"),xh=o(e=>{let t=0,{wheelDelta:r,detail:n}=e;return r!==void 0?t=r:n!==void 0&&(t=-n),t},"getScrollDelta");var Eh=class Eh{constructor(t,r){f(this,"input1");f(this,"input2");f(this,"lastAngle");f(this,"lastDistance");f(this,"totalDistance");f(this,"first");f(this,"second");this.input1=t,this.input2=r,this.lastAngle=bh(t,r),this.lastDistance=Fs(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let n=Fs(t,r);this.input1=t,this.input2=r;let i=bh(t,r);this.lastAngle=i,this.lastDistance=n,this.totalDistance+=(Fs(this.first,t)+Fs(this.second,r))/2,this.first=vh(this.first,t),this.second=vh(this.second,r)}};o(Eh,"InputSet");var Bm=Eh;l();var Ch=class Ch{constructor(t,r,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=t,this.camera=r,this.cameraPlane=n,this.viewCoordinate={x:t.x,y:t.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 t=new Ie(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Ln,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var n,i;let t=new Ie(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(t,this.snapCamera);let r=(i=this.raycaster)==null?void 0:i.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};o(Ch,"TouchAnchor");var Os=Ch;var pn={};_i(pn,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>GO,CLIPPING_RADIUS:()=>Bs,CONTROL_OPTIONS:()=>$O,DEFAULT_ANIMATION_DURATION:()=>Ah,DEFAULT_BEARING:()=>KO,DEFAULT_MAX_ZOOM_LEVEL:()=>WO,DEFAULT_MIN_ZOOM_LEVEL:()=>Fh,DEFAULT_PITCH:()=>HO,DEFAULT_ZOOM_LEVEL:()=>VO,EVENTS:()=>km,MAPLIBRE_TILE_SIZE:()=>Pm,MAX_LAT:()=>Dh,MAX_MERCATOR_ZOOM_LEVEL:()=>Tm,MIN_LAT:()=>Ih,MIN_MERCATOR_ZOOM_LEVEL:()=>Mm,ROOM_MERCATOR_ZOOM_LEVEL:()=>ZO,TWO_PI:()=>Sh,WHEEL_ZOOM_MULTIPLIER:()=>wh,ZRANGE:()=>cu});l();var Pm=512,Ih=-85.051129,Dh=85.051129,Bs=1e4,$O={chain:"chain",cancel:"cancel"},Sh=Math.PI*2,cu=100,wh=1e4,Mm=0,Tm=24,GO=17,ZO=20,Ah=200,km=["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"],VO=18,Fh=12,WO=22,HO=0,KO=0;var _m=!1,qO=!1;var Lm,Rm=class Rm extends Te{constructor(r,n,i,a,u){super();f(this,"dirty",!1);f(this,"zoomDirty",!1);f(this,"rotationDirty",!1);f(this,"panDirty",!1);f(this,"stateDirty",!1);_(this,Lm,Fh);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 ue(1/0,1/0),max:new ue(-1/0,-1/0),center:new ue(0,0,0),radius:1/0});f(this,"minTilt",0);f(this,"maxTilt",1.2);f(this,"MOUSE_BUTTONS",{ORBIT:bc.RIGHT,ZOOM:bc.MIDDLE,PAN:bc.LEFT});f(this,"camera");f(this,"scene");f(this,"renderer");f(this,"elevation");f(this,"orbit");f(this,"cameraPlane");f(this,"raycaster",new Ln);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 hy(!0));f(this,"coords",{mouse:new Ie,rotateStart:new Ie,rotateEnd:new Ie,rotateDelta:new Ie,panStart:new ue,panCameraStart:new ue,panEnd:new ue,panDelta:new ue,initialShiftPos:new Ie,initialPedestal:0,floorAnchor:new ue});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",o(r=>{this.raycaster.setFromCamera(r,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new ue},"raycastToFloor"));f(this,"isUserInteracting",o(()=>this.userInteracting,"isUserInteracting"));f(this,"getPosition",o(()=>new ue(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z),"getPosition"));f(this,"getPedestal",o(()=>this.orbit.position.z,"getPedestal"));f(this,"pan",o((r,n)=>{isNaN(r)||isNaN(n)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+n),this.publish("position-updated"))},"pan"));f(this,"postRender",o(()=>{(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"))},"postRender"));f(this,"isCameraMoving",o(()=>this.cameraMoving,"isCameraMoving"));f(this,"lastCameraStoppedMovingTime",o(()=>this.lastCameraMoveTime,"lastCameraStoppedMovingTime"));f(this,"setPosition",o((r,n)=>{r===void 0||n===void 0||isNaN(r)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(r,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)},"setPosition"));f(this,"updateCameraPosition",o((r,n)=>{let i=r-this.panBounds.center.x,a=n-this.panBounds.center.y,u=Math.sqrt(i*i+a*a);if(this.stayInsideBounds&&u>this.panBounds.radius){let c=Math.atan2(a,i),m={x:Math.cos(c)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(c)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=m.x,this.orbit.position.y=m.y}else this.orbit.position.x=r,this.orbit.position.y=n},"updateCameraPosition"));f(this,"tilt",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+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},"tilt"));f(this,"zoomIn",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a/1.5},r,n,i)},"zoomIn"));f(this,"zoomOut",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a*1.5},r,n,i)},"zoomOut"));f(this,"getRotation",o(()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2),"getRotation"));f(this,"cancelAnimation",o(()=>{let r=Array.from(this.tweens.keys());if(r.length<1)return;let n=r[r.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)},"cancelAnimation"));f(this,"animateCamera",o((r,n,i,a,u,c)=>{let m=R({interruptible:!0},c),d={},h={},g=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(d.x=g.x,h.x=r.position.x),r.position.y!==void 0&&(d.y=g.y,h.y=r.position.y),r.position.z!==void 0&&(d.z=g.z,h.z=r.position.z)),r.zoom!==void 0&&(d.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?h.zoom=r.zoom:h.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let{start:D,end:C}=Iy(this.getRotation(),r.rotation);d.rotation=D,h.rotation=C}r.tilt!==void 0&&(d.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?h.tilt=r.tilt:h.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let v=d.zoom!==h.zoom,b=d.rotation!==h.rotation,S=d.tilt!==h.tilt,O=new mE(d).to(h,y.env.TESTING?0:n).onUpdate(D=>{this.setMulti({x:D.x,y:D.y,z:D.z},D.zoom,D.rotation,D.tilt)}).onComplete(()=>{this.completeTween(O),this.publish("multi-end",{zooming:v,rotating:b,tilting:S}),a&&a()}).onStart(()=>{this.state!==7&&(this.state=7,O.state=7,this.publish("multi-start",{zooming:v,rotating:b,tilting:S})),this.publish("change")});this.rendererState.internalTweenGroup.add(O);let x=Array.from(this.tweens.entries()),E=x[x.length-1],I=!1;return E!=null&&(E[1].interruptible?(typeof E[1].cancelledCallback=="function"&&E[1].cancelledCallback(),this.completeTween(E[0])):(I=!0,E[0].chain(O))),this.tweens.set(O,{cancelledCallback:u,interruptible:m.interruptible}),i?O.easing(i):O.easing(dn.Quadratic.In),!r.doNotAutoStart&&!I&&(O.start(),this.publish("change")),O.cameraAnimation=!0,O},"animateCamera"));f(this,"setMulti",o((r,n,i,a,u=!0)=>{this.state===-1&&this.publish("multi-start");let c=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&r.y!==void 0&&!isNaN(r.y)&&(this.updateCameraPosition(r.x,r.y),c=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0,!1),c=!0)),c&&this.publish("position-updated");let m={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let d=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;d!==this.camera.position.z&&(m.zooming=!0,this.camera.position.z=d,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>Bs&&(this.camera.near=n-Bs,this.camera.far=n+Bs):(this.camera.near=n/cu,this.camera.far=n*cu),this.camera.updateProjectionMatrix())}if(i!==void 0&&!isNaN(i)&&i!==this.getRotation()&&(m.rotating=!0,this.orbit.rotation.z=-i,this.publish("rotation-updated")),a!==void 0&&!isNaN(a)){let d=this.stayInsideBounds?Math.max(Math.min(a,this.maxTilt),this.minTilt):a;d!==this.elevation.rotation.x&&(m.tilting=!0,this.elevation.rotation.x=d,this.publish("tilt-updated"))}u&&this.publish("change"),this.state===-1&&this.publish("multi-end",m),this.stateDirty=!0},"setMulti"));f(this,"getZoomScaledMin",o(()=>this.minZoomAltitude*this.zoomFactor,"getZoomScaledMin"));f(this,"getZoomScaledMax",o(()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)},"getZoomScaledMax"));f(this,"setRotation",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=-(r%Sh);i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,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)},"setRotation"));f(this,"setZoomAltitude",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/cu,this.camera.far=n*cu,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0},"setZoomAltitude"));f(this,"setZoomLevel",o(r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))},"setZoomLevel"));f(this,"getZoomAltitude",o(()=>this.camera.position.z,"getZoomAltitude"));f(this,"getZoomLevel",o(()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()),"getZoomLevel"));f(this,"setTilt",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)},"setTilt"));f(this,"getTilt",o(()=>this.elevation.rotation.x,"getTilt"));f(this,"setCameraPlaneElevation",o(r=>{this.cameraPlane.position.z=r},"setCameraPlaneElevation"));f(this,"zoom",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-r;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},"zoom"));f(this,"getProjectionScaleFactor",o((r,n,i)=>ip(r,n,i),"getProjectionScaleFactor"));f(this,"update",o(()=>{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())},"update"));f(this,"setPedestal",o((r,n=!1,i=!0)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,n&&(this.publishPedestalChangeEvent(r),this.publish("pedestal-change",{pedestal:r})),this.publish("change"),this.dirty=!0,i&&(this.stateDirty=!0))},"setPedestal"));f(this,"dispose",o(()=>{for(let r of km)r.endsWith("start")?(this.off(r,this.setCameraMoving),r.startsWith("user")&&this.off(r,this.setUserInteracting)):(r.endsWith("end")||r.endsWith("cancel"))&&(this.off(r,this.unsetCameraMoving),r.startsWith("user")&&this.off(r,this.unsetUserInteracting));this.removeEventListeners(),this.scene.remove(this.cameraPlane),this.destroy()},"dispose"));f(this,"createCameraPlane",o(()=>{let r=_m?2e3:1e10,n=_m?100:1,i=new yn(r,r,n,n),a=new cr({color:0,wireframe:_m,visible:_m}),u=new Oe(i,a);return this.scene.add(u),u},"createCameraPlane"));f(this,"addEventListeners",o(()=>{let{domElement:r}=this.renderer;for(let n of km)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));r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)},"addEventListeners"));f(this,"addMouseEventListeners",o(()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)},"addMouseEventListeners"));f(this,"addMouseMoveEventListeners",o(()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)},"addMouseMoveEventListeners"));f(this,"removeMouseMoveEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)},"removeMouseMoveEventListeners"));f(this,"removeEventListeners",o(()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeEventListeners"));f(this,"removeMouseUpEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeMouseUpEventListeners"));f(this,"onContextMenu",o(r=>{r.preventDefault()},"onContextMenu"));f(this,"onMouseUp",o(()=>{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}},"onMouseUp"));f(this,"onMouseMove",o(r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}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(r)},"onMouseMove"));f(this,"onTouchStart",o(r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new Bm(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}},"onTouchStart"));f(this,"onTouchMove",o(r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let n=R({},this.touch.inputs.first),i=R({},this.touch.inputs.second),a=new Ie(this.touch.touches[0].x,this.touch.touches[0].y),u=new Ie(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(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let c=n.y<a.y&&i.y<u.y,m=n.y>a.y&&i.y>u.y;this.enableRotate&&this.state!==4&&(m||c)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}},"onTouchMove"));f(this,"onTouchEnd",o(r=>{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}r.touches.length?this.onTouchStart(r):this.state=-1}},"onTouchEnd"));f(this,"handleTouchMovePan",o(r=>{let n=Object.hasOwn(r,"x")?new Ie(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panEnd.set(i.x,i.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},"handleTouchMovePan"));f(this,"handleTouchStartDolly",o(()=>{let r=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 i=new Ie(this.touch.touches[0].x-r/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(i),this.orbit.updateMatrixWorld(),this.touch.anchor1=new Os(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new Os(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")},"handleTouchStartDolly"));f(this,"handleMouseMovePan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.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},"handleMouseMovePan"));f(this,"handleTouchStartTilt",o(r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")},"handleTouchStartTilt"));f(this,"handleTouchMovePedestal",o(r=>{this.handleMouseMovePedestal(r.touches[0])},"handleTouchMovePedestal"));f(this,"handleTouchMoveTilt",o(r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.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)},"handleTouchMoveTilt"));f(this,"handleTouchMoveDolly",o(()=>{let r=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let i=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);i&&this.setCameraFromTransformMatrix(i),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,n)},"handleTouchMoveDolly"));f(this,"handleTouchEnd",o(()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1},"handleTouchEnd"));f(this,"handleTouchStartPan",o(r=>{let n=Object.hasOwn(r,"x")?new Ie(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panStart.set(i.x,i.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")},"handleTouchStartPan"));f(this,"handleTouchStartPedestal",o(r=>{this.handleMouseDownPedestal(r.touches[0])},"handleTouchStartPedestal"));f(this,"onMouseDown",o(r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}},"onMouseDown"));f(this,"onMouseWheel",o(r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(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(r))},"onMouseWheel"));f(this,"handleMouseWheel",o(r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),i=n-xh(r)*n/wh*this.zoomSpeed;if(this.setZoomAltitude(i),this.enablePan){let a=i/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-a),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")},"handleMouseWheel"));f(this,"setCameraFromTransformMatrix",o(r=>{this.orbit.updateMatrixWorld();let n=new ia;n.setFromRotationMatrix(r,"ZYX");let i=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),a=n.z,u=new ue(0,0,1);u.applyEuler(n),u.setLength(i);let c=new ue;c.setFromMatrixPosition(r),c.sub(u),this.enablePan&&this.setPosition(c.x,c.y),this.enableZoom&&this.setZoomAltitude(i),this.enableRotate&&this.setRotation(-a)},"setCameraFromTransformMatrix"));f(this,"makeTransformFromTouchAnchors",o((r,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let i=this.camera.projectionMatrix.clone(),a=r.worldCoordinate,u=n.worldCoordinate,c=r.reUnproject(),m=n.reUnproject();if(!c||!m||!a||!u)return null;let d=r.viewCoordinate,h=n.viewCoordinate,g=u.x-a.x,v=u.y-a.y,b=Math.atan2(v,g),S=m.x-c.x,O=m.y-c.y,x=Math.atan2(O,S),E=dE(b,x),I=new _r;I.makeRotationZ(-E);let D=I.clone();D.multiply(r.snapHolderMatrix);let C=o((Z6,V6,W6)=>Z6.elements[(V6-1)*4+W6-1],"m"),A=C(i,1,1)*C(D,1,1)-d.x*C(i,3,4)*C(D,3,1),T=C(i,1,1)*C(D,1,2)-d.x*C(i,3,4)*C(D,3,2),k=C(i,1,1)*C(D,1,3)-d.x*C(i,3,4)*C(D,3,3),j=a.x*A+a.y*T+a.z*k,U=C(i,2,2)*C(D,2,1)-d.y*C(i,3,4)*C(D,3,1),G=C(i,2,2)*C(D,2,2)-d.y*C(i,3,4)*C(D,3,2),$=C(i,2,2)*C(D,2,3)-d.y*C(i,3,4)*C(D,3,3),X=a.x*U+a.y*G+a.z*$,V=C(i,1,1)*C(D,1,1)-h.x*C(i,3,4)*C(D,3,1),Y=C(i,1,1)*C(D,1,2)-h.x*C(i,3,4)*C(D,3,2),oe=C(i,1,1)*C(D,1,3)-h.x*C(i,3,4)*C(D,3,3),Z=u.x*V+u.y*Y+u.z*oe,ee=C(i,2,2)*C(D,2,1)-h.y*C(i,3,4)*C(D,3,1),te=C(i,2,2)*C(D,2,2)-h.y*C(i,3,4)*C(D,3,2),Q=C(i,2,2)*C(D,2,3)-h.y*C(i,3,4)*C(D,3,3),de=u.x*ee+u.y*te+u.z*Q,je=Math.abs(V-A),Me=Math.abs(Y-T),Ve=Math.abs(oe-k),qe=Math.abs(V-U),Ae=Math.abs(Y-G),ot=Math.abs(oe-$),Pt=Math.abs(ee-A),Ht=Math.abs(te-T),F=Math.abs(Q-k),q=Math.abs(ee-U),B=Math.abs(te-G),ae=Math.abs(Q-$),J=Math.min(je+Me+Ve,qe+Ae+ot),re=Math.min(Pt+Ht+F,q+B+ae);J<re&&(V=ee,Y=te,oe=Q,Z=de);let Ce=U*k-A*$,bt=G*k-T*$,ye=X*k-j*$,le=V*$-U*oe,He=Y*$-G*oe,Wr=Z*$-X*oe,Ou=(Wr*bt-ye*He)/(le*bt-Ce*He),Bu=(Wr*Ce-ye*le)/(He*Ce-bt*le),na=G*A-T*U,z6=$*A-k*U,$6=X*A-j*U,qg=Y*U-G*V,G6=oe*U-$*V,Jg=((Z*U-X*V)*na-$6*qg)/(G6*na-z6*qg),gc=D.clone();return gc.elements[12]=Ou,gc.elements[13]=Bu,gc.elements[14]=Jg,Jg>0?gc:null},"makeTransformFromTouchAnchors"));f(this,"updateTouchOrigin",o(()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top},"updateTouchOrigin"));f(this,"touchToScene",o(r=>{this.touch.touches=[];for(let n=0,i=r.touches.length;n<i;n++){let a=r.touches[n],u=pE(a,this.touch.origin);this.touch.touches.push(new Ie(u.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(u.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]},"touchToScene"));f(this,"canScrollZoom",o(r=>{let n=xh(r),i=this.getZoomAltitude();return!(n<0&&i===this.getZoomScaledMax()||n>0&&i===this.getZoomScaledMin())},"canScrollZoom"));f(this,"mouseToScene",o(r=>{let n=this.getMousePos(r);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},"mouseToScene"));f(this,"getMousePos",o(r=>({x:r.offsetX,y:r.offsetY}),"getMousePos"));f(this,"handleMouseDownRotate",o(r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")},"handleMouseDownRotate"));f(this,"handleMouseDownPan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")},"handleMouseDownPan"));f(this,"handleMouseDownPedestal",o(r=>{let n=new Ie(r.clientX,r.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=ip(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")},"handleMouseDownPedestal"));f(this,"handleMouseMovePedestal",o(r=>{let n={x:r.clientX,y:r.clientY},i=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(i<this.minPedestal?i=Math.max(i,this.minPedestal):i>this.maxPedestal&&(i=Math.min(i,this.maxPedestal))),i!==this.getPedestal()&&this.setPedestal(i,!0)},"handleMouseMovePedestal"));f(this,"handleMouseMoveRotate",o(r=>{this.coords.rotateEnd.set(r.clientX,r.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")},"handleMouseMoveRotate"));f(this,"publishUserZoomDebounced",ju(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));f(this,"publishUserZoomEvent",o(()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())},"publishUserZoomEvent"));f(this,"setCameraMoving",o(()=>{this.cameraMoving=!0},"setCameraMoving"));f(this,"unsetCameraMoving",o(()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()},"unsetCameraMoving"));f(this,"setUserInteracting",o(()=>{this.userInteracting=!0},"setUserInteracting"));f(this,"unsetUserInteracting",o(()=>{this.userInteracting=!1},"unsetUserInteracting"));f(this,"publishPedestalChangeEvent",o(r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})},"publishPedestalChangeEvent"));f(this,"convertAltitudeToZoomLevel",o(r=>{let[,n]=this.center,i=this.computeMetersPerPixelFromAltitude(r),a=Math.cos(Fe.degToRad(n))*2*Math.PI*Qd/i;return Fe.clamp(Math.log2(a/512),Mm,Tm)},"convertAltitudeToZoomLevel"));f(this,"convertZoomLevelToAltitude",o(r=>this.computeMetersPerPixelFromZoomLevel(r)*this.options.canvasHeight/2/Math.tan(Fe.degToRad(this.camera.fov)/2),"convertZoomLevelToAltitude"));f(this,"completeTween",o(r=>{r.isPlaying()&&r.stop(),this.rendererState.internalTweenGroup.remove(r),this.tweens.delete(r)},"completeTween"));f(this,"debugContainer",new xo);this.camera=r,this.renderer=i,this.rendererState=a,this.scene=n,this.options=u,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,u.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,Lm)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get scrollPercent(){let r=this.minPedestal,n=this.maxPedestal,i=this.getPedestal();return i=Math.min(i,n),i=Math.max(i,r),(i-r)/(n-r)*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 a,u,c,m;let r=this.getPosition(),{lat:n,lon:i}=Rc((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(m=(c=this.rendererState.center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n]}setCenter(r,n){var u,c,m,d;let{x:i,y:a}=Nc((c=(u=this.rendererState.center)==null?void 0:u[1])!=null?c:0,(d=(m=this.rendererState.center)==null?void 0:m[0])!=null?d:0,n,r);this.setPosition(i,a)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(r=>r.cameraAnimation)}getCameraFrameForCoordinates(r,n){var v,b;let i=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,a=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,u=this.options.canvasWidth,c=this.options.canvasHeight,m=this.getRotation(),d=this.getTilt(),h=this.getPosition();this.setRotation((v=n.rotation)!=null?v:m,!0),this.setTilt((b=n.tilt)!=null?b:d,!0);let g=fE(r,{canvasWidth:u,canvasHeight:c,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:i,maxZoom:a,position:h,camera:this.camera,orbit:this.orbit});return this.setRotation(m,!0),this.setTilt(d,!0),{center:g.position,zoomLevel:this.convertAltitudeToZoomLevel(g.zoom)}}focusOn(r,n){if(qO){this.debugContainer&&Rt(this.debugContainer);let x=new Ri(4,4,4),E=new cr({color:65280,depthTest:!1}),I=new _n(x,E,r.length),D=new _r;r.forEach((C,A)=>{D.setPosition(C),I.setMatrixAt(A,D)}),I.instanceMatrix.needsUpdate=!0,this.debugContainer.add(I),this.scene.add(this.debugContainer)}let i=n.curve,a=n.callback,u=n.cancelledCallback,c=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,d=this.options.canvasWidth,h=this.options.canvasHeight,g;n.duration!==void 0?g=n.duration:y.env.TESTING==="true"?g=0:g=Ah;let v=n.padding,b=this.getRotation(),S=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let O=fE(r,{canvasHeight:h,paddingOption:v,canvasWidth:d,minZoom:c,maxZoom:m,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(b),this.setTilt(S),this.animateCamera({position:O.position,tilt:n.tilt,rotation:n.rotation,zoom:O.zoom},g,i,a,u,n)}resize(r,n){this.options.canvasWidth=r,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(r){let[,n]=this.center,i=Fe.clamp(r,Mm,Tm),a=Math.pow(2,i),u=Fe.clamp(n,Ih,Dh),c=a*512;return Math.cos(Fe.degToRad(u))*Math.PI*2*Qd/c}computeMetersPerPixelFromAltitude(r){return r*2*Math.tan(Fe.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};Lm=new WeakMap,o(Rm,"CameraSystem"),f(Rm,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);var lu=Rm;function fE(e,{canvasWidth:t,orbit:r,paddingOption:n,verticalPadding:i=0,canvasHeight:a,minZoom:u,maxZoom:c,camera:m,position:d}){let h={zoom:u,position:d};if(e.length===0)return h;for(let Ce of lu.CAMERA_FRAME_PADDING_SIDES)typeof n[Ce]!="number"&&(n[Ce]=0);let g=n.type==="portion"?{top:n.top*a,bottom:n.bottom*a,left:n.left*t,right:n.right*t,type:"pixel"}:n;if(g.left+g.right>=t||g.top+g.bottom>=a)return h;r.updateMatrixWorld();let v=m.matrixWorldInverse,b=m.fov*(Math.PI/180)/2,S=b,x=Math.atan(Math.tan(b)*(t/a)),E=new ue(1/0,1/0,1/0),I=new ue(-1/0,-1/0,-1/0),D=new Qt,C=new ue;for(let Ce=0,bt=e.length;Ce<bt;Ce++)C.copy(e[Ce]),D.expandByPoint(C),C.applyMatrix4(v),E.min(C),I.max(C),C.copy(e[Ce]),C.z-=i,C.applyMatrix4(v),E.min(C),I.max(C),C.copy(e[Ce]),C.z+=i,C.applyMatrix4(v),E.min(C),I.max(C);let A=I.x-E.x,T=I.y-E.y,k=t-g.left-g.right,j=a-g.top-g.bottom,U=(I.x+E.x)/2,G=(I.y+E.y)/2,$=A/k,X=T/j,V=u,Y=c,oe=V*Math.tan(x)*2,Z=Y*Math.tan(x)*2,ee=oe/t,te=Z/t,Q=Math.max($,X);Q=Fe.clamp(Q,ee,te);let de=k*Q,je=j*Q,Me={min:{x:U-de/2-g.left*Q,y:G-je/2-g.bottom*Q},max:{x:U+de/2+g.right*Q,y:G+je/2+g.top*Q}},Ve=(Me.min.x+Me.max.x)/2,qe=(Me.min.y+Me.max.y)/2,Ae=D.getCenter(new ue),ot=Math.abs(Ve-Me.min.x),Pt=Math.abs(qe-Me.min.y),Ht=ot/Math.tan(x),F=Pt/Math.tan(S),q=new ue;q.set(Ve,qe,I.z+Math.max(Ht,F)),q.applyMatrix4(m.matrixWorld);let B=new ue;B.set(Ve,qe,I.z),B.applyMatrix4(m.matrixWorld);let ae=new ue().subVectors(B,q),J=(Ae.z-q.z)/ae.z,re=new ue().copy(q).add(ae.clone().multiplyScalar(J));return B.set(re.x,re.y,re.z),q.sub(B),{position:re,zoom:q.length()}}o(fE,"getCameraFrameForPoints");var JO=0,XO=90,YO=(y.env.NODE_ENV==="test",!1),Nm={linear:dn.Linear.None,"ease-in":dn.Quadratic.In,"ease-out":dn.Quadratic.Out,"ease-in-out":dn.Quadratic.InOut},QO=-50,me,be,Fi,Ps,Ms,Bh,Ph=class Ph{constructor(t,r,n){_(this,Ms);_(this,me);_(this,be);_(this,Fi);_(this,Ps);W(this,me,t),W(this,be,r),W(this,Fi,n),s(this,me).map&&s(this,me).map.transform.setMinElevationForCurrentTile(QO),s(this,be).cameraSystem.on("pedestal-change",({pedestal:i})=>{s(this,be).cameraSystem.setCameraPlaneElevation(i)})}get center(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map).getCenter)==null?void 0:r.call(t).toArray():s(this,be).cameraSystem.center}setCenter(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setCenter(t),s(this,be).interactionSystem.handleHover();return}s(this,be).cameraSystem.setCenter(t[0],t[1]),s(this,be).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getZoom():s(this,be).cameraSystem.getZoomLevel()}setZoomLevel(t){var r;s(this,me).mode==="outdoors-overlay"&&s(this,me).map&&((r=s(this,me).map)==null||r.setZoom(t)),s(this,be).cameraSystem.setZoomLevel(Rn(t,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,be).cameraSystem.isAnimating}cancelAnimation(){s(this,be).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,be).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,be).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,be).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,be).panBoundsSystem.dirty=!0,s(this,be).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,be).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,r=!1){var i;r&&this.setAutoMinZoomLevel(!1);let n=Rn(t,pn.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(pn.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,be).cameraSystem.setMinZoomLevel(n),this.zoomLevel<n&&this.setZoomLevel(n),(i=s(this,me).map)==null||i.setMinZoom(n)}setMaxZoomLevel(t){var n;let r=Rn(t,this.minZoomLevel,pn.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(pn.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,be).cameraSystem.setMaxZoomLevel(r),this.zoomLevel>r&&this.setZoomLevel(r),(n=s(this,me).map)==null||n.setMaxZoom(r)}get maxPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMaxPitch)==null?void 0:r.call(t):Fe.radToDeg(s(this,be).cameraSystem.maxTilt)}get minPitch(){var t,r;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(r=(t=s(this,me).map)==null?void 0:t.getMinPitch)==null?void 0:r.call(t):Fe.radToDeg(s(this,be).cameraSystem.minTilt)}setMinPitch(t){var n;let r=Math.max(JO,t);(n=s(this,me).map)==null||n.setMinPitch(r),s(this,be).cameraSystem.minTilt=Fe.degToRad(r)}setMaxPitch(t){var n;let r=Math.min(XO,t);(n=s(this,me).map)==null||n.setMaxPitch(r),s(this,be).cameraSystem.maxTilt=Fe.degToRad(r)}get bearing(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getBearing():Fe.radToDeg(s(this,be).cameraSystem.getRotation())}setBearing(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setBearing(t);return}s(this,be).cameraSystem.setRotation(Fe.degToRad(t))}get pitch(){var t;return s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(t=s(this,me).map)==null?void 0:t.getPitch():Fe.radToDeg(s(this,be).cameraSystem.getTilt())}setPitch(t){var r;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map){(r=s(this,me).map)==null||r.setPitch(t);return}s(this,be).cameraSystem.setTilt(Fe.degToRad(Rn(t,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,be).cameraSystem.getPedestal()}setElevation(t){s(this,be).cameraSystem.setPedestal(t,!0)}animateElevation(t,r){return s(this,Ps)&&s(this,Ps).stop(),new Promise(n=>{var i;s(this,be).cameraSystem.animateCamera({position:{z:t}},(r==null?void 0:r.duration)||300,Nm[(r==null?void 0:r.easing)||"ease-in-out"],n,n,{interruptible:(i=r==null?void 0:r.interruptible)!=null?i:!0})})}get insetsPadding(){return s(this,Fi).insetsPadding}get panMode(){return s(this,be).cameraSystem.enablePan===!1&&s(this,be).cameraSystem.enablePedestal===!0?"elevation":"default"}setPanMode(t){if(t!=="default"&&t!=="elevation")throw new Error("Invalid pan mode");t!==this.panMode&&(t==="default"?(s(this,be).cameraSystem.enablePan=!0,s(this,be).cameraSystem.enablePedestal=!1):(s(this,be).cameraSystem.enablePan=!1,s(this,be).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Fi).insetsPadding=Object.assign({},s(this,Fi).insetsPadding,t)}animateTo(t){var u,c,m,d,h,g;if(s(this,me).mode==="outdoors-overlay"&&s(this,me).map)return(g=s(this,me).map)==null||g.flyTo({center:(u=t.center)!=null?u:this.center,zoom:(c=t.zoomLevel)!=null?c:this.zoomLevel,bearing:(m=t.bearing)!=null?m:this.bearing,pitch:(d=t.pitch)!=null?d:this.pitch,duration:(h=t.duration)!=null?h:600}),Promise.resolve();let r=t.center?s(this,me).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0,n=t.zoomLevel!==void 0?s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.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,i=t.bearing!==void 0?Fe.degToRad(t.bearing):void 0,a=t.pitch!==void 0?Fe.degToRad(Rn(t.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(v=>{var b;s(this,be).cameraSystem.animateCamera({position:r,zoom:n,rotation:i,tilt:a},t.duration||0,Nm[t.easing||"ease-in-out"],()=>{s(this,be).interactionSystem.handleHover(),v()},v,{interruptible:(b=t==null?void 0:t.interruptible)!=null?b:!0})})}getCameraFrameForCoordinates(t,r){let n=dt(this,Ms,Bh).call(this,r||{},()=>Promise.resolve()),{pointCloud:i}=hE(t,s(this,me),s(this,Fi).geometry3DMap);if(i.length===0)return De.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};let{center:a,zoomLevel:u}=s(this,be).cameraSystem.getCameraFrameForCoordinates(i,n);return{center:s(this,me).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,r){var u,c,m,d;let{pointCloud:n,geoBounds:i,firstPosition:a}=hE(t,s(this,me),s(this,Fi).geometry3DMap);return n.length===0?(De.error("No valid coordinates found in targets:",t),Promise.resolve()):s(this,me).mode==="outdoors-overlay"&&s(this,me).map?(n.length===1&&a?(u=s(this,me).map)==null||u.flyTo({center:[a[0],a[1]],duration:(r==null?void 0:r.duration)||s(this,me).map.getBearing(),animate:!0,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,zoom:(r==null?void 0:r.maxZoomLevel)||s(this,me).map.getMaxZoom()}):(YO&&eB(s(this,me),i),(d=s(this,me).map)==null||d.fitBounds(i,{duration:(c=r==null?void 0:r.duration)!=null?c:pn.DEFAULT_ANIMATION_DURATION,bearing:(r==null?void 0:r.bearing)===void 0?s(this,me).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,me).map.getPitch():r==null?void 0:r.pitch,maxZoom:(m=r==null?void 0:r.maxZoomLevel)!=null?m:s(this,me).map.getMaxZoom()})),s(this,be).interactionSystem.handleHover(),Promise.resolve()):new Promise(h=>{s(this,be).cameraSystem.focusOn(n,dt(this,Ms,Bh).call(this,r||{},h))})}};me=new WeakMap,be=new WeakMap,Fi=new WeakMap,Ps=new WeakMap,Ms=new WeakSet,Bh=o(function(t,r){var n;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(t==null?void 0:t.minZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(Rn(t.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:t!=null&&t.padding?Object.assign({},Lc,t==null?void 0:t.padding):this.insetsPadding,curve:Nm[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:Fe.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?Fe.degToRad(Rn(t.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:t==null?void 0:t.duration,callback:o(()=>{s(this,be).interactionSystem.handleHover(),r()},"callback"),cancelledCallback:r,interruptible:(n=t==null?void 0:t.interruptible)!=null?n:!0,verticalPadding:t==null?void 0:t.verticalPadding}},"#convertToLegacy"),o(Ph,"Camera");var jm=Ph;function Oh(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}o(Oh,"updateBounds");function hE(e,t,r){var c;let n=[],i=[1/0,1/0,-1/0,-1/0],a=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:i,firstPosition:a};let u=t.getSystems().renderSystem;for(let m of e)if(typeof m=="string"){(u.threeDdirty||u.twoDdirty)&&t.renderSync();let d=r.get(m);if(!d){De.error("Entity not found with id:",m);continue}let h=new Qt;My(t,"userData"in d&&(c=d.userData.entityId)!=null?c:d.id,n,h,d instanceof Ut?d.position.z:void 0);let g=t.convert3DMapPositionToCoordinate(h.min),v=t.convert3DMapPositionToCoordinate(h.max);Oh(i,g),Oh(i,v),a||(a=t.convert3DMapPositionToCoordinate(h.getCenter(new ue)))}else n.push(t.convertTo3DMapPosition(m[1],m[0],m[2]||0)),Oh(i,m),a||(a=m);return{pointCloud:n,geoBounds:i,firstPosition:a}}o(hE,"processTargets");function eB(e,t){var n,i,a,u;let r=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(i=e.map)!=null&&i.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(a=e.map)==null||a.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:r}}}),(u=e.map)==null||u.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}o(eB,"drawBounds");var Mh="";var mu=!1,tB=150,kh=class kh extends Te{constructor(r,n,i=!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 qr(new Se(0,0,0,0)));f(this,"interactiveCollidersQTree",new qr(new Se(0,0,0,0)));f(this,"coreState");f(this,"postMessage");f(this,"showCollisionBoxes",o(()=>{mu=!0,this.debugCanvas.style.display="block"},"showCollisionBoxes"));f(this,"hideCollisionBoxes",o(()=>{mu=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"},"hideCollisionBoxes"));f(this,"currentMsgId","");f(this,"working",!1);f(this,"_postMessage",o(()=>{this.worker.postMessage(this.packedMessage)},"_postMessage"));f(this,"componentArray",[]);f(this,"update",o((r,n,i="bottom-left",a=!1,u=[])=>{let c=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let h;for(let g of this.coreState.geometry2DIdsInScene){let v=this.coreState.geometry2DMap.get(g);v&&(h=v.components[0],this.componentArray.push(h))}this.resize(r,n,i),this.collidersDirty=!1,c=!0}else c=this.componentArray.some(h=>h.collisionDirty===!0);c&&this.componentArray.sort((h,g)=>g.rank-h.rank);let m=0;for(let h of u)this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=[[h.h/2,h.h/2,h.w/2,h.w/2,hp]],this.packedMessage[0][m][1]=1,this.packedMessage[0][m][2]=1,this.packedMessage[0][m][3]=h.x,this.packedMessage[0][m][4]=h.y,this.packedMessage[0][m][5]=0,this.packedMessage[0][m][6]=-1,m++;let d=0;for(;m<this.componentArray.length+u.length;){if(this.packedMessage){let h=this.componentArray[d].toPackedMessage(a&&!c);this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=h.bboxes,this.packedMessage[0][m][1]=h.enabled&&this.componentArray[d].visible&&!this.componentArray[d].isOccluded?1:0,this.packedMessage[0][m][2]=h.rank===la?1:0,this.packedMessage[0][m][3]=h.x,this.packedMessage[0][m][4]=h.y,this.packedMessage[0][m][5]=h.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][m][6]=h.lockedToStrategyIndex}m++,d++}this.working||this.postMessage()},"update"));f(this,"resolve",o(r=>{if(this.working=!1,this.collidersDirty||!r.data)return;let n=r.data.colliders,i=-1,a,u,c,m=new Se(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new qr(m),this.interactiveCollidersQTree=new qr(m),mu)for(let d of r.data.staticColliders)this.visibleCollidersQTree.insert(new Se(d.x,d.y,d.w,d.h));for(let d=0;d<this.componentArray.length;d++){let h=this.componentArray[d];n[d]!=null&&(i=n[d][0],a=n[d][2],h.offscreen=n[d][1]===1,i!==-1&&a!=null?(c=new Se(a.x,a.y,a.w,a.h,{entityId:h.id}),this.visibleCollidersQTree.insert(c),u=this.coreState.geometry2DMap.get(h.id),(u==null?void 0:u.components[1])!=null&&this.interactiveCollidersQTree.insert(c),(h.canShow===!1||h.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate="show"),i!==-1&&i!==h.currentStrategyIndex&&(h.activeBoundingBox=c,h.onStrategySelected(i))):((h.canShow===!0||h.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in h&&(h.visibilityNeedsUpdate="hide"),i!==-1&&i!==h.currentStrategyIndex&&h.onStrategySelected(i)))}mu&&this.drawDebug(),this.publish("visibility-changed")},"resolve"));f(this,"drawDebug",o(()=>{mu&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))},"drawDebug"));f(this,"destroy",o(()=>{this.worker.terminate()},"destroy"));this.worker=i===!1?new $u:Mh!==""?new Worker(Mh):new Worker(URL.createObjectURL(new Blob([E4],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new $u,this.worker.onmessage=a=>this.resolve(a)},this.coreState=n,this.debugCanvas=r,this.debugContext=r.getContext("2d"),this.worker.onmessage=a=>this.resolve(a),this.postMessage=S4(this._postMessage,tB,!1),mu?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(r,n,i){this.packedMessage[6]=i,this.packedMessage[5]=n,this.packedMessage[4]=r,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};o(kh,"CollisionSystem");var Um=kh;l();l();l();l();var Lh=class Lh{constructor(t){f(this,"type");f(this,"event");this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};o(Lh,"Tap");var zm=Lh,Rh=class Rh{constructor(){f(this,"taps",[])}add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};o(Rh,"TapsController");var $m=Rh;l();function Nh(e){let t=new Set;for(let r of e){let n=r.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!t.has(n.parent);)n=n.parent,n instanceof Ut&&n.type==="group-container"&&n.visible&&n.components[0]&&t.add(n)}return Array.from(t)}o(Nh,"getUniqueIntersectedGroupContainers");var du,jh=class jh extends Te{constructor(r,n,i,a,u){super();f(this,"raycaster",new Ln);f(this,"state",{hovered3DEntity:void 0,hovered2DEntity:void 0,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 qr(new Se(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);_(this,du);f(this,"onPointerMoveRaf",o(r=>{this.lastPointerEvent=r,s(this,du)&&cancelAnimationFrame(s(this,du)),W(this,du,requestAnimationFrame(()=>{this.onPointerMove(r)}))},"onPointerMoveRaf"));f(this,"onPointerMove",o(r=>{r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor()},"onPointerMove"));f(this,"tapsControl",new $m);f(this,"onPointerDown",o(r=>{r.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:r.timeStamp,offsetX:r.offsetX,offsetY:r.offsetY},this.lastPointerEvent=r,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&(this.tapsControl.add(new zm(r)),this.touchesCount=Math.max(0,this.touchesCount+1)))},"onPointerDown"));f(this,"clickTimeout");f(this,"onPointerUp",o(r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this.lastPointerEvent=r,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(r);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)&&(r.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())},"onPointerUp"));f(this,"dirty3D",!0);f(this,"cachedHitBoxes",{entities:[]});f(this,"ndcPoint",new Ie);f(this,"debugPanel");this.isUserInteracting=u,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=i,this._container=r,this.coreState=n,this.worldPlane=a,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}getThreeDIntersectsFromXY(r){this.raycaster.setFromCamera(r,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(a=>{var u,c;return((u=a.object)==null?void 0:u.name)==="worldPlane"||((c=a.object)==null?void 0:c.visible)}),i=n.findIndex(a=>{var u;return((u=a.object)==null?void 0:u.name)==="worldPlane"});return i!==-1&&n.push(n.splice(i,1)[0]),n}getGroupContainerIntersectsFromXY(r){let n=this.getThreeDIntersectsFromXY(r),i;return n!=null&&n.length>0&&(i=Nh(n)),i}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){let n=r||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserInteracting())return;let{entity3D:i,entity2D:a,position:u,groupContainers:c}=this.intersect(n);(this.detect3DEntityHover(i)||this.detect2DEntityHover(a)||this.detect3DContainerHover(c))&&(this.state.hovered3DEntity=i,this.state.lastHover=i,this.state.hovered2DEntity=a,this.state.hovered3DContainers=c,this.publish("hover",{entity2D:this.state.hovered2DEntity,entity3D:this.state.hovered3DEntity,position:u,groupContainers:c})),this.handleCursor()}handleCursor(){var u;let r=!!(this.state.hovered3DEntity&&((u=this.state.hovered3DEntity)!=null&&u.components[2])||this.state.hovered2DEntity),n=!!this.state.interaction.mouseDownStart,i=this.state.interaction.isPanning,a=iB(r,i,n);this.cursor!==a&&(this.cursor=a,a==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(r){return this.state.hovered2DEntity!==r}handleClick(r){let n=this.intersect(r);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let r;for(let n of this.coreState.geometry3DIdsInScene)r=this.coreState.geometry3DMap.get(n),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model"||(r==null?void 0:r.type)==="path"||(r==null?void 0:r.type)==="custom-geometry")&&r.components[0].mesh&&!this.cachedHitBoxes.entities.includes(r.components[0].mesh)&&this.cachedHitBoxes.entities.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var E,I,D,C,A;let{offsetX:n,offsetY:i}=r,a=[n,i],u=this._quadtree.queryPoint(a),[c]=u.filter(T=>T.intersectsPoint(a));this.ndcPoint.x=n/this._container.clientWidth*2-1,this.ndcPoint.y=-(i/this._container.clientHeight)*2+1;let m=this.getThreeDIntersectsFromXY(this.ndcPoint),d=(E=m[0])==null?void 0:E.point,h=[],g=[],v=m.filter(T=>T.object.name!=="worldPlane");for(let T of v)T.object instanceof Oe&&T.object.material.depthTest===!1?h.push(T):g.push(T);let b=(D=(I=h[0])!=null?I:g[0])!=null?D:void 0,S,O;if(b!=null){if(S=aB(b.object,this.coreState.geometry3DMap),!S){let T=(C=b==null?void 0:b.instanceId)!=null?C:b==null?void 0:b.batchId;S=T!=null&&(b!=null&&b.object.userData.entities)?this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entities[T]):this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entityId)}S!=null&&S.components[2]&&(O=S)}let x=Nh(v);return{entity2D:((A=c==null?void 0:c.userData)==null?void 0:A.entityId)==="watermark"?{id:"watermark"}:this.coreState.geometry2DMap.get(c==null?void 0:c.userData.entityId),entity3D:O,position:d,groupContainers:x.length>0?x:void 0}}detect3DEntityHover(r){return this.state.lastHover!==r&&(this.state.lastHover&&EE(this.state.lastHover,!1,this.coreState),r&&EE(r,!0,this.coreState)),this.state.hovered3DEntity!==r}detect3DContainerHover(r){return!Ey(this.state.hovered3DContainers,r)}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.offsetX-this.state.interaction.mouseDownStart.offsetX,2)+Math.pow(r.offsetY-this.state.interaction.mouseDownStart.offsetY,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.onPointerMoveRaf,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,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 i,a,u;this.queueDebugMessage("CLICK \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.id," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var i,a,u;this.queueDebugMessage("HOVER \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.id," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,n){var a;let i=document.createElement("pre");i.style.maxWidth="300px",i.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",i.style.backgroundColor=n,i.textContent=r,(a=this.debugPanel)==null||a.prepend(i),setTimeout(()=>{i.style.opacity="0",setTimeout(()=>{i.remove()},500)},2500)}getCursor(){return this.cursor}};du=new WeakMap,o(jh,"InteractionSystem");var Ts=jh;function EE(e,t,r){var u;let n=e.components[2];n&&n.hover!==!0&&(n.hover=t?"user-interaction":!1,n.dirty=!0);let i=(u=e.components[0].textMesh)==null?void 0:u.userData.entityId;if(!i)return;let a=r.geometry3DMap.get(i);(a==null?void 0:a.type)==="text3d"&&(a.components[1].hoverByPolygon=t,a.components[1].dirty=!0)}o(EE,"updateHover");function iB(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}o(iB,"processCursor");function oB(e){let t=e;for(;t!=null&&t.parent;){if(t instanceof ji)return;if(t.userData.isSingleModel)return t;t=t.parent}}o(oB,"findModelParent");function aB(e,t){let r=oB(e);return r?t.get(r.userData.entityId):void 0}o(aB,"findModelParentEntity");l();l();var $o,ti,Gm,io,CE,_s,Zm,IE,DE,Ls,Vm,Rs,Ns,Wm,Uh=class Uh{constructor(t){_(this,io);_(this,$o,null);_(this,ti);f(this,"getCurrentSceneGLTF",o(async t=>{let r=R({onlyVisible:!0,binary:!0,light:!0,scale:1},t),n=await dt(this,io,CE).call(this),i=s(this,Gm).call(this,r),a=await n.parseAsync(i,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),u;if(a instanceof ArrayBuffer)u=new Blob([a],{type:"application/octet-stream"});else{let c=JSON.stringify(a,null,2);u=new Blob([c],{type:"text/plain"})}return u},"getCurrentSceneGLTF"));_(this,Gm,o(t=>{let{scale:r,light:n,onlyVisible:i}=t,a=new ji,u=new Qt().setFromObject(s(this,ti).entityScene);if(s(this,_s).call(this,s(this,ti).entityScene,a,i),n){let c=new Mc(16777215,.3*Math.PI);c.position.set(0,Math.max(u.max.x,u.max.y)*r*.5,u.max.y*r*4),c.lookAt(0,0,-1),c.target.position.set(0,0,-1),c.add(c.target),a.add(c)}return a},"#getExportedScene"));_(this,_s,o((t,r,n)=>{t.material&&(t instanceof Oc?dt(this,io,IE).call(this,t).forEach(i=>r.add(i)):t instanceof Tu&&r.add(dt(this,io,DE).call(this,t))),t.children.forEach(i=>{(!n||i.visible)&&s(this,_s).call(this,i,r,n)})},"#processObject3D"));_(this,Zm,o((t,r,n)=>{let i=new ku({color:new Mt(t),metalness:0});return i.opacity=r,i.transparent=n,i},"#createStandardMaterial"));_(this,Ls,o(t=>{let{geometry:r,material:n,position:i,rotation:a,quaternion:u,scale:c}=t;if(!(r!=null&&r.isBufferGeometry))return t;let m=r.attributes.position,d=r.attributes.normal,h=r.attributes.uv;return s(this,Vm).call(this,m,d),s(this,Ns).call(this,i,c,a,u),h&&s(this,Wm).call(this,h),n!=null&&n.map&&r.type==="PlaneGeometry"&&(t.side=oi),t},"#convertGeometry"));_(this,Vm,o((t,r)=>{let n=new ue,i=new ue;for(let a=0;a<t.count;a++)n.fromBufferAttribute(t,a),s(this,Rs).call(this,n),t.setXYZ(a,n.x,n.y,n.z),r&&(i.fromBufferAttribute(r,a),s(this,Rs).call(this,i),r.setXYZ(a,i.x,i.y,i.z))},"#convertAttributes"));_(this,Rs,o(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));_(this,Ns,o((t,r,n,i)=>{let a=t.y;t.y=t.z,t.z=-a;let u=r.y;if(r.y=r.z,r.z=u,n instanceof ia)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let c=i.y;i.set(i.x,i.z,-c,i.w)}},"#convertObjectProperties"));_(this,Wm,o(t=>{for(let r=0;r<t.count;r++){let n=t.getX(r),i=t.getY(r);t.setXY(r,n,i)}},"#convertUVs"));W(this,ti,t),s(this,ti).entityScene=t.entityScene,s(this,ti).geometry3DMap=t.geometry3DMap}destroy(){W(this,$o,null)}};$o=new WeakMap,ti=new WeakMap,Gm=new WeakMap,io=new WeakSet,CE=o(async function(){if(!s(this,$o)){let{GLTFExporter:t}=await import("./GLTFExporter-ZNG777AV.js");W(this,$o,new t)}return s(this,$o)},"#getGLTFExporter"),_s=new WeakMap,Zm=new WeakMap,IE=o(function(t){var u,c;let r=[],i=((u=t.userData)!=null&&u.entities?Object.values((c=t.userData)==null?void 0:c.entities):[]).map(m=>s(this,ti).geometry3DMap.get(m)),a=new Map;return i.forEach(m=>{var b;if(!m||!(m instanceof et))return;let d=m.components[1],h=m.components[2];if(!d.visible||d instanceof jn&&d.opacity===0||d instanceof Uu||d instanceof Uc)return;let g=h!=null&&h.hover?d.hoverColor||s(this,ti).hoverColor:d.color,v="".concat(g,"-").concat(d.opacity,"-").concat(Number(d.visible));a.has(v)||a.set(v,[]),(b=a.get(v))==null||b.push(m)}),a.forEach((m,d)=>{let[h,g,v]=d.split("-"),b=m.reduce((E,I)=>{if(I.type==="custom-geometry")return E;let D=I.components[0];return"geometry"in D&&D.geometry instanceof wc&&E.push(D.geometry),E},[]),S=s(this,Zm).call(this,h,Number(g),t.material.transparent),O=Kr(b,!0),x=new Oe(O,S);x.position.copy(t.position),x.rotation.copy(t.rotation),x.scale.copy(t.scale),x.visible=!!v,s(this,Ns).call(this,x.position,x.scale,x.rotation,x.quaternion),r.push(s(this,Ls).call(this,x))}),r},"#processBatchedMesh"),DE=o(function(t){let r=t.geometry.clone(),n=t.material,i=new cr({color:n.color,side:oi});i.opacity=n.opacity,i.transparent=n.transparent;let a=new Tu(r,i);return a.position.copy(t.position),a.rotation.copy(t.rotation),a.scale.copy(t.scale),a.visible=t.visible,s(this,Ls).call(this,a)},"#processLineSegments"),Ls=new WeakMap,Vm=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,Wm=new WeakMap,o(Uh,"ExporterSystem");var ks=Uh;l();l();var uB="gray",sB=.1,js=100,zh=new Nn.ClipperOffset;function cB(e,t){zh.Clear(),t/=2;let r=e.map(i=>({X:i.x*js,Y:i.y*js}));zh.AddPath(r,Nn.JoinType.jtMiter,Nn.EndType.etClosedPolygon);let n=new Nn.Paths;return zh.Execute(n,t*js),n.length?n.map(a=>a.map(u=>({x:u.X/js,y:u.Y/js}))):[e]}o(cB,"offset");function Km(e,t,r){var b,S,O,x,E;let{color:n=uB,opacity:i=1,altitude:a=0,height:u=sB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a},center:{x:0,y:0,z:(u+a)/2}},d=e.geometry.coordinates[0].map(I=>{let D=t(I[1],I[0]);return c.min.x=Math.min(c.min.x,D.x),c.min.y=Math.min(c.min.y,D.y),c.max.x=Math.max(c.max.x,D.x),c.max.y=Math.max(c.max.y,D.y),D});((S=(b=e.properties)==null?void 0:b.style)==null?void 0:S.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((O=e.properties)==null?void 0:O.image)!=null?d=cB(d,((E=(x=e.properties)==null?void 0:x.style)==null?void 0:E.edgeOffset)||0):d=[d];let h=[];for(let I of d){let D=new aa;D.moveTo(I[0].x,I[0].y),I.slice(1).forEach(k=>D.lineTo(k.x,k.y)),D.lineTo(I[0].x,I[0].y);let C=e.geometry.coordinates.slice(1);D.holes=C.map(k=>{let j=k.map(G=>t(G[1],G[0])),U=new oa;return U.moveTo(j[0].x,j[0].y),j.slice(1).forEach(G=>U.lineTo(G.x,G.y)),U.lineTo(j[0].x,j[0].y),U});let A=Ru(r==null?void 0:r.bevel,u),T=new ua(D,A);T.userData={style:{color:n,opacity:i},usedBevelSettings:A},h.push(T)}if(h.length===1)return h[0];let g=Kr(h);h.forEach(I=>I.dispose());let v=Ru(r==null?void 0:r.bevel,u);return g.userData={style:{color:n,opacity:i},usedBevelSettings:v,_split:!0},g}o(Km,"renderPolygonGeometry");l();var lB="gray",mB=.1;function qm(e,t,r){let{color:n=lB,opacity:i=1,altitude:a=0,height:u=mB}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a}},m=Ru(r==null?void 0:r.bevel,u),d=[];e.geometry.coordinates.forEach(g=>{let v=new aa,b=g[0].map(x=>{let E=t(x[1],x[0]);return c.min.x=Math.min(c.min.x,E.x),c.min.y=Math.min(c.min.y,E.y),c.max.x=Math.max(c.max.x,E.x),c.max.y=Math.max(c.max.y,E.y),E});v.moveTo(b[0].x,b[0].y),b.slice(1).forEach(x=>v.lineTo(x.x,x.y)),v.lineTo(b[0].x,b[0].y);let S=g.slice(1);v.holes=S.map(x=>{let E=x.map(D=>t(D[1],D[0])),I=new oa;return I.moveTo(E[0].x,E[0].y),E.slice(1).forEach(D=>I.lineTo(D.x,D.y)),I.lineTo(E[0].x,E[0].y),I});let O=new ua(v,m);d.push(O)});let h=Kr(d);return d.forEach(g=>g.dispose()),h.translate(0,0,a||0),h.userData={style:{color:n,opacity:i},usedBevelSettings:m},h}o(qm,"renderMultiPolygonGeometry");l();var Sr=100,dB=.22,pB=.01;function SE(e,t,r={}){let{width:n=dB,height:i=pB,color:a="gray",opacity:u=1,altitude:c=0}=r,m={min:{x:1/0,y:1/0,z:c},max:{x:-1/0,y:-1/0,z:c+i}},d={bevelEnabled:!1,depth:i},h=new Nn.ClipperOffset,g=e.geometry.coordinates.map(O=>O.map(x=>t(x[1],x[0])));h.AddPaths(g.map(O=>O.map(x=>({X:x.x*Sr,Y:x.y*Sr}))),Nn.JoinType.jsMiter,Nn.EndType.etOpenRound);let v=new Nn.PolyTree;h.Execute(v,n/2*Sr);let b=[];for(let O of v.m_AllPolys){let x=new aa;if(O.IsHole())continue;m.min.x=Math.min(m.min.x,O.m_polygon[0].X),m.min.y=Math.min(m.min.y,O.m_polygon[0].Y),m.max.x=Math.max(m.max.x,O.m_polygon[0].X),m.max.y=Math.max(m.max.y,O.m_polygon[0].Y);let E=O.m_polygon;x.moveTo(E[0].X/Sr,E[0].Y/Sr),E.slice(1).forEach(I=>x.lineTo(I.X/Sr,I.Y/Sr)),x.lineTo(E[0].X/Sr,E[0].Y/Sr),x.holes=O.m_Childs.map(I=>{let D=new oa,C=I.m_polygon;return D.moveTo(C[0].X/Sr,C[0].Y/Sr),C.slice(1).forEach(A=>D.lineTo(A.X/Sr,A.Y/Sr)),D.lineTo(C[0].X/Sr,C[0].Y/Sr),D}),b.push(new ua(x,d))}let S=Kr(b);return S.translate(0,0,c||0),S.userData={style:{color:a,opacity:u}},h.Clear(),S}o(SE,"renderMultiLineStringGeometry");l();l();var pu=ie.object({type:ie.enum(["Point"]),coordinates:ie.array(ie.number()).min(2).max(3)});var fB=ie.object({rotation:ie.array(ie.number()).length(3).optional(),altitude:ie.number().optional(),scale:ie.array(ie.number()).length(3).optional(),interactive:ie.boolean().optional(),verticalOffset:ie.number().optional(),id:ie.union([ie.number(),ie.string()]).optional()}),hB=ie.object({type:ie.enum(["Feature"]),geometry:pu,properties:fB}),gB=ie.object({type:ie.enum(["FeatureCollection"]),features:ie.array(hB)}),yB=ie.object({color:ie.string()}),bB=ie.object({url:ie.string(),color:ie.string().optional(),opacity:ie.number().optional(),material:ie.record(ie.string(),yB).optional()});function AE(e,t,r){ie.union([ie.number(),ie.string()]).parse(e),gB.parse(t),bB.parse(r)}o(AE,"validateModelGroup");var Us,zs,$s,fu,On,$h=class $h{constructor(t){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);_(this,Us,!0);f(this,"color",new Mt);f(this,"clippingPlane");f(this,"position",new ue);_(this,zs,0);_(this,$s,1);_(this,fu,Hr.GEOMETRY);_(this,On,!1);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:s(this,Us)}set visible(t){W(this,Us,t),this.mesh&&(this.mesh.visible=t)}setOpacity(){}setColor(){}get altitude(){return s(this,zs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,zs,t))}getRotation(){return this.mesh?[this.mesh.rotation.x,this.mesh.rotation.y,this.mesh.rotation.z]:void 0}setRotation(t){this.mesh&&this.mesh.rotation.set(Fe.degToRad(t[0]),Fe.degToRad(t[1]),Fe.degToRad(t[2]))}getScale(){return this.mesh?[this.mesh.scale.x,this.mesh.scale.y,this.mesh.scale.z]:void 0}setScale(t){this.mesh&&this.mesh.scale.set(t[0],t[1],t[2])}get opacity(){return s(this,$s)}set opacity(t){var r,n,i;if(this.mesh){if(this.mesh.children[0]instanceof _n){for(let a of this.mesh.children)if(a instanceof _n){((r=a.userData)==null?void 0:r.originalOpacity)===void 0&&(a.userData.originalOpacity=a.material.opacity);let u=Co(t,0,(n=a.userData)==null?void 0:n.originalOpacity,0,1);a.material.opacity=u,a.material.transparent=u<1,a.material.needsUpdate=!0}}else(i=this.mesh)==null||i.traverse(a=>{a instanceof Oe&&a.material&&(Array.isArray(a.material)?a.material.forEach(u=>{wE(u,t)}):wE(a.material,t))});W(this,$s,t)}}get renderOrder(){return s(this,fu)}set renderOrder(t){var r;if(!(!this.mesh||t===s(this,fu)))if(W(this,fu,t),this.mesh.children[0]instanceof _n){this.mesh.renderOrder=t;for(let n of this.mesh.children)n instanceof _n&&(n.material.depthWrite=!s(this,On),n.material.depthTest=!s(this,On),n.material.needsUpdate=!0)}else(r=this.mesh)==null||r.traverse(n=>{n instanceof Oe&&n.material&&(n.renderOrder=t,Array.isArray(n.material)?n.material.forEach(i=>{i.depthWrite=!s(this,On),i.depthTest=!s(this,On),i.needsUpdate=!0}):(n.material.depthWrite=!s(this,On),n.material.depthTest=!s(this,On),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,On)}set visibleThroughGeometry(t){W(this,On,t)}};Us=new WeakMap,zs=new WeakMap,$s=new WeakMap,fu=new WeakMap,On=new WeakMap,o($h,"ModelComponent");var oo=$h;function wE(e,t){e.opacity!==t&&(t===1?(e.opacity=1,e.transparent=!1):(e.opacity=t,e.transparent=!0),e.needsUpdate=!0)}o(wE,"updateMaterialOpacity");l();function Jm(e){var c,m;let t=e.components[0],r=e.components[1];r.opacity!=null&&r.opacity!==t.opacity&&(t.opacity=r.opacity);let n=r.material,i=r.color;if(n||i){let d=vB(i,n);(c=t.mesh)==null||c.traverse(h=>{h instanceof Oe&&h.material&&(Array.isArray(h.material)?h.material.forEach(g=>{d[g.name]?(g.color.set(d[g.name].color),g.vertexColors=!1):g.color.set(i)}):d[h.material.name]?(h.material.color.set(d[h.material.name].color),h.material.vertexColors=!1):h.material.color.set(i))})}let a=(m=t.feature.geometry.coordinates[2])!=null?m:0,u=r.verticalOffset+a;t.altitude!==u&&(t.altitude=u),r.visible!==t.visible&&(t.visible=r.visible),r.rotation&&t.setRotation(r.rotation),r.scale&&t.setScale(r.scale),r.visibleThroughGeometry!==t.visibleThroughGeometry&&(t.visibleThroughGeometry=r.visibleThroughGeometry)}o(Jm,"applyModelGeometryStyle");function vB(e,t){let r={};if(t)for(let n in t)t[n].color&&(r[n]={color:t[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let i of n)r[i]||(r[i]={color:e})}return r}o(vB,"consolidateColorAndMaterial");function FE(e,t){var u,c;let r=e.components[0],i=(u=e.components[1].verticalOffset)!=null?u:0,a=r.feature.geometry.coordinates.slice();a[2]=((c=a[2])!=null?c:0)+i,r.mesh?r.mesh.position.copy(t(a)):r.position.copy(t(a))}o(FE,"applyModelPosition");function Oi(e){return e instanceof Tt?e.material:null}o(Oi,"getMaterial");function OE(e){return e.side===Pu?"back":e.side===vo?"front":"double"}o(OE,"getMaterialSide");function BE(e,t){e.side=t==="back"?Pu:t==="front"?vo:oi}o(BE,"setMaterialSide");function xB(e){let{color:t,opacity:r,topColor:n,texture:i,topTexture:a}=e;return"".concat(t).concat(r).concat(n||"").concat(i||"").concat(a||"")}o(xB,"generateIndex");var Gh=class Gh extends Te{constructor(r,n){super();f(this,"state");f(this,"convertTo3DMapPosition");f(this,"loader");f(this,"optimizePromise",[]);this.state=r,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:r}=await import("./GLTFLoader-QD4ZLTRH.js");return this.loader=new r,this.loader}createEntityFromFeature(r,n,i){var h,g,v,b;let a=new Tt(n),u=(h=n==null?void 0:n.properties)==null?void 0:h.bevel,c=i&&"bevel"in i?i.bevel:void 0,m;c?m=R(R({},u),c):u&&(m=u);let d=new et(a,new jn(xe(R({},i),{url:(v=(g=n.properties)==null?void 0:g.image)==null?void 0:v.path,bevel:m})));return i!=null&&i.outline&&(d.components[3]=new Zy(Hy(i.color))),i!=null&&i.focusable&&(d.components[4]=new zu),((b=n.properties)==null?void 0:b.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?d.components[6]=new Io(n.properties.textures.find(S=>S.face==="side"),n.properties.textures.find(S=>S.face==="top")):(i!=null&&"texture"in i&&i.texture!=null||i!=null&&"topTexture"in i&&i.topTexture!=null)&&(d.components[6]=new Io(i.texture,i.topTexture)),d.id=r,d}createModelFromFeature(r,n,i){let a=new oo(n),u=R({},i);n.properties.verticalOffset!=null&&(u.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(u.rotation=n.properties.rotation),n.properties.scale!=null&&(u.scale=n.properties.scale);let c=new Uc(u),m=new et(a,c);return m.id=r,m}populateEntityMesh(r,n){let i=r.components[0];i.geometry=n,i.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},i.currentHeight=r.components[1].height,i.dirty=!1}async populateModelGroup(r,n,i){let a=new _r,u=new ia,c=new Sc,m=new ue,d=new zi,h=await this.getGLTFLoader(),g=new Promise(v=>{let b=o(O=>{"entities3D"in i.userData&&(i.userData.entities3D.size>1?O.scene.traverse(x=>{let E=x;if("isMesh"in E&&E.isMesh===!0){let I=new _n(E.geometry,E.material,r.size);I.userData={entities:{}},d.add(I),i.add(d)}}):(O.scene.traverse(x=>{"isMesh"in x&&x.isMesh===!0&&(x.position.set(0,0,0),x.rotation.set(0,0,0),x.scale.set(1,1,1),x.updateMatrix())}),d.add(O.scene),i.add(d),d.userData.isSingleModel=!0,d.userData.entityId=r.values().next().value,d.userData.type="model")),v()},"processGLTF");if(n.trimStart().startsWith("{")||n.startsWith("data:")&&n.includes("application/json")){let O=n.startsWith("data:")?atob(n.split(",")[1]):n;h.parse(O,"",b)}else h.load(n,b)});return this.optimizePromise.push(g.then(()=>{var S,O,x,E,I,D,C,A,T,k,j,U;let v=0,b;for(let G of r.values()){if(b=this.state.geometry3DMap.get(G),!b||(b==null?void 0:b.type)!=="model")continue;let $=b.components[0],X=b.components[1],V=b.components[0].feature;$.mesh=d,$.instanceIndex=v,Jm(b),b.components[1].dirty=!1;let{x:Y,y:oe}=this.convertTo3DMapPosition(V.geometry.coordinates[1],V.geometry.coordinates[0],0);$.position.set(Y,oe,$.altitude),u.set(Fe.degToRad((O=(S=X.rotation)==null?void 0:S[0])!=null?O:ha[0]),Fe.degToRad((E=(x=X.rotation)==null?void 0:x[1])!=null?E:ha[1]),Fe.degToRad((D=(I=X.rotation)==null?void 0:I[2])!=null?D:ha[2])),m.set((A=(C=X.scale)==null?void 0:C[0])!=null?A:fa[0],(k=(T=X.scale)==null?void 0:T[1])!=null?k:fa[1],(U=(j=X.scale)==null?void 0:j[2])!=null?U:fa[2]),c.setFromEuler(u),a.compose($.position,c,m),d.children.forEach(Z=>{!b||(b==null?void 0:b.type)!=="model"||!(Z instanceof _n)||(Z.setMatrixAt(v,a),Z.userData.entities[v]=b.id)}),$.mesh.userData.isSingleModel&&($.mesh.matrix.copy(a),$.mesh.matrix.decompose($.mesh.position,$.mesh.quaternion,$.mesh.scale)),v++}this.publish("model-loaded")})),d}populateEntityGroup(r){var c;let n,i,a,u;for(let m of r.values())u=this.state.geometry3DMap.get(m),u.components[0]instanceof Tt&&(i=u.components[0].feature,a=u.components[1],i.geometry.type==="Polygon"?(n=Km(i,this.convertTo3DMapPosition,a),(c=i.properties)!=null&&c.textures&&i.properties.textures.length>0&&Ky(n,i.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(u,n)):i.geometry.type==="MultiPolygon"?(n=qm(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="LineString"?(n=h4(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="MultiLineString"&&(n=SE(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)));return r}update(){var r;for(let n of this.state.geometryGroupIdsToLoad.values()){let i=this.state.geometry3DMap.get(n);if(i instanceof bn&&i.userData.dirty){if(i.userData.modelURL)i.userData.modelURL&&(this.populateModelGroup(i.userData.entities3D,i.userData.modelURL,i),i.userData.dirty=!1);else try{this.populateEntityGroup(i.userData.entities3D)}catch(c){De.warn(c)}let a,u={};for(let c of i.userData.entities3D.values()){a=this.state.geometry3DMap.get(c);let m=a==null?void 0:a.components[0];if((a==null?void 0:a.type)==="geometry"){let d=a.components[1],h=xB(d);u[h]===void 0&&(u[h]={style:d,entities:[]}),u[h].entities.push(a)}else m&&"mesh"in m&&m.mesh&&((r=m.mesh)==null?void 0:r.parent)!==i&&i.add(m.mesh)}for(let c in u){let m=Wy(u[c].entities,u[c].style);i.add(m)}for(let c of i.userData.entities3D.values())if(a=this.state.geometry3DMap.get(c),a!=null&&a.entities2D.size>0)for(let m of a.entities2D.values())m&&(a.attach(m),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),i.userData.dirty=!1}}return Promise.resolve()}};o(Gh,"MeshCreationAndOptimizationSystem");var Xm=Gh;l();var Zh=class Zh{constructor(t,r){f(this,"state");f(this,"dirty",!0);f(this,"domTree");this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.geometry2DMap.get(r.userData.entityId),t){let n=t.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(r),t){let n=t.components[0];n instanceof ui&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:t.id},this.domTree.appendChild(n.markerContainer),n.updateDimensions())}this.dirty=!1}}};o(Zh,"DOMVisibilitySystem");var Ym=Zh;l();var Vh=class Vh{constructor(t,r){f(this,"state");f(this,"project");this.state=t,this.project=r}update(){let t,r=0,n=0,i,a;for(let u of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(u),t){a=t.components[0];let c=t.attachedTo?this.state.geometry3DMap.get(t.attachedTo):void 0;if(c instanceof et)if(this.state.geometry3DIdsInScene.has(c.id)){i=c.components[1],a=t.components[0],(i.dirty||t.components[0].attachedDirty)&&(r=i.height,n=i.altitude,t.setAltitude(r+n));let m=i.visible;a.visible!==m&&(a.visible=m)}else a.visible===!0&&(a.visible=!1);this.project(t.components[0].projection,t.position),t.components[0].attachedDirty=!1}}};o(Vh,"TwoDProjectionSystem");var Qm=Vh;l();l();l();var EB=o(function(){let t,r;return n=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*n,t.height=500*n,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),PE=o(({text:e,size:t,maxWidth:r,pixelRatio:n,maxLines:i=2,lineHeight:a=1.2,options:u={strokeText:!0}})=>{let c="bold ".concat(t*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:m}=EB(n);m.font=c;let d=[],h=e.split(" "),g=0,v=0,b=0;for(;v<h.length;){let E=h[v];if(g===i&&g>0){d[g-1]+="...";break}if(d[g]==null&&(d[g]=E,v++),h.length===1){d[g]=E;break}if(h[v]==null)break;let{width:I}=m.measureText(d[g]+" "+h[v]);I<=r*n?(d[g]+=" "+h[v],v++):g++}d.forEach(E=>{let{width:I}=m.measureText(E);b=Math.max(I,b)});let S=t*n*a,O=d.length*S;return{maxWidth:b,maxHeight:O,lines:d.length,draw:o((E,I,D)=>{d.length===1?(u.strokeText&&E.strokeText(d[0],I,D),E.fillText(d[0],I,D)):(u.strokeText&&(E.strokeText(d[0],I,D-S/2),E.strokeText(d[1],I,D+S/2)),E.fillText(d[0],I,D-S/2),E.fillText(d[1],I,D+S/2))},"draw")}},"shaveText");l();function ME(e){let t=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?t.src="data:image/svg+xml;base64,".concat(btoa(e)):t.src=e),t}o(ME,"createImage");var Hh=class Hh extends Te{constructor(r,n,i){super();f(this,"dirty",!1);f(this,"state");f(this,"colliderContext");f(this,"colliderCanvas");f(this,"transformRequestFunc");f(this,"transformRequest",o(async r=>this.transformRequestFunc?await this.transformRequestFunc(r):{url:r},"transformRequest"));f(this,"pinCache",{});f(this,"imageCache",{});f(this,"imagePromiseCache",{});f(this,"imageDimensionsCache",{});f(this,"textCache",{});f(this,"update",o(r=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let i,a,u,c,m,d,h;for(let g of this.state.geometry2DIdsInScene)if(h=this.state.geometry2DMap.get(g),h!=null&&(d=h.components[0],d instanceof ai&&!h.disposed)){if(m=d.appearance.iconVisible,d.appearance.icon!=null&&m!=null){let b=typeof m=="boolean"?m:r>=m;b!==d.iconVisible&&(d.iconVisible=b,d.dirty=!0)}if((d.dirty||this.dirty)&&d.calculatePinSize(),a={active:d.appearance.pinColor,inactive:d.appearance.pinColorInactive},u={active:d.appearance.pinOutlineColor,inactive:d.appearance.pinOutlineColorInactive},c=sa(d.pinSize,2),i="".concat(a.active,"-").concat(a.inactive,"-").concat(u.active,"-").concat(u.inactive,"-").concat(c,"-").concat(d.iconVisible),d.labelCacheId=i,(!this.pinCache[i]||this.dirty)&&(this.prepare(d,i,this.colliderContext),d.dirty=!0),(d.appearance.icon&&(!d.imageHash||d.pinDirty)||this.dirty)&&this.cacheImage(d),this.textCache[d.id]==null||d.textDirty||this.dirty){d.dirty=!0,this.textCache[d.id]={};let{textDrawFn:b,width:S,height:O}=this.processText(d.text,d.appearance.textSize,d.appearance.maxWidth,d.appearance.maxLines,d.appearance.lineHeight);["left","center","right"].forEach(x=>{this.textCache[d.id][x]=this.textToCanvas(b,d.appearance.textSize,x,S,O,d.appearance.textColor,d.appearance.textOutlineColor)}),d.dimensions={width:Math.ceil(S/n),height:Math.ceil(O/n)}}let v=1;if(d.appearance.iconScale)if(typeof d.appearance.iconScale=="number")v=d.appearance.iconScale;else{let{on:b,input:S,output:O,easing:x}=d.appearance.iconScale;b==="zoom-level"?v=Fy(r,S,O,x!=null?x:"linear"):De.warn("Unsupported interpolation property: ".concat(b))}d.recomputeCurrentStrategy(d.iconVisible?v:1),d.canShow&&d.visible&&(d.enabled||d.visibilityNeedsUpdate!==!1)&&this.draw(d,i,this.colliderContext),d.textDirty=!1,d.pinDirty=!1}this.dirty=!1},"update"));f(this,"processText",o((r,n,i,a,u)=>{let c=this.state.pixelRatio,{draw:m,maxWidth:d,maxHeight:h}=PE({text:r,size:n,pixelRatio:c,maxWidth:i,maxLines:a,lineHeight:u});return{textDrawFn:m,width:d+2.5*c*2,height:h+2.5*c*2}},"processText"));f(this,"textToCanvas",o((r,n,i,a,u,c,m)=>{let d=this.state.pixelRatio,h,g=a,v=u;window.OffscreenCanvas!=null&&!Ty()?h=new OffscreenCanvas(g,v):(h=document.createElement("canvas"),h.width=g,h.height=v,h.style.width=g+"px",h.style.height=v+"px");let b=h.getContext("2d",{willReadFrequently:!0});if(!b)return;let S=2.5*d;b.textAlign=i,b.font="bold ".concat(n*d,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),b.textBaseline="middle",b.lineJoin="miter",b.miterLimit=2,b.strokeStyle="white",b.lineWidth=S,b.fillStyle=c,b.strokeStyle=m;let O=i==="left"?S/2:i==="center"?g/2:g-S/2;return r(b,O,(v+S/2)/2),h},"textToCanvas"));f(this,"cacheImage",o(r=>{if(!r.appearance.icon)return;let n=Ly(r.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(i=>{this.transformRequest(r.appearance.icon).then(a=>{let u=ME(a.url);u.onload=()=>{this.imageCache[n]=u,this.publish("img:loaded"),i(u)}})})),r.imageHash!==n&&(r.imageHash=n,this.imagePromiseCache[n].then(()=>{r.dirty=!0}))},"cacheImage"));f(this,"createPinCanvas",o((r,n,i,a,u=1)=>{let c,m=this.state.pixelRatio,d=r.totalPinSize*2*m*u;window.OffscreenCanvas!=null?c=new OffscreenCanvas(d,d):(c=document.createElement("canvas"),c.width=d,c.height=d,c.style.width=d/m+"px",c.style.height=d/m+"px");let h=c.getContext("2d");return h.shadowColor="rgba(0,0,0,0.3)",h.shadowOffsetY=2*m,h.shadowBlur=5*m,h.beginPath(),h.arc(d/2,d/2,(n/2+2.5*m/2)*u,0,2*Math.PI),h.fillStyle=i,h.fill(),h.beginPath(),h.arc(d/2,d/2,n/2*u,0,2*Math.PI),h.shadowColor="transparent",h.fillStyle=a,h.fill(),c},"createPinCanvas"));f(this,"prepare",o((r,n,i)=>{let a=this.state.pixelRatio;i.lineWidth=4*a;let u=typeof r.appearance.iconScale=="number"?[r.appearance.iconScale]:r.appearance.iconScale==null?[]:r.appearance.iconScale.output,c=u.length>0?Math.max(...u):void 0,m=this.createPinCanvas(r,r.pinSize,r.appearance.pinOutlineColor,r.appearance.pinColor,c),d=this.createPinCanvas(r,3.5*a,r.appearance.pinOutlineColorInactive,r.appearance.pinColorInactive,c);this.pinCache[n]=[m,d]},"prepare"));this.state=r,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=i}draw(r,n,i){var h;if(!r.canShow||!r.visible)return;i.save(),i.globalAlpha=r.currentOpacity;let a=this.state.pixelRatio,u=r.projection.x*a,c=r.projection.y*a,m=r.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],d=r.style.pinVisibility===1?r.scaledPinSize*a:r.totalPinSize*a;if(r.style.pinVisibility!==0&&i.drawImage(m,u-d,c-d,d*2,d*2),r.appearance.icon&&r.iconVisible&&r.imageHash&&r.appearance.iconSize&&this.imageCache[r.imageHash]&&r.style.pinVisibility===1){let g=this.imageCache[r.imageHash],v=(r.scaledPinSize-r.scaledIconPadding)*a,b=r.appearance.iconFit,S=v,O=v,x="".concat(r.imageHash,"_").concat(b);if(this.imageDimensionsCache[x])S=this.imageDimensionsCache[x].width,O=this.imageDimensionsCache[x].height;else{let E=g.width*a,I=g.height*a;if(b==="contain"){let D=Math.sqrt(E**2+I**2),C=v/D;S=E*C,O=I*C}if(b==="cover"){let D=v/E,C=v/I,A=Math.max(D,C);S=E*A,O=I*A}}i.save(),i.beginPath(),i.arc(u,c,v/2,0,2*Math.PI),i.closePath(),((h=r==null?void 0:r.appearance)==null?void 0:h.iconOverflow)!=="visible"&&i.clip(),i.drawImage(g,u-S/2,c-O/2,S,O),i.restore()}r.style.textLabelVisible&&r.style.textAlign!=null&&r.style.left!=null&&r.style.top!=null&&i.drawImage(this.textCache[r.id][r.style.textAlign],u+r.style.left*a,c+r.style.top*a),i.restore()}};o(Hh,"TwoDDrawSystem");var ed=Hh;l();function wB(e,t){let r=e.components[2],n=e.components[1];return r!=null&&r.hover?[n.hoverColor||t,n.hoverColor||t]:[n.color,n.topColor||n.color]}o(wB,"processColor");var Kh=class Kh{constructor(t,r){f(this,"state");f(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=r,this.state=t}determineTextureVisiblity(t,r,n){let i=Oi(t);((i==null?void 0:i.texture)!=null||(i==null?void 0:i.topTexture)!=null)&&(n!=null&&n.hover&&i.texturesVisible?i.hideTextures(t.instanceIndex):i.texturesVisible||i.showTextures(t.instanceIndex),r.texture==null&&i.removeSideTexture(t.instanceIndex),r.topTexture==null&&i.removeTopTexture(t.instanceIndex))}update(){var i,a,u,c,m,d,h,g,v,b,S,O,x,E,I,D,C,A,T,k,j;let t,r,n;for(let U of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(U),n&&(n.type==="geometry"||n.type==="custom-geometry")&&((i=n.components[1])!=null&&i.dirty||(a=n.components[2])!=null&&a.dirty)){let G=n.components[0],$=n.components[1];r=n.components[2];let X=wB(n,this.state.hoverColor);G.setColor(X[0],X[1]);let V=Oi(G);if($.visible!==G.visible&&(G.visible=$.visible,G instanceof Tt&&G.textMesh)){let oe=this.state.geometry3DMap.get(G.textMesh.userData.entityId);(oe==null?void 0:oe.type)==="text3d"&&oe.components[0].polygonEntityId!=null&&(oe.components[0].visible=$.visible)}$.altitude!==G.altitude&&(G.altitude=$.altitude);let Y=$.opacity*da(n);if(Y!==G.opacity&&(G.opacity=Y),$.renderOrder!==G.renderOrder&&(G.renderOrder=$.renderOrder),V&&$.side!==OE(V)&&BE(V,$.side),G instanceof Tt&&$.shading!=null&&(((u=$.shading)==null?void 0:u.start)!==((c=Oi(G))==null?void 0:c.getGradientShading().start)||((m=$.shading)==null?void 0:m.end)!==((d=Oi(G))==null?void 0:d.getGradientShading().end)||((h=$.shading)==null?void 0:h.intensity)!==((g=Oi(G))==null?void 0:g.getGradientShading().intensity))&&((I=Oi(G))==null||I.setGradientShading((b=(v=$.shading)==null?void 0:v.start)!=null?b:0,(O=(S=$.shading)==null?void 0:S.end)!=null?O:0,(E=(x=$.shading)==null?void 0:x.intensity)!=null?E:0)),$.dirty=!1,G instanceof Tt){let oe=n.components[6];oe instanceof Io&&this.determineTextureVisiblity(G,oe,r)}n.components[2]&&(n.components[2].dirty=!1)}else if((n==null?void 0:n.type)==="model")n.components[1].dirty&&(Jm(n),n.components[1].dirty=!1),n.components[0].positionDirty&&(FE(n,this.convertTo3DMapPosition),n.components[0].positionDirty=!1);else if((n==null?void 0:n.type)==="image"&&((D=n.components[1])!=null&&D.dirty)){t=n.components[0];let G=n.components[1];G.visible!==t.visible&&(t.visible=G.visible),G.dirty=!1}else if((n==null?void 0:n.type)==="text3d"&&((C=n.components[1])!=null&&C.dirty)&&n.components[0].polygonEntityId!=null){t=n.components[0];let G=n.components[1];G.visible!=null&&G.visible!==t.visible&&(t.visible=G.visible);let{textMesh:$}=t;if($){Object.assign($,G.getState());let X=(A=G.hoverColor)!=null?A:this.state.text3dHoverColor;$.color=G.hoverByPolygon?X:(T=G.color)!=null?T:pa.color,$.outlineColor=G.hoverByPolygon?X:(k=G.outlineColor)!=null?k:pa.outlineColor,$.strokeColor=G.hoverByPolygon?X:(j=G.strokeColor)!=null?j:pa.strokeColor}G.dirty=!1}}};o(Kh,"DrawSystem");var td=Kh;l();var qh=class qh extends Te{constructor(r){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",o(()=>{var i;this.animating.clear();let r,n;for(let a of this.state.geometry2DIdsInScene)r=this.state.geometry2DMap.get(a),r&&(n=r.components[0],n instanceof ai&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(i=n.appearance.opacity)!=null?i:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")},"update"));f(this,"playAnimations");this.state=r,this.playAnimations=this._playAnimations}_playAnimations(){let r=performance.now();for(let[n,[i,a]]of this.animating.entries()){let u=a===1?this.showDuration:this.hideDuration,c=(r-this.startTime)/u;n.currentOpacity=Co(c,0,1,i,a,a===0?Sy:wy),r-this.startTime>=u&&(a===1?n.canShow=!0:a===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};o(qh,"TwoDVisibilitySystem");var rd=qh;l();var Jh=class Jh extends Te{constructor(r,n,i,a,u,c,m){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,"update",o((r=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(r){let i=this.commitRenderState();return this.paint(),i}else return this.frameId?Promise.resolve():new Promise((i,a)=>{this.frameId=requestAnimationFrame(()=>{var u,c;return((u=this.renderer)==null?void 0:u.renderer)==null?i():this.mode==="standalone"?(c=this.commitRenderState())==null?void 0:c.then(()=>{this.paint(),i()}).catch(m=>{a(m)}):i()})})},"update"));f(this,"animate2D",o(()=>{this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})},"animate2D"));f(this,"drawEntities2D",o(()=>{this.twoDFrameId||(this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel())}))},"drawEntities2D"));f(this,"updateEntities2D",o(()=>{this.twoDFrameId&&(cancelAnimationFrame(this.twoDFrameId),this.twoDFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})},"updateEntities2D"));f(this,"commitRenderState",o(()=>{try{let r=[];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(),_y(this.state.entityScene,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(),ky(this.state.entityScene,this.state.geometry3DIdsInScene,this.state.geometryGroupIdsToLoad),this.threeDdirty=!1,this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0,this.systems.outlineInterpolationSystem.geometries3DDirty=!0,this.systems.geometryInFocusSystem.focusablesDirty=!0);let n=this.systems.meshOptimizationSystem.update();n&&r.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()),r.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.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomLevel()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.systems.watermarkSystem.update();let i=this.needs2DRecompute;return this.nextFrame=requestAnimationFrame(()=>{this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height,this.systems.watermarkSystem.options.position,!i,this.systems.imageSystem.currentImageScreenBBoxes)}),this.systems.textureSystem.update(),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(r)}catch(r){return Promise.reject(r)}},"commitRenderState"));this.renderer=r,this.state=n,this.mode=i,this.scene=a,this.cameraObject=u,this.viewCamera=c,this.systems=m,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 r;(r=this.renderer)!=null&&r.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)}};o(Jh,"RenderSystem");var nd=Jh;l();var AB=ie.object({interactive:ie.boolean().optional(),id:ie.string().optional(),width:ie.union([ie.number(),ie.object({on:ie.literal("zoom-level").optional(),input:ie.array(ie.number()).nonempty(),output:ie.array(ie.number()).nonempty(),easing:ie.string().optional()})]).optional(),accentColor:ie.string().optional(),displayArrowsOnPath:ie.boolean().optional(),animateArrowsOnPath:ie.boolean().optional(),visibleThroughGeometry:ie.boolean().optional(),dashed:ie.boolean().optional()}),FB=ie.object({type:ie.enum(["Feature"]),geometry:pu,properties:ie.object({parentId:ie.any().optional()})});function TE(e,t){ie.object({features:ie.array(FB)}).parse(e),AB.parse(t)}o(TE,"validatePath");var Gs,Xh=class Xh{constructor(t,r){f(this,"type","path");f(this,"mesh",new zi);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 ue);_(this,Gs,0);var n,i,a,u,c,m;this.feature=t,this.options=r||{},this.width=(n=r==null?void 0:r.width)!=null?n:this.width,this.accentColor=(i=r==null?void 0:r.accentColor)!=null?i:this.accentColor,this.displayArrowsOnPath=(a=r==null?void 0:r.displayArrowsOnPath)!=null?a:this.displayArrowsOnPath,this.animateArrowsOnPath=(u=r==null?void 0:r.animateArrowsOnPath)!=null?u:this.animateArrowsOnPath,this.visibleThroughGeometry=(c=r==null?void 0:r.visibleThroughGeometry)!=null?c:this.visibleThroughGeometry,this.dashed=(m=r==null?void 0:r.dashed)!=null?m:this.dashed}setColor(){}setOpacity(){}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,Gs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,Gs,t))}set complete(t){this.material&&(this.material.uniforms.complete.value=t,this.material.needsUpdate=!0)}};Gs=new WeakMap,o(Xh,"PathComponent");var ao=Xh;l();var OB=300,Zs,Vs,Yh=class Yh{constructor(t){f(this,"state");_(this,Zs,new ue);_(this,Vs,new ue);this.state=t}update(t){var i;let r,n;this.state.cameraObject.getWorldPosition(s(this,Vs));for(let a of this.state.geometry2DIdsInScene)if(r=this.state.geometry2DMap.get(a),r&&(n=r.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||((i=n.animation)==null?void 0:i.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{r.object3d.getWorldPosition(s(this,Zs));let u=s(this,Vs).distanceTo(s(this,Zs));n.markerContainer.style.transform="translate3D(".concat(n.projection.x,"px, ").concat(n.projection.y,"px, ").concat(-u,"px)")}if(n.canShow===!0&&n.visible===!0?n.markerContainer.style.pointerEvents=t?"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:OB,easing:"ease-in-out",fill:"forwards"}),n.visibilityNeedsUpdate=!1)}}};Zs=new WeakMap,Vs=new WeakMap,o(Yh,"DOMDrawSystem");var id=Yh;l();var Qh=class Qh extends Te{constructor(r,n){super();f(this,"state");f(this,"dirty",!0);f(this,"domTree");f(this,"observers",new Map);f(this,"updateDimensions",o(r=>{r.forEach(n=>{var u;let a=(u=n.target.parentElement)==null?void 0:u.getAttribute("data-marker-id");if(a){let c=this.state.geometry2DMap.get(a),m=c==null?void 0:c.components[0];c&&m instanceof ui&&(m.updateDimensions(n.contentRect.width,n.contentRect.height),m.collisionDirty=!0)}}),this.publish("dimensions-update")},"updateDimensions"));this.state=r,this.domTree=n}setupObserver(){var i;if(this.observers){for(let a of this.observers.values())a.disconnect();this.observers.clear()}let r,n;for(let a of this.domTree.children){let u=a.getAttribute("data-marker-id");if(u!=null&&(r=this.state.geometry2DMap.get(u),n=r.components[0],(i=n.options)!=null&&i.dynamicResize)){let c=new ResizeObserver(this.updateDimensions);c.observe(n.containerEl),this.observers.set(a.userData.entityId,c)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let r of this.observers.values())r.disconnect();this.observers.clear()}};o(Qh,"DOMResizeSystem");var od=Qh;l();l();var kE="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}";l();var _E="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}";l();var LE=4.291666666666667,RE=15,NE=25,jE=43/60;l();var UE=["horizontal","icon"],BB=new Map([[UE[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>'],[UE[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>']]),PB=/<svg([^>]*)>/g;function zE(e,t,r,n){let i=BB.get(e);return i?i.replace(PB,'<svg$1 width="'.concat(r,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(t,';">')):""}o(zE,"getLogoIcon");l();var uo=class uo{constructor(){f(this,"loader");this.loader=new Pc}static getInstance(){return uo.instance||(uo.instance=new uo),uo.instance}getLoader(){return this.loader}load(t){return new Promise((r,n)=>{this.loader.load(t,r,void 0,n)})}};o(uo,"TextureLoaderSingleton"),f(uo,"instance");var eg=uo,so=eg.getInstance();var $E=!1,ct,Bi,hu,Zt,wr,Go,Bn,ri,tg=class tg extends Te{constructor(r,n,i){super();_(this,ct,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:o(()=>{window!=null&&window.open("https://www.mappedin.com")},"onClick"),interactive:!0,visible:!0});_(this,Bi);_(this,hu);_(this,Zt);_(this,wr);_(this,Go);_(this,Bn,0);_(this,ri,0);f(this,"dirty",!0);f(this,"getPositionAlignedCanvasCoordinates",o((r,n)=>({"top-left":{x:0,y:0},"top-right":{x:r,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:r,y:n},center:{x:r/2,y:n/2},top:{x:r/2,y:0},bottom:{x:r/2,y:n},left:{x:0,y:n/2},right:{x:r,y:n/2}})[s(this,ct).position],"getPositionAlignedCanvasCoordinates"));f(this,"getPositionAlignedPadding",o(()=>{var i,a,u,c;let r=s(this,ct).padding;if(typeof r=="number")return{"top-left":{x:r,y:r},"top-right":{x:-r,y:r},"bottom-left":{x:r,y:-r},"bottom-right":{x:-r,y:-r},center:{x:0,y:0},top:{x:0,y:r},bottom:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0}}[s(this,ct).position];let n={top:(i=r.top)!=null?i:0,right:(a=r.right)!=null?a:0,bottom:(u=r.bottom)!=null?u:0,left:(c=r.left)!=null?c:0};return{x:n.left-n.right,y:n.top-n.bottom}},"getPositionAlignedPadding"));i&&Object.entries(i).forEach(([a,u])=>{u!==void 0&&(s(this,ct)[a]=u)}),W(this,hu,r),W(this,Bi,n)}get color(){return s(this,ct).color==="light"?"white":"#293136"}get iconName(){return s(this,ct).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,ct).iconOnly?RE:75}get defaultWidth(){return s(this,ct).iconOnly?NE:150}get aspectRatio(){return s(this,ct).iconOnly?jE:LE}get options(){return R({},s(this,ct))}set options(r){var n,i;W(this,ct,{padding:r.padding||s(this,ct).padding,position:r.position||s(this,ct).position,iconOnly:r.iconOnly||s(this,ct).iconOnly,color:r.color||s(this,ct).color,scale:r.scale||s(this,ct).scale,onClick:s(this,ct).onClick,interactive:(n=r.interactive)!=null?n:s(this,ct).interactive,visible:(i=r.visible)!=null?i:s(this,ct).visible})}get icon(){return zE(this.iconName,this.color,s(this,Bn)*s(this,Bi).pixelRatio,s(this,ri)*s(this,Bi).pixelRatio)}setSize(r,n){s(this,wr)&&(s(this,wr).uniforms.uSize.value.x=r,s(this,wr).uniforms.uSize.value.y=n)}setXY(r,n){s(this,wr)&&(s(this,wr).uniforms.uSize.value.w=r,s(this,wr).uniforms.uSize.value.z=n)}get width(){return s(this,Bn)}get height(){return s(this,ri)}getPositionAlignedOffset(r,n){return{"top-left":{x:0,y:0},"top-right":{x:-r,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-r,y:-n},center:{x:-(r/2),y:-(n/2)},top:{x:-(r/2),y:0},bottom:{x:-(r/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-r,y:-(n/2)}}[s(this,ct).position]}insertIntoQuadTree(r){s(this,Go)!=null&&typeof s(this,ct).onClick=="function"&&s(this,ct).interactive&&r.insert(s(this,Go))}resize(r,n){if(s(this,ct).visible!==!0)return;let i=this.getPositionAlignedCanvasCoordinates(r,n),a=this.getPositionAlignedPadding(),u=this.getPositionAlignedOffset(s(this,Bn),s(this,ri)),c=Math.min(r-s(this,Bn),Math.max(0,i.x+a.x+u.x)),m=Math.min(n-s(this,ri),Math.max(0,i.y+a.y+u.y));this.setSize(s(this,Bn)/r,s(this,ri)/n),this.setXY(c/r,m/n),W(this,Go,new Se(c,m,s(this,Bn),s(this,ri),{entityId:"watermark"}))}update(){this.dirty&&(s(this,ct).visible===!0?(W(this,Bn,Math.min(s(this,Bi).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,ct).scale))),W(this,ri,s(this,Bn)/this.aspectRatio),so.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),r=>{if(W(this,wr,new Ni({uniforms:{uTexture:{value:r},uSize:{value:new oy(0,0,0,0)},uOpacity:{value:.7}},vertexShader:kE,fragmentShader:_E,depthWrite:!1,depthTest:!1,defines:{debug:$E},wireframe:$E,transparent:!0,visible:!0})),s(this,Zt))s(this,Zt).visible=!0,s(this,Zt).material=s(this,wr),s(this,Zt).material.needsUpdate=!0;else{let n=new yn(2,2,1,1);W(this,Zt,new Oe(n,s(this,wr))),s(this,Zt).position.set(0,0,-1),s(this,Zt).frustumCulled=!1,s(this,Zt).renderOrder=999;let i=new Ri(1,1,1),a=new Oe(i,new cr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));a.frustumCulled=!1,a.layers.set(1),s(this,Zt).add(a),s(this,hu).add(s(this,Zt))}this.resize(s(this,Bi).canvasWidth,s(this,Bi).canvasHeight),this.publish("texture-loaded")})):s(this,Zt)&&(s(this,Zt).visible=!1),this.dirty=!1)}destroy(){s(this,Zt)&&(s(this,hu).remove(s(this,Zt)),Rt(s(this,Zt))),W(this,Zt,void 0),s(this,wr)&&s(this,wr).dispose(),W(this,wr,void 0),W(this,Go,void 0)}};ct=new WeakMap,Bi=new WeakMap,hu=new WeakMap,Zt=new WeakMap,wr=new WeakMap,Go=new WeakMap,Bn=new WeakMap,ri=new WeakMap,o(tg,"WatermarkSystem");var ad=tg;l();var ud=100,kB=!1,rg=class rg extends Te{constructor(r,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=r,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new Qt,this.state.entityScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new ue(0,0,0),new ue(ud*2,ud*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.entityScene),this.currentTotalBoundingBox.expandByScalar(ud)));let r=new Qt().setFromObject(this.state.entityScene);this.currentTotalBoundingBox.union(r);let n=r.getSize(new ue),i=Math.max(n.x,n.y,n.z);for(let u of this.state.geometry2DMap.values())u.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(u.position),u.positionDirty=!1);let a=sd.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(i,ud)).getBoundingSphere(_B).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new ue),min:sd.min,max:sd.max,radius:a},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,kB&&this.state.entityScene.parent instanceof ji){this.debugMesh&&(this.state.entityScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new xo,this.debugMesh.add(new Oe(new Bc(this.cameraSystem.panBounds.radius),new cr({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.entityScene.parent.add(this.debugMesh);let u=new ue;sd.getSize(u);let c=new Ri(u.x,u.y,u.z),m=new cr({color:65280,wireframe:!0,transparent:!0,opacity:.5}),d=new Oe(c,m);d.position.copy(this.currentTotalBoundingBox.getCenter(new ue)),this.debugMesh.add(d)}}}};o(rg,"PanBoundsSystem");var cd=rg,sd=new Qt,_B=new uy;l();var Ws,Hs,ng=class ng{constructor(t,r){f(this,"mesh");f(this,"type","custom-geometry");f(this,"dirty",!0);f(this,"feature");f(this,"builder");f(this,"outline");_(this,Ws,1);f(this,"color",new Mt);_(this,Hs,0);this.mesh=new zi,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}set opacity(t){W(this,Ws,t)}get opacity(){return s(this,Ws)}setColor(t){this.color.set(t)}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return s(this,Hs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,W(this,Hs,t))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(t){this.mesh&&(this.mesh.renderOrder=t)}};Ws=new WeakMap,Hs=new WeakMap,o(ng,"CustomGeometryComponent");var gu=ng;l();var ig=class ig{constructor(t,r){f(this,"state");f(this,"convertTo3DMapPosition");this.state=t,this.convertTo3DMapPosition=r}update(){let t,r;for(let n of this.state.geometry3DIdsInScene){let i=this.state.geometry3DMap.get(n);(i==null?void 0:i.type)==="custom-geometry"&&(t=i.components[0],r=i.components[1],t.dirty&&r.visible!==!1&&(t.position.copy(this.convertTo3DMapPosition(t.feature.geometry.coordinates[1],t.feature.geometry.coordinates[0],r.altitude)),t.builder.setup(t.mesh),t.mesh.traverse(a=>{a.userData=xe(R({},a.userData),{entityId:n,type:"custom-geometry"})}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}}};o(ig,"CustomGeometrySystem");var ld=ig;l();l();function GE(e){return e.children.some(t=>t.userData.isOutline)}o(GE,"hasOutline");function ZE(e,t){var n;let r=e.userData.entities3D.values().next().value;return r?((n=t.geometry3DMap.get(r))==null?void 0:n.components[3])!==void 0:!1}o(ZE,"needsOutline");function md(e,t,r,n){let a=e.getAttribute("position").array,u=-1/0;for(let c=0;c<t.count;c++){let d=(t.start+c)*3,h=a[d+2];u=Math.max(u,h)}for(let c=0;c<t.count;c++){let d=(t.start+c)*3,h=a[d+2];Math.abs(h-u)<1e-4?a[d+2]=Math.max(r+n,2e-4+n):a[d+2]=n}e.attributes.position.needsUpdate=!0}o(md,"updateBufferGeometryHeight");l();function og(e){var d,h;let t=new wc,r=(d=e.mesh)==null?void 0:d.geometry;if(!r||!((h=e.batchedProps)!=null&&h.range))return;let n=e.batchedProps.range,i=n.start,a=n.count,u=r.getAttribute("position");if(u){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=u.array[b*3],g[v*3+1]=u.array[b*3+1],g[v*3+2]=u.array[b*3+2]}t.setAttribute("position",new vr(g,3))}let c=r.getAttribute("normal");if(c){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=c.array[b*3],g[v*3+1]=c.array[b*3+1],g[v*3+2]=c.array[b*3+2]}t.setAttribute("normal",new vr(g,3))}let m=r.getAttribute("uv");if(m){let g=new Float32Array(a*2);for(let v=0;v<a;v++){let b=i+v;g[v*2]=m.array[b*2],g[v*2+1]=m.array[b*2+1]}t.setAttribute("uv",new vr(g,2))}if(r.index){let g=r.index,v=new Uint32Array(a);for(let b=0;b<a;b++)v[b]=g.array[i+b];t.setIndex(new vr(v,1))}return t}o(og,"extractBufferGeometryFromBatchedGeometry");function VE(e,t,r){let n=og(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,r),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let i=t.addGeometry(n);t.addInstance(i),t.setMatrixAt(i,r);let a=t.getGeometryIdAt(i),u=t.getGeometryRangeAt(a);return u&&e.batchedProps&&(e.batchedProps.range=u),n.dispose(),i}o(VE,"transferGeometryToNewBatchedMesh");l();l();var WE="// 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}";l();var HE="// 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 ag=class ag extends ly{constructor(t){super(t),this.onBeforeCompile=r=>{r.vertexShader=WE,r.fragmentShader=HE}}};o(ag,"OutlineLineMaterial");var dd=ag;l();var Pn,Zo,co,lo,Ks,ug,sg=class sg{constructor(){_(this,Ks);_(this,Pn,[]);_(this,Zo,!1);_(this,co);_(this,lo)}get size(){return s(this,Pn).length}add(t){s(this,Pn).push(t),s(this,Zo)||dt(this,Ks,ug).call(this)}onComplete(t){W(this,co,t)}clearOnComplete(){W(this,co,void 0)}clearAll(){W(this,Pn,[]),W(this,Zo,!1),W(this,co,void 0),s(this,lo)!==void 0&&(cancelIdleCallback(s(this,lo)),W(this,lo,void 0))}};Pn=new WeakMap,Zo=new WeakMap,co=new WeakMap,lo=new WeakMap,Ks=new WeakSet,ug=o(function(){W(this,Zo,!0),W(this,lo,requestIdleCallback(t=>{let r=0;for(;s(this,Pn).length>0&&t.timeRemaining()>2;){let n=s(this,Pn).shift();n&&(n(),r++)}if(r===0&&s(this,Pn).length>0&&t.timeRemaining()<2){let n=s(this,Pn).shift();n&&n()}W(this,lo,void 0),s(this,Pn).length>0?dt(this,Ks,ug).call(this):(W(this,Zo,!1),s(this,co)&&s(this,co).call(this))},{timeout:3e3}))},"#processQueue"),o(sg,"IdleQueue");var Vo=sg;var NB=80,Wo,yu,fd,hd,gd,cg=class cg extends Te{constructor(r){super();f(this,"rendererState");f(this,"outlineOpacitiesDirty",!0);f(this,"useIdleFramesOnly",!0);_(this,Wo,!0);_(this,yu,-1/0);f(this,"idleBuildQueue",new Vo);f(this,"idleComputeBoundingSphereQueue",new Vo);_(this,fd,new Map);_(this,hd,new dd({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:vo}));_(this,gd,o(()=>{this.publish("needs-render")},"#publishRender"));this.rendererState=r,this.idleBuildQueue.onComplete(s(this,gd))}get geometries3DDirty(){return s(this,Wo)}set geometries3DDirty(r){W(this,Wo,r)}buildOutlines(r){var v;let n=[];for(let b of r.userData.entities3D.values()){let S=this.rendererState.geometry3DMap.get(b);if(S instanceof et&&S.type==="geometry"&&S.components[3]&&S.components[3].dirty===!0&&S.components[0].material!=null){let O=S.components[0].geometry,x=!1;O||(O=og(S.components[0]),x=!0);let E=S.components[1];n.push([S.components[3],new dy(O,(v=E.bevel)!=null&&v.enabled?1:NB)]),x&&(O==null||O.dispose(),O=void 0)}}if(n.length===0)return;let i=Kr(n.map(b=>b[1]),!1);if(i==null)return;let a=i.getAttribute("position"),u=new Float32Array(a.count*4),c=new vr(u,4);i.setAttribute("color",c);let m=new Uint8Array(a.count);m.fill(0);let d=new vr(m,1,!1);i.setAttribute("visibility",d);let h=0;for(let b=0;b<n.length;b++){let[S,O]=n[b],x=O.getAttribute("position").count;S.edgeColors=c,S.edgeVisibility=d,S.geometry=i,S.ranges={count:x,start:h},h+=x,O.dispose()}let g=new Tu(i,s(this,hd));g.userData.isOutline=!0,r.add(g)}update(r,n=!0){var u,c;let i;if(this.geometries3DDirty){for(let m of this.rendererState.geometry3DIdsInScene){let d=this.rendererState.geometry3DMap.get(m);d instanceof bn&&ZE(d,this.rendererState)&&!GE(d)&&d.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(d)):this.buildOutlines(d))}W(this,Wo,!1),this.outlineOpacitiesDirty=!0}for(let m of this.rendererState.geometry3DIdsInScene){let d=this.rendererState.geometry3DMap.get(m);if(d instanceof et&&d.type==="geometry"&&d.components[3]&&d.components[3].dirty===!0&&d.components[0].material!=null&&d.parentObject3D instanceof bn){let h=d.components[3].geometry;if(!h)continue;let g=d.components[3];if(!g)continue;let v=g.enabled&&d.components[1].visible;if(g.visible!==v&&(g.visible=v),!g.visible)continue;let b=g.edgeColors;if(!b||!g.ranges)continue;let S=new Mt(g.color);for(let I=0;I<g.ranges.count;I++){let D=g.ranges.start+I;b.setXYZ(D,S.r,S.g,S.b)}let O=d.components[1].height,x=d.components[1].altitude;((c=(u=d.components[1])==null?void 0:u.bevel)==null?void 0:c.enabled)||md(h,g.ranges,O,x),h.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>h.computeBoundingSphere()),g.dirty=!1}}let a=n?Co(r,16,19,0,1):s(this,yu);if((a!==s(this,yu)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DIdsInScene.size>0){for(let m of this.rendererState.geometry3DIdsInScene)if(i=this.rendererState.geometry3DMap.get(m),(i==null?void 0:i.type)==="geometry"&&i.components[0]instanceof Tt){let d=i.components[3];if(d&&d.edgeColors&&d.geometry&&d.visible){let h=Math.min(a,i.components[1].opacity*da(i));if(d.currentOpacity!==h){for(let g=0;g<d.ranges.count;g++){let v=d.ranges.start+g;d.edgeColors.setW(v,h)}d.geometry.attributes.color.needsUpdate=!0}}}}W(this,yu,a),W(this,Wo,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,fd).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};Wo=new WeakMap,yu=new WeakMap,fd=new WeakMap,hd=new WeakMap,gd=new WeakMap,o(cg,"OutlineInterpolationSystem");var pd=cg;l();l();var lg=class lg extends Oe{constructor(){super(...arguments);f(this,"userData",{entityId:""})}};o(lg,"EntityMesh");var yd=lg,jB=ie.object({flipImageToFaceCamera:ie.boolean().optional(),url:ie.string()}),UB=ie.object({type:ie.enum(["Feature"]),properties:ie.object({width:ie.number(),height:ie.number(),rotation:ie.number().min(0).max(360).optional(),verticalOffset:ie.number().optional()}),geometry:pu});function KE(e,t,r){ie.union([ie.number(),ie.string()]).parse(e),UB.parse(t),jB.parse(r)}o(KE,"validateImage");var mg=class mg{constructor(t){f(this,"mesh",new zi);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 ue);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:!1}set visible(t){this.mesh&&(this.mesh.visible=t)}};o(mg,"ImageComponent");var bd=mg;l();function dg(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}}o(dg,"rotatePoint");function zB(e,t){return e.map(r=>dg(r,t))}o(zB,"rotatePoints");function $B(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}o($B,"getBounds");function GB(e,t){let r=!1;for(let n=0,i=t.length-1;n<t.length;i=n++){let a=t[n].x,u=t[n].y,c=t[i].x,m=t[i].y;u>e.y!=m>e.y&&e.x<(c-a)*(e.y-u)/(m-u)+a&&(r=!r)}return r}o(GB,"pointInPolygon");function qE(e,t,r,n,i){for(let a=0;a<i;a++)for(let u=0;u<n;u++)if(e[r+a][t+u]!==1)return!1;return!0}o(qE,"isValidRectangle");function ZB(e,t,r){let n=e.maxX-e.minX,i=e.maxY-e.minY,a,u,c=R({},e);return n/i>t?(u=i/r,a=u*t,c.minX+=(n-a*r)/2):(a=n/r,u=a/t,c.minY+=(i-u*r)/2),{dx:a,dy:u,gridBounds:c}}o(ZB,"calculateGridDimensions");function VB(e,t,r,n,i){let a=Array(r).fill(0).map(()=>Array(r).fill(0));for(let u=0;u<r;u++)for(let c=0;c<r;c++){let m={x:t.minX+c*n,y:t.minY+u*i};GB(m,e)&&(a[u][c]=1)}return a}o(VB,"createAndFillGrid");function WB(e,t){let r=Array(t).fill(0).map(()=>Array(t).fill(0));for(let n=0;n<t;n++)for(let i=0;i<t;i++)if(e[n][i]===1){let a=0;for(let u=1;u<=Math.min(t-i,t-n)&&qE(e,i,n,u,u);u++)a=u;r[n][i]=a}return r}o(WB,"calculateRectSizes");function HB(e,t,r,n,i,a){let u=0,c=0,m=0;for(let d=0;d<n;d++)for(let h=0;h<n;h++)if(e[d][h]===1){let g=Math.pow(t[d][h],2),v=r.minX+h*i,b=r.minY+d*a;u+=g,c+=v*g,m+=b*g}return{x:c/u,y:m/u}}o(HB,"calculatePolygonCenter");function KB(e,t,r,n,i,a,u){let c=-1/0,m=null,d=e.length,h=Math.sqrt(Math.pow(t.maxX-t.minX,2)+Math.pow(t.maxY-t.minY,2));for(let g=0;g<d;g++)for(let v=0;v<d;v++)if(e[g][v]===1)for(let b=1;b<=d-v;b++){let S=b;if(!(S>d-g)&&qE(e,v,g,b,S)){let O=b*S,x=t.minX+(v+b/2)*r,E=t.minY+(g+S/2)*n,I={x,y:E},C=Math.sqrt(Math.pow(I.x-i.x,2)+Math.pow(I.y-i.y,2))/h,A=O*(1-a)-C*a*O;A>c&&(c=A,m={center:I,width:b*r*u,height:b*n*u})}}return m}o(KB,"findBestRectangle");function pg(e,t,r,n={}){let{scaleFactor:i=.9,centerPriority:a=.5,resolution:u=100,minimumSizeRatio:c=.5}=n,m=Cy(r),d=e.width/e.height,h=zB(t,m),g=$B(h),{dx:v,dy:b,gridBounds:S}=ZB(g,d,u),O=VB(h,S,u,v,b),x=WB(O,u),E=HB(O,x,S,u,v,b),I=KB(O,S,v,b,E,a,i);return!I||I.width<e.width*c||I.height<e.height*c?e:xe(R({},I),{center:dg(I.center,-m),rotation:r,polygonCenter:dg(E,-m)})}o(pg,"findLargestInteriorRectangle");var qs=Math.PI*2,qB=Math.PI/2,JB=Math.PI*1.5,XB=sa(qB,2),YB=sa(JB,2),QB=.01,JE=!1,fg=class fg extends Te{constructor(r,n,i,a=0,u=0,c={}){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 Fc);f(this,"imageLoadingCache",new Map);f(this,"currentImageScreenBBoxes",[]);f(this,"viewProjectionMatrix",new _r);this.rendererState=r,this.convertTo3DMapPosition=n,this.projectToScreen=i,this.initialBearing=a,this.naturalBearing=u,this.imagePlacementOptions=c}createImageMesh(r,n,i,a=0,u,c){var S,O,x;let m={width:i.width,height:i.height,center:this.convertTo3DMapPosition(u),rotation:(S=i.rotation)!=null?S:0},d=(O=this.imagePlacementOptions.mode)!=null?O:"default",h=(()=>{switch(d){case"fit-nearest-90":let E=(this.initialBearing-this.naturalBearing+360)%180;return E>=45&&E<=135?pg(m,c,m.rotation+90,this.imagePlacementOptions):m;case"fit-initial-bearing":return pg(m,c,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return m}})();if(JE&&h.polygonCenter){let E=new Oe(new Bc(1),new _u({color:65280}));E.position.set(h.polygonCenter.x,h.polygonCenter.y,a),this.rendererState.entityScene.add(E)}let g=new _u({transparent:!0,depthWrite:!1,side:oi}),v=new yn(h.width,h.height),b=new yd(v);if(b.visible=!1,b.renderOrder=Hr.IMAGE_MESH,(x=this.getOrDownloadImage(n))==null||x.then(E=>{g.map=E,g.needsUpdate=!0,g.map.colorSpace=vc,b.visible=!0,this.publish("image-loaded")}),b.userData.entityId=r,b.material=g,JE){let E=new Oe(new yn(i.width,i.height),new _u({color:"gray"}));b.add(E);let I=new gy;b.add(I),I.scale.set(10,10,10)}return b.position.set(h.center.x,h.center.y,a+QB),b.rotation.z=(-Fe.degToRad(h.rotation)+qs)%qs,b}getOrDownloadImage(r){var n;if(this.imageLoadingCache.has(r))return(n=this.imageLoadingCache.get(r))==null?void 0:n.promise;{let i=new Promise(a=>{so.getLoader().load(r,u=>{let c=this.imageLoadingCache.get(r);c&&!c.loaded&&(c.loaded=!0),a(u)})});return this.imageLoadingCache.set(r,{loaded:!1,promise:i}),i}}flipIfNeeded(r,n){if(r.imageMesh==null)return;let i=-n,a=r.imageMesh.rotation.z,u=sa((a-i+qs)%qs,2);u>XB&&u<YB&&(r.imageMesh.rotation.z=(a+Math.PI)%qs)}update(r){var u,c,m,d,h;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,i,a;for(let g of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(g),(n==null?void 0:n.type)==="image"){if(i=n.components[0],a=n.components[1],a.url&&i.imageMesh==null){let v=this.convertTo3DMapPosition(i.feature.geometry.coordinates),b={x:v.x,y:v.y};i.imageMesh=this.createImageMesh(n.id,a.url,i.feature.properties,i.feature.properties.verticalOffset,i.feature.geometry.coordinates,[b]),i.mesh.add(i.imageMesh),i.position.copy(i.imageMesh.position)}i.imageMesh&&(a.flipImageToFaceCamera&&this.flipIfNeeded(i,r),i.imageMesh.material instanceof _u&&a.dirty&&(i.imageMesh.material.opacity=a.opacity))}else if((n==null?void 0:n.type)==="geometry"){if(i=n.components[0],a=n.components[1],a.showImage&&((u=i.feature.properties)!=null&&u.image)&&i.imageMesh==null&&i.visible&&i.mesh!=null&&i.mesh.parent!=null&&((c=i.feature.properties)==null?void 0:c.image.position)!=null&&i.feature.geometry.coordinates!=null&&i.feature.geometry.coordinates.length>0){let v=i.feature.geometry.coordinates[0].map(S=>{let O=this.convertTo3DMapPosition(S);return{x:O.x,y:O.y}}),b=this.createImageMesh(g,(m=i.feature.properties)==null?void 0:m.image.path,(d=i.feature.properties)==null?void 0:d.image,a.height,(h=i.feature.properties)==null?void 0:h.image.position,v);i.mesh.parent.add(b),i.imageMesh=b}if(i.imageMesh){if(!i.visible)i.imageMesh.visible=!1;else if(a.showImage&&!i.imageMesh.visible)if(a.url){let v=this.imageLoadingCache.get(a.url);v&&v.loaded&&(i.imageMesh.visible=!0)}else i.imageMesh.visible=!0;else!a.showImage&&i.imageMesh.visible&&(i.imageMesh.visible=!1);a.flipImageToFaceCamera&&this.flipIfNeeded(i,r),a.enableImageCollisions===!0&&this.updateImageScreenBBoxes(i)}}}updateImageScreenBBoxes(r){if(r.imageMesh==null)return;let n=r.imageMesh.geometry.boundingBox;if(n!=null){let i=new ue;if(r.imageMesh.getWorldPosition(i),!this.cameraFrustum.containsPoint(i))return;let a=new Ie;this.projectToScreen(a,i);let u=[new ue(n.min.x,n.min.y,n.min.z),new ue(n.max.x,n.min.y,n.min.z),new ue(n.min.x,n.max.y,n.min.z),new ue(n.max.x,n.max.y,n.min.z),new ue(n.min.x,n.min.y,n.max.z),new ue(n.max.x,n.min.y,n.max.z),new ue(n.min.x,n.max.y,n.max.z),new ue(n.max.x,n.max.y,n.max.z)],c=[];for(let b of u){let S=b.clone().applyMatrix4(r.imageMesh.matrixWorld),O=new Ie;this.projectToScreen(O,S),c.push(O)}let m=1/0,d=1/0,h=-1/0,g=-1/0;for(let b of c)m=Math.min(m,b.x),d=Math.min(d,b.y),h=Math.max(h,b.x),g=Math.max(g,b.y);let v=new Se(a.x,a.y,h-m,g-d);this.currentImageScreenBBoxes.push(v)}}};o(fg,"ImageSystem");var vd=fg;l();var eP=250,mo,hg=class hg extends Te{constructor(r,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);_(this,mo);f(this,"update",o((r=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!r&&(Date.now()-n>eP||(s(this,mo)&&cancelAnimationFrame(s(this,mo)),W(this,mo,requestAnimationFrame(()=>{this.updateRaf()}))))},"update"));this.state=r,this.camera=n,this.buildRaycasters()}resize(){this.buildRaycasters()}buildRaycasters(){this.debugEl&&this.debugEl.remove();let r=new Ie(this.state.canvasWidth/2,this.state.canvasHeight/2),n=new Ie(r.x/1.2,r.y/1.2),i=new Ie(r.x+(r.x-n.x),n.y),a=new Ie(n.x,r.y+(r.y-n.y)),u=new Ie(i.x,a.y),c=new Ie(r.x,r.y/1.5),m=new Ie(r.x,r.y+(r.y-c.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=[r,c,m,n,i,a,u].map((d,h)=>{if(this.debugRaycasters){let O=document.createElement("div");O.style.position="absolute",O.style.top=d.y+"px",O.style.left=d.x+"px",O.style.width="10px",O.style.height="10px",O.style.backgroundColor="red",this.debugEl.append(O)}let g=d.x/this.state.canvasWidth*2-1,v=-(d.y/this.state.canvasHeight)*2+1,b=new Ie(g,v),S=new Ln;return S.setFromCamera(b,this.camera),[S,b,h===0?10:h<7?2:1]})}updateFocusableEntities(){this.focusableEntities.clear();let r,n,i;for(let a of this.state.geometry3DIdsInScene)if(i=this.state.geometry3DMap.get(a),i!=null){if(i.type==="group-container"&&i.components[1]!==void 0&&i.components[1]instanceof zu){if(n=i.components[1],n.dirty===!0||n.focusMesh==null){n.focusMesh&&Rt(n.focusMesh);let u=new Qt;u.setFromObject(i);let c=u.max.x-u.min.x,m=u.max.y-u.min.y,d=u.max.z-u.min.z;if(!isFinite(c)||!isFinite(m)||!isFinite(d)||isNaN(c)||isNaN(m)||isNaN(d)||c<=0||m<=0||d<=0)continue;let h=new Ri(c,m,d),g={transparent:!0,opacity:this.debugRaycasters?1:0,visible:this.debugRaycasters};if(this.debugRaycasters){let S=["red","green","blue","yellow","purple","orange","pink","brown","gray","black"];g.color=S[Math.floor(Math.random()*S.length)]}let v=new cr(g),b=new Oe(h,v);b.position.set((u.min.x+u.max.x)/2,(u.min.y+u.max.y)/2,0),b.userData={entityId:i.userData.entityId},n.focusMesh=b,i.add(b),i.components[1].dirty=!1}this.focusableEntities.add(n.focusMesh)}else if(i.type==="geometry"&&i.components[4]&&i.components[4]instanceof zu&&(r=i.components[0],n=i.components[4],r instanceof Tt&&r.geometry!=null&&(n.dirty===!0||n.focusMesh==null))){if(n.focusMesh==null){let u=new Oe(r.geometry);u.userData={entityId:i.id},n.focusMesh=u}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,i]of this.raycasters)n.setFromCamera(i,this.camera);for(let[n,i,a]of this.raycasters)n.intersectObjects(Array.from(this.focusableEntities.values())).forEach(c=>{var m;if((c==null?void 0:c.object)!=null&&"isMesh"in c.object&&(c!=null&&c.object.isMesh)){let d=c.object.userData.entityId,h=(m=this.collisions.get(d))!=null?m:0;this.collisions.set(d,h+a)}});let r=Array.from(this.collisions,([n,i])=>({entityId:n,weight:i})).sort((n,i)=>i.weight-n.weight).map(({entityId:n})=>n);this.publish("geometry-in-focus",r),this.cameraDirty=!1}showRaycasters(){this.debugRaycasters=!0,this.buildRaycasters()}hideRaycasters(){this.debugRaycasters=!1,this.buildRaycasters()}destroy(){s(this,mo)&&cancelAnimationFrame(s(this,mo)),this.debugEl&&this.debugEl.remove(),this.collisions.clear(),this.focusableEntities.clear(),this.raycasters=[]}};mo=new WeakMap,o(hg,"GeometryInFocusSystem");var xd=hg;l();l();l();l();l();function tP(e){if(!e)throw new Error("geojson is required");var t=[];return Ui(e,function(r){rP(r,t)}),Eo(t)}o(tP,"lineSegment");function rP(e,t){var r=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":r=So(n);break;case"LineString":r=[So(n)]}r.forEach(function(i){var a=nP(i,e.properties);a.forEach(function(u){u.id=t.length,t.push(u)})})}}o(rP,"lineSegmentFeature");function nP(e,t){var r=[];return e.reduce(function(n,i){var a=kc([n,i],t);return a.bbox=iP(n,i),r.push(a),i}),r}o(nP,"createSegments");function iP(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],u=r<i?r:i,c=n<a?n:a,m=r>i?r:i,d=n>a?n:a;return[u,c,m,d]}o(iP,"bbox");var gg=tP;var f6=Xg(d6(),1);function PP(e,t){var r={},n=[];if(e.type==="LineString"&&(e=Jd(e)),t.type==="LineString"&&(t=Jd(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=p6(e,t);return i&&n.push(i),Eo(n)}var a=(0,f6.default)();return a.load(gg(t)),Yd(gg(e),function(u){Yd(a.search(u),function(c){var m=p6(u,c);if(m){var d=So(m).join(",");r[d]||(r[d]=!0,n.push(m))}})}),Eo(n)}o(PP,"lineIntersect");function p6(e,t){var r=So(e),n=So(t);if(r.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 i=r[0][0],a=r[0][1],u=r[1][0],c=r[1][1],m=n[0][0],d=n[0][1],h=n[1][0],g=n[1][1],v=(g-d)*(u-i)-(h-m)*(c-a),b=(h-m)*(a-d)-(g-d)*(i-m),S=(u-i)*(a-d)-(c-a)*(i-m);if(v===0)return null;var O=b/v,x=S/v;if(O>=0&&O<=1&&x>=0&&x<=1){var E=i+O*(u-i),I=a+O*(c-a);return Xd([E,I])}return null}o(p6,"intersects");var Dd=PP;l();function Xs(e,t){t===void 0&&(t={});var r=ya(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return MP(r,t);case"MultiPolygon":return TP(r,t);default:throw new Error("invalid poly")}}o(Xs,"default");function MP(e,t){t===void 0&&(t={});var r=ya(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return h6(n,i)}o(MP,"polygonToLine");function TP(e,t){t===void 0&&(t={});var r=ya(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},a=[];return n.forEach(function(u){a.push(h6(u,i))}),Eo(a)}o(TP,"multiPolygonToLine");function h6(e,t){return e.length>1?by(e,t):kc(e[0],t)}o(h6,"coordsToLine");function kP(e,t){var r=!0;return Ui(e,function(n){Ui(t,function(i){if(r===!1)return!1;r=_P(n.geometry,i.geometry)})}),r}o(kP,"booleanDisjoint");function _P(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return!jP(e.coordinates,t.coordinates);case"LineString":return!g6(t,e);case"Polygon":return!Zi(e,t)}break;case"LineString":switch(t.type){case"Point":return!g6(e,t);case"LineString":return!LP(e,t);case"Polygon":return!y6(t,e)}break;case"Polygon":switch(t.type){case"Point":return!Zi(t,e);case"LineString":return!y6(e,t);case"Polygon":return!RP(t,e)}}return!1}o(_P,"disjoint");function g6(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(NP(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}o(g6,"isPointOnLine");function LP(e,t){var r=Dd(e,t);return r.features.length>0}o(LP,"isLineOnLine");function y6(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){var i=n[r];if(Zi(i,e))return!0}var a=Dd(t,Xs(e));return a.features.length>0}o(y6,"isLineInPoly");function RP(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){var i=n[r];if(Zi(i,t))return!0}for(var a=0,u=t.coordinates[0];a<u.length;a++){var c=u[a];if(Zi(c,e))return!0}var m=Dd(Xs(e),Xs(t));return m.features.length>0}o(RP,"isPolyInPoly");function NP(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],a=t[0]-e[0],u=t[1]-e[1],c=n*u-i*a;return c!==0?!1:Math.abs(a)>=Math.abs(u)?a>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:u>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}o(NP,"isPointOnLineSegment");function jP(e,t){return e[0]===t[0]&&e[1]===t[1]}o(jP,"compareCoords");var b6=kP;function Og(e,t){var r=!1;return Ui(e,function(n){Ui(t,function(i){if(r===!0)return!0;r=!b6(n.geometry,i.geometry)})}),r}o(Og,"booleanIntersects");var UP=5e3,Bg="outdoor-system-debug-container",v6=!1,Pi,_t,Ys,vu,Mi,fo,Ho,fn,xu,Qs,wd,Ad,Mn,Pg,Eu,Ko,x6,Fd,ec,E6,C6,Mg=class Mg{constructor(t){_(this,Mn);_(this,Pi,!0);_(this,_t);f(this,"idleQueue",new Vo);_(this,Ys,"");_(this,vu,new Set);_(this,Mi,new Set);_(this,fo);_(this,Ho);_(this,fn,null);_(this,xu,!1);_(this,Qs,o(t=>{if(!s(this,_t))throw new Error("Map not initialized");let n=[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]]].map(m=>s(this,_t).project(m)),i=Math.max(...n.map(m=>m.x)),a=Math.min(...n.map(m=>m.x)),u=Math.max(...n.map(m=>m.y)),c=Math.min(...n.map(m=>m.y));return[new Kd.default(a,c),new Kd.default(i,u)]},"#getScreenPoints"));_(this,wd,o(()=>{s(this,fn)&&(clearTimeout(s(this,fn)),W(this,fn,null),W(this,Pi,!1))},"#stopTrying"));_(this,Ad,o(()=>{s(this,fn)&&(clearTimeout(s(this,fn)),W(this,fn,null)),W(this,fn,setTimeout(()=>{s(this,wd).call(this)},UP))},"#startTrying"));_(this,Eu,o(async()=>{if(v6&&s(this,fo)){let t=s(this,Qs).call(this,s(this,fo));dt(this,Mn,C6).call(this,t)}if(!(!s(this,_t)||!s(this,xu))&&s(this,Pi)&&!(!s(this,Mi)||s(this,Mi).size===0)&&(s(this,Mn,x6)&&s(this,Fd).call(this),s(this,fo)&&s(this,Ho))){let t=s(this,Qs).call(this,s(this,fo)),r=s(this,_t).queryRenderedFeatures(t,{layers:Array.from(s(this,Mi))});if(r.length>0){this.idleQueue.onComplete(()=>{s(this,Ko).length>0&&(s(this,Mi).forEach(n=>{var i;(i=s(this,_t))==null||i.setFilter(n,["all",...s(this,Ko)])}),W(this,Pi,!1)),W(this,Ko,[])});for(let n of r)this.idleQueue.add(()=>{if(n.geometry!=null&&"coordinates"in n.geometry){if(s(this,Ho)==null)return;let i;if(n.geometry.type==="Polygon"?i=Tc(n.geometry.coordinates):n.geometry.type==="MultiPolygon"&&(i=vy(n.geometry.coordinates)),!i)return;for(let a of s(this,Ho))if(Og(a,i)){s(this,Ko).push(["!=",["id"],n.id]);return}}})}}},"#handleRender"));_(this,Ko,[]);_(this,Fd,o(()=>{this.idleQueue.clearAll()},"#cancelJobs"));_(this,ec,o(t=>{var r,n;if(s(this,_t)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,vu).size>0){let i=(n=(r=t==null?void 0:t.style)==null?void 0:r.stylesheet)==null?void 0:n.id;(!i||i!==s(this,Ys))&&(W(this,Ys,i),dt(this,Mn,Pg).call(this),W(this,Pi,!0))}},"#handleStyleChange"));t&&(W(this,_t,t),s(this,_t).on("styledata",s(this,ec)),s(this,_t).on("render",s(this,Eu)),W(this,xu,s(this,_t).loaded()),s(this,_t).on("load",()=>{W(this,xu,!0)})),v6&&dt(this,Mn,E6).call(this)}hideLayersIntersectingPolygons(t,r,n){s(this,fn)&&clearTimeout(s(this,fn)),s(this,Ad).call(this),W(this,fo,t),W(this,Ho,r.reduce((i,a)=>{if(a.geometry.type==="Polygon"){let u=Tc(a.geometry.coordinates);i.push(u)}else a.geometry.type==="MultiPolygon"&&i.push(...a.geometry.coordinates.map(u=>Tc(u)));return i},[]));for(let i of n)s(this,vu).add(i);W(this,Pi,!0),dt(this,Mn,Pg).call(this),s(this,Eu).call(this)}destroy(){s(this,_t)&&(s(this,_t).off("styledata",s(this,ec)),s(this,_t).off("render",s(this,Eu))),this.idleQueue.clearAll()}};Pi=new WeakMap,_t=new WeakMap,Ys=new WeakMap,vu=new WeakMap,Mi=new WeakMap,fo=new WeakMap,Ho=new WeakMap,fn=new WeakMap,xu=new WeakMap,Qs=new WeakMap,wd=new WeakMap,Ad=new WeakMap,Mn=new WeakSet,Pg=o(function(){if(W(this,Mi,new Set),s(this,_t))for(let t of s(this,vu))s(this,_t).getLayer(t)&&s(this,Mi).add(t)},"#filterStylesInMap"),Eu=new WeakMap,Ko=new WeakMap,x6=o(function(){return this.idleQueue.size!==0},"#running"),Fd=new WeakMap,ec=new WeakMap,E6=o(function(){if(!document.getElementById(Bg)&&s(this,_t)){let t=document.createElement("div");t.id=Bg,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.bottom="0",t.style.right="0",t.style.pointerEvents="none",t.style.zIndex="1000",s(this,_t).getContainer().appendChild(t)}},"#addDebugContainer"),C6=o(function(t){let r=document.getElementById(Bg);if(!r)return;let n=document.getElementById("bbox");n==null&&(n=document.createElement("div"),n.id="bbox",n.style.position="absolute",r.appendChild(n));let i=[Math.min(t[0].x,t[1].x),Math.min(t[0].y,t[1].y)],a=[Math.max(t[0].x,t[1].x),Math.max(t[0].y,t[1].y)];n.style.top=i[1]+"px",n.style.left=i[0]+"px",n.style.width=a[0]-i[0]+"px",n.style.height=a[1]-i[1]+"px",n.style.border="2px solid ".concat(s(this,Pi)?"red":"blue")},"#updateDebugBBox"),o(Mg,"OutdoorLayers");var Sd=Mg;l();l();l();l();var Od="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";l();var Tg="#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";l();var I6="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 D6="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 $P=new Pc;function S6(e,t,r){var Ce,bt;let{breakpoint:n,width:i,accentColor:a,completeFraction:u,isVertical:c,visibleThroughGeometry:m,dashed:d,highlightCompleteFraction:h,highlightStartFraction:g,highlightEndFraction:v,highlightColor:b,highlightWidthMultiplier:S}=t,{color:O}=r,x=!0,E=0,I=1/0,D=t.displayArrowsOnPath,C=!0,A=D,T=typeof i=="object"?Number(i.output[n])/2:i/2,k=typeof i=="object"?Number((Ce=i.output[n+1])!=null?Ce:i.output[n])/2:i/2,j=((bt=r.altitude)!=null?bt:0)+GP,U=0;e[0].z+=j;for(let ye=1;ye<e.length;++ye){e[ye].z+=j;let le=e[ye].x-e[ye-1].x,He=e[ye].z-e[ye-1].z;if(c)U+=Math.sqrt(le*le+He*He);else{let Wr=e[ye].y-e[ye-1].y;U+=Math.sqrt(le*le+Wr*Wr+He*He)}}if(!c){let ye=e[0],le=e[e.length-1];e.push(le.clone().setZ(le.z-.01)),e.unshift(ye.clone().setZ(ye.z-.01))}let G=new iy;A&&(G=$P.load(D6),G.colorSpace=vc);let $=new Mt(O),X=new Mt(a),V={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new Ie(1,1)},cameraParameters:{type:"v2",value:new Ie(E,0)},complete:{type:"f",value:x?0:1},color:{type:"c",value:$},pathLength:{type:"f",value:U},nearRadius:{type:"f",value:T},farRadius:{type:"f",value:k},nearZoom:{type:"f",value:E},farZoom:{type:"f",value:I},pulseColor:{type:"c",value:X},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:c},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:G},displayArrowsOnPath:{type:"b",value:D},showPulse:{type:"b",value:C},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:d},highlightCompleteFraction:{type:"f",value:h},highlightStartFraction:{type:"f",value:g},highlightEndFraction:{type:"f",value:v},highlightColor:{type:"c",value:new Mt(b)},highlightWidthMultiplier:{type:"f",value:S}},Y=new my(e);Y.curveType="catmullrom",Y.tension=0;let oe=30,Z=8,ee=oe*e.length,te=new py(Y,ee,T,Z,!1),Q=new Float32Array(te.attributes.position.count);for(let ye=e.length;ye<Q.length;ye++)Q[ye]=ye;te.setAttribute("vertexIndex",new vr(Q,1));let de=new Float32Array(te.attributes.position.count),je=new vr(de,1);for(let ye=0;ye<=ee;ye++)for(let le=0;le<=Z;++le)je.setX(ye*(Z+1)+le,ye/ee);te.setAttribute("pathDistance",je);let Me=new Float32Array(te.attributes.normal.count*3),Ve=new vr(Me,3);for(let ye=0;ye<ee;ye++){let le=te.tangents[ye];for(let He=0;He<=Z;++He)Ve.setXYZ(ye*(Z+1)+He,le.x,le.y,le.z)}te.setAttribute("pathTangent",Ve);let qe=new Float32Array(te.attributes.normal.count*3),Ae=new vr(qe,3);for(let ye=0;ye<ee;ye++){let le=te.tangents[ye];var ot,Pt,Ht;c?(ot=le.x*le.y,Pt=-1+le.y*le.y,Ht=le.z*le.y):(ot=-le.x*le.z,Pt=-le.y*le.z,Ht=1-le.z*le.z);let He=Math.sqrt(ot*ot+Pt*Pt+Ht*Ht);He===0&&(He=1);let Wr=ot/He,Ou=Pt/He,Bu=Ht/He;for(let na=0;na<=Z;++na)Ae.setXYZ(ye*(Z+1)+na,Wr,Ou,Bu)}te.setAttribute("pathNormal",Ae);let F=new Ni({uniforms:V,vertexShader:Od,fragmentShader:Tg});F.transparent=!0,F.alphaTest=.5,V.resolution.value.x=1,V.resolution.value.y=1,V.vertexes.value=Q.length,V.arrowTexture.value.wrapS=Mu,V.arrowTexture.value.wrapT=Mu,V.arrowTexture.value.anisotropy=16;let q=new Oe(te,F),B=q.clone(),ae=xe(R({},V),{opacityMultiplier:{type:"f",value:.25},pathIsVertical:{type:"b",value:c}});ae.complete.value=1,B.material=new Ni({uniforms:ae,vertexShader:Od,fragmentShader:Tg}),B.material.transparent=!0,B.material.alphaTest=.5,B.material.depthWrite=!1,B.material.depthTest=!1,ae.resolution.value.x=1,ae.resolution.value.y=1,ae.vertexes.value=Q.length,ae.arrowTexture.value.wrapS=Mu,ae.arrowTexture.value.wrapT=Mu,ae.arrowTexture.value.anisotropy=16,ae.complete.value=u,q.userData=B.userData=t.mesh.userData;let J=t.mesh;if(!m){let ye=new Ni({uniforms:V,vertexShader:Od,fragmentShader:I6}),le=new Oe(te,ye);le.name="stencil",le.material.colorWrite=!1,le.material.stencilWrite=!0,le.material.stencilRef=1,le.material.stencilFunc=Dc,le.material.stencilZPass=Li,le.material.stencilZFail=Li,le.material.stencilFail=Li,le.material.depthWrite=!1,le.material.depthTest=!1,le.userData=t.mesh.userData,J.add(le),J.add(B),B.renderOrder=0,q.renderOrder=1}if(J.add(q),c){let ye=new Qt().setFromObject(q),le=new ue;ye.getCenter(le),J.children.forEach(He=>{He.geometry.center(),He.position.copy(le)})}m&&(q.material.stencilWrite=!0,q.material.stencilRef=1,q.material.stencilFunc=Ic,q.material.stencilZPass=xc,q.material.stencilZFail=xc,q.material.stencilFail=xc,q.material.needsUpdate=!0,q.layers.disableAll(),q.layers.enable(Hr.ALWAYS_ON_TOP_PATHS)),te.computeBoundingBox();let re=new ue;return te.boundingBox.getCenter(re),{mesh:J,material:F,center:re}}o(S6,"buildPath");var GP=.15;var ZP=.5,kg=class kg extends Te{constructor(r,n,i,a){super();f(this,"rendererState");f(this,"verticalDistanceDirty",!0);f(this,"convertTo3DMapPosition");f(this,"getParentContainer");f(this,"convertZoomLevelToAltitude");this.rendererState=r,this.convertTo3DMapPosition=n,this.getParentContainer=i,this.convertZoomLevelToAltitude=a}update(r,n,i){let a,u=!1;for(let c of this.rendererState.geometry3DIdsInScene)if(a=this.rendererState.geometry3DMap.get(c),a&&a.type==="path"&&a.components[0].type==="path"){let m=a.components[0],d=a.components[1],h=m.isVertical&&this.verticalDistanceDirty;if(!(m instanceof ao))continue;let g=[];if(m.dirty||d.dirty||h){if(m.mesh.parent!=null)for(let v=m.mesh.children.length-1;v>=0;v--)Rt(m.mesh.children[0]);if(m.feature.features.length===2&&m.feature.features[0].properties.parentId&&m.feature.features[1].properties.parentId){let v=m.feature.features[0],b=m.feature.features[m.feature.features.length-1],S,O,x=v.geometry.coordinates[2]||0,E=b.geometry.coordinates[2]||0;v.properties.parentId&&(S=this.getParentContainer(v.properties.parentId,!0),S!=null&&S.altitude!=null&&(x+=S.altitude,m.isVertical=!0)),b.properties.parentId&&(O=this.getParentContainer(b.properties.parentId,!0),O!=null&&O.altitude!=null&&(E+=O.altitude,m.isVertical=!0));let I=this.convertTo3DMapPosition(v.geometry.coordinates[1],v.geometry.coordinates[0],x),D=this.convertTo3DMapPosition(b.geometry.coordinates[1],b.geometry.coordinates[0],E);Math.abs(I.z-D.z)>ZP&&S!=null&&S.visible&&O!=null&&O.visible&&(g=[I,D])}else{let v=m.feature.features;for(let b=0;b<v.length;b++)if(b===0||!jy(v[b].geometry.coordinates,v[b-1].geometry.coordinates)){let S=this.convertTo3DMapPosition(v[b].geometry.coordinates[1],v[b].geometry.coordinates[0],v[b].geometry.coordinates[2]||0);g.push(S)}}if(g.length>1){let{mesh:v,material:b,center:S}=S6(g,m,{color:d.color,altitude:d.altitude,isVertical:m.isVertical});m.mesh=v,m.material=b,m.position=S}m.dirty&&typeof m.width=="object"&&m.width.on==="zoom-level"&&(m.altitudeBreakpoints=m.width.input.map(v=>this.convertZoomLevelToAltitude(v))),m.dirty=!1}d.dirty&&(m.mesh.children.forEach(v=>{v.name!=="stencil"&&(v.material.uniforms.color.value.set(d.color),v.material.visible=d.visible,v.material.needsUpdate=!0)}),m.mesh.position.z=d.altitude,d.dirty=!1),m.material&&(m.mesh.children.forEach(v=>{var S,O,x,E,I,D,C;let b=v.material.uniforms;if(v.name==="stencil"){m.materialDirty&&w6(m,v.material);return}if(typeof m.width=="object"&&m.width.on==="zoom-level"){m.altitudeBreakpoints&&m.altitudeBreakpoints.length>2&&De.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=Ay(i,(O=(S=m.altitudeBreakpoints)==null?void 0:S.slice(0,2))!=null?O:[r,n]);m.breakpoint=A,b.nearZoom.value=(E=(x=m.altitudeBreakpoints)==null?void 0:x[A])!=null?E:r,b.farZoom.value=(D=(I=m.altitudeBreakpoints)==null?void 0:I[A+1])!=null?D:n,b.nearRadius.value=Number(m.width.output[A])/2,b.farRadius.value=Number((C=m.width.output[A+1])!=null?C:m.width.output[A])/2}b.cameraParameters.value.x=i,m.materialDirty&&(b.displayArrowsOnPath.value=m.displayArrowsOnPath,b.pulseColor.value.set(m.accentColor),b.complete.value=m.completeFraction,w6(m,v.material),typeof m.width=="number"&&(b.nearZoom.value=r,b.farZoom.value=n,b.nearRadius.value=Number(m.width)/2,b.farRadius.value=Number(m.width)/2))}),m.displayArrowsOnPath&&m.animateArrowsOnPath&&(m.mesh.children.forEach(v=>{v.name!=="stencil"&&(v.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,v.material.needsUpdate=!0)}),u=!0),m.materialDirty=!1)}this.verticalDistanceDirty=!1,u&&this.publish("animate:path")}};o(kg,"PathSystem");var tc=kg;function w6(e,t){let r=t.uniforms;r.highlightCompleteFraction.value=e.highlightCompleteFraction,r.highlightStartFraction.value=e.highlightStartFraction,r.highlightEndFraction.value=e.highlightEndFraction,r.highlightWidthMultiplier.value=e.highlightWidthMultiplier,r.highlightColor.value.set(e.highlightColor)}o(w6,"updateHighlightPathUniforms");l();var Lt,Cu,Ti,Pd,_g=class _g{constructor(t){f(this,"rendererState");f(this,"dirty",!1);_(this,Lt);_(this,Cu);_(this,Ti);_(this,Pd,new _r);this.rendererState=t}updateOne(t){if(t instanceof et&&t.components[0]instanceof Tt&&t.components[1]instanceof jn&&t.parentObject3D instanceof bn&&(W(this,Lt,t.components[0]),W(this,Ti,t.components[1]),!s(this,Lt).detached&&s(this,Lt).shouldDetach&&s(this,Lt).mesh!=null&&s(this,Lt).material!=null&&s(this,Lt).batchedProps!=null)){W(this,Cu,t.parentObject3D),s(this,Lt).visible=!1;let r=new Mt(s(this,Ti).color),n=s(this,Ti).opacity*da(t),i=new Vy({color:r,side:oi,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1},1,s(this,Lt).material.repeatYFactor),a=new b4(1,s(this,Lt).batchedProps.positionCount,0,i),u=VE(s(this,Lt),a,s(this,Pd));if(u==null)return;a.userData={entities:{0:t.id},detached:!0},s(this,Lt).instanceIndex=u,s(this,Lt).material.setColor(s(this,Lt).instanceIndex,r,s(this,Ti).topColor?new Mt(s(this,Ti).topColor):r),s(this,Lt).mesh=a,s(this,Lt).material=i,s(this,Cu).add(a),s(this,Lt).shouldDetach=!1,s(this,Lt).detached=!0}}update(){if(!this.dirty)return;let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.dirty=!1,this.cleanup()}cleanup(){W(this,Lt,void 0),W(this,Cu,void 0),W(this,Ti,void 0)}};Lt=new WeakMap,Cu=new WeakMap,Ti=new WeakMap,Pd=new WeakMap,o(_g,"MeshDetachmentSystem");var Bd=_g;l();l();function A6(e,t,r){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let i=t||1e-4,a=i/Math.max(r,1e-4);return md(e.mesh.geometry,e.batchedProps.range,i,0),e.material&&(e.material.repeatYFactor=a),e.currentHeight=i,!0}return!1}o(A6,"updateHeight");function F6(e,t,r,n,i,a){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,r),r.decompose(n,i,a),n.z=t,r.compose(n,i,a),e.mesh.setMatrixAt(e.instanceIndex,r),e.altitude=t,!0):!1}o(F6,"updateAltitude");var Tn,ii,Td,kd,_d,Ld,Lg=class Lg{constructor(t){f(this,"rendererState");f(this,"dirty",!1);_(this,Tn);_(this,ii);_(this,Td,new _r);_(this,kd,new ue);_(this,_d,new Sc);_(this,Ld,new ue);this.rendererState=t}updateOne(t){var r;if(t instanceof et&&t.type==="geometry"&&((r=t.components[1])!=null&&r.dirty)&&(W(this,Tn,t.components[0]),W(this,ii,t.components[1]),t.type==="geometry")){let n=!1;s(this,ii).height!==s(this,Tn).currentHeight&&(n=A6(s(this,Tn),s(this,ii).height,s(this,ii).initialHeight)),s(this,ii).altitude!==s(this,Tn).altitude&&(n=F6(s(this,Tn),s(this,ii).altitude,s(this,Td),s(this,kd),s(this,_d),s(this,Ld))),n&&s(this,Tn).mesh!=null&&s(this,Tn).mesh.computeBoundingSphere()}}update(){let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.cleanup()}cleanup(){W(this,Tn,void 0),W(this,ii,void 0)}};Tn=new WeakMap,ii=new WeakMap,Td=new WeakMap,kd=new WeakMap,_d=new WeakMap,Ld=new WeakMap,o(Lg,"MeshModificationSystem");var Md=Lg;l();var VP={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1},Rg=class Rg{constructor(t){f(this,"state",VP);f(this,"core");this.core=t}update(t){let r={};for(let[n,i]of Object.entries(t))n in this.state&&this.state[n]!==t[n]&&(this.state[n]=i,r[n]=i);this.handleUpdate(r)}handleUpdate(t){t.showPolygonLabelTextAreaMesh!=null&&(t.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),t.showEnvMap!=null&&(t.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),t.showCollisionBoxes!=null&&(t.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes())}};o(Rg,"Debug");var Rd=Rg;l();var rc=9,WP=!1,O6=.1;function HP(e,t,r){for(let n=0;n<t;n++){let i=(r&16711680)>>16,a=(r&65280)>>8,u=r&255;e[n*3]=i/255,e[n*3+1]=a/255,e[n*3+2]=u/255}}o(HP,"fillArrayWithColor");var Ng=class Ng{constructor(t,r,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",o(()=>{let t=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/t*this.scale),this.height=Math.floor(this.renderer.domElement.height/t*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new ay(this.width,this.height,{format:ry,type:ty,internalFormat:"RGBA"})},"resize"));f(this,"shouldShowByXY",o((t,r,n)=>{if(this.pixelBuffer==null)return!1;let i=t+(this.height-r-1)*this.width,a=this.pixelBuffer[i*4],u=this.pixelBuffer[i*4+1],c=this.pixelBuffer[i*4+2],m=a<<16|u<<8|c;return m===n||m===this.backgroundId},"shouldShowByXY"));f(this,"activeOccluders",new Set);f(this,"update",o(()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let t,r;for(let i of this.state.geometry3DIdsInScene){let a=this.state.geometry3DMap.get(i);if(a&&a instanceof Ut&&a.userData.occluderFeature!=null&&a.userData.occluderId!=null&&(this.activeOccluders.add(a.userData.occluderId),a.userData.occluderDirty)){if(t=a.userData.occluderFeature,t.geometry.type==="Polygon"){let u=Km(t,this.convertTo3DMapPosition,{color:"white",height:O6});r=this.createOccluderMesh(u,a.userData.occluderId),a.add(r)}else if(t.geometry.type==="MultiPolygon"){let u=qm(t,this.convertTo3DMapPosition,{color:"white",height:O6});r=this.createOccluderMesh(u,a.userData.occluderId),a==null||a.add(r)}a.userData.occluderDirty=!1}}this.renderer.setRenderTarget(this.pickingTexture);let n=new Mt(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(rc),this.renderer.render(this.state.entityScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(rc),WP?this.renderService.enabledLayers.add(rc):this.renderService.enabledLayers.delete(rc),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let i of this.state.geometry2DIdsInScene){let a=this.state.geometry2DMap.get(i);if(a&&(a==null?void 0:a.occluderId)!=null&&this.activeOccluders.has(a==null?void 0:a.occluderId)){let u=a.components[0].projection,c=Math.floor(u.x*this.scale),m=Math.floor(u.y*this.scale),d=this.shouldShowByXY(c,m,a.occluderId);a.components[0].isOccluded=!d}}}).catch(i=>{this.destroyed||De.error(i)})},"update"));if(this.state=t,this.convertTo3DMapPosition=r,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new Ni({glslVersion:ny,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(t,r){let n=t.attributes.position,i=new Float32Array(n.count*3);HP(i,n.count,r),t.setAttribute("color",new vr(i,3))}createOccluderMesh(t,r){let n=new Oe(t,this.pickingMaterial);return n.layers.set(rc),this.applyId(n.geometry,r),n.userData.occluderId=r,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var t;this.destroyed=!0,(t=this.pickingTexture)==null||t.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};o(Ng,"Occlusion2DSystem");var Nd=Ng;l();var jg=class jg{constructor(t){this.state=t;f(this,"dirty",!0)}update(){var t;if(this.dirty){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(n instanceof et&&n.type==="geometry"&&((t=n.components[0])==null?void 0:t.geometry)!=null){let i=n.components[0];i.geometry&&(i.geometry.dispose(),i.geometry=void 0)}}this.dirty=!1}}};o(jg,"GeometryDisposalSystem");var jd=jg;l();var Ug=class Ug extends Te{constructor(r){super();f(this,"dirty",!0);f(this,"state");f(this,"texturePromiseCache",new Map);this.state=r}async loadTexture(r){if(this.texturePromiseCache.has(r))return this.texturePromiseCache.get(r);let n=new Promise((i,a)=>{so.getLoader().load(r,i,void 0,a)});return this.texturePromiseCache.set(r,n),n}update(){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(!(n instanceof et))continue;let i=n.components[6];if(!(i instanceof Io))continue;let a=n.components[0];if(!(a instanceof Tt)||!i.dirty)continue;let u=Oi(a);u!=null&&(i.texture!=null&&(i.texture.path===""?(u.texture=null,u.hideTextures(a.instanceIndex),i.dirty=!1):this.loadTexture(i.texture.path).then(c=>{c&&(i.textureInstance=c,u.texture=c,u.blendTexture=!0,u.showTextures(a.instanceIndex)),this.publish("texture-added")})),i.topTexture!=null&&(i.topTexture.path===""?(u.topTexture=null,u.hideTextures(a.instanceIndex),i.dirty=!1):this.loadTexture(i.topTexture.path).then(c=>{c&&(i.topTextureInstance=c,u.topTexture=c,u.blendTexture=!0,u.showTextures(a.instanceIndex)),this.publish("texture-added")})),i.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async r=>{(await r).dispose()}),this.texturePromiseCache.clear()}};o(Ug,"TextureSystem");var Ud=Ug;l();var zg=class zg{constructor(t){f(this,"currentOrder",Hr.ALWAYS_ON_TOP_MODELS);f(this,"assignedOrders",new WeakMap);f(this,"state");this.state=t}assignOrder(t){return this.assignedOrders.has(t)?this.assignedOrders.get(t):(this.currentOrder+=1,this.assignedOrders.set(t,this.currentOrder),this.currentOrder)}releaseOrder(t){return this.assignedOrders.delete(t),Hr.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(t){return this.assignedOrders.get(t)}update(){var i;let t,r,n;for(let a of this.state.geometry3DIdsInScene)if(n=this.state.geometry3DMap.get(a),n&&n.type==="model"&&(i=n.components[1])!=null&&i.dirty)if(t=n.components[1],r=n.components[0],t.visibleThroughGeometry===!0){let u=this.assignOrder(r);r.renderOrder!==u&&(r.renderOrder=u)}else r.renderOrder>Hr.GEOMETRY&&(r.renderOrder=this.releaseOrder(r))}};o(zg,"RenderOrderSystem");var zd=zg;l();var B6=500,$g=class $g{constructor(t){f(this,"rendererState");f(this,"dirty",!1);this.rendererState=t}update(){var i;let t,r,n;for(let a of this.rendererState.geometry3DIdsInScene)if(t=this.rendererState.geometry3DMap.get(a),(t==null?void 0:t.type)==="model"&&t.components[7]!=null&&(n=t.components[0],r=t.components[7],r.dirty&&n.mesh!=null&&(r==null?void 0:r.verticalOffset)!==1/0&&(r.plane==null&&(r.plane=new cy(new ue(0,0,-1),r.verticalOffset),this.process(n,r)),r.plane.constant!==r.verticalOffset&&(r.plane.constant=r.verticalOffset),r.topColor!=null&&((i=r.holeFillMesh)==null?void 0:i.material)instanceof ku&&r.holeFillMesh.material.color.set(r.topColor),r.topVisible!=null&&r.holeFillMesh!=null&&(r.holeFillMesh.visible=r.topVisible),r.dirty=!1),r.plane!=null&&r.holeFillMesh!=null&&r.topVisible===!0)){let u=r.plane,c=r.holeFillMesh;u.coplanarPoint(c.position),c.lookAt(c.position.x-u.normal.x,c.position.y-u.normal.y,c.position.z-u.normal.z)}}process(t,r){var v;if(t.mesh==null)return;let n=t.mesh.parent,i=[];t.mesh.traverse(b=>{if(b instanceof Oe){let S=b.geometry.clone();b.updateWorldMatrix(!0,!1),S.applyMatrix4(b.matrixWorld),i.push(S),S.computeVertexNormals(),b.material.clippingPlanes=[r.plane],b.material.transparent=!1}});let a=Kr(i),u=new Ac,c=new Ac,m=this.createHoleFillGeometry(a,r.plane,1);m.name="hole-fill-group";let d=new ku({color:(v=r.topColor)!=null?v:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:Ic,stencilFail:Li,stencilZFail:Li,stencilZPass:Li}),h=new yn(B6,B6),g=new Oe(h,d);g.name="hole-fill-mesh",r.holeFillMesh=g,g.renderOrder=1.1,c.add(m),c.add(t.mesh),u.add(c),u.add(g),n==null||n.add(u),t.mesh=u}createHoleFillGeometry(t,r,n=0){let i=new Ac,a=new cr;a.depthWrite=!1,a.depthTest=!1,a.colorWrite=!1,a.stencilWrite=!0,a.stencilFunc=Dc;let u=a.clone();u.side=Pu,u.clippingPlanes=[r],u.stencilFail=Ec,u.stencilZFail=Ec,u.stencilZPass=Ec;let c=new Oe(t,u);c.renderOrder=n,i.add(c);let m=a.clone();m.side=vo,m.clippingPlanes=[r],m.stencilFail=Cc,m.stencilZFail=Cc,m.stencilZPass=Cc;let d=new Oe(t,m);return d.renderOrder=n,i.add(d),i}};o($g,"ClippingPlaneSystem");var $d=$g;var P6=new Ln;var{DEFAULT_PITCH:gE,DEFAULT_BEARING:yE,DEFAULT_ZOOM_LEVEL:bE,DEFAULT_MIN_ZOOM_LEVEL:KP,DEFAULT_MAX_ZOOM_LEVEL:qP}=pn,JP=Fe.radToDeg(.6435011087932844),St,vt,qo,nc,Iu,ho,Jo,Du,sr,Zg,M,hn,Xo,Xe,kn,wt,gn,Yt,P,ic,Wt,lt,M6,T6,k6,ki,oc,ac,uc,sc,Su,Gd,cc,wu,lc,Yo,Vg,Qo,mc,dc,Ar,Fr,Wg,Zd,Vd,Au,pc,Hg=class Hg extends Te{constructor(r,n={}){var S,O,x,E,I,D,C,A,T,k,j,U,G,$,X;super();_(this,sr);f(this,"options");f(this,"container");f(this,"Debug");_(this,St);_(this,vt);_(this,qo);_(this,nc);_(this,Iu);_(this,ho);_(this,Jo);_(this,Du);f(this,"rendererDomElement");_(this,M,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,entityScene:new Ut("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:Lc,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new Om,externalTweenGroup:new Om,cameraObject:new qd,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1});_(this,hn,{});_(this,Xo,new AbortController);f(this,"camera");_(this,Xe);_(this,kn);_(this,wt);_(this,gn);_(this,Yt);_(this,P,{});_(this,ic,window.matchMedia("screen and (min-resolution: 2dppx)"));f(this,"map");_(this,Wt,o(()=>{var r;this.aborted||!((r=s(this,P))!=null&&r.renderSystem)||(s(this,P).renderSystem.twoDdirty=!0)},"#invalidate2DEntities"));_(this,lt,o(()=>{var r;this.aborted||!((r=s(this,P))!=null&&r.renderSystem)||(s(this,P).renderSystem.threeDdirty=!0)},"#invalidate3DEntities"));_(this,ki,"standalone");_(this,oc,o(()=>{s(this,P).geometryDisposalSystem.dirty=!0,this.render()},"#setGeometryDisposalDirty"));_(this,ac,o(r=>Math.trunc(r*10)/10,"#round10"));_(this,uc,o(()=>{dt(this,sr,Zg).call(this,Nu()),s(this,P).twoDDrawSystem.dirty=!0,s(this,Su).call(this,void 0,void 0,!0)},"#handlePixelRatioChange"));_(this,sc,o(()=>{s(this,Su).call(this)},"#handleWindowResizeWithEvent"));_(this,Su,o((r,n,i=!1)=>{let a=r!=null?r:this.rendererDomElement.clientWidth,u=n!=null?n:this.rendererDomElement.clientHeight;if((a===0||u===0)&&!i)return;s(this,M).canvasWidth=a,s(this,M).canvasHeight=u,dt(this,sr,Zg).call(this,Nu()),s(this,Yo).call(this),dt(this,sr,k6).call(this),s(this,P).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,P).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,P).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,P).htmlControlsSystem.resize(this.canvasWidth),s(this,P).geometryInFocusSystem.resize(),s(this,P).occlusion2DSystem.resize();let{top:c,left:m}=this.container.getBoundingClientRect();s(this,M).containerOffset=[c,m],this.publish("resize"),this.render()},"#handleWindowResize"));_(this,Gd,o(()=>{this.renderSync()},"#renderFull"));_(this,cc,new ue);_(this,wu,o((r,n)=>{let i=this.mode==="standalone"?s(this,vt):this.viewCamera;if(s(this,vt).position.z+this.camera.elevation>n.z){s(this,cc).copy(n);let a=s(this,cc).project(i),u=(a.x+1)/2*this.canvasWidth-0/2,c=(-a.y+1)/2*this.canvasHeight-0/2,m=s(this,ac).call(this,u),d=s(this,ac).call(this,c);r.x=m,r.y=d}else r.x=-1e3,r.y=-1e3},"#project"));_(this,lc,o((r,n)=>{s(this,Yt).setBufferSize(r,n),s(this,vt).aspect=r/n,s(this,vt).updateProjectionMatrix(),s(this,vt).updateMatrixWorld(!0),s(this,Iu).x=r,s(this,Iu).y=n},"#setBufferSize"));_(this,Yo,o(()=>{var u;let r=s(this,M).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,M).canvasHeight=this.rendererDomElement.clientHeight,i=Math.floor(r*this.resolutionScale),a=Math.floor(n*this.resolutionScale);s(this,lc).call(this,i,a),(u=this.map)==null||u.resize(),s(this,M).shouldMeasureCanvas=!1},"#measureCanvas"));f(this,"getParentContainer",o((r,n=!0)=>{if(!r)return n?s(this,M).entityScene:void 0;if(typeof r=="string"||typeof r=="number"){let i=s(this,M).geometry3DMap.get(r);return i instanceof Ut?i:(De.warn("Parent (".concat(typeof r=="object"?r.id:r,") is not a valid container, adding to scene")),n?s(this,M).entityScene:void 0)}else if(r.type==="group-container"){let i=s(this,M).geometry3DMap.get(r.id);if(i instanceof Ut)return i}return n?s(this,M).entityScene:void 0},"getParentContainer"));f(this,"showCollisionBoxes",o(()=>{s(this,P).collisionSystem.showCollisionBoxes(),this.render()},"showCollisionBoxes"));f(this,"hideCollisionBoxes",o(()=>{s(this,P).collisionSystem.hideCollisionBoxes(),this.render()},"hideCollisionBoxes"));f(this,"projectScreenXYToCoordinate",o((r,n,i=!1)=>{var g,v;let a=this.container.getBoundingClientRect(),u=(r-a.left)/s(this,M).canvasWidth*2-1,c=-((n-a.top)/s(this,M).canvasHeight)*2+1,m=new Ie(u,c),d,h;if(i)P6.setFromCamera(m,s(this,vt)),d=(g=P6.intersectObject(s(this,ho),!1)[0])==null?void 0:g.point;else{let b=s(this,P).interactionSystem.getThreeDIntersectsFromXY(m);d=(v=b==null?void 0:b[0])==null?void 0:v.point,h=s(this,P).interactionSystem.getGroupContainerIntersectsFromXY(m)}if(d)return{coordinate:this.convert3DMapPositionToCoordinate(d),groupContainers:h}},"projectScreenXYToCoordinate"));f(this,"projectCoordinateToScreenXY",o(r=>{let n=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),i=new Ie;return s(this,wu).call(this,i,n),{x:i.x,y:i.y}},"projectCoordinateToScreenXY"));f(this,"convert3DMapPositionToCoordinate",o(r=>{var a,u,c,m;let{lat:n,lon:i}=Rc((u=(a=s(this,M).center)==null?void 0:a[1])!=null?u:0,(m=(c=s(this,M).center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n,r.z]},"convert3DMapPositionToCoordinate"));f(this,"setBackgroundColor",o((r,n)=>{s(this,Yt).setBackgroundColor(r,n)},"setBackgroundColor"));f(this,"getMetersPerPixel",o(()=>s(this,P).cameraSystem.getCurrentMetersPerPixel(),"getMetersPerPixel"));f(this,"hideOutdoorLayersIntersectingPolygons",o((r,n,i)=>{s(this,P).outdoorLayersSystem.hideLayersIntersectingPolygons(r,n,i),this.render()},"hideOutdoorLayersIntersectingPolygons"));_(this,Qo,new Fc);_(this,mc,new _r);_(this,dc,o(r=>{var n;De.error("Render failed: ",r,(n=r.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:r})},"#onRenderError"));f(this,"render",o(()=>{var r;if(!(((r=s(this,P))==null?void 0:r.renderSystem)==null||this.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,P).renderSystem.update().catch(s(this,dc))},"render"));f(this,"renderSync",o(()=>this.aborted?Promise.resolve():s(this,P).renderSystem.update(!0).catch(s(this,dc)),"renderSync"));_(this,Ar,ju(()=>{this.publish("user-interaction-start",void 0)},0,!0));_(this,Fr,ju(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));f(this,"on",o((r,n)=>{this.aborted||(super.on(r,n),["outdoor-view-loaded","outdoor-style-loaded"].includes(r)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(De.warn('"'.concat(r,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(r)))},"on"));f(this,"off",o((r,n)=>{super.off(r,n)},"off"));f(this,"getCursor",o(()=>s(this,P).interactionSystem.getCursor(),"getCursor"));_(this,Zd,o(()=>{if(s(this,M).entityScene.removeEventListener("childadded",s(this,lt)),s(this,M).entityScene.removeEventListener("childadded",s(this,Wt)),s(this,M).entityScene.removeEventListener("childremoved",s(this,lt)),s(this,M).entityScene.removeEventListener("childremoved",s(this,Wt)),window.removeEventListener("resize",s(this,sc),!1),s(this,ic).removeEventListener("change",s(this,uc)),this.map){for(let r in s(this,hn))for(let n of s(this,hn)[r])this.map.off(r,n);W(this,hn,{})}this._subscribers={}},"#cleanupEventListeners"));_(this,Vd,o(()=>{try{s(this,ki)!=="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,gn)&&this.container.contains(s(this,gn))&&this.container.removeChild(s(this,gn)),s(this,Xe)&&this.container.contains(s(this,Xe))&&this.container.removeChild(s(this,Xe)))}catch(r){De.warn("Error during DOM cleanup, some elements may not have been removed:",r)}},"#cleanupDOMElements"));f(this,"destroy",o(()=>{var r;s(this,P)&&(s(this,P).textureSystem.destroy(),this.aborted||s(this,Xo).abort(),s(this,Zd).call(this),this.remove("__scene"),s(this,P).renderSystem.destroy(),s(this,P).cameraSystem.dispose(),s(this,P).exporterSystem.destroy(),s(this,P).outdoorLayersSystem.destroy(),s(this,P).borderSystem.destroy(),s(this,Jo)&&s(this,Jo).disconnect(),s(this,Yt).destroy(),(r=s(this,St))==null||r.traverse(n=>{Rt(n),"dispose"in n&&typeof n.dispose=="function"&&n.dispose()}),W(this,St,void 0),s(this,P).htmlControlsSystem.destroy(),s(this,P).collisionSystem.destroy(),s(this,P).interactionSystem.destroy(),s(this,P).domMutationSystem.destroy(),s(this,P).geometryInFocusSystem.destroy(),s(this,P).occlusion2DSystem.destroy(),W(this,P,void 0),s(this,Vd).call(this),W(this,Yt,void 0))},"destroy"));_(this,Au,new ue);_(this,pc,new ue);if(W(this,Xo,new AbortController),s(this,M).useStandaloneCamera=(S=n.useStandaloneCamera)!=null?S:!1,s(this,M).naturalBearing=(O=n.naturalBearing)!=null?O:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!r.clientWidth||!r.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&&(W(this,ki,n.mode),this.map=n.map),s(this,M).entityScene.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).entityScene.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).geometry3DMap.set(s(this,M).entityScene.userData.entityId,s(this,M).entityScene),n.center&&(s(this,M).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=r,dt(this,sr,M6).call(this),dt(this,sr,T6).call(this),s(this,P).htmlControlsSystem=new Fm(this.container,{outdoorEnabled:!!this.map}),s(this,ki)!=="outdoors-overlay"&&s(this,P).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),W(this,Yt,new Vc({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:o(V=>{var Y;(Y=n.onWebGLContextRestored)==null||Y.call(n,V),s(this,Wt).call(this),s(this,lt).call(this),this.render()},"onWebGLContextRestored"),onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(E=n.backgroundAlpha)!=null?E:1})),W(this,St,new ji),s(this,ki)!=="standalone"&&s(this,St).add(Uy()),s(this,St).add(s(this,M).entityScene);let i=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof i<"u"&&(i.dispatchEvent(new CustomEvent("observe",{detail:s(this,St)})),i.dispatchEvent(new CustomEvent("observe",{detail:s(this,Yt)}))),W(this,vt,new qd(JP,this.aspect,50,1e5)),s(this,M).cameraObject=s(this,vt),W(this,nc,new sy),s(this,vt).renderOrder=999;let a=new xo;a.add(s(this,vt)),W(this,Du,new xo),s(this,Du).add(a),s(this,St).add(s(this,Du)),s(this,vt).updateProjectionMatrix(),s(this,vt).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:o(()=>0,"getNorth"),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,Yt).domElement(),W(this,Iu,new Ie);let u=new yn(1e6,1e6),c=new cr({color:0,visible:!1});W(this,ho,new Oe(u,c)),s(this,ho).name="worldPlane",s(this,St).add(s(this,ho)),(I=n.gl)!=null&&I.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,sc),!1),s(this,ic).addEventListener("change",s(this,uc)),typeof ResizeObserver=="function"&&((D=y.env)==null?void 0:D.NODE_ENV)!=="test"&&(W(this,Jo,new ResizeObserver(Qg(V=>{s(this,Su).call(this,V[0].contentRect.width,V[0].contentRect.height)},50))),(C=s(this,Jo))==null||C.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(A=globalThis.MappedinDebug)!=null&&A.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,M).canvasWidth=this.rendererDomElement.clientWidth,s(this,M).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let m=this.canvasWidth,d=this.canvasHeight;s(this,P).watermarkSystem=new ad(s(this,vt),s(this,M),n==null?void 0:n.watermark),s(this,P).watermarkSystem.on("texture-loaded",this.render),s(this,M).shouldMeasureCanvas=!0,s(this,M).pixelRatio=this.resolutionScale,s(this,lc).call(this,Math.floor(m*this.resolutionScale),Math.floor(d*this.resolutionScale));let h=new Mc(16777215,.3*Math.PI);h.position.set(-150,-150,350),s(this,St).add(h);let g=new fy(16777215,.741*Math.PI);s(this,St).add(g),s(this,P).cameraSystem=new lu(s(this,vt),s(this,St),s(this,Yt).renderer,s(this,M),{mode:this.mode,canvasHeight:d,canvasWidth:m}),s(this,P).cameraSystem.on("user-dolly-start",s(this,Ar)),s(this,P).cameraSystem.on("user-pan-start",s(this,Ar)),s(this,P).cameraSystem.on("user-rotate-start",s(this,Ar)),s(this,P).cameraSystem.on("user-zoom-start",s(this,Ar)),s(this,P).cameraSystem.on("user-tilt-start",s(this,Ar)),s(this,P).cameraSystem.on("user-pedestal-start",s(this,Ar)),s(this,P).cameraSystem.on("user-dolly-end",s(this,Fr)),s(this,P).cameraSystem.on("user-pan-end",s(this,Fr)),s(this,P).cameraSystem.on("user-rotate-end",s(this,Fr)),s(this,P).cameraSystem.on("user-zoom-end",s(this,Fr)),s(this,P).cameraSystem.on("user-tilt-end",s(this,Fr)),s(this,P).cameraSystem.on("user-pedestal-end",s(this,Fr)),s(this,P).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,P).geometryInFocusSystem&&(s(this,P).geometryInFocusSystem.cameraDirty=!0),this.render()}),this.onAbort(()=>{s(this,P).cameraSystem.off("user-dolly-start",s(this,Ar)),s(this,P).cameraSystem.off("user-pan-start",s(this,Ar)),s(this,P).cameraSystem.off("user-rotate-start",s(this,Ar)),s(this,P).cameraSystem.off("user-zoom-start",s(this,Ar)),s(this,P).cameraSystem.off("user-tilt-start",s(this,Ar)),s(this,P).cameraSystem.off("user-pedestal-start",s(this,Ar)),s(this,P).cameraSystem.off("user-dolly-end",s(this,Fr)),s(this,P).cameraSystem.off("user-pan-end",s(this,Fr)),s(this,P).cameraSystem.off("user-rotate-end",s(this,Fr)),s(this,P).cameraSystem.off("user-zoom-end",s(this,Fr)),s(this,P).cameraSystem.off("user-tilt-end",s(this,Fr)),s(this,P).cameraSystem.off("user-pedestal-end",s(this,Fr)),s(this,P).renderSystem.off("measure-canvas",s(this,Yo)),s(this,P).cameraSystem.off("change",this.render),s(this,P).outlineInterpolationSystem.off("needs-render",this.render)}),s(this,P).pathSystem=new tc(s(this,M),this.convertTo3DMapPosition,this.getParentContainer,s(this,P).cameraSystem.convertZoomLevelToAltitude),s(this,P).pathSystem.on("animate:path",this.render),this.onAbort(()=>{s(this,P).pathSystem.off("animate:path",this.render)}),s(this,P).panBoundsSystem=new cd(s(this,M),s(this,P).cameraSystem);let v=o(()=>{let{panBounds:V,fov:Y,convertAltitudeToZoomLevel:oe}=s(this,P).cameraSystem;if(s(this,P).panBoundsSystem.autoMinZoomLevel){if(V.radius<=0)return;let Z=Math.min(s(this,M).canvasWidth/s(this,M).canvasHeight,1),ee=Y*Math.PI/180*Z,te=Math.tan(ee/2),{radius:Q,center:de}=s(this,P).cameraSystem.panBounds,je=Q/te,Me=this.getThreeCamera().getWorldPosition(new ue),Ve=de.distanceTo(Me),qe=Math.abs(Me.z-de.z),Ae=je*qe/Ve,ot=oe(Ae);Ny(ot,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(ot)}this.publish("pan-bounds-change",s(this,P).cameraSystem.panBounds)},"handlePanBoundsUpdate");s(this,P).panBoundsSystem.on("update",v),this.onAbort(()=>{s(this,P).panBoundsSystem.off("update",v)}),this.camera=new jm(this,s(this,P),s(this,M)),this.camera.setZoomLevel((k=n.zoomLevel)!=null?k:bE),this.camera.setBearing((j=n.bearing)!=null?j:yE),this.camera.setPitch((U=n.pitch)!=null?U:gE),this.camera.setMaxZoomLevel(qP),this.camera.setMinZoomLevel(KP),s(this,P).domVisiblitySystem=new Ym(s(this,M),s(this,gn)),s(this,P).domMutationSystem=new od(s(this,M),s(this,gn)),s(this,P).domMutationSystem.on("dimensions-update",()=>{s(this,P).collisionSystem.collidersDirty=!0,this.render()}),s(this,P).domDrawSystem=new id(s(this,M)),s(this,P).collisionSystem=new Um(s(this,kn),s(this,M),((G=n.useCollisionWorker)!=null?G:!0)&&(($=n.useWorkers)!=null?$:!0)),s(this,P).twoDDrawSystem=new ed(s(this,M),s(this,wt),n.transformImageRequest),s(this,P).twoDDrawSystem.on("img:loaded",this.render),s(this,P).interactionSystem=new Ts(this.rendererDomElement,s(this,M),s(this,vt),s(this,ho),s(this,P).cameraSystem.isUserInteracting),s(this,P).interactionSystem.on("doubletap-with-onefinger",V=>{var Y;s(this,P).cameraSystem.enableZoom&&this.camera.animateTo({center:(Y=this.projectScreenXYToCoordinate(V.clientX,V.clientY))==null?void 0:Y.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:rp,easing:"ease-out"})}),s(this,P).interactionSystem.on("singletap-with-twofinger",()=>{s(this,P).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:rp,easing:"ease-out"})}),s(this,P).interactionSystem.on("hover",this.render),s(this,P).interactionSystem.on("click",V=>{var oe,Z,ee,te,Q,de,je,Me,Ve,qe,Ae,ot;if(((oe=V.entity2D)==null?void 0:oe.id)==="watermark"&&typeof s(this,P).watermarkSystem.options.onClick=="function"&&s(this,P).watermarkSystem.options.interactive){s(this,P).watermarkSystem.options.onClick();return}let Y=V.entity3D?[(Z=V.entity3D)==null?void 0:Z.id]:[];(Q=(te=(ee=V.entity3D)==null?void 0:ee.parentObject3D)==null?void 0:te.userData)!=null&&Q.entityId&&Y.push((Me=(je=(de=V.entity3D)==null?void 0:de.parentObject3D)==null?void 0:je.userData)==null?void 0:Me.entityId),this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(V.position),geometry:Y,paths:((Ve=V.entity3D)==null?void 0:Ve.components[0])instanceof ao?[V.entity3D.id]:[],markers:((qe=V.entity2D)==null?void 0:qe.components[0])instanceof ui?[V.entity2D.id]:[],models:((Ae=V.entity3D)==null?void 0:Ae.components[0])instanceof oo?[V.entity3D.id]:[],labels:((ot=V.entity2D)==null?void 0:ot.components[0])instanceof ai?[V.entity2D.id]:[],containers:Array.isArray(V.groupContainers)?V.groupContainers.map(Pt=>Pt.userData.entityId):[],pointerEvent:V.pointerEvent})}),s(this,P).interactionSystem.on("hover",V=>{var Y,oe,Z,ee,te;V.position&&this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(V.position),geometry:V.entity3D?[(Y=V.entity3D)==null?void 0:Y.id]:[],paths:((oe=V.entity3D)==null?void 0:oe.components[0])instanceof ao?[V.entity3D.id]:[],markers:((Z=V.entity2D)==null?void 0:Z.components[0])instanceof ui?[V.entity2D.id]:[],models:((ee=V.entity3D)==null?void 0:ee.components[0])instanceof oo?[V.entity3D.id]:[],labels:((te=V.entity2D)==null?void 0:te.components[0])instanceof ai?[V.entity2D.id]:[],containers:Array.isArray(V.groupContainers)?V.groupContainers.map(Q=>Q.userData.entityId):[]})}),s(this,P).geometryInFocusSystem=new xd(s(this,M),s(this,vt));let b=o(V=>{this.publish("geometry-in-focus",V)},"handleGeometryInFocus");s(this,P).geometryInFocusSystem.on("geometry-in-focus",b),this.onAbort(()=>{s(this,P).geometryInFocusSystem.off("geometry-in-focus",b)}),s(this,P).twoDVisiblitySystem=new rd(s(this,M)),s(this,P).drawSystem=new td(s(this,M),this.convertTo3DMapPosition),s(this,P).twoDProjectionSystem=new Qm(s(this,M),s(this,wu)),s(this,P).exporterSystem=new ks(s(this,M)),s(this,P).meshOptimizationSystem=new Xm(s(this,M),this.convertTo3DMapPosition),s(this,P).meshOptimizationSystem.on("model-loaded",this.render),s(this,P).meshOptimizationSystem.on("geometry-2d-added",this.render),s(this,P).meshOptimizationSystem.on("geometry-group-added",s(this,oc)),this.onAbort(()=>{s(this,P).meshOptimizationSystem.off("model-loaded",this.render),s(this,P).meshOptimizationSystem.off("geometry-2d-added",this.render),s(this,P).meshOptimizationSystem.off("geometry-group-added",s(this,oc))}),s(this,P).meshDetachmentSystem=new Bd(s(this,M)),s(this,P).meshModificationSystem=new Md(s(this,M)),s(this,P).geometryDisposalSystem=new jd(s(this,M)),s(this,P).textureSystem=new Ud(s(this,M)),s(this,P).textureSystem.on("texture-added",this.render),this.onAbort(()=>{s(this,P).textureSystem.off("texture-added",this.render)}),s(this,P).borderSystem=new g4(s(this,M),this.convertTo3DMapPosition),s(this,P).clippingPlaneSystem=new $d(s(this,M)),s(this,P).renderOrderSystem=new zd(s(this,M)),s(this,P).customGeometrySystem=new ld(s(this,M),this.convertTo3DMapPosition),s(this,P).outlineInterpolationSystem=new pd(s(this,M)),s(this,P).outlineInterpolationSystem.on("needs-render",this.render),s(this,P).renderSystem=new nd(s(this,Yt),s(this,M),this.mode,s(this,St),s(this,vt),this.viewCamera,s(this,P)),s(this,P).imageSystem=new vd(s(this,M),this.convertTo3DMapPosition,s(this,wu),n.bearing,n.naturalBearing,n.imagePlacementOptions),s(this,P).text3DSystem=new $y(s(this,M),this.convertTo3DMapPosition,(X=n.useWorkers)!=null?X:!0),s(this,P).text3DSystem.on("render",this.render),s(this,P).imageSystem.on("image-loaded",this.render),s(this,P).renderSystem.on("pre-render",()=>this.publish("pre-render")),s(this,P).renderSystem.on("post-render",()=>this.publish("post-render")),s(this,P).renderSystem.on("measure-canvas",s(this,Yo)),this.onAbort(()=>{s(this,P).renderSystem.off("pre-render",()=>this.publish("pre-render")),s(this,P).renderSystem.off("post-render",()=>this.publish("post-render")),s(this,P).renderSystem.off("measure-canvas",s(this,Yo))}),s(this,P).outdoorLayersSystem=new Sd(this.map),s(this,P).occlusion2DSystem=new Nd(s(this,M),this.convertTo3DMapPosition,s(this,Yt)),n.occlusionEnabled&&s(this,P).occlusion2DSystem.enable(),this.Debug=new Rd(this),n.environment!==!1&&W(this,qo,dt(this,sr,Wg).call(this)),s(this,Gd).call(this)}get viewCamera(){return s(this,nc)}get canvasWidth(){return s(this,M).canvasWidth}get canvasHeight(){return s(this,M).canvasHeight}get resolutionScale(){var r,n;return(n=(r=this.map)==null?void 0:r._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:Nu()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,ki)}addGroupContainer(r,n,i){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let a=new Ut(r);a.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),a.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),(n==null?void 0:n.visible)!==void 0&&(a.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&a.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&Lr(a,n.interactive,s(this,M)),(n==null?void 0:n.focusable)!==void 0&&Zc(a,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(a.userData.preloadGeometry=n.preloadGeometry),s(this,M).geometry3DMap.set(r,a);let u=this.getParentContainer(i);u instanceof Ut&&u.addEntity(a),s(this,lt).call(this),this.render()}else De.error("Group container with ID '".concat(r,"' already exists. The group container cannot be added."));return{id:r,type:"group-container"}}addCustomGeometry(r,n,i,a,u){if(s(this,M).geometry3DMap.has(r))De.error("Custom geometry with ID '".concat(r,"' already exists. The custom geometry cannot be added."));else{let c=new gu(n,i),m=new et(c,new jn(a));(a==null?void 0:a.interactive)!==void 0&&Lr(m,a.interactive,s(this,M)),m.id=r,c.mesh.userData={entityId:r,type:"custom-geometry"},s(this,M).geometry3DMap.set(m.id,m);let d=this.getParentContainer(u);u&&d instanceof Ut?d.addEntity(m):s(this,M).entityScene.addEntity(m),s(this,lt).call(this),this.render()}return{id:r,type:"custom-geometry"}}addGeometryGroup(r,n,i,a){var c;if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let m=new bn(r);m.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),m.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),m.userData.dirty=!0,s(this,M).geometry3DMap.set(r,m);let u=i||{color:y4},{visible:d}=u,h=yo(u,["visible"]);for(let v of n.features){if(v.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(v.geometry.type))continue;let b=(v==null?void 0:v.id)||((c=v==null?void 0:v.properties)==null?void 0:c.id)||ca(),S=s(this,P).meshOptimizationSystem.createEntityFromFeature(b,v,R({outline:!0},h));s(this,M).geometry3DMap.set(b,S),m.userData.entities3D.add(b),s(this,P).textureSystem.dirty=!0}m.setVisible(d!=null?d:!0);let g=this.getParentContainer(a);g instanceof Ut&&g.addEntity(m),s(this,lt).call(this),this.render()}else De.error("Geometry group with ID '".concat(r,"' already exists. The geometry group cannot be added."));return s(this,P).outlineInterpolationSystem.geometries3DDirty=!0,{id:r,type:"geometry-group"}}addOccluder(r,n){let i=this.getParentContainer(n),a=s(this,P).occlusion2DSystem.reserveOccluderId();return i==null||i.addOccluderFeature(r,a),a}addImage(r,n,i,a){try{KE(r,n,i)}catch(u){De.error(u);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new bd(n),c=new et(u,new jn(i));c.id=r||ca(),u.mesh.userData={entityId:c.id,type:"path"},s(this,M).geometry3DMap.set(c.id,c);let m=this.getParentContainer(a);m instanceof Ut&&m.addEntity(c),s(this,lt).call(this),this.render()}else De.error("Image with ID '".concat(r,"' already exists. The image cannot be added."));return{id:r,type:"image"}}addModelGroup(r,n,i,{parent:a,onComplete:u}={}){var c,m;try{AE(r,n,i)}catch(d){De.error(d);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let d=new bn(r);d.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),d.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Wt).call(this)}),s(this,M).geometry3DMap.set(r,d),d.userData.dirty=!0,d.userData.modelURL=i.url;for(let g of n.features){let v=g.id||g.properties.id||ca(),b=s(this,P).meshOptimizationSystem.createModelFromFeature(v,g,R({},i));(g.properties.interactive!==void 0||i.interactive!=null)&&Lr(b,(c=g.properties.interactive)!=null?c:i.interactive,s(this,M)),i.clippingPlaneZOffset!=null&&(b.components[7]=new qy,b.components[7].verticalOffset=i.clippingPlaneZOffset),b.parentId=d.userData.entityId,s(this,M).geometry3DMap.set(v,b),d.userData.entities3D.add(v)}let h=this.getParentContainer(a);h instanceof Ut&&h.addEntity(d),s(this,lt).call(this),(m=this.render())==null||m.then(u)}else De.error("Model group with ID '".concat(r,"' already exists. The model group cannot be added."));return{id:r,type:"geometry-group"}}addMarker2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{By(r,n,i||{})}catch(m){De.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,sr,Vg).call(this,r,new ui(n,i),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&i.interactive!=="pointer-events-auto"&&Lr(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&$c(m,i.enabled);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof et&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),this.render()}else De.error("Marker2D with ID '".concat(u,"' already exists. The marker cannot be added."));return{id:u,type:"marker"}}addText3D(r,n,i,a){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new zc(xe(R({},n),{properties:xe(R({},n.properties),{id:r,content:n.properties.text})})),c=new et(u,new Uu(i==null?void 0:i.appearance));c.id=r,u.mesh.userData.entityId=r.toString(),u.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(r,c);let m=this.getParentContainer(a);m instanceof Ut&&m.addEntity(c),s(this,lt).call(this),this.render()}else De.error("Text3D with ID '".concat(r,"' already exists. The text3d cannot be added."));return{id:r,type:"text3d"}}labelText3D(r,n,i={}){var d,h;try{if(!n||!r)throw new Error("content and meshGeometryId are required");Gy.parse(i)}catch(g){De.error(g);return}let a=s(this,M).geometry3DMap.get(r);if((a==null?void 0:a.type)!=="geometry"){De.error(".labelText3D failed: target incorrect");return}let u=a==null?void 0:a.components[0];if(!u.feature.properties.textArea)return;if(u.textEntityId){let g=s(this,M).geometry3DMap.get(u.textEntityId);if((g==null?void 0:g.type)!=="text3d"){De.error(".labelText3D failed: existing text3d not found");return}return{id:g.id,type:g.type}}let c=new zc({type:"Feature",geometry:{coordinates:(d=u.feature.properties.textArea)==null?void 0:d.position,type:"Point"},properties:{textArea:u.feature.properties.textArea,content:n,id:ca()}});c.polygonEntityId=r;let m=new et(c,new Uu(i==null?void 0:i.appearance));return u.textEntityId=m.id.toString(),c.mesh.userData.entityId=m.id.toString(),c.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(m.id.toString(),m),i.parentId&&((h=this.getParentContainer(i.parentId))==null||h.addEntity(m)),this.render(),{id:m.id,type:"text3d"}}addLabel2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{Oy(r,n,i||{})}catch(m){De.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,sr,Vg).call(this,r,new ai(n,i||{},s(this,M)),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&Lr(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&$c(m,i.enabled);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof et&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),s(this,Wt).call(this),this.render()}else De.error("Label2D with ID '".concat(u,"' already exists. The label cannot be added."));return{id:u,type:"label"}}addPath(r,n={},i){var m,d;try{TE(r,n||{})}catch(h){De.error(h);return}let a=new ao(r,l4(n)),u=new et(a,new jn({color:(m=n==null?void 0:n.color)!=null?m:"#ff834c",altitude:(d=n==null?void 0:n.verticalOffset)!=null?d:.1}));u.id=(n==null?void 0:n.id)||ca(),a.mesh.userData={entityId:u.id,type:"path"},s(this,M).geometry3DMap.set(u.id,u),(n==null?void 0:n.interactive)!=null&&Lr(u,n==null?void 0:n.interactive,s(this,M));let c=this.getParentContainer(i);return c instanceof Ut&&c.addEntity(u),s(this,lt).call(this),this.render(),{id:u.id,type:"path"}}updateWatermark(r){s(this,P).watermarkSystem.options=r,s(this,P).watermarkSystem.dirty=!0,s(this,P).collisionSystem.collidersDirty=!0,this.render()}remove(r){var i,a;let n;if(typeof r=="string"||typeof r=="number"?(n=s(this,M).geometry2DMap.get(r),n==null&&(n=s(this,M).geometry3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(n=s(this,M).geometry2DMap.get(r.id),n==null&&(n=s(this,M).geometry3DMap.get(r.id))):n=r,n!=null){if(n.type==="custom-geometry")s(this,M).geometry3DMap.delete(n.id),n.object3d&&Rt(n.object3d);else if(n.type==="group-container"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let c of n.childrenIds.values())this.remove(c),n.userData.entities2D.delete(c);let u=n.components[1];u&&u.focusMesh&&Rt(u.focusMesh),Rt(n)}else if(n.type==="geometry-group"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let u of n.userData.entities3D.values())this.remove(u),n.userData.entities3D.delete(u);Rt(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let u=n.components[0],c=n.components[4];if(n.entities2D.size>0){for(let d of n.entities2D.values())this.remove(d);n.removeAllEntities()}let m=(a=(i=n.parentObject3D)==null?void 0:i.userData.entityId)!=null?a:n.parentId;if(m){let d=s(this,M).geometry3DMap.get(m);d instanceof bn&&d.userData.entities3D.delete(n.id)}if(n.object3d&&Rt(n.object3d),n.type==="geometry"){let d=n.components[3];d&&(d.enabled=!1,d.dirty=!0)}c&&"focusMesh"in c&&c.focusMesh!=null&&Rt(c.focusMesh),"textMesh"in u&&u.textMesh!=null&&this.remove(u.textMesh.userData.entityId),s(this,M).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let u=n.attachedTo;if(u){let c=s(this,M).geometry3DMap.get(u);c instanceof et&&c.detach(n)}n.object3d&&Rt(n.object3d),n.type==="label"&&delete s(this,P).twoDDrawSystem.textCache[n.id],s(this,M).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&Rt(n.object3d),s(this,M).geometry3DMap.delete(n.id);else if(n.type==="text3d"){Rt(n.object3d);let{batchedText:u,textMesh:c,polygonEntityId:m}=n.components[0];if(c&&(u&&u.removeText(c),Rt(c)),m){s(this,P).text3DSystem.remove(m);let d=s(this,M).geometry3DMap.get(m);(d==null?void 0:d.type)==="geometry"&&(d.components[0].textMesh=void 0,d.components[0].textEntityId=void 0)}s(this,M).geometry3DMap.delete(n.id)}s(this,lt).call(this),s(this,Wt).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,St)}getThreeCamera(){return s(this,vt)}async setEnvironment(r){if(s(this,St))if(r==="basic"){s(this,qo)||W(this,qo,dt(this,sr,Wg).call(this));let n=await s(this,qo);s(this,St).environment=n}else s(this,St).environment=null}getEnvironment(){var r;return(r=s(this,St))!=null&&r.environment?"basic":!1}getCurrentSceneGLTF(r){return s(this,P).exporterSystem.getCurrentSceneGLTF(r)}getBoundingArea(r){(s(this,P).renderSystem.threeDdirty||s(this,P).renderSystem.twoDdirty)&&this.renderSync();let n=new Qt;if(r==null)n.setFromObject(s(this,M).entityScene);else{let i=ma(s(this,M),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let a=i.components[0],u=a instanceof Tt?a.geometry:void 0;a.mesh instanceof Oc&&u?(u.computeBoundingBox(),u.boundingBox&&n.union(u.boundingBox)):n.setFromObject(i.object3d)}else((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null&&n.setFromObject(i)}if(_c(n))return Py(n).map(this.convert3DMapPositionToCoordinate)}hasState(r){return ma(s(this,M),r)!=null}getState(r){var i,a,u,c,m,d,h,g,v,b,S,O,x,E,I,D,C;if(r==null)return{type:"map-view",hoverColor:s(this,M).hoverColor,text3dHoverColor:s(this,M).text3dHoverColor};let n=ma(s(this,M),r);if((n==null?void 0:n.type)==="custom-geometry"){let A=n.components[0],T=n.components[1];return{id:n.id,type:"custom-geometry",visible:T.visible,altitude:T.altitude,parent:(i=n.parentObject3D)==null?void 0:i.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()),T=A==null?void 0:A[0],k=T?this.getState(T):{};return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:k==null?void 0:k.altitude,initialColor:k==null?void 0:k.initialColor,color:k==null?void 0:k.color,side:(a=k==null?void 0:k.side)!=null?a:"double",opacity:k==null?void 0:k.opacity,height:k==null?void 0:k.height,texture:k==null?void 0:k.texture,topColor:k==null?void 0:k.topColor,topTexture:k==null?void 0:k.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(j=>s(this,M).geometry3DMap.get(j)).every(j=>j&&j.components[2]!=null),children:A,bevel:k==null?void 0:k.bevel}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(u=n.getWorldPosition(XP).z)!=null?u: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],T=n.object3d.parent,k=T==null?void 0:T.userData.entityId;return{id:n.id,type:"label",text:A.text||"",parent:{id:k,type:T==null?void 0:T.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:A.enabled,visible:A.visible,initialRank:Lu(A.initialRank),options:{rank:Lu(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],T=n.object3d.parent,k=T==null?void 0:T.userData.entityId;return{id:n.id,type:"marker",enabled:A.enabled,visible:A.visible,placement:A.options.placement,dynamicResize:A.options.dynamicResize,parent:{id:k,type:T==null?void 0:T.type},position:this.convert3DMapPositionToCoordinate(n.position),element:A.containerEl,initialRank:Lu(A.initialRank),contentHTML:A.contentHtml,options:{rank:Lu(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:T,initialColor:k,initialTopColor:j,topColor:U,altitude:G}=n.components[1],$=n.components[0],X=n.components[1],V=n.components[1],Y=n.components[6],oe=n.components[2],Z=n.components[3],ee=n.parentObject3D;return{id:n.id,type:"geometry",opacity:V.opacity,initialColor:k,color:A,focusable:X!=null&&X.focusMesh!=null,initialTopColor:j,topColor:U,side:V.side,hoverColor:T,hovered:!!(oe!=null&&oe.hover),height:V.height,visible:V.visible,outline:Z==null?void 0:Z.enabled,showImage:V.showImage,texture:(c=Y==null?void 0:Y.texture)==null?void 0:c.path,topTexture:(m=Y==null?void 0:Y.topTexture)==null?void 0:m.path,flipImageToFaceCamera:V.flipImageToFaceCamera,enableImageCollisions:V.enableImageCollisions,parent:{id:ee==null?void 0:ee.userData.entityId,type:ee==null?void 0:ee.type},altitude:G,bevel:V.bevel,position:this.convert3DMapPositionToCoordinate($.position),interactive:n.components[2]!=null,borderVisible:V.borderVisible,borderColor:V.borderColor,borderWidth:V.borderWidth}}else if((n==null?void 0:n.type)==="model"){let A=n.components[0],T=n.components[1],k=n.components[2];return{id:n.id,type:"model",position:A.mesh?this.convert3DMapPositionToCoordinate((d=A.mesh)==null?void 0:d.getWorldPosition(new ue)):this.convert3DMapPositionToCoordinate(A.position),interactive:k!=null,material:T.material,parent:(h=n.parentObject3D)!=null&&h.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:T.visible,verticalOffset:T.verticalOffset,color:T.color,opacity:T.opacity,rotation:(g=T.rotation)!=null?g:ha,scale:(v=T.scale)!=null?v:fa}}else if((n==null?void 0:n.type)==="path"){let A=n.components[0],T=n.components[2],k=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(A.position),visible:k.visible,interactive:T!=null,completeFraction:A.completeFraction,color:k.color,accentColor:A.accentColor,width:A.width,animateArrowsOnPath:A.animateArrowsOnPath,displayArrowsOnPath:A.displayArrowsOnPath,verticalOffset:k.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:(b=A.feature.properties.verticalOffset)!=null?b:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(S=A.feature.properties.width)!=null?S:0,height:(O=A.feature.properties.height)!=null?O:0,rotation:(x=A.feature.properties.rotation)!=null?x:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof zc&&"textArea"in n.components[0].feature.properties){m4(n);let A=n.components[0],T=n.components[1],{textMesh:k}=A,j=(E=A.mesh)==null?void 0:E.parent;j instanceof Ut&&((I=j.children.find($=>$.type==="batchedtext"))==null||I.getWorldPosition(s(this,pc))),s(this,Au).set(0,0,0);let U=k?k.getWorldPosition(s(this,Au)):s(this,Au);return Object.assign({},pa,T.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(U.add(s(this,pc))),visible:(D=A.visible)!=null?D:!1,content:(C=A.feature.properties.content)!=null?C:""})}else return}}setState(r,n){var a,u;if(typeof r=="object"&&n==null){"hoverColor"in r&&(Dy(r.hoverColor)?s(this,M).hoverColor=(a=r.hoverColor)!=null?a:s(this,M).hoverColor:De.warn('Failed to update global hover color. Invalid color "'.concat(r.hoverColor,'".'))),"text3dHoverColor"in r&&(s(this,M).text3dHoverColor=(u=r.text3dHoverColor)!=null?u:s(this,M).text3dHoverColor);return}let i=ma(s(this,M),r);if(i!=null){if(i.type==="custom-geometry"){let c=s(this,M).geometry3DMap.get(i.id);if(c instanceof et&&c.components[0]instanceof gu){let m=n;$i(i,s(this,M),m.visible),ga(i,s(this,M),m.altitude),up(i,m.position,this.convertTo3DMapPosition),sp(i,this.getParentContainer(m.parent,!1)),Lr(i,m.interactive,s(this,M))&&s(this,lt).call(this)}}else if(i.type==="path"){let c=n;Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),ga(i,s(this,M),c.verticalOffset),c4(i,s(this,M),c)}else if(i.type==="model"){let c=n;Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),$i(i,s(this,M),c.visible),p4(i,c),f4(i,c)}else if(i.type==="group-container"){let c=n;$i(i,s(this,M),c.visible)&&(s(this,P).pathSystem.verticalDistanceDirty=!0,s(this,P).geometryInFocusSystem.focusablesDirty=!0),ga(i,s(this,M),c.altitude)&&(s(this,P).pathSystem.verticalDistanceDirty=!0),Lr(i,c.interactive,s(this,M))&&s(this,lt).call(this),Gc(i,s(this,M),c.opacity)&&(s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),c.preloadGeometry&&i.userData.preloadGeometry!==!0&&(i.userData.preloadGeometry=!0,s(this,P).outlineInterpolationSystem.geometries3DDirty=!0),Zc(i,c.focusable)&&(s(this,P).geometryInFocusSystem.focusablesDirty=!0)}else if(i.type==="geometry-group"){let c=n;$i(i,s(this,M),c.visible),Jy(i,s(this,M),c),mp(i,s(this,M),c.outline),c.height!=null&&ap(i,s(this,M),c.height),ga(i,s(this,M),c.altitude),lp(i,s(this,M),c)&&(s(this,P).textureSystem.dirty=!0),lp(i,s(this,M),c),Xy(i,s(this,M),c.shading),Gc(i,s(this,M),c.opacity)&&(s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),Lr(i,c.interactive,s(this,M))&&(s(this,lt).call(this),s(this,Wt).call(this)),dp(i,s(this,M),c.side)}else if(i.type==="geometry"){if(i.components[0]instanceof Tt){let c=n;$i(i,s(this,M),c.visible),mp(i,s(this,M),c.outline),Yy(i,c),Zc(i,c.focusable)&&(s(this,P).geometryInFocusSystem.focusablesDirty=!0),u4(i,c.renderOrder)&&(s(this,P).meshDetachmentSystem.dirty=!0),a4(i,c.opacity)&&(s(this,P).meshDetachmentSystem.dirty=!0,s(this,P).interactionSystem.dirty3D=!0,s(this,P).outlineInterpolationSystem.outlineOpacitiesDirty=!0),cp(i,c.flipImageToFaceCamera),i4(i,c.enableImageCollisions),ga(i,s(this,M),c.altitude),c.height!=null&&ap(i,s(this,M),c.height),o4(i,c)&&(s(this,P).meshDetachmentSystem.dirty=!0,s(this,P).textureSystem.dirty=!0),Qy(i,c),r4(i,c.hoverColor),Lr(i,c.interactive,s(this,M)),n4(i,c.hovered),dp(i,s(this,M),c.side),s4(i,c)}s(this,lt).call(this)}else if(i.type==="label"||i.type==="marker"){let c=n;t4(i,n,s(this,M)),e4(i,n,s(this,M))&&(s(this,Wt).call(this),s(this,P).domMutationSystem.dirty=!0),up(i,c.position,this.convertTo3DMapPosition),sp(i,this.getParentContainer(c.parent,!1))&&(s(this,Wt).call(this),s(this,P).panBoundsSystem.dirty=!0),$c(i,c.enabled),$i(i,s(this,M),c.visible)}else if(i.type==="image"){let c=n;$i(i,s(this,M),c.visible),Gc(i,s(this,M),c.opacity),cp(i,c.flipImageToFaceCamera)}else if(i.type==="text3d"){let c=n;d4(i,s(this,M),c)}this.render()}}convertTo3DMapPosition(r,n,i=0,a){var m,d,h,g,v;if(Array.isArray(r))return this.convertTo3DMapPosition(r[1],r[0],(m=r[2])!=null?m:i,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:u,y:c}=Nc((h=(d=s(this,M).center)==null?void 0:d[1])!=null?h:0,(v=(g=s(this,M).center)==null?void 0:g[0])!=null?v:0,r,n);return a?(a.set(u,c,i),a):new ue(u,c,i)}get backgroundColor(){return typeof s(this,Yt).backgroundColor=="string"?s(this,Yt).backgroundColor:"#".concat(s(this,Yt).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,Yt).backgroundAlpha}getThreeRenderer(){return s(this,Yt)}getCenter(r){let n=Array.isArray(r)?r:this.getBoundingArea(r);return n?Ry(n):void 0}isInView(r){let n=ma(s(this,M),r);if(s(this,mc).identity().multiply(s(this,vt).projectionMatrix).multiply(s(this,vt).matrixWorldInverse),s(this,Qo).setFromProjectionMatrix(s(this,mc)),n instanceof tp)return s(this,Qo).containsPoint(n.position);if(n instanceof et){let i=n==null?void 0:n.components[0];if(i instanceof gu||i instanceof oo)return s(this,Qo).containsPoint(this.convertTo3DMapPosition(i.feature.geometry.coordinates));if(i instanceof Tt){let a=new Qt(this.convertTo3DMapPosition(i.featureBbox[1],i.featureBbox[0],0),this.convertTo3DMapPosition(i.featureBbox[3],i.featureBbox[2],0));return s(this,Qo).intersectsBox(a)}}return!1}queryGeometry2DInView(r){let{screenOffsets:n,fullyContains:i}=r!=null?r:{},[a,u,c,m]=zy(this.container,n),d=new Se(a,u,c,m);return s(this,P).collisionSystem.visibleCollidersQTree.queryRect(d).filter(b=>i?d.contains(b):d.intersects(b)).map(b=>s(this,M).geometry2DMap.get(b.userData.entityId)).filter(b=>b!=null).filter(b=>b.components[0]instanceof ai||b.components[0]instanceof ui).map(b=>b.id.toString())}onMapLibreEvent(r,n){if(!this.map){De.warn('Tried to add event listener "'.concat(r,'" but MapLibre map is not initialized.'));return}this.map.on(r,n),s(this,hn)[r]=s(this,hn)[r]||[],s(this,hn)[r].push(n)}offMapLibreEvent(r,n){!this.map||!Array.isArray(s(this,hn)[r])||(this.map.off(r,n),s(this,hn)[r]=s(this,hn)[r].filter(i=>i!==n))}get aborted(){return s(this,Xo).signal.aborted}onAbort(r){s(this,Xo).signal.addEventListener("abort",r,{once:!0})}getSystems(){return s(this,P)}getInternalState(){return s(this,M)}getInternalTweenGroup(){return s(this,M).internalTweenGroup}getExternalTweenGroup(){return s(this,M).externalTweenGroup}computeMinZOffsetBetweenContainers(r,n,i){if(!r||!n)return-1;ep(r,"group-container"),ep(n,"group-container");let a=jc(r,this.getThreeCamera()),u=n.clone(),c=jc(u,this.getThreeCamera());if(!_c(a)||!_c(c))return-1;let m=0,d;i&&this.container.querySelectorAll(".debug-box").forEach(g=>g.remove());do{if(m>1e4)return-1;if(m+=20,u.position.z=m,u.updateMatrixWorld(),c.makeEmpty(),jc(u,s(this,vt),c),d=a.intersectsBox(c),i){let h=op(a,"blue",this.container),g=op(c,d?"red":"green",this.container);h.classList.add("debug-box"),g.classList.add("debug-box")}}while(d);return m}};St=new WeakMap,vt=new WeakMap,qo=new WeakMap,nc=new WeakMap,Iu=new WeakMap,ho=new WeakMap,Jo=new WeakMap,Du=new WeakMap,sr=new WeakSet,Zg=o(function(r){var n;s(this,ki)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(r)),s(this,M).pixelRatio=this.resolutionScale},"#setResolutionScale"),M=new WeakMap,hn=new WeakMap,Xo=new WeakMap,Xe=new WeakMap,kn=new WeakMap,wt=new WeakMap,gn=new WeakMap,Yt=new WeakMap,P=new WeakMap,ic=new WeakMap,Wt=new WeakMap,lt=new WeakMap,M6=o(function(){W(this,Xe,document.createElement("div")),s(this,Xe).classList.add("mappedin__smart-collision-engine__container"),W(this,kn,document.createElement("canvas")),s(this,kn).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Xe)),W(this,wt,document.createElement("canvas")),s(this,wt).classList.add("mappedin__smart-collision-engine__container"),s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,Xe).appendChild(s(this,kn)),s(this,Xe).appendChild(s(this,wt)),s(this,kn).width=s(this,Xe).clientWidth,s(this,kn).height=s(this,Xe).clientHeight,s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px"},"#renderEntity2DContainer"),T6=o(function(){W(this,gn,document.createElement("div")),s(this,gn).classList.add("mappedin-2d-entities"),Object.assign(s(this,gn).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,gn))},"#renderEntityDOMContainer"),k6=o(function(){s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,kn).width=s(this,Xe).clientWidth,s(this,kn).height=s(this,Xe).clientHeight,s(this,wt).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,wt).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,wt).style.width=s(this,Xe).clientWidth+"px",s(this,wt).style.height=s(this,Xe).clientHeight+"px",s(this,P).collisionSystem.collidersDirty=!0},"#resizeCollisionCanvas"),ki=new WeakMap,oc=new WeakMap,ac=new WeakMap,uc=new WeakMap,sc=new WeakMap,Su=new WeakMap,Gd=new WeakMap,cc=new WeakMap,wu=new WeakMap,lc=new WeakMap,Yo=new WeakMap,Vg=o(function(r,n,i,a){let u=new tp(n,this.convertTo3DMapPosition(r[1],r[0],r[2]||0),a);return u.occluderId=i!=null?i:s(this,P).occlusion2DSystem.backgroundId,s(this,M).geometry2DMap.set(u.id,u),u},"#createEntity2D"),Qo=new WeakMap,mc=new WeakMap,dc=new WeakMap,Ar=new WeakMap,Fr=new WeakMap,Wg=o(async function(){return so.load(v4).then(r=>{var n;return s(this,St)&&((n=s(this,St).environment)==null||n.dispose(),r.mapping=ey,s(this,St).environment=r,this.render()),r})},"#loadEnvMap"),Zd=new WeakMap,Vd=new WeakMap,Au=new WeakMap,pc=new WeakMap,o(Hg,"Core");var Gg=Hg,XP=new ue,Th=Gg;var Kg=class Kg extends Te{constructor(r){super();f(this,"gl");f(this,"el",document.createElement("div"));f(this,"core");f(this,"origin");f(this,"map");f(this,"layer");f(this,"handleStyleChange",o(()=>{!this.map||!this.layer||this.map.getLayer(this.layer.id)||(this.map.addLayer(this.layer),this.core.camera.setMinZoomLevel(this.map.getMinZoom()),this.core.camera.setMaxZoomLevel(this.map.getMaxZoom()),this.core.camera.setMinPitch(this.map.getMinPitch()),this.core.camera.setMaxPitch(this.map.getMaxPitch()))},"handleStyleChange"));f(this,"handleMove",o(()=>{if(!this.map)return;let[r,n]=this.map.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(r,n),this.core.getSystems().cameraSystem.setZoomLevel(this.map.getZoom()),this.core.getSystems().cameraSystem.setRotation(Fe.degToRad(this.map.getBearing())),this.core.getSystems().cameraSystem.setTilt(Fe.degToRad(this.map.getPitch()))},"handleMove"));f(this,"handleError",o(r=>{De.warn(r)},"handleError"));this.origin=r}onAdd(r){this.origin=this.origin||r.getCenter().toArray(),this.gl=r.painter.context.gl,this.core=new Th(r._container,{center:this.origin,zoomLevel:r.getZoom(),pitch:r.getPitch(),bearing:r.getBearing(),gl:this.gl,map:r,mode:"outdoors-overlay"}),this.map=r,this.core.camera.setMinZoomLevel(r.getMinZoom()),this.core.camera.setMaxZoomLevel(r.getMaxZoom()),this.core.camera.setMinPitch(r.getMinPitch()),this.core.camera.setMaxPitch(r.getMaxPitch()),this.map.on("error",this.handleError);let n=Hd.fromLngLat(this.origin,0);return this.layer=np(n,this.core.viewCamera,()=>{this.core.renderSync()}),this.map.on("styledata",this.handleStyleChange),this.map.on("move",this.handleMove),this.handleStyleChange(),this.el}onRemove(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("move",this.handleMove),this.map.off("error",this.handleError),this.layer&&this.map.removeLayer(this.layer.id)),this.layer=void 0,this.map=void 0,this.core&&this.core.destroy(),this.core=void 0}};o(Kg,"MapLibreOverlay");var Wd=Kg;l();var _6=xy("",{prefix:"[MapLibreOverlay]"});l();var L6=o((e,{id:t}={})=>{let r=Array.isArray(e)?e:[e];if(!r.every(a=>typeof a=="string"))return;let n=r.join(""),i=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(i=a)}i==null&&(i=document.createElement("style")),t&&t!==""&&(i.id=t),i.textContent=n,document.head.appendChild(i)},"injectCSS");var R6=".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 N6=".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 j6=".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 U6=".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 nM=[R6,N6,j6,U6],kve=o((e,t)=>{fc.instance!=null&&_6.warn("Only a single map venue is supported at this time.");let r=new fc([e.mapCenter.longitude,e.mapCenter.latitude],e,t);return fc.instance=r,r},"createMapLibreOverlay"),iM=3,oM={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:iM}},ea,ta,Fu,go,ra,hc=class hc{constructor(t,r,n){_(this,ea);_(this,ta);_(this,Fu);_(this,go);_(this,ra);f(this,"on",o((t,r)=>{s(this,ea).on(t,r)},"on"));f(this,"off",o((t,r)=>{s(this,ea).off(t,r)},"off"));W(this,ea,new Te),W(this,ra,new Wd(t)),W(this,ta,r),W(this,Fu,n)}onAdd(t){var i,a,u;let r=s(this,ra).onAdd(t),n=xe(R(R({},oM),(i=s(this,Fu))!=null?i:{}),{outdoorView:R({token:s(this,ta).outdoorViewToken},(a=s(this,Fu))==null?void 0:a.outdoorView)});return W(this,go,new rM(s(this,ra).core)),((u=n.injectStyles)==null||u)&&L6(nM,{id:"mappedin__styles"}),s(this,go).addMap(s(this,ta),n).then(()=>{s(this,ea).publish("loaded",{mapView:s(this,go),mapData:s(this,ta)})}),r}onRemove(){s(this,go)&&s(this,go).clear(),hc.instance=null,s(this,ra).onRemove()}};ea=new WeakMap,ta=new WeakMap,Fu=new WeakMap,go=new WeakMap,ra=new WeakMap,o(hc,"MappedinMapLibreOverlay"),f(hc,"instance");var fc=hc;export{oM as DEFAULT_MAP_OPTIONS,iM as FLOOR_GAP,fc as MappedinMapLibreOverlay,kve as createMapLibreOverlay};
|
|
1
|
+
import{$ as t4,$a as Jc,A as Wy,Aa as g4,B as Hy,Ba as Zu,C as Ky,Ca as Oo,D as Fo,Da as y4,E as qy,Ea as $r,F as Jy,Fa as b4,G as ne,Ga as v4,H as ha,Ha as x4,I as ju,Ia as wp,J as Xy,Ja as E4,K as mi,Ka as Ap,L as Yy,La as Fp,M as di,Ma as Kc,N as xp,Na as C4,O as Ki,Oa as I4,P as ot,Pa as Op,Q as $c,Qa as D4,R as zu,Ra as S4,S as kr,Sa as Pp,T as Ep,Ta as w4,U as Qy,Ua as qi,V as ga,Va as qc,W as e4,Wa as Bp,X as $u,Xa as A4,Ya as F4,Z as Gc,Za as Ea,_ as Zc,_a as Mp,a as mp,aa as r4,ab as O4,b as dp,ba as n4,bb as Tp,c as fp,ca as Cp,cb as P4,d as hp,da as i4,db as B4,e as Nc,ea as Ip,eb as M4,f as Uc,fa as o4,fb as T4,g as Ao,ga as a4,gb as k4,h as jy,ha as ya,hb as _4,i as zy,ia as u4,ib as L4,j as gp,ja as s4,jb as zn,k as Hi,ka as Vc,kb as R4,l as yp,la as Dp,lb as Rt,m as $y,ma as c4,mb as N4,n as Ee,na as Sp,nb as Xc,o as bp,oa as Gu,ob as $n,p as jn,pa as ba,pb as U4,q as Gy,qa as Wc,qb as kt,r as Zy,ra as va,rb as Gn,s as jc,sa as xa,sb as tr,t as Vy,ta as l4,u as zc,ua as m4,v as da,va as Hc,w as pa,wa as d4,x as vp,xa as p4,y as fa,ya as f4,z as ke,za as h4}from"./chunk-NVXDKAHA.js";import{a as Yr}from"./chunk-AYTY2WDR.js";import{$a as Rc,B as Dc,D as Sc,Da as Ty,E as Gi,Ea as ca,F as wc,Fa as ky,G as Ac,Ga as la,H as Fc,Ha as ma,I as Oc,Ia as En,Ja as _c,K as Sy,Ka as _y,L as Oe,La as Nu,M as Se,Na as Uu,Q as wy,R as Ay,S as Fy,T as Pc,U as ae,V as er,W as Oy,X as zr,Xa as Lc,Y as sa,Z as wo,_ as Tt,a as l,aa as dr,ab as Ly,b as y,ba as Dr,ca as Bc,d as Ic,da as Pe,e as So,ea as Zi,eb as Ry,f as _u,g as li,ga as Vi,gb as Un,h as Cy,ha as Py,i as Lu,ia as pp,ib as Ny,ja as Mc,ka as Wi,kb as Uy,r as Iy,sa as Nn,t as Dy,ta as By,ua as Tc,va as kc,wa as My,ya as Ru}from"./chunk-W37QTIXX.js";import{a as U,b as xe,c as o,d as Cc,e as Do,g as ci,h as $i,i as xy,j as h,k as s,l as R,m as H,n as dt,o as Ey,p as K}from"./chunk-LUJQR5EH.js";var FE=ci((Ah,Fh)=>{l();(function(e,t){typeof Ah=="object"&&typeof Fh<"u"?Fh.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(Ah,function(){"use strict";var e=o(function(n,i){if(n===void 0&&(n=[]),i===void 0&&(i=t),this.data=n,this.length=this.data.length,this.compare=i,this.length>0)for(var a=(this.length>>1)-1;a>=0;a--)this._down(a)},"TinyQueue");e.prototype.push=o(function(n){this.data.push(n),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=o(function(){if(this.length!==0){var n=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),n}},"pop"),e.prototype.peek=o(function(){return this.data[0]},"peek"),e.prototype._up=o(function(n){for(var i=this,a=i.data,u=i.compare,c=a[n];n>0;){var m=n-1>>1,d=a[m];if(u(c,d)>=0)break;a[n]=d,n=m}a[n]=c},"_up"),e.prototype._down=o(function(n){for(var i=this,a=i.data,u=i.compare,c=this.length>>1,m=a[n];n<c;){var d=(n<<1)+1,f=a[d],g=d+1;if(g<this.length&&u(a[g],f)<0&&(d=g,f=a[g]),u(f,m)>=0)break;a[n]=f,n=d}a[n]=m},"_down");function t(r,n){return r<n?-1:r>n?1:0}return o(t,"defaultCompare"),e})});var PE=ci((Ule,Oh)=>{"use strict";l();var Um=FE();Um.default&&(Um=Um.default);Oh.exports=OE;Oh.exports.default=OE;function OE(e,t,r){t=t||1;for(var n,i,a,u,c=0;c<e[0].length;c++){var m=e[0][c];(!c||m[0]<n)&&(n=m[0]),(!c||m[1]<i)&&(i=m[1]),(!c||m[0]>a)&&(a=m[0]),(!c||m[1]>u)&&(u=m[1])}var d=a-n,f=u-i,g=Math.min(d,f),v=g/2;if(g===0){var b=[n,i];return b.distance=0,b}for(var S=new Um(void 0,hP),F=n;F<a;F+=g)for(var E=i;E<u;E+=g)S.push(new co(F+v,E+v,v,e));var x=yP(e),D=new co(n+d/2,i+f/2,0,e);D.d>x.d&&(x=D);for(var I=S.length;S.length;){var C=S.pop();C.d>x.d&&(x=C,r&&console.log("found best %d after %d probes",Math.round(1e4*C.d)/1e4,I)),!(C.max-x.d<=t)&&(v=C.h/2,S.push(new co(C.x-v,C.y-v,v,e)),S.push(new co(C.x+v,C.y-v,v,e)),S.push(new co(C.x-v,C.y+v,v,e)),S.push(new co(C.x+v,C.y+v,v,e)),I+=4)}r&&(console.log("num probes: "+I),console.log("best distance: "+x.d));var k=[x.x,x.y];return k.distance=x.d,k}o(OE,"polylabel");function hP(e,t){return t.max-e.max}o(hP,"compareMax");function co(e,t,r,n){this.x=e,this.y=t,this.h=r,this.d=gP(e,t,n),this.max=this.d+this.h*Math.SQRT2}o(co,"Cell");function gP(e,t,r){for(var n=!1,i=1/0,a=0;a<r.length;a++)for(var u=r[a],c=0,m=u.length,d=m-1;c<m;d=c++){var f=u[c],g=u[d];f[1]>t!=g[1]>t&&e<(g[0]-f[0])*(t-f[1])/(g[1]-f[1])+f[0]&&(n=!n),i=Math.min(i,bP(e,t,f,g))}return i===0?0:(n?1:-1)*Math.sqrt(i)}o(gP,"pointToPolygonDist");function yP(e){for(var t=0,r=0,n=0,i=e[0],a=0,u=i.length,c=u-1;a<u;c=a++){var m=i[a],d=i[c],f=m[0]*d[1]-d[0]*m[1];r+=(m[0]+d[0])*f,n+=(m[1]+d[1])*f,t+=f*3}return t===0?new co(i[0][0],i[0][1],0,e):new co(r/t,n/t,0,e)}o(yP,"getCentroidCell");function bP(e,t,r,n){var i=r[0],a=r[1],u=n[0]-i,c=n[1]-a;if(u!==0||c!==0){var m=((e-i)*u+(t-a)*c)/(u*u+c*c);m>1?(i=n[0],a=n[1]):m>0&&(i+=u*m,a+=c*m)}return u=e-i,c=t-a,u*u+c*c}o(bP,"getSegDistSq")});var E6=ci((kg,_g)=>{l();(function(e,t){typeof kg=="object"&&typeof _g<"u"?_g.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(kg,function(){"use strict";function e(E,x,D,I,C){o(function k(V,$,T,w,L){for(;w>T;){if(w-T>600){var _=w-T+1,G=$-T+1,ie=Math.log(_),Q=.5*Math.exp(2*ie/3),le=.5*Math.sqrt(ie*Q*(_-Q)/_)*(G-_/2<0?-1:1),Z=Math.max(T,Math.floor($-G*Q/_+le)),Y=Math.min(w,Math.floor($+(_-G)*Q/_+le));k(V,$,Z,Y,L)}var ee=V[$],q=T,ce=w;for(t(V,T,$),L(V[w],ee)>0&&t(V,T,w);q<ce;){for(t(V,q,ce),q++,ce--;L(V[q],ee)<0;)q++;for(;L(V[ce],ee)>0;)ce--}L(V[T],ee)===0?t(V,T,ce):t(V,++ce,w),ce<=$&&(T=ce+1),$<=ce&&(w=ce-1)}},"t")(E,x,D||0,I||E.length-1,C||r)}o(e,"t");function t(E,x,D){var I=E[x];E[x]=E[D],E[D]=I}o(t,"i");function r(E,x){return E<x?-1:E>x?1:0}o(r,"n");var n=o(function(E){E===void 0&&(E=9),this._maxEntries=Math.max(4,E),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function i(E,x,D){if(!D)return x.indexOf(E);for(var I=0;I<x.length;I++)if(D(E,x[I]))return I;return-1}o(i,"e");function a(E,x){u(E,0,E.children.length,x,E)}o(a,"a");function u(E,x,D,I,C){C||(C=S(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var k=x;k<D;k++){var V=E.children[k];c(C,E.leaf?I(V):V)}return C}o(u,"h");function c(E,x){return E.minX=Math.min(E.minX,x.minX),E.minY=Math.min(E.minY,x.minY),E.maxX=Math.max(E.maxX,x.maxX),E.maxY=Math.max(E.maxY,x.maxY),E}o(c,"o");function m(E,x){return E.minX-x.minX}o(m,"s");function d(E,x){return E.minY-x.minY}o(d,"l");function f(E){return(E.maxX-E.minX)*(E.maxY-E.minY)}o(f,"f");function g(E){return E.maxX-E.minX+(E.maxY-E.minY)}o(g,"u");function v(E,x){return E.minX<=x.minX&&E.minY<=x.minY&&x.maxX<=E.maxX&&x.maxY<=E.maxY}o(v,"m");function b(E,x){return x.minX<=E.maxX&&x.minY<=E.maxY&&x.maxX>=E.minX&&x.maxY>=E.minY}o(b,"c");function S(E){return{children:E,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}o(S,"p");function F(E,x,D,I,C){for(var k=[x,D];k.length;)if(!((D=k.pop())-(x=k.pop())<=I)){var V=x+Math.ceil((D-x)/I/2)*I;e(E,V,x,D,C),k.push(x,V,V,D)}}return o(F,"d"),n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(E){var x=this.data,D=[];if(!b(E,x))return D;for(var I=this.toBBox,C=[];x;){for(var k=0;k<x.children.length;k++){var V=x.children[k],$=x.leaf?I(V):V;b(E,$)&&(x.leaf?D.push(V):v(E,$)?this._all(V,D):C.push(V))}x=C.pop()}return D},n.prototype.collides=function(E){var x=this.data;if(!b(E,x))return!1;for(var D=[];x;){for(var I=0;I<x.children.length;I++){var C=x.children[I],k=x.leaf?this.toBBox(C):C;if(b(E,k)){if(x.leaf||v(E,k))return!0;D.push(C)}}x=D.pop()}return!1},n.prototype.load=function(E){if(!E||!E.length)return this;if(E.length<this._minEntries){for(var x=0;x<E.length;x++)this.insert(E[x]);return this}var D=this._build(E.slice(),0,E.length-1,0);if(this.data.children.length)if(this.data.height===D.height)this._splitRoot(this.data,D);else{if(this.data.height<D.height){var I=this.data;this.data=D,D=I}this._insert(D,this.data.height-D.height-1,!0)}else this.data=D;return this},n.prototype.insert=function(E){return E&&this._insert(E,this.data.height-1),this},n.prototype.clear=function(){return this.data=S([]),this},n.prototype.remove=function(E,x){if(!E)return this;for(var D,I,C,k=this.data,V=this.toBBox(E),$=[],T=[];k||$.length;){if(k||(k=$.pop(),I=$[$.length-1],D=T.pop(),C=!0),k.leaf){var w=i(E,k.children,x);if(w!==-1)return k.children.splice(w,1),$.push(k),this._condense($),this}C||k.leaf||!v(k,V)?I?(D++,k=I.children[D],C=!1):k=null:($.push(k),T.push(D),D=0,I=k,k=k.children[0])}return this},n.prototype.toBBox=function(E){return E},n.prototype.compareMinX=function(E,x){return E.minX-x.minX},n.prototype.compareMinY=function(E,x){return E.minY-x.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(E){return this.data=E,this},n.prototype._all=function(E,x){for(var D=[];E;)E.leaf?x.push.apply(x,E.children):D.push.apply(D,E.children),E=D.pop();return x},n.prototype._build=function(E,x,D,I){var C,k=D-x+1,V=this._maxEntries;if(k<=V)return a(C=S(E.slice(x,D+1)),this.toBBox),C;I||(I=Math.ceil(Math.log(k)/Math.log(V)),V=Math.ceil(k/Math.pow(V,I-1))),(C=S([])).leaf=!1,C.height=I;var $=Math.ceil(k/V),T=$*Math.ceil(Math.sqrt(V));F(E,x,D,T,this.compareMinX);for(var w=x;w<=D;w+=T){var L=Math.min(w+T-1,D);F(E,w,L,$,this.compareMinY);for(var _=w;_<=L;_+=$){var G=Math.min(_+$-1,L);C.children.push(this._build(E,_,G,I-1))}}return a(C,this.toBBox),C},n.prototype._chooseSubtree=function(E,x,D,I){for(;I.push(x),!x.leaf&&I.length-1!==D;){for(var C=1/0,k=1/0,V=void 0,$=0;$<x.children.length;$++){var T=x.children[$],w=f(T),L=(_=E,G=T,(Math.max(G.maxX,_.maxX)-Math.min(G.minX,_.minX))*(Math.max(G.maxY,_.maxY)-Math.min(G.minY,_.minY))-w);L<k?(k=L,C=w<C?w:C,V=T):L===k&&w<C&&(C=w,V=T)}x=V||x.children[0]}var _,G;return x},n.prototype._insert=function(E,x,D){var I=D?E:this.toBBox(E),C=[],k=this._chooseSubtree(I,this.data,x,C);for(k.children.push(E),c(k,I);x>=0&&C[x].children.length>this._maxEntries;)this._split(C,x),x--;this._adjustParentBBoxes(I,C,x)},n.prototype._split=function(E,x){var D=E[x],I=D.children.length,C=this._minEntries;this._chooseSplitAxis(D,C,I);var k=this._chooseSplitIndex(D,C,I),V=S(D.children.splice(k,D.children.length-k));V.height=D.height,V.leaf=D.leaf,a(D,this.toBBox),a(V,this.toBBox),x?E[x-1].children.push(V):this._splitRoot(D,V)},n.prototype._splitRoot=function(E,x){this.data=S([E,x]),this.data.height=E.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(E,x,D){for(var I,C,k,V,$,T,w,L=1/0,_=1/0,G=x;G<=D-x;G++){var ie=u(E,0,G,this.toBBox),Q=u(E,G,D,this.toBBox),le=(C=ie,k=Q,V=void 0,$=void 0,T=void 0,w=void 0,V=Math.max(C.minX,k.minX),$=Math.max(C.minY,k.minY),T=Math.min(C.maxX,k.maxX),w=Math.min(C.maxY,k.maxY),Math.max(0,T-V)*Math.max(0,w-$)),Z=f(ie)+f(Q);le<L?(L=le,I=G,_=Z<_?Z:_):le===L&&Z<_&&(_=Z,I=G)}return I||D-x},n.prototype._chooseSplitAxis=function(E,x,D){var I=E.leaf?this.compareMinX:m,C=E.leaf?this.compareMinY:d;this._allDistMargin(E,x,D,I)<this._allDistMargin(E,x,D,C)&&E.children.sort(I)},n.prototype._allDistMargin=function(E,x,D,I){E.children.sort(I);for(var C=this.toBBox,k=u(E,0,x,C),V=u(E,D-x,D,C),$=g(k)+g(V),T=x;T<D-x;T++){var w=E.children[T];c(k,E.leaf?C(w):w),$+=g(k)}for(var L=D-x-1;L>=x;L--){var _=E.children[L];c(V,E.leaf?C(_):_),$+=g(V)}return $},n.prototype._adjustParentBBoxes=function(E,x,D){for(var I=D;I>=0;I--)c(x[I],E)},n.prototype._condense=function(E){for(var x=E.length-1,D=void 0;x>=0;x--)E[x].children.length===0?x>0?(D=E[x-1].children).splice(D.indexOf(E[x]),1):this.clear():a(E[x],this.toBBox)},n})});var jg=ci(ge=>{"use strict";l();Object.defineProperty(ge,"__esModule",{value:!0});ge.earthRadius=63710088e-1;ge.factors={centimeters:ge.earthRadius*100,centimetres:ge.earthRadius*100,degrees:ge.earthRadius/111325,feet:ge.earthRadius*3.28084,inches:ge.earthRadius*39.37,kilometers:ge.earthRadius/1e3,kilometres:ge.earthRadius/1e3,meters:ge.earthRadius,metres:ge.earthRadius,miles:ge.earthRadius/1609.344,millimeters:ge.earthRadius*1e3,millimetres:ge.earthRadius*1e3,nauticalmiles:ge.earthRadius/1852,radians:1,yards:ge.earthRadius*1.0936};ge.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/ge.earthRadius,yards:1.0936133};ge.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 xo(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(xo,"feature");ge.feature=xo;function VB(e,t,r){switch(r===void 0&&(r={}),e){case"Point":return Lg(t).geometry;case"LineString":return Ng(t).geometry;case"Polygon":return Rg(t).geometry;case"MultiPoint":return I6(t).geometry;case"MultiLineString":return C6(t).geometry;case"MultiPolygon":return D6(t).geometry;default:throw new Error(e+" is invalid")}}o(VB,"geometry");ge.geometry=VB;function Lg(e,t,r){if(r===void 0&&(r={}),!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(!Td(e[0])||!Td(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return xo(n,t,r)}o(Lg,"point");ge.point=Lg;function WB(e,t,r){return r===void 0&&(r={}),kd(e.map(function(n){return Lg(n,t)}),r)}o(WB,"points");ge.points=WB;function Rg(e,t,r){r===void 0&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var u=0;u<a[a.length-1].length;u++)if(a[a.length-1][u]!==a[0][u])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:e};return xo(c,t,r)}o(Rg,"polygon");ge.polygon=Rg;function HB(e,t,r){return r===void 0&&(r={}),kd(e.map(function(n){return Rg(n,t)}),r)}o(HB,"polygons");ge.polygons=HB;function Ng(e,t,r){if(r===void 0&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:e};return xo(n,t,r)}o(Ng,"lineString");ge.lineString=Ng;function KB(e,t,r){return r===void 0&&(r={}),kd(e.map(function(n){return Ng(n,t)}),r)}o(KB,"lineStrings");ge.lineStrings=KB;function kd(e,t){t===void 0&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o(kd,"featureCollection");ge.featureCollection=kd;function C6(e,t,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:e};return xo(n,t,r)}o(C6,"multiLineString");ge.multiLineString=C6;function I6(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return xo(n,t,r)}o(I6,"multiPoint");ge.multiPoint=I6;function D6(e,t,r){r===void 0&&(r={});var n={type:"MultiPolygon",coordinates:e};return xo(n,t,r)}o(D6,"multiPolygon");ge.multiPolygon=D6;function qB(e,t,r){r===void 0&&(r={});var n={type:"GeometryCollection",geometries:e};return xo(n,t,r)}o(qB,"geometryCollection");ge.geometryCollection=qB;function JB(e,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}o(JB,"round");ge.round=JB;function S6(e,t){t===void 0&&(t="kilometers");var r=ge.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(S6,"radiansToLength");ge.radiansToLength=S6;function Ug(e,t){t===void 0&&(t="kilometers");var r=ge.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(Ug,"lengthToRadians");ge.lengthToRadians=Ug;function XB(e,t){return w6(Ug(e,t))}o(XB,"lengthToDegrees");ge.lengthToDegrees=XB;function YB(e){var t=e%360;return t<0&&(t+=360),t}o(YB,"bearingToAzimuth");ge.bearingToAzimuth=YB;function w6(e){var t=e%(2*Math.PI);return t*180/Math.PI}o(w6,"radiansToDegrees");ge.radiansToDegrees=w6;function QB(e){var t=e%360;return t*Math.PI/180}o(QB,"degreesToRadians");ge.degreesToRadians=QB;function eM(e,t,r){if(t===void 0&&(t="kilometers"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return S6(Ug(e,t),r)}o(eM,"convertLength");ge.convertLength=eM;function tM(e,t,r){if(t===void 0&&(t="meters"),r===void 0&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var n=ge.areaFactors[t];if(!n)throw new Error("invalid original units");var i=ge.areaFactors[r];if(!i)throw new Error("invalid final units");return e/n*i}o(tM,"convertArea");ge.convertArea=tM;function Td(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(Td,"isNumber");ge.isNumber=Td;function rM(e){return!!e&&e.constructor===Object}o(rM,"isObject");ge.isObject=rM;function nM(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(t){if(!Td(t))throw new Error("bbox must only contain numbers")})}o(nM,"validateBBox");ge.validateBBox=nM;function iM(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")}o(iM,"validateId");ge.validateId=iM});var B6=ci(Vt=>{"use strict";l();Object.defineProperty(Vt,"__esModule",{value:!0});var Er=jg();function Qs(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,f=0,g=0,v,b=e.type,S=b==="FeatureCollection",F=b==="Feature",E=S?e.features.length:1,x=0;x<E;x++){d=S?e.features[x].geometry:F?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var D=0;D<c;D++){var I=0,C=0;if(u=v?d.geometries[D]:d,u!==null){m=u.coordinates;var k=u.type;switch(f=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":if(t(m,g,x,I,C)===!1)return!1;g++,I++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,x,I,C)===!1)return!1;g++,k==="MultiPoint"&&I++}k==="LineString"&&I++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-f;i++){if(t(m[n][i],g,x,I,C)===!1)return!1;g++}k==="MultiLineString"&&I++,k==="Polygon"&&C++}k==="Polygon"&&I++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-f;a++){if(t(m[n][i][a],g,x,I,C)===!1)return!1;g++}C++}I++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(Qs(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(Qs,"coordEach");function oM(e,t,r,n){var i=r;return Qs(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(oM,"coordReduce");function A6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(A6,"propEach");function aM(e,t,r){var n=r;return A6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(aM,"propReduce");function F6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(F6,"featureEach");function uM(e,t,r){var n=r;return F6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(uM,"featureReduce");function sM(e){var t=[];return Qs(e,function(r){t.push(r)}),t}o(sM,"coordAll");function zg(e,t){var r,n,i,a,u,c,m,d,f,g,v=0,b=e.type==="FeatureCollection",S=e.type==="Feature",F=b?e.features.length:1;for(r=0;r<F;r++){for(c=b?e.features[r].geometry:S?e.geometry:e,d=b?e.features[r].properties:S?e.properties:{},f=b?e.features[r].bbox:S?e.bbox:void 0,g=b?e.features[r].id:S?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,f,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,f,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,f,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(zg,"geomEach");function cM(e,t,r){var n=r;return zg(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(cM,"geomReduce");function _d(e,t){zg(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(Er.feature(r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var f=r.coordinates[d],g={type:m,coordinates:f};if(t(Er.feature(g,i),n,d)===!1)return!1}})}o(_d,"flattenEach");function lM(e,t,r){var n=r;return _d(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(lM,"flattenReduce");function O6(e,t){_d(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,f=0;if(Qs(r,function(g,v,b,S,F){if(c===void 0||n>m||S>d||F>f){c=g,m=n,d=S,f=F,a=0;return}var E=Er.lineString([c,g],r.properties);if(t(E,n,i,F,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(O6,"segmentEach");function mM(e,t,r){var n=r,i=!1;return O6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(mM,"segmentReduce");function P6(e,t){if(!e)throw new Error("geojson is required");_d(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(Er.lineString(u[c],r.properties),n,i,c)===!1)return!1;break}}})}o(P6,"lineEach");function dM(e,t,r){var n=r;return P6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(dM,"lineReduce");function pM(e,t){if(t=t||{},!Er.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),Er.lineString([m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),Er.lineString([m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),Er.lineString([m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),Er.lineString([m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(pM,"findSegment");function fM(e,t){if(t=t||{},!Er.isObject(t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return Er.point(m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),Er.point(m[n],u,t);case"LineString":return a<0&&(a=m.length+a),Er.point(m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),Er.point(m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),Er.point(m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),Er.point(m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(fM,"findPoint");Vt.coordAll=sM;Vt.coordEach=Qs;Vt.coordReduce=oM;Vt.featureEach=F6;Vt.featureReduce=uM;Vt.findPoint=fM;Vt.findSegment=pM;Vt.flattenEach=_d;Vt.flattenReduce=lM;Vt.geomEach=zg;Vt.geomReduce=cM;Vt.lineEach=P6;Vt.lineReduce=dM;Vt.propEach=A6;Vt.propReduce=aM;Vt.segmentEach=O6;Vt.segmentReduce=mM});var R6=ci(qe=>{"use strict";l();Object.defineProperty(qe,"__esModule",{value:!0});var jr=63710088e-1,Gg={centimeters:jr*100,centimetres:jr*100,degrees:360/(2*Math.PI),feet:jr*3.28084,inches:jr*39.37,kilometers:jr/1e3,kilometres:jr/1e3,meters:jr,metres:jr,miles:jr/1609.344,millimeters:jr*1e3,millimetres:jr*1e3,nauticalmiles:jr/1852,radians:1,yards:jr*1.0936},$g={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,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Eo(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}o(Eo,"feature");function hM(e,t,r={}){switch(e){case"Point":return Zg(t).geometry;case"LineString":return Wg(t).geometry;case"Polygon":return Vg(t).geometry;case"MultiPoint":return T6(t).geometry;case"MultiLineString":return M6(t).geometry;case"MultiPolygon":return k6(t).geometry;default:throw new Error(e+" is invalid")}}o(hM,"geometry");function Zg(e,t,r={}){if(!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(!Ld(e[0])||!Ld(e[1]))throw new Error("coordinates must contain numbers");return Eo({type:"Point",coordinates:e},t,r)}o(Zg,"point");function gM(e,t,r={}){return Rd(e.map(n=>Zg(n,t)),r)}o(gM,"points");function Vg(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let 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.")}return Eo({type:"Polygon",coordinates:e},t,r)}o(Vg,"polygon");function yM(e,t,r={}){return Rd(e.map(n=>Vg(n,t)),r)}o(yM,"polygons");function Wg(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return Eo({type:"LineString",coordinates:e},t,r)}o(Wg,"lineString");function bM(e,t,r={}){return Rd(e.map(n=>Wg(n,t)),r)}o(bM,"lineStrings");function Rd(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}o(Rd,"featureCollection");function M6(e,t,r={}){return Eo({type:"MultiLineString",coordinates:e},t,r)}o(M6,"multiLineString");function T6(e,t,r={}){return Eo({type:"MultiPoint",coordinates:e},t,r)}o(T6,"multiPoint");function k6(e,t,r={}){return Eo({type:"MultiPolygon",coordinates:e},t,r)}o(k6,"multiPolygon");function vM(e,t,r={}){return Eo({type:"GeometryCollection",geometries:e},t,r)}o(vM,"geometryCollection");function xM(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}o(xM,"round");function _6(e,t="kilometers"){let r=Gg[t];if(!r)throw new Error(t+" units is invalid");return e*r}o(_6,"radiansToLength");function Hg(e,t="kilometers"){let r=Gg[t];if(!r)throw new Error(t+" units is invalid");return e/r}o(Hg,"lengthToRadians");function EM(e,t){return L6(Hg(e,t))}o(EM,"lengthToDegrees");function CM(e){let t=e%360;return t<0&&(t+=360),t}o(CM,"bearingToAzimuth");function IM(e){return e=e%360,e>180?e-360:e<-180?e+360:e}o(IM,"azimuthToBearing");function L6(e){return e%(2*Math.PI)*180/Math.PI}o(L6,"radiansToDegrees");function DM(e){return e%360*Math.PI/180}o(DM,"degreesToRadians");function SM(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return _6(Hg(e,t),r)}o(SM,"convertLength");function wM(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=$g[t];if(!n)throw new Error("invalid original units");let i=$g[r];if(!i)throw new Error("invalid final units");return e/n*i}o(wM,"convertArea");function Ld(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}o(Ld,"isNumber");function AM(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}o(AM,"isObject");function FM(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(t=>{if(!Ld(t))throw new Error("bbox must only contain numbers")})}o(FM,"validateBBox");function OM(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")}o(OM,"validateId");qe.areaFactors=$g;qe.azimuthToBearing=IM;qe.bearingToAzimuth=CM;qe.convertArea=wM;qe.convertLength=SM;qe.degreesToRadians=DM;qe.earthRadius=jr;qe.factors=Gg;qe.feature=Eo;qe.featureCollection=Rd;qe.geometry=hM;qe.geometryCollection=vM;qe.isNumber=Ld;qe.isObject=AM;qe.lengthToDegrees=EM;qe.lengthToRadians=Hg;qe.lineString=Wg;qe.lineStrings=bM;qe.multiLineString=M6;qe.multiPoint=T6;qe.multiPolygon=k6;qe.point=Zg;qe.points=gM;qe.polygon=Vg;qe.polygons=yM;qe.radiansToDegrees=L6;qe.radiansToLength=_6;qe.round=xM;qe.validateBBox=FM;qe.validateId=OM});var $6=ci(Wt=>{"use strict";l();Object.defineProperty(Wt,"__esModule",{value:!0});var Cr=R6();function ec(e,t,r){if(e!==null)for(var n,i,a,u,c,m,d,f=0,g=0,v,b=e.type,S=b==="FeatureCollection",F=b==="Feature",E=S?e.features.length:1,x=0;x<E;x++){d=S?e.features[x].geometry:F?e.geometry:e,v=d?d.type==="GeometryCollection":!1,c=v?d.geometries.length:1;for(var D=0;D<c;D++){var I=0,C=0;if(u=v?d.geometries[D]:d,u!==null){m=u.coordinates;var k=u.type;switch(f=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":if(t(m,g,x,I,C)===!1)return!1;g++,I++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(t(m[n],g,x,I,C)===!1)return!1;g++,k==="MultiPoint"&&I++}k==="LineString"&&I++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(i=0;i<m[n].length-f;i++){if(t(m[n][i],g,x,I,C)===!1)return!1;g++}k==="MultiLineString"&&I++,k==="Polygon"&&C++}k==="Polygon"&&I++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(C=0,i=0;i<m[n].length;i++){for(a=0;a<m[n][i].length-f;a++){if(t(m[n][i][a],g,x,I,C)===!1)return!1;g++}C++}I++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(ec(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}o(ec,"coordEach");function PM(e,t,r,n){var i=r;return ec(e,function(a,u,c,m,d){u===0&&r===void 0?i=a:i=t(i,a,u,c,m,d)},n),i}o(PM,"coordReduce");function N6(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}o(N6,"propEach");function BM(e,t,r){var n=r;return N6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(BM,"propReduce");function U6(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}o(U6,"featureEach");function MM(e,t,r){var n=r;return U6(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}o(MM,"featureReduce");function TM(e){var t=[];return ec(e,function(r){t.push(r)}),t}o(TM,"coordAll");function Kg(e,t){var r,n,i,a,u,c,m,d,f,g,v=0,b=e.type==="FeatureCollection",S=e.type==="Feature",F=b?e.features.length:1;for(r=0;r<F;r++){for(c=b?e.features[r].geometry:S?e.geometry:e,d=b?e.features[r].properties:S?e.properties:{},f=b?e.features[r].bbox:S?e.bbox:void 0,g=b?e.features[r].id:S?e.id:void 0,m=c?c.type==="GeometryCollection":!1,u=m?c.geometries.length:1,i=0;i<u;i++){if(a=m?c.geometries[i]:c,a===null){if(t(null,v,d,f,g)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,v,d,f,g)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],v,d,f,g)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}o(Kg,"geomEach");function kM(e,t,r){var n=r;return Kg(e,function(i,a,u,c,m){a===0&&r===void 0?n=i:n=t(n,i,a,u,c,m)}),n}o(kM,"geomReduce");function Nd(e,t){Kg(e,function(r,n,i,a,u){var c=r===null?null:r.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return t(Cr.feature.call(void 0,r,i,{bbox:a,id:u}),n,0)===!1?!1:void 0}var m;switch(c){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var d=0;d<r.coordinates.length;d++){var f=r.coordinates[d],g={type:m,coordinates:f};if(t(Cr.feature.call(void 0,g,i),n,d)===!1)return!1}})}o(Nd,"flattenEach");function _M(e,t,r){var n=r;return Nd(e,function(i,a,u){a===0&&u===0&&r===void 0?n=i:n=t(n,i,a,u)}),n}o(_M,"flattenReduce");function j6(e,t){Nd(e,function(r,n,i){var a=0;if(r.geometry){var u=r.geometry.type;if(!(u==="Point"||u==="MultiPoint")){var c,m=0,d=0,f=0;if(ec(r,function(g,v,b,S,F){if(c===void 0||n>m||S>d||F>f){c=g,m=n,d=S,f=F,a=0;return}var E=Cr.lineString.call(void 0,[c,g],r.properties);if(t(E,n,i,F,a)===!1)return!1;a++,c=g})===!1)return!1}}})}o(j6,"segmentEach");function LM(e,t,r){var n=r,i=!1;return j6(e,function(a,u,c,m,d){i===!1&&r===void 0?n=a:n=t(n,a,u,c,m,d),i=!0}),n}o(LM,"segmentReduce");function z6(e,t){if(!e)throw new Error("geojson is required");Nd(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,u=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c<u.length;c++)if(t(Cr.lineString.call(void 0,u[c],r.properties),n,i,c)===!1)return!1;break}}})}o(z6,"lineEach");function RM(e,t,r){var n=r;return z6(e,function(i,a,u,c){a===0&&r===void 0?n=i:n=t(n,i,a,u,c)}),n}o(RM,"lineReduce");function NM(e,t){if(t=t||{},!Cr.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=m.length+a-1),Cr.lineString.call(void 0,[m[a],m[a+1]],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a-1),Cr.lineString.call(void 0,[m[i][a],m[i][a+1]],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a-1),Cr.lineString.call(void 0,[m[n][a],m[n][a+1]],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a-1),Cr.lineString.call(void 0,[m[n][i][a],m[n][i][a+1]],u,t)}throw new Error("geojson is invalid")}o(NM,"findSegment");function UM(e,t){if(t=t||{},!Cr.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,u=t.properties,c;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),u=u||e.features[r].properties,c=e.features[r].geometry;break;case"Feature":u=u||e.properties,c=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=e;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var m=c.coordinates;switch(c.type){case"Point":return Cr.point.call(void 0,m,u,t);case"MultiPoint":return n<0&&(n=m.length+n),Cr.point.call(void 0,m[n],u,t);case"LineString":return a<0&&(a=m.length+a),Cr.point.call(void 0,m[a],u,t);case"Polygon":return i<0&&(i=m.length+i),a<0&&(a=m[i].length+a),Cr.point.call(void 0,m[i][a],u,t);case"MultiLineString":return n<0&&(n=m.length+n),a<0&&(a=m[n].length+a),Cr.point.call(void 0,m[n][a],u,t);case"MultiPolygon":return n<0&&(n=m.length+n),i<0&&(i=m[n].length+i),a<0&&(a=m[n][i].length-a),Cr.point.call(void 0,m[n][i][a],u,t)}throw new Error("geojson is invalid")}o(UM,"findPoint");Wt.coordAll=TM;Wt.coordEach=ec;Wt.coordReduce=PM;Wt.featureEach=U6;Wt.featureReduce=MM;Wt.findPoint=UM;Wt.findSegment=NM;Wt.flattenEach=Nd;Wt.flattenReduce=_M;Wt.geomEach=Kg;Wt.geomReduce=kM;Wt.lineEach=z6;Wt.lineReduce=RM;Wt.propEach=N6;Wt.propReduce=BM;Wt.segmentEach=j6;Wt.segmentReduce=LM});var Z6=ci(Ud=>{"use strict";l();Object.defineProperty(Ud,"__esModule",{value:!0});var jM=$6();function G6(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return jM.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}o(G6,"bbox");var zM=G6;Ud.bbox=G6;Ud.default=zM});var q6=ci((bbe,qg)=>{l();var ai=E6(),W6=jg(),H6=B6(),Cu=Z6().default,$M=H6.featureEach,gbe=H6.coordEach,ybe=W6.polygon,V6=W6.featureCollection;function K6(e){var t=new ai(e);return t.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Cu(r),ai.prototype.insert.call(this,r)},t.load=function(r){var n=[];return Array.isArray(r)?r.forEach(function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:Cu(i),n.push(i)}):$M(r,function(i){if(i.type!=="Feature")throw new Error("invalid features");i.bbox=i.bbox?i.bbox:Cu(i),n.push(i)}),ai.prototype.load.call(this,n)},t.remove=function(r,n){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Cu(r),ai.prototype.remove.call(this,r,n)},t.clear=function(){return ai.prototype.clear.call(this)},t.search=function(r){var n=ai.prototype.search.call(this,this.toBBox(r));return V6(n)},t.collides=function(r){return ai.prototype.collides.call(this,this.toBBox(r))},t.all=function(){var r=ai.prototype.all.call(this);return V6(r)},t.toJSON=function(){return ai.prototype.toJSON.call(this)},t.fromJSON=function(r){return ai.prototype.fromJSON.call(this,r)},t.toBBox=function(r){var n;if(r.bbox)n=r.bbox;else if(Array.isArray(r)&&r.length===4)n=r;else if(Array.isArray(r)&&r.length===6)n=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")n=Cu(r);else if(r.type==="FeatureCollection")n=Cu(r);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}o(K6,"geojsonRbush");qg.exports=K6;qg.exports.default=K6});l();import{MapView as fT}from"@mappedin/mappedin-js";l();l();l();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:o(function(){return this},"get"),configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var j4="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=";l();l();var PC=!1;function z4(){return PC}o(z4,"isTestMode");var kp=class kp{constructor(t){h(this,"backgroundAlpha",1);h(this,"backgroundColor",new Tt);h(this,"width",0);h(this,"height",0);h(this,"options",{});h(this,"renderer");h(this,"enabledLayers",new Set([0,1]));h(this,"matricesUpdatedThisFrame",!1);h(this,"handleWebGLContextCreationError",o(t=>{var r,n;(n=(r=this.options).onWebGLContextCreationError)==null||n.call(r,t)},"handleWebGLContextCreationError"));h(this,"handleWebGLContextLost",o(t=>{var r,n;(n=(r=this.options).onWebGLContextLost)==null||n.call(r,t)},"handleWebGLContextLost"));h(this,"handleWebGLContextRestored",o(t=>{var r,n;(n=(r=this.options).onWebGLContextRestored)==null||n.call(r,t)},"handleWebGLContextRestored"));var r,n,i,a,u;try{this.options=t,z4()?(this.renderer={setSize:o(()=>{},"setSize"),state:{reset:o(()=>{},"reset")},properties:{get:o(()=>{},"get")},getSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getSize"),getDrawingBufferSize:o(()=>({width:window.innerWidth,height:innerHeight}),"getDrawingBufferSize"),getClearAlpha:o(()=>1,"getClearAlpha"),getClearColor:o(()=>new Tt,"getClearColor"),autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:o(()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),"getContext"),readRenderTargetPixelsAsync:o(()=>Promise.resolve([]),"readRenderTargetPixelsAsync"),setRenderTarget:o(()=>{},"setRenderTarget"),setClearColor:o(()=>{},"setClearColor"),clear:o(()=>{},"clear"),render:o(()=>{},"render"),clearStencil:o(()=>{},"clearStencil"),clearDepth:o(()=>{},"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 Uy({canvas:t.canvas,alpha:t.alpha||!1,stencil:!0,antialias:typeof t.antialias=="boolean"?t.antialias:!0,powerPreference:"high-performance",preserveDrawingBuffer:!0}),this.renderer.localClippingEnabled=!0),this.backgroundColor=new Tt((r=t.backgroundColor)!=null?r:"#ffffff"),this.backgroundAlpha=(n=t.backgroundAlpha)!=null?n:1}catch(c){Ee.error(c),t.onWebGLRendererError&&t.onWebGLRendererError(c)}(i=this.domElement())==null||i.addEventListener("webglcontextlost",this.handleWebGLContextLost),(a=this.domElement())==null||a.addEventListener("webglcontextrestored",this.handleWebGLContextRestored),(u=this.domElement())==null||u.addEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}destroy(){var t,r,n,i,a;this.renderer&&((r=(t=this.renderer).dispose)==null||r.call(t)),(n=this.domElement())==null||n.removeEventListener("webglcontextlost",this.handleWebGLContextLost),(i=this.domElement())==null||i.removeEventListener("webglcontextrestored",this.handleWebGLContextRestored),(a=this.domElement())==null||a.removeEventListener("webglcontextcreationerror",this.handleWebGLContextCreationError)}startFrame(){this.matricesUpdatedThisFrame=!1}updateMatricesIfNeeded(t){this.matricesUpdatedThisFrame||(t.updateMatrixWorld(),this.matricesUpdatedThisFrame=!0)}renderScene(t,r){this.renderer&&(this.updateMatricesIfNeeded(t),this.renderer.render(t,r))}renderFullScene(t,r){if(this.renderer){this.renderer.state.reset(),this.updateMatricesIfNeeded(t),r.layers.disableAll();for(let n of this.enabledLayers.values())r.layers.enable(n);this.renderer.clearStencil(),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,r),this.renderer.clearDepth(),r.layers.disableAll(),r.layers.enable(kr.ALWAYS_ON_TOP_PATHS),this.renderer.render(t,r),this.renderer.state.reset()}}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,r){y.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=r,this.renderer.setSize(t,r,!1))}setBackgroundColor(t,r){this.backgroundColor=t,this.backgroundAlpha=r}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};o(kp,"Renderer");var Yc=kp;l();l();var $4='"use strict";(()=>{var Ya=Object.defineProperty,fs=Object.defineProperties;var ps=Object.getOwnPropertyDescriptors;var qa=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,vs=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={}))gs.call(r,n)&&Mr(e,n,r[n]);if(qa)for(var n of qa(r))vs.call(r,n)&&Mr(e,n,r[n]);return e},z=(e,r)=>fs(e,ps(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,s=e.y,c=e.x+e.w,a=e.y+e.h;return n<c&&u<t&&i<a&&s<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:()=>so,$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:()=>us,ZodGUID:()=>Or,ZodIPv4:()=>Sa,ZodIPv6:()=>ja,ZodISODate:()=>wr,ZodISODateTime:()=>Ir,ZodISODuration:()=>jr,ZodISOTime:()=>Sr,ZodIntersection:()=>Tc,ZodIssueCode:()=>rf,ZodJWT:()=>Da,ZodKSUID:()=>wa,ZodLazy:()=>is,ZodLiteral:()=>Fc,ZodMap:()=>Cc,ZodNaN:()=>es,ZodNanoID:()=>ya,ZodNever:()=>Uc,ZodNonOptional:()=>Ja,ZodNull:()=>Sc,ZodNullable:()=>Bc,ZodNumber:()=>St,ZodNumberFormat:()=>Ve,ZodObject:()=>Er,ZodOptional:()=>Fa,ZodPipe:()=>Ma,ZodPrefault:()=>Wc,ZodPromise:()=>as,ZodReadonly:()=>ts,ZodRealError:()=>X,ZodRecord:()=>La,ZodSet:()=>Vc,ZodString:()=>It,ZodStringFormat:()=>A,ZodSuccess:()=>Yc,ZodSymbol:()=>Ic,ZodTemplateLiteral:()=>ns,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:()=>lm,cidrv6:()=>dm,clone:()=>K,codec:()=>Km,coerce:()=>Rr,config:()=>L,core:()=>ae,cuid:()=>nm,cuid2:()=>im,custom:()=>Ym,date:()=>Um,decode:()=>sa,decodeAsync:()=>da,discriminatedUnion:()=>Em,e164:()=>pm,email:()=>Gd,emoji:()=>tm,encode:()=>ca,encodeAsync:()=>la,endsWith:()=>vt,enum:()=>Ca,file:()=>Fm,flattenError:()=>He,float32:()=>_m,float64:()=>ym,formatError:()=>et,function:()=>Xm,getErrorMap:()=>of,globalRegistry:()=>oe,gt:()=>se,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:()=>sm,iso:()=>kt,json:()=>ef,jwt:()=>gm,keyof:()=>Nm,ksuid:()=>um,lazy:()=>os,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:()=>le,parse:()=>ia,parseAsync:()=>oa,partialRecord:()=>Am,pipe:()=>Nr,positive:()=>Vo,prefault:()=>Xc,preprocess:()=>tf,prettifyError:()=>rn,promise:()=>Wm,property:()=>Bo,readonly:()=>rs,record:()=>Lc,refine:()=>cs,regex:()=>dt,regexes:()=>Q,registry:()=>ir,safeDecode:()=>fa,safeDecodeAsync:()=>ga,safeEncode:()=>ma,safeEncodeAsync:()=>pa,safeParse:()=>aa,safeParseAsync:()=>ua,set:()=>Lm,setErrorMap:()=>nf,size:()=>lt,startsWith:()=>gt,strictObject:()=>Dm,string:()=>va,stringFormat:()=>vm,stringbool:()=>Hm,success:()=>Mm,superRefine:()=>ss,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:()=>si,$ZodURL:()=>ii,$ZodUUID:()=>ri,$ZodUndefined:()=>Oi,$ZodUnion:()=>Ht,$ZodUnknown:()=>Ni,$ZodVoid:()=>Di,$ZodXID:()=>li,$brand:()=>Pt,$constructor:()=>d,$input:()=>so,$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:()=>lr,_encode:()=>Tt,_encodeAsync:()=>At,_endsWith:()=>vt,_enum:()=>Od,_file:()=>Go,_float32:()=>yo,_float64:()=>xo,_gt:()=>se,_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:()=>le,_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:()=>lt,_startsWith:()=>gt,_string:()=>lo,_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:()=>st,_uuid:()=>ar,_uuidv4:()=>ur,_uuidv6:()=>cr,_uuidv7:()=>sr,_void:()=>Ao,_xid:()=>gr,clone:()=>K,config:()=>L,decode:()=>Ms,decodeAsync:()=>Ks,encode:()=>Js,encodeAsync:()=>Bs,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:()=>Ws,safeDecodeAsync:()=>qs,safeEncode:()=>Gs,safeEncodeAsync:()=>Xs,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 s;function i(c,a){var v,f;var l;Object.defineProperty(c,"_zod",{value:(v=c._zod)!=null?v:{},enumerable:!1}),(f=(l=c._zod).traits)!=null||(l.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=(s=n==null?void 0:n.Parent)!=null?s:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function u(c){var v;var a;let l=n!=null&&n.Parent?new o:this;i(l,c),(v=(a=l._zod).deferred)!=null||(a.deferred=[]);for(let f of l._zod.deferred)f();return l}return Object.defineProperty(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:c=>{var a,l;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(l=(a=c==null?void 0:c._zod)==null?void 0:a.traits)==null?void 0:l.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:()=>ys,assertEqual:()=>hs,assertIs:()=>bs,assertNever:()=>_s,assertNotEqual:()=>$s,assignProp:()=>pe,base64ToUint8Array:()=>ru,base64urlToUint8Array:()=>Rs,cached:()=>je,captureStackTrace:()=>Nt,cleanEnum:()=>As,cleanRegex:()=>We,clone:()=>K,cloneDef:()=>ks,createTransparentProxy:()=>Os,defineLazy:()=>Z,esc:()=>Ut,escapeRegex:()=>ie,extend:()=>Ns,finalizeIssue:()=>Y,floatSafeRemainder:()=>Wr,getElementAtPath:()=>zs,getEnumValues:()=>Ge,getLengthableOrigin:()=>Ye,getParsedType:()=>js,getSizableOrigin:()=>qe,hexToUint8Array:()=>Cs,isObject:()=>ye,isPlainObject:()=>ve,issue:()=>Oe,joinValues:()=>p,jsonStringifyReplacer:()=>Se,merge:()=>Ds,mergeDefs:()=>ge,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>Ss,objectClone:()=>xs,omit:()=>Us,optionalKeys:()=>Qr,partial:()=>Ts,pick:()=>Ps,prefixIssues:()=>q,primitiveTypes:()=>Yr,promiseAllObject:()=>Is,propertyKeyTypes:()=>Xe,randomString:()=>ws,required:()=>Es,safeExtend:()=>Zs,shallowClone:()=>qr,stringifyPrimitive:()=>b,uint8ArrayToBase64:()=>nu,uint8ArrayToBase64url:()=>Ls,uint8ArrayToHex:()=>Vs,unwrapMessage:()=>Ke});function hs(e){return e}function $s(e){return e}function bs(e){}function _s(e){throw new Error}function ys(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(".","")),s=Number.parseInt(r.toFixed(o).replace(".",""));return u%s/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 xs(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 ks(e){return ge(e._zod.def)}function zs(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function Is(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 ws(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 Ss(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var js=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 Os(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 Ps(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 Us(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 Ns(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 Zs(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 Ds(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 Ts(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 Es(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,s,c,a,l,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((s=(u=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:u.error)==null?void 0:s.call(u,e)))!=null?a:Ke((c=r==null?void 0:r.error)==null?void 0:c.call(r,e)))!=null?v:Ke((l=n.customError)==null?void 0:l.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 As(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 Rs(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return ru(r+n)}function Ls(e){return nu(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")}function Cs(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 Vs(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,s=0;for(;s<o.path.length;){let c=o.path[s];s===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],s++}}};return i(e),n}function tn(e,r=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var c,a,l,v;var u,s;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]):((l=x.items)!=null||(x.items=[]),(v=(s=x.items)[I])!=null||(s[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,s;return((u=t.path)!=null?u:[]).length-((s=o.path)!=null?s:[]).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 s;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((s=t==null?void 0:t.Err)!=null?s: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 s;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((s=t==null?void 0:t.Err)!=null?s: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)},Js=Tt(G),Et=e=>(r,n,i)=>Pe(e)(r,n,i),Ms=Et(G),At=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ue(e)(r,n,t)},Bs=At(G),Rt=e=>async(r,n,i)=>Ue(e)(r,n,i),Ks=Rt(G),Lt=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ne(e)(r,n,t)},Gs=Lt(G),Ct=e=>(r,n,i)=>Ne(e)(r,n,i),Ws=Ct(G),Vt=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ze(e)(r,n,t)},Xs=Vt(G),Ft=e=>async(r,n,i)=>Ze(e)(r,n,i),qs=Ft(G);var Q={};_e(Q,{base64:()=>_n,base64url:()=>Jt,bigint:()=>Sn,boolean:()=>Pn,browserEmail:()=>il,cidrv4:()=>$n,cidrv6:()=>bn,cuid:()=>an,cuid2:()=>un,date:()=>kn,datetime:()=>In,domain:()=>al,duration:()=>mn,e164:()=>xn,email:()=>pn,emoji:()=>gn,extendedDuration:()=>Ys,guid:()=>fn,hex:()=>ul,hostname:()=>yn,html5Email:()=>tl,idnEmail:()=>nl,integer:()=>jn,ipv4:()=>vn,ipv6:()=>hn,ksuid:()=>ln,lowercase:()=>Zn,md5_base64:()=>sl,md5_base64url:()=>ll,md5_hex:()=>cl,nanoid:()=>dn,null:()=>Un,number:()=>On,rfc5322Email:()=>rl,sha1_base64:()=>ml,sha1_base64url:()=>fl,sha1_hex:()=>dl,sha256_base64:()=>gl,sha256_base64url:()=>vl,sha256_hex:()=>pl,sha384_base64:()=>$l,sha384_base64url:()=>bl,sha384_hex:()=>hl,sha512_base64:()=>yl,sha512_base64url:()=>xl,sha512_hex:()=>_l,string:()=>wn,time:()=>zn,ulid:()=>cn,undefined:()=>Nn,unicodeEmail:()=>au,uppercase:()=>Dn,uuid:()=>xe,uuid4:()=>Qs,uuid6:()=>Hs,uuid7:()=>el,xid:()=>sn});var an=/^[cC][^\\s-]{8,}$/,un=/^[0-9a-z]+$/,cn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sn=/^[0-9a-vA-V]{20}$/,ln=/^[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)?)?)$/,Ys=/^[-+]?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)$/,Qs=xe(4),Hs=xe(6),el=xe(7),pn=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,tl=/^[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])?)*$/,rl=/^(([^<>()\\[\\]\\\\.,;:\\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"),nl=au,il=/^[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])?)*$/,ol="^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$";function gn(){return new RegExp(ol,"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])?)*\\.?$/,al=/^([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]*$/,ul=/^[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 cl=/^[0-9a-fA-F]{32}$/,sl=tt(22,"=="),ll=rt(22),dl=/^[0-9a-fA-F]{40}$/,ml=tt(27,"="),fl=rt(27),pl=/^[0-9a-fA-F]{64}$/,gl=tt(43,"="),vl=rt(43),hl=/^[0-9a-fA-F]{96}$/,$l=tt(64,""),bl=rt(64),_l=/^[0-9a-fA-F]{128}$/,yl=tt(86,"=="),xl=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=[])}),lu={number:"number",bigint:"bigint",object:"date"},Mt=d("$ZodCheckLessThan",(e,r)=>{R.init(e,r);let n=lu[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=lu[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(s=>{let c=s._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o,n&&(c.pattern=jn)}),e._zod.check=s=>{let c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.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}):s.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&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),c>o&&s.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 s=u>r.size;t.issues.push(z(m({origin:qe(o)},s?{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 s=Ye(o);t.issues.push({origin:s,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 s=Ye(o);t.issues.push({origin:s,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 s=Ye(o),c=u>r.length;t.issues.push(z(m({origin:s},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 s=u._zod.bag;s.format=r.format,r.pattern&&((c=s.patterns)!=null||(s.patterns=new Set),s.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 su(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=>su(t,n,r.property));su(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 s of i)for(let c of s._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 s=(a,l,v)=>{let f=he(a),h;for(let x of l){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,l,v)=>{if(he(a))return a.aborted=!0,a;let f=s(l,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,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let f=e._zod.parse({value:a.value,issues:[]},z(m({},l),{skipChecks:!0}));return f instanceof Promise?f.then(h=>c(h,a,l)):c(f,a,l)}let v=e._zod.parse(a,l);if(v instanceof Promise){if(l.async===!1)throw new te;return v.then(f=>s(f,i,l))}return s(v,i,l)}}e["~standard"]={validate:s=>{var c;try{let a=nn(e,s);return a.success?{value:a.data}:{issues:(c=a.error)==null?void 0:c.issues}}catch(a){return on(e,s).then(l=>{var v;return l.success?{value:l.data}:{issues:(v=l.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(s){}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)}),si=d("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=cn),T.init(e,r)}),li=d("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=sn),T.init(e,r)}),di=d("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=ln),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 s=Number(u);if("".concat(s)!==u)throw new Error;if(s<0||s>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(s){}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(s){}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 s=t[u],c=r.element._zod.run({value:s,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 s of r)if(!((u=(o=(t=(i=e.shape)==null?void 0:i[s])==null?void 0:t._zod)==null?void 0:o.traits)!=null&&u.has("$ZodType")))throw new Error(\'Invalid element at key "\'.concat(s,\'": 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=[],s=t.keySet,c=t.catchall._zod,a=c.def.type;for(let l of Object.keys(r)){if(s.has(l))continue;if(a==="never"){u.push(l);continue}let v=c.run({value:r[l],issues:[]},i);v instanceof Promise?e.push(v.then(f=>qt(f,n,l,r))):qt(v,n,l,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 s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let c=m({},s);return Object.defineProperty(r,"shape",{value:c}),c}})}let i=je(()=>zu(r));Z(e._zod,"propValues",()=>{var a;let s=r.shape,c={};for(let l in s){let v=s[l]._zod;if(v.values){(a=c[l])!=null||(c[l]=new Set);for(let f of v.values)c[l].add(f)}}return c});let t=ye,o=r.catchall,u;e._zod.parse=(s,c)=>{u!=null||(u=i.value);let a=s.value;if(!t(a))return s.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),s;s.value={};let l=[],v=u.shape;for(let f of u.keys){let x=v[f]._zod.run({value:a[f],issues:[]},c);x instanceof Promise?l.push(x.then(S=>qt(S,s,f,a))):qt(x,s,f,a)}return o?Iu(l,a,s,c,i.value,e):l.length?Promise.all(l).then(()=>s):s}}),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,s=!Be.jitless,a=s&&Xr.value,l=r.catchall,v;e._zod.parse=(f,h)=>{v!=null||(v=i.value);let x=f.value;return u(x)?s&&a&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(o||(o=t(r.shape)),f=o(f,h),l?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,s=[];for(let c of r.options){let a=c._zod.run({value:t.value,issues:[]},o);if(a instanceof Promise)s.push(a),u=!0;else{if(a.issues.length===0)return a;s.push(a)}}return u?Promise.all(s).then(c=>fu(c,t,e,o)):fu(s,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[s,c]of Object.entries(u)){t[s]||(t[s]=new Set);for(let a of c)t[s].add(a)}}return t});let i=je(()=>{var u;let t=r.options,o=new Map;for(let s of t){let c=(u=s._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(s),\'"\'));for(let a of c){if(o.has(a))throw new Error(\'Duplicate discriminator value "\'.concat(String(a),\'"\'));o.set(a,s)}}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 s=i.value.get(u==null?void 0:u[r.discriminator]);return s?s._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 s=[];if(!r.rest){let a=u.length>n.length,l=u.length<i-1;if(a||l)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 l=a._zod.run({value:u[c],issues:[]},o);l instanceof Promise?s.push(l.then(v=>Kt(v,t,c))):Kt(l,t,c)}if(r.rest){let a=u.slice(n.length);for(let l of a){c++;let v=r.rest._zod.run({value:l,issues:[]},o);v instanceof Promise?s.push(v.then(f=>Kt(f,t,c))):Kt(v,t,c)}}return s.length?Promise.all(s).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(l=>{l.issues.length&&n.issues.push(...q(c,l.issues)),n.value[c]=l.value})):(a.issues.length&&n.issues.push(...q(c,a.issues)),n.value[c]=a.value)}let s;for(let c in t)u.has(c)||(s=s!=null?s:[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:s})}else{n.value={};for(let u of Reflect.ownKeys(t)){if(u==="__proto__")continue;let s=r.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(a=>Y(a,i,L())),input:u,path:[u],inst:e}),n.value[s.value]=s.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[s.value]=a.value})):(c.issues.length&&n.issues.push(...q(u,c.issues)),n.value[s.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,s]of t){let c=r.keyType._zod.run({value:u,issues:[]},i),a=r.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||a instanceof Promise?o.push(Promise.all([c,a]).then(([l,v])=>{gu(l,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(s=>Y(s,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(s=>Y(s,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 s=r.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(c=>vu(c,n))):vu(s,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:()=>sc,sv:()=>lc,ta:()=>dc,th:()=>mc,tr:()=>fc,ua:()=>pc,uk:()=>nr,ur:()=>gc,vi:()=>vc,yo:()=>bc,zhCN:()=>hc,zhTW:()=>$c});var zl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?" \\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=l.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((s=t.origin)!=null?s:"\\u0627\\u0644\\u0642\\u064A\\u0645\\u0629"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\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(l.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:zl()}}var Il=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"element"):"\\xC7ox b\\xF6y\\xFCk: g\\xF6zl\\u0259nil\\u0259n ".concat((s=t.origin)!=null?s:"d\\u0259y\\u0259r"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\xC7ox ki\\xE7ik: g\\xF6zl\\u0259nil\\u0259n ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Il()}}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 wl=()=>{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,s;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 l=Number(t.maximum),v=Ou(l,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 l=Number(t.minimum),v=Ou(l,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((s=i[c.format])!=null?s: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:wl()}}var Sl=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},jl=()=>{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,s;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(Sl(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((s=n[c.format])!=null?s: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:jl()}}var Ol=()=>{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,s,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",l=r(t.origin);return l?"Massa gran: s\'esperava que ".concat((o=t.origin)!=null?o:"el valor"," contingu\\xE9s ").concat(a," ").concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elements"):"Massa gran: s\'esperava que ".concat((s=t.origin)!=null?s:"el valor"," fos ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?"com a m\\xEDnim":"m\\xE9s de",l=r(t.origin);return l?"Massa petit: s\'esperava que ".concat(t.origin," contingu\\xE9s ").concat(a," ").concat(t.minimum.toString()," ").concat(l.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:Ol()}}var Pl=()=>{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,s,c,a,l,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((s=t.origin)!=null?s:"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((l=t.origin)!=null?l:"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:Pl()}}var Ul=()=>{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 s;return(s=e[u])!=null?s:null}function i(u){var s;return(s=r[u])!=null?s:u}let t=u=>{let s=typeof u;switch(s){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 s},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 s,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?"<=":"<",l=n(u.origin),v=i(u.origin);return l?"For stor: forventede ".concat(v!=null?v:"value"," ").concat(l.verb," ").concat(a," ").concat(u.maximum.toString()," ").concat((s=l.unit)!=null?s:"elementer"):"For stor: forventede ".concat(v!=null?v:"value"," havde ").concat(a," ").concat(u.maximum.toString())}case"too_small":{let a=u.inclusive?">=":">",l=n(u.origin),v=i(u.origin);return l?"For lille: forventede ".concat(v," ").concat(l.verb," ").concat(a," ").concat(u.minimum.toString()," ").concat(l.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:Ul()}}var Nl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"Zu gro\\xDF: erwartet, dass ".concat((o=t.origin)!=null?o:"Wert"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"Elemente"," hat"):"Zu gro\\xDF: erwartet, dass ".concat((s=t.origin)!=null?s:"Wert"," ").concat(a).concat(t.maximum.toString()," ist")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Zu klein: erwartet, dass ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Nl()}}var Zl=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},Dl=()=>{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,s;switch(i.code){case"invalid_type":return"Invalid input: expected ".concat(i.expected,", received ").concat(Zl(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((s=n[c.format])!=null?s: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:Dl()}}var Tl=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},El=()=>{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,s;switch(i.code){case"invalid_type":return"Nevalida enigo: atendi\\u011Dis ".concat(i.expected,", ricevi\\u011Dis ").concat(Tl(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((s=n[c.format])!=null?s: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:El()}}var Al=()=>{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 s;return(s=e[u])!=null?s:null}function i(u){var s;return(s=r[u])!=null?s:u}let t=u=>{let s=typeof u;switch(s){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 s},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 s,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?"<=":"<",l=n(u.origin),v=i(u.origin);return l?"Demasiado grande: se esperaba que ".concat(v!=null?v:"valor"," tuviera ").concat(a).concat(u.maximum.toString()," ").concat((s=l.unit)!=null?s:"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?">=":">",l=n(u.origin),v=i(u.origin);return l?"Demasiado peque\\xF1o: se esperaba que ".concat(v," tuviera ").concat(a).concat(u.minimum.toString()," ").concat(l.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:Al()}}var Rl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631"," \\u0628\\u0627\\u0634\\u062F"):"\\u062E\\u06CC\\u0644\\u06CC \\u0628\\u0632\\u0631\\u06AF: ".concat((s=t.origin)!=null?s:"\\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?">=":">",l=r(t.origin);return l?"\\u062E\\u06CC\\u0644\\u06CC \\u06A9\\u0648\\u0686\\u06A9: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Rl()}}var Ll=()=>{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?"<=":"<",s=r(t.origin);return s?"Liian suuri: ".concat(s.subject," t\\xE4ytyy olla ").concat(u).concat(t.maximum.toString()," ").concat(s.unit).trim():"Liian suuri: arvon t\\xE4ytyy olla ".concat(u).concat(t.maximum.toString())}case"too_small":{let u=t.inclusive?">=":">",s=r(t.origin);return s?"Liian pieni: ".concat(s.subject," t\\xE4ytyy olla ").concat(u).concat(t.minimum.toString()," ").concat(s.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:Ll()}}var Cl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"Trop grand : ".concat((o=t.origin)!=null?o:"valeur"," doit ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\xE9l\\xE9ment(s)"):"Trop grand : ".concat((s=t.origin)!=null?s:"valeur"," doit \\xEAtre ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Trop petit : ".concat(t.origin," doit ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Cl()}}var Vl=()=>{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,s;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((s=i[c.format])!=null?s: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:Vl()}}var Fl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"elements"):"\\u05D2\\u05D3\\u05D5\\u05DC \\u05DE\\u05D3\\u05D9: ".concat((s=t.origin)!=null?s:"value"," \\u05E6\\u05E8\\u05D9\\u05DA \\u05DC\\u05D4\\u05D9\\u05D5\\u05EA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\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(l.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:Fl()}}var Jl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"T\\xFAl nagy: ".concat((o=t.origin)!=null?o:"\\xE9rt\\xE9k"," m\\xE9rete t\\xFAl nagy ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elem"):"T\\xFAl nagy: a bemeneti \\xE9rt\\xE9k ".concat((s=t.origin)!=null?s:"\\xE9rt\\xE9k"," t\\xFAl nagy: ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"T\\xFAl kicsi: a bemeneti \\xE9rt\\xE9k ".concat(t.origin," m\\xE9rete t\\xFAl kicsi ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Jl()}}var Ml=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"Terlalu besar: diharapkan ".concat((o=t.origin)!=null?o:"value"," memiliki ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elemen"):"Terlalu besar: diharapkan ".concat((s=t.origin)!=null?s:"value"," menjadi ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Terlalu kecil: diharapkan ".concat(t.origin," memiliki ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Ml()}}var Bl=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},Kl=()=>{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,s;switch(i.code){case"invalid_type":return"Rangt gildi: \\xDE\\xFA sl\\xF3st inn ".concat(Bl(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((s=n[c.format])!=null?s: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:Kl()}}var Gl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"Troppo grande: ".concat((o=t.origin)!=null?o:"valore"," deve avere ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementi"):"Troppo grande: ".concat((s=t.origin)!=null?s:"valore"," deve essere ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Troppo piccolo: ".concat(t.origin," deve avere ").concat(a).concat(t.minimum.toString()," ").concat(l.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:Gl()}}var Wl=()=>{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,s,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",l=r(t.origin);return l?"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((o=t.origin)!=null?o:"\\u5024","\\u306F").concat(t.maximum.toString()).concat((u=l.unit)!=null?u:"\\u8981\\u7D20").concat(a,"\\u5FC5\\u8981\\u304C\\u3042\\u308A\\u307E\\u3059"):"\\u5927\\u304D\\u3059\\u304E\\u308B\\u5024: ".concat((s=t.origin)!=null?s:"\\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",l=r(t.origin);return l?"\\u5C0F\\u3055\\u3059\\u304E\\u308B\\u5024: ".concat(t.origin,"\\u306F").concat(t.minimum.toString()).concat(l.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:Wl()}}var Xl=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},ql=()=>{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(Xl(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 s=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(s).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(s).concat(i.maximum.toString())}case"too_small":{let s=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(s).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(s).concat(i.minimum.toString())}case"invalid_format":{let s=i;return s.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(s.prefix,\'"-\\u10D8\\u10D7\'):s.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(s.suffix,\'"-\\u10D8\\u10D7\'):s.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(s.includes,\'"-\\u10E1\'):s.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(s.pattern):"\\u10D0\\u10E0\\u10D0\\u10E1\\u10EC\\u10DD\\u10E0\\u10D8 ".concat((u=n[s.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:ql()}}var Yl=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"\\u1792\\u17B6\\u178F\\u17BB"):"\\u1792\\u17C6\\u1796\\u17C1\\u1780\\u17D6 \\u178F\\u17D2\\u179A\\u17BC\\u179C\\u1780\\u17B6\\u179A ".concat((s=t.origin)!=null?s:"\\u178F\\u1798\\u17D2\\u179B\\u17C3"," ").concat(a," ").concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\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(l.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:Yl()}}function Xu(){return rr()}var Ql=()=>{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,s,c,a,l,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((s=t.origin)!=null?s:"\\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((l=t.origin)!=null?l:"\\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:Ql()}}var Hl=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 s=(c=e[i])!=null?c:null;return s===null?s:{unit:s.unit[t],verb:s.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,s,c,a,l,v,f,h;switch(i.code){case"invalid_type":return"Gautas tipas ".concat(Hl(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((s=x!=null?x:i.origin)!=null?s:"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((l=S.unit)!=null?l:"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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.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((s=t.origin)!=null?s:"\\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?">=":">",l=r(t.origin);return l?"\\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(l.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,s,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?"<=":"<",l=r(t.origin);return l?"Terlalu besar: dijangka ".concat((o=t.origin)!=null?o:"nilai"," ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elemen"):"Terlalu besar: dijangka ".concat((s=t.origin)!=null?s:"nilai"," adalah ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Terlalu kecil: dijangka ".concat(t.origin," ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"Te lang: verwacht dat ".concat((o=t.origin)!=null?o:"waarde"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementen"," bevat"):"Te lang: verwacht dat ".concat((s=t.origin)!=null?s:"waarde"," ").concat(a).concat(t.maximum.toString()," is")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Te kort: verwacht dat ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"For stor(t): forventet ".concat((o=t.origin)!=null?o:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementer"):"For stor(t): forventet ".concat((s=t.origin)!=null?s:"value"," til \\xE5 ha ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"For lite(n): forventet ".concat(t.origin," til \\xE5 ha ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"Fazla b\\xFCy\\xFCk: ".concat((o=t.origin)!=null?o:"value",", ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elements"," sahip olmal\\u0131yd\\u0131."):"Fazla b\\xFCy\\xFCk: ".concat((s=t.origin)!=null?s:"value",", ").concat(a).concat(t.maximum.toString()," olmal\\u0131yd\\u0131.")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Fazla k\\xFC\\xE7\\xFCk: ".concat(t.origin,", ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"\\u0639\\u0646\\u0635\\u0631\\u0648\\u0646\\u0647"," \\u0648\\u0644\\u0631\\u064A"):"\\u0689\\u06CC\\u0631 \\u0644\\u0648\\u06CC: ".concat((s=t.origin)!=null?s:"\\u0627\\u0631\\u0632\\u069A\\u062A"," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.maximum.toString()," \\u0648\\u064A")}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u0689\\u06CC\\u0631 \\u06A9\\u0648\\u0686\\u0646\\u06CC: ".concat(t.origin," \\u0628\\u0627\\u06CC\\u062F ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,c,a,l,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((s=t.origin)!=null?s:"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((l=t.origin)!=null?l:"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,s,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?"<=":"<",l=r(t.origin);return l?"Muito grande: esperado que ".concat((o=t.origin)!=null?o:"valor"," tivesse ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementos"):"Muito grande: esperado que ".concat((s=t.origin)!=null?s:"valor"," fosse ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Muito pequeno: esperado que ".concat(t.origin," tivesse ").concat(a).concat(t.minimum.toString()," ").concat(l.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 sd=()=>{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,s;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 l=Number(t.maximum),v=uc(l,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 l=Number(t.minimum),v=uc(l,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((s=i[c.format])!=null?s: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:sd()}}var ld=()=>{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,s,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?"<=":"<",l=r(t.origin);return l?"Preveliko: pri\\u010Dakovano, da bo ".concat((o=t.origin)!=null?o:"vrednost"," imelo ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"elementov"):"Preveliko: pri\\u010Dakovano, da bo ".concat((s=t.origin)!=null?s:"vrednost"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Premajhno: pri\\u010Dakovano, da bo ".concat(t.origin," imelo ").concat(a).concat(t.minimum.toString()," ").concat(l.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 sc(){return{localeError:ld()}}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,s,c,a,l,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((s=t.origin)!=null?s:"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((l=i[h.format])!=null?l: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 lc(){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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.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((s=t.origin)!=null?s:"\\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?">=":">",l=r(t.origin);return l?"\\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(l.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,s,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",l=r(t.origin);return l?"\\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=l.unit)!=null?u:"\\u0E23\\u0E32\\u0E22\\u0E01\\u0E32\\u0E23"):"\\u0E40\\u0E01\\u0E34\\u0E19\\u0E01\\u0E33\\u0E2B\\u0E19\\u0E14: ".concat((s=t.origin)!=null?s:"\\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",l=r(t.origin);return l?"\\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(l.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,s;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((s=n[c.format])!=null?s: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,s,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?"<=":"<",l=r(t.origin);return l?"\\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(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.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((s=t.origin)!=null?s:"\\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?">=":">",l=r(t.origin);return l?"\\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(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"\\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=l.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((s=t.origin)!=null?s:"\\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?">=":">",l=r(t.origin);return l?"\\u0628\\u06C1\\u062A \\u0686\\u06BE\\u0648\\u0679\\u0627: ".concat(t.origin," \\u06A9\\u06D2 ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((o=t.origin)!=null?o:"gi\\xE1 tr\\u1ECB"," ").concat(l.verb," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"ph\\u1EA7n t\\u1EED"):"Qu\\xE1 l\\u1EDBn: mong \\u0111\\u1EE3i ".concat((s=t.origin)!=null?s:"gi\\xE1 tr\\u1ECB"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"Qu\\xE1 nh\\u1ECF: mong \\u0111\\u1EE3i ".concat(t.origin," ").concat(l.verb," ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((o=t.origin)!=null?o:"\\u503C"," ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u4E2A\\u5143\\u7D20"):"\\u6570\\u503C\\u8FC7\\u5927\\uFF1A\\u671F\\u671B ".concat((s=t.origin)!=null?s:"\\u503C"," ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u6570\\u503C\\u8FC7\\u5C0F\\uFF1A\\u671F\\u671B ".concat(t.origin," ").concat(a).concat(t.minimum.toString()," ").concat(l.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,s,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?"<=":"<",l=r(t.origin);return l?"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((o=t.origin)!=null?o:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString()," ").concat((u=l.unit)!=null?u:"\\u500B\\u5143\\u7D20"):"\\u6578\\u503C\\u904E\\u5927\\uFF1A\\u9810\\u671F ".concat((s=t.origin)!=null?s:"\\u503C"," \\u61C9\\u70BA ").concat(a).concat(t.maximum.toString())}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?"\\u6578\\u503C\\u904E\\u5C0F\\uFF1A\\u9810\\u671F ".concat(t.origin," \\u61C9\\u70BA ").concat(a).concat(t.minimum.toString()," ").concat(l.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 s=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(s).concat(t.maximum," ").concat(c.unit):"T\\xF3 p\\u1ECD\\u0300 j\\xF9: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(s).concat(t.maximum)}case"too_small":{let s=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(s).concat(t.minimum," ").concat(c.unit):"K\\xE9r\\xE9 ju: a n\\xED l\\xE1ti j\\u1EB9\\u0301 ".concat(s).concat(t.minimum)}case"invalid_format":{let s=t;return s.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(s.prefix,\'"\'):s.format==="ends_with"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 par\\xED p\\u1EB9\\u0300l\\xFA "\'.concat(s.suffix,\'"\'):s.format==="includes"?\'\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 n\\xED "\'.concat(s.includes,\'"\'):s.format==="regex"?"\\u1ECC\\u0300r\\u1ECD\\u0300 a\\u1E63\\xEC\\u1E63e: gb\\u1ECD\\u0301d\\u1ECD\\u0300 b\\xE1 \\xE0p\\u1EB9\\u1EB9r\\u1EB9 mu ".concat(s.pattern):"A\\u1E63\\xEC\\u1E63e: ".concat((u=i[s.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"),so=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 lo(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 sr(e,r){return new e(m({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},y(r)))}function st(e,r){return new e(m({type:"string",format:"url",check:"string_format",abort:!1},y(r)))}function lr(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 se(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 se(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 lt(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 le(e){return new Qn({check:"overwrite",tx:e})}function $t(e){return le(r=>r.normalize(e))}function bt(){return le(e=>e.trim())}function _t(){return le(e=>e.toLowerCase())}function yt(){return le(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,s;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),(s=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),s=(S=e.Codec)!=null?S:ot,c=(I=e.Boolean)!=null?I:it,a=(C=e.String)!=null?C:ke,l=new a({type:"string",error:n.error}),v=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:l,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:s=>n.test(s)}),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 s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,s);let c=(f=(v=r._zod).toJSONSchema)==null?void 0:f.call(v);if(c)s.schema=c;else{let I=z(m({},n),{schemaPath:[...n.schemaPath,r],path:n.path}),C=r._zod.parent;if(C)s.ref=C,this.process(C,I),this.seen.get(C).isParent=!0;else{let j=s.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&&(s.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"?(s.ref=t.innerType,j.nullable=!0):j.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,I),s.ref=t.innerType;break}case"success":{let g=j;g.type="boolean";break}case"default":{this.process(t.innerType,I),s.ref=t.innerType,j.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,I),s.ref=t.innerType,this.io==="input"&&(j._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,I),s.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),s.ref=g;break}case"readonly":{this.process(t.innerType,I),s.ref=t.innerType,j.readOnly=!0;break}case"promise":{this.process(t.innerType,I),s.ref=t.innerType;break}case"optional":{this.process(t.innerType,I),s.ref=t.innerType;break}case"lazy":{let g=r._zod.innerType;this.process(g,I),s.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(s.schema,a),this.io==="input"&&J(r)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((S=(i=s.schema).default)!=null||(i.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(r).schema}emit(r,n){var l,v,f,h,x,S,I,C,j,g;let i={cycles:(l=n==null?void 0:n.cycles)!=null?l:"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 s=($,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){s(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())s($[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 s of e._idmap.entries()){let[c,a]=s;i.process(a)}let o={},u={registry:e,uri:r==null?void 0:r.uri,defs:t};for(let s of e._idmap.entries()){let[c,a]=s;o[c]=i.emit(a,z(m({},r),{external:u}))}if(Object.keys(t).length>0){let s=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[s]: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),sa=Et(X),la=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)=>sa(e,n,i),e.encodeAsync=async(n,i)=>la(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(cs(n,i)),e.superRefine=n=>e.check(ss(n)),e.overwrite=n=>e.check(le(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=()=>rs(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(st(Zr,n)),e.jwt=n=>e.check(zr(Da,n)),e.emoji=n=>e.check(lr(_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(sr(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 lo(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 sr(de,e)}var Zr=d("ZodURL",(e,r)=>{ii.init(e,r),A.init(e,r)});function Hd(e){return st(Zr,e)}function em(e){return st(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 lr(_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)=>{si.init(e,r),A.init(e,r)});function om(e){return pr(za,e)}var Ia=d("ZodXID",(e,r)=>{li.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 sm(e){return $r(ja,e)}var Oa=d("ZodCIDRv4",(e,r)=>{$i.init(e,r),A.init(e,r)});function lm(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,s,c,a,l,v;Yt.init(e,r),U.init(e,r),e.gt=(f,h)=>e.check(se(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(se(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,(s=n.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((a=n.format)!=null?a:"").includes("int")||Number.isSafeInteger((l=n.multipleOf)!=null?l:.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,s)=>e.check(W(u,s)),e.min=(u,s)=>e.check(W(u,s)),e.gt=(u,s)=>e.check(se(u,s)),e.gte=(u,s)=>e.check(W(u,s)),e.min=(u,s)=>e.check(W(u,s)),e.lt=(u,s)=>e.check(ce(u,s)),e.lte=(u,s)=>e.check(H(u,s)),e.max=(u,s)=>e.check(H(u,s)),e.positive=u=>e.check(se(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,s)=>e.check(Ie(u,s));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(lt(...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,s,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"),(s=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 es=d("ZodNaN",(e,r)=>{eo.init(e,r),U.init(e,r)});function Bm(e){return Co(es,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 ts=d("ZodReadonly",(e,r)=>{ro.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function rs(e){return new ts({type:"readonly",innerType:e})}var ns=d("ZodTemplateLiteral",(e,r)=>{no.init(e,r),U.init(e,r)});function Gm(e,r){return new ns(m({type:"template_literal",parts:e},_.normalizeParams(r)))}var is=d("ZodLazy",(e,r)=>{ao.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.getter()});function os(e){return new is({type:"lazy",getter:e})}var as=d("ZodPromise",(e,r)=>{oo.init(e,r),U.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Wm(e){return new as({type:"promise",innerType:e})}var us=d("ZodFunction",(e,r)=>{io.init(e,r),U.init(e,r)});function Xm(e){var r,n;return new us({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 cs(e,r={}){return Xo(Ar,e,r)}function ss(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=os(()=>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:()=>sf,boolean:()=>cf,date:()=>lf,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 sf(e){return jo(Ot,e)}function lf(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 ls(e,r,n,i,t,o,u="-1"){var N,P;let s=1/0,c=1/0,a=-1/0,l=-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,ms]=[w.y-re,w.y+F,w.x-ne,w.x+Je],Fr=Ga,Jr=ee,Wa=ms-Ga,Xa=Vr-ee;s=Math.min(s,Fr)-be,c=Math.min(c,Jr)-be,a=Math.max(a,Fr+Wa)+be,l=Math.max(l,Jr+Xa)+be,w.bboxes[V].boundingRect=new E(Fr,Jr,Wa,Xa)}}let j=new Me(new E(s,c,a-s,l-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 ds(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=ds(e.data);self.postMessage(ls(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId))};})();\n';l();l();l();l();l();function G4(e,t){return t.x+t.w<e.x+e.w&&t.x>e.x&&t.y>e.y&&t.y+t.h<e.y+e.h}o(G4,"contains");l();function Z4(e,t){let[r,n]=t;return r>=e.x&&r<=e.x+e.w&&n>=e.y&&n<=e.y+e.h}o(Z4,"intersectPoint");l();function V4(e,t){let r=t.x,n=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x,c=e.y,m=e.x+e.w,d=e.y+e.h;return r<m&&u<i&&n<d&&c<a}o(V4,"intersects");l();function pi(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}o(pi,"appendItems");l();var _p=class _p{constructor(t,r,n,i,a){h(this,"x");h(this,"y");h(this,"w");h(this,"h");h(this,"userData");this.userData=typeof a>"u"?null:a,this.x=t,this.y=r,this.w=n,this.h=i}contains(t){return t===this?!1:G4(this,t)}intersects(t){return V4(this,t)}intersectsPoint(t){return Z4(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.8)",t.fillRect(this.x,this.y,this.w,this.h)}};o(_p,"Rectangle");var we=_p;var Po=class Po{constructor(t,r){h(this,"topLeft");h(this,"topRight");h(this,"bottomLeft");h(this,"bottomRight");h(this,"divided",!1);h(this,"boundary");h(this,"capacity",16);h(this,"objects",[]);h(this,"parent");this.parent=r,this.boundary=t}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:t,y:r,w:n,h:i}=this.boundary;this.topLeft=new Po(new we(t,r,n/2,i/2),this),this.topRight=new Po(new we(t+n/2,r,n/2,i/2),this),this.bottomLeft=new Po(new we(t,r+i/2,n/2,i/2),this),this.bottomRight=new Po(new we(t+n/2,r+i/2,n/2,i/2),this),this.divided=!0}queryRect(t){let r=[];if(this.boundary.intersects(t))r.push(...this.objects);else return[];return this.divided&&(pi(r,this.topLeft.queryRect(t)),pi(r,this.topRight.queryRect(t)),pi(r,this.bottomLeft.queryRect(t)),pi(r,this.bottomRight.queryRect(t))),r}queryPoint(t){let r=[];if(this.boundary.intersectsPoint(t))r.push(...this.objects);else return[];return this.divided&&(pi(r,this.topLeft.queryPoint(t)),pi(r,this.topRight.queryPoint(t)),pi(r,this.bottomLeft.queryPoint(t)),pi(r,this.bottomRight.queryPoint(t))),r}insert(t){return(this.parent?!this.boundary.contains(t):!this.boundary.intersects(t))?!1:this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0)}drawObjects(t){this.objects.forEach(r=>r.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};o(Po,"QuadTree");var Qr=Po;l();var Lp=9,Ji=200,Qc=10;function W4(e,t,r,n,i,a,u="-1"){var V,$;let c=1/0,m=1/0,d=-1/0,f=-1/0,g=new we(-Qc,0,5,r),v=new we(-Qc,0,t,5),b=new we(t-5,0,t+Qc,r),S=new we(0,r-5,t,r+Qc),F=BC(t,r,n,i,a),E=[g,v,b,S],x=new we(-Ji,-Ji,t+Ji*2,r+Ji*2);for(let T of e){let w,L;for(let _=0;_<T.bboxes.length;_++){if(T.bboxes[_]==null||(w=T.bboxes[_].boundingBox,L=T.bboxes[_].index,T.lockedToStrategyIndex!==-1&&L!==T.lockedToStrategyIndex))continue;let[G,ie,Q,le]=w,[Z,Y,ee,q]=[T.y-G,T.y+ie,T.x-Q,T.x+le],ce=ee,Ie=Z,Te=q-ee,We=Y-Z;c=Math.min(c,ce)-Ji,m=Math.min(m,Ie)-Ji,d=Math.max(d,ce+Te)+Ji,f=Math.max(f,Ie+We)+Ji,T.bboxes[_].boundingRect=new we(ce,Ie,Te,We)}}let D=new Qr(new we(c,m,d-c,f-m)),I={msgId:u,colliders:new Array(e.length),staticColliders:[],debug:[]},C=0;for(let T=0;T<e.length;T++){let w=e[T];(($=(V=w.bboxes)==null?void 0:V[0])==null?void 0:$.index)===Lp&&(I.staticColliders.push(w.bboxes[0].boundingRect),D.insert(w.bboxes[0].boundingRect),C++)}e=e.slice(C,e.length);let k;for(let T=0;T<e.length;T++)if(k=e[T],I.colliders[T]=[-1,0],k.enabledAndVisible){let[w,L,_]=[1/0,-1,void 0];for(let{index:G,boundingRect:ie}of k.bboxes){if(ie==null)continue;let Q=[];if(Q=D.queryRect(ie).filter(Z=>ie.intersects(Z)),k.shouldCollideWithScreenEdges&&E.forEach(Z=>{ie.intersects(Z)&&Q.push(Z)}),ie.intersects(F)){I.colliders[T]=[-1,0,ie];break}if(Q.length<=w&&(_=ie,L=G,w=Q.length),Q.length===0){D.insert(ie),I.colliders[T]=[G,x.contains(ie)?0:1,ie];break}}k.rank===ha&&_!=null&&(D.insert(_),I.colliders[T]=[L,x.contains(_)?0:1,_])}else I.colliders[T]=[-1,0];return I}o(W4,"processColliders");function BC(e,t,r,n,i){switch(i){case"top-left":return new we(0,0,r,n);case"top-right":return new we(e-r,0,r,n);case"bottom-left":return new we(0,t-n,r,n);case"bottom-right":return new we(e-r,t-n,r,n);case"center":return new we((e-r)/2,(t-n)/2,r,n);case"top":return new we((e-r)/2,0,r,n);case"bottom":return new we((e-r)/2,t-n,r,n);case"left":return new we(0,(t-n)/2,r,n);case"right":return new we(e-r,(t-n)/2,r,n);default:return new we(0,t-n,r,n)}}o(BC,"getWatermarkBoundary");l();l();function H4(e){let t=e[0].map(r=>{let n=r[0].map(i=>({index:i[4],boundingBox:[i[0],i[1],i[2],i[3]]}));return{enabledAndVisible:r[1]===1,rank:r[2]===1?ha:0,x:r[3],y:r[4],shouldCollideWithScreenEdges:r[5]===1,bboxes:n,lockedToStrategyIndex:r[6]}});return{msgId:"-1",totalWidth:e[3],totalHeight:e[2],watermarkWidth:e[4],watermarkHeight:e[5],watermarkPosition:e[6],colliders:t,devicePixelRatio:e[1]}}o(H4,"unpackMessage");var Rp=class Rp{constructor(){h(this,"onerror",o(()=>{},"onerror"));h(this,"onmessage",o(()=>{},"onmessage"));h(this,"postMessage",o(t=>{let r=H4(t);this.onmessage({data:W4(r.colliders,r.totalWidth,r.totalHeight,r.watermarkWidth,r.watermarkHeight,r.watermarkPosition,r.msgId)})},"postMessage"));h(this,"terminate",o(()=>{},"terminate"))}};o(Rp,"SyncWorker");var Vu=Rp;l();l();globalThis.MappedinDebug||(globalThis.MappedinDebug={});globalThis.MappedinDebug.__idleCallbackInteractionState={isInteracting:!1,interactionCheckers:[],pendingCallbacks:[],registerInteractionChecker:o(function(e){this.interactionCheckers.push(e)},"registerInteractionChecker"),unregisterInteractionChecker:o(function(e){let t;for(let r=this.interactionCheckers.length-1;r>=0;r--)if(t=this.interactionCheckers[r],t===e){this.interactionCheckers.splice(r,1);break}},"unregisterInteractionChecker"),checkInteraction:o(function(){let e=!1;for(let t=0;t<this.interactionCheckers.length;t++)if(e=this.interactionCheckers[t](),e)return!0;return!1},"checkInteraction"),addPendingCallback:o(function(e,t){this.pendingCallbacks.push({callback:e,timeoutId:t}),this.scheduleDeferredCheck()},"addPendingCallback"),scheduleDeferredCheck:o(function(){var e=this;this.checkTimeoutId||(this.checkTimeoutId=setTimeout(o(function t(){if(e.checkInteraction())e.checkTimeoutId=setTimeout(t,16);else{e.checkTimeoutId=null;var r=e.pendingCallbacks.slice();e.pendingCallbacks=[];let n;for(let i=0;i<r.length;i++)if(n=r[i],n&&n.callback)try{n.callback()}catch(a){}}},"checkAndExecute"),16))},"scheduleDeferredCheck"),removePendingCallback:o(function(e){let t;for(let r=this.pendingCallbacks.length-1;r>=0;r--)if(t=this.pendingCallbacks[r],t.timeoutId===e){this.pendingCallbacks.splice(r,1);break}},"removePendingCallback")};globalThis.requestIdleCallback=globalThis.requestIdleCallback||function(e){var a,u;var t=performance.now(),r,n=!1,i=o(function(){if(!n){n=!0;try{e({didTimeout:!1,timeRemaining:o(function(){return Math.max(0,50-(performance.now()-t))},"timeRemaining")})}catch(c){}}},"wrappedCallback");return(u=(a=globalThis.MappedinDebug)==null?void 0:a.__idleCallbackInteractionState)!=null&&u.checkInteraction()?(r=Date.now()+Math.random(),globalThis.MappedinDebug.__idleCallbackInteractionState.addPendingCallback(i,r),r):(r=setTimeout(i,0),r)};globalThis.cancelIdleCallback=globalThis.cancelIdleCallback||function(e){var t,r;clearTimeout(e),(r=(t=globalThis.MappedinDebug)==null?void 0:t.__idleCallbackInteractionState)==null||r.removePendingCallback(e)};l();l();l();l();l();l();l();l();l();l();l();function Np(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")}o(Np,"getCoord");function Bo(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")}o(Bo,"getCoords");function Ca(e){return e.type==="Feature"?e.geometry:e}o(Ca,"getGeom");function Xi(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Np(e),i=Ca(t),a=i.type,u=t.bbox,c=i.coordinates;if(u&&MC(n,u)===!1)return!1;a==="Polygon"&&(c=[c]);for(var m=!1,d=0;d<c.length&&!m;d++)if(K4(n,c[d][0],r.ignoreBoundary)){for(var f=!1,g=1;g<c[d].length&&!f;)K4(n,c[d][g],!r.ignoreBoundary)&&(f=!0),g++;f||(m=!0)}return m}o(Xi,"booleanPointInPolygon");function K4(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var u=t[i][0],c=t[i][1],m=t[a][0],d=t[a][1],f=e[1]*(u-m)+c*(m-e[0])+d*(e[0]-u)===0&&(u-e[0])*(m-e[0])<=0&&(c-e[1])*(d-e[1])<=0;if(f)return!r;var g=c>e[1]!=d>e[1]&&e[0]<(m-u)*(e[1]-c)/(d-c)+u;g&&(n=!n)}return n}o(K4,"inRing");function MC(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}o(MC,"inBBox");l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();l();var Le={};$i(Le,{HasPropertyKey:()=>LC,IsArray:()=>pr,IsAsyncIterator:()=>Up,IsBigInt:()=>Wu,IsBoolean:()=>Yi,IsDate:()=>Mo,IsFunction:()=>jp,IsIterator:()=>zp,IsNull:()=>$p,IsNumber:()=>Cn,IsObject:()=>at,IsRegExp:()=>Hu,IsString:()=>pt,IsSymbol:()=>Gp,IsUint8Array:()=>fi,IsUndefined:()=>Ct});l();function LC(e,t){return t in e}o(LC,"HasPropertyKey");function Up(e){return at(e)&&!pr(e)&&!fi(e)&&Symbol.asyncIterator in e}o(Up,"IsAsyncIterator");function pr(e){return Array.isArray(e)}o(pr,"IsArray");function Wu(e){return typeof e=="bigint"}o(Wu,"IsBigInt");function Yi(e){return typeof e=="boolean"}o(Yi,"IsBoolean");function Mo(e){return e instanceof globalThis.Date}o(Mo,"IsDate");function jp(e){return typeof e=="function"}o(jp,"IsFunction");function zp(e){return at(e)&&!pr(e)&&!fi(e)&&Symbol.iterator in e}o(zp,"IsIterator");function $p(e){return e===null}o($p,"IsNull");function Cn(e){return typeof e=="number"}o(Cn,"IsNumber");function at(e){return typeof e=="object"&&e!==null}o(at,"IsObject");function Hu(e){return e instanceof globalThis.RegExp}o(Hu,"IsRegExp");function pt(e){return typeof e=="string"}o(pt,"IsString");function Gp(e){return typeof e=="symbol"}o(Gp,"IsSymbol");function fi(e){return e instanceof globalThis.Uint8Array}o(fi,"IsUint8Array");function Ct(e){return e===void 0}o(Ct,"IsUndefined");function RC(e){return e.map(t=>el(t))}o(RC,"ArrayType");function NC(e){return new Date(e.getTime())}o(NC,"DateType");function UC(e){return new Uint8Array(e)}o(UC,"Uint8ArrayType");function jC(e){return new RegExp(e.source,e.flags)}o(jC,"RegExpType");function zC(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=el(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=el(e[r]);return t}o(zC,"ObjectType");function el(e){return pr(e)?RC(e):Mo(e)?NC(e):fi(e)?UC(e):Hu(e)?jC(e):at(e)?zC(e):e}o(el,"Visit");function gt(e){return el(e)}o(gt,"Clone");function J4(e){return e.map(t=>Ku(t))}o(J4,"CloneRest");function Ku(e,t){return t===void 0?gt(e):gt(U(U({},t),e))}o(Ku,"CloneType");l();l();l();function tl(e){return Ce(e)&&Symbol.asyncIterator in e}o(tl,"IsAsyncIterator");function rl(e){return Ce(e)&&Symbol.iterator in e}o(rl,"IsIterator");function Zp(e){return Ce(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}o(Zp,"IsStandardObject");function nl(e){return e instanceof Promise}o(nl,"IsPromise");function Sr(e){return e instanceof Date&&Number.isFinite(e.getTime())}o(Sr,"IsDate");function X4(e){return e instanceof globalThis.Map}o(X4,"IsMap");function Y4(e){return e instanceof globalThis.Set}o(Y4,"IsSet");function en(e){return ArrayBuffer.isView(e)}o(en,"IsTypedArray");function Ia(e){return e instanceof globalThis.Uint8Array}o(Ia,"IsUint8Array");function ye(e,t){return t in e}o(ye,"HasPropertyKey");function Ce(e){return e!==null&&typeof e=="object"}o(Ce,"IsObject");function ve(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)}o(ve,"IsArray");function It(e){return e===void 0}o(It,"IsUndefined");function hi(e){return e===null}o(hi,"IsNull");function Zn(e){return typeof e=="boolean"}o(Zn,"IsBoolean");function pe(e){return typeof e=="number"}o(pe,"IsNumber");function il(e){return Number.isInteger(e)}o(il,"IsInteger");function rr(e){return typeof e=="bigint"}o(rr,"IsBigInt");function Re(e){return typeof e=="string"}o(Re,"IsString");function Qi(e){return typeof e=="function"}o(Qi,"IsFunction");function gi(e){return typeof e=="symbol"}o(gi,"IsSymbol");function nr(e){return rr(e)||Zn(e)||hi(e)||pe(e)||Re(e)||gi(e)||It(e)}o(nr,"IsValueType");var Ye;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(u,c){return e.ExactOptionalPropertyTypes?c in u:u[c]!==void 0}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){let c=Ce(u);return e.AllowArrayObject?c:c&&!ve(u)}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return r(u)&&!(u instanceof Date)&&!(u instanceof Uint8Array)}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return e.AllowNaN?pe(u):Number.isFinite(u)}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){let c=It(u);return e.AllowNullVoid?c||u===null:c}o(a,"IsVoidLike"),e.IsVoidLike=a})(Ye||(Ye={}));l();function $C(e){return globalThis.Object.freeze(e).map(t=>qu(t))}o($C,"ImmutableArray");function GC(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=qu(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=qu(e[r]);return globalThis.Object.freeze(t)}o(GC,"ImmutableObject");function qu(e){return pr(e)?$C(e):Mo(e)?e:fi(e)?e:Hu(e)?e:at(e)?GC(e):e}o(qu,"Immutable");function W(e,t){let r=t!==void 0?U(U({},t),e):e;switch(Ye.InstanceMode){case"freeze":return qu(r);case"clone":return gt(r);default:return r}}o(W,"CreateType");l();var Vp=class Vp extends Error{constructor(t){super(t)}};o(Vp,"TypeBoxError");var he=Vp;l();l();l();var yt=Symbol.for("TypeBox.Transform"),yi=Symbol.for("TypeBox.Readonly"),wr=Symbol.for("TypeBox.Optional"),tn=Symbol.for("TypeBox.Hint"),N=Symbol.for("TypeBox.Kind");function Q4(e){return at(e)&&e[yi]==="Readonly"}o(Q4,"IsReadonly");function Vn(e){return at(e)&&e[wr]==="Optional"}o(Vn,"IsOptional");function Wp(e){return je(e,"Any")}o(Wp,"IsAny");function bi(e){return je(e,"Array")}o(bi,"IsArray");function Ju(e){return je(e,"AsyncIterator")}o(Ju,"IsAsyncIterator");function Hp(e){return je(e,"BigInt")}o(Hp,"IsBigInt");function Kp(e){return je(e,"Boolean")}o(Kp,"IsBoolean");function Xu(e){return je(e,"Constructor")}o(Xu,"IsConstructor");function ZC(e){return je(e,"Date")}o(ZC,"IsDate");function Yu(e){return je(e,"Function")}o(Yu,"IsFunction");function To(e){return je(e,"Integer")}o(To,"IsInteger");function _t(e){return je(e,"Intersect")}o(_t,"IsIntersect");function Qu(e){return je(e,"Iterator")}o(Qu,"IsIterator");function je(e,t){return at(e)&&N in e&&e[N]===t}o(je,"IsKindOf");function vi(e){return je(e,"Literal")}o(vi,"IsLiteral");function Gr(e){return je(e,"MappedKey")}o(Gr,"IsMappedKey");function bt(e){return je(e,"MappedResult")}o(bt,"IsMappedResult");function eo(e){return je(e,"Never")}o(eo,"IsNever");function VC(e){return je(e,"Not")}o(VC,"IsNot");function WC(e){return je(e,"Null")}o(WC,"IsNull");function ko(e){return je(e,"Number")}o(ko,"IsNumber");function zt(e){return je(e,"Object")}o(zt,"IsObject");function _o(e){return je(e,"Promise")}o(_o,"IsPromise");function qp(e){return je(e,"Record")}o(qp,"IsRecord");function Jp(e){return je(e,"Ref")}o(Jp,"IsRef");function Xp(e){return je(e,"RegExp")}o(Xp,"IsRegExp");function es(e){return je(e,"String")}o(es,"IsString");function HC(e){return je(e,"Symbol")}o(HC,"IsSymbol");function Zr(e){return je(e,"TemplateLiteral")}o(Zr,"IsTemplateLiteral");function KC(e){return je(e,"This")}o(KC,"IsThis");function Da(e){return at(e)&&yt in e}o(Da,"IsTransform");function In(e){return je(e,"Tuple")}o(In,"IsTuple");function qC(e){return je(e,"Undefined")}o(qC,"IsUndefined");function Ve(e){return je(e,"Union")}o(Ve,"IsUnion");function JC(e){return je(e,"Uint8Array")}o(JC,"IsUint8Array");function XC(e){return je(e,"Unknown")}o(XC,"IsUnknown");function YC(e){return je(e,"Unsafe")}o(YC,"IsUnsafe");function QC(e){return je(e,"Void")}o(QC,"IsVoid");function to(e){return at(e)&&N in e&&pt(e[N])}o(to,"IsKind");function Dn(e){return Wp(e)||bi(e)||Kp(e)||Hp(e)||Ju(e)||Xu(e)||ZC(e)||Yu(e)||To(e)||_t(e)||Qu(e)||vi(e)||Gr(e)||bt(e)||eo(e)||VC(e)||WC(e)||ko(e)||zt(e)||_o(e)||qp(e)||Jp(e)||Xp(e)||es(e)||HC(e)||Zr(e)||KC(e)||In(e)||qC(e)||Ve(e)||JC(e)||XC(e)||YC(e)||QC(e)||to(e)}o(Dn,"IsSchema");var A={};$i(A,{IsAny:()=>nb,IsArray:()=>ib,IsAsyncIterator:()=>ob,IsBigInt:()=>ab,IsBoolean:()=>ub,IsConstructor:()=>sb,IsDate:()=>cb,IsFunction:()=>lb,IsInteger:()=>mb,IsIntersect:()=>db,IsIterator:()=>pb,IsKind:()=>Rb,IsKindOf:()=>Ue,IsLiteral:()=>rs,IsLiteralBoolean:()=>oI,IsLiteralNumber:()=>hb,IsLiteralString:()=>fb,IsLiteralValue:()=>gb,IsMappedKey:()=>yb,IsMappedResult:()=>bb,IsNever:()=>vb,IsNot:()=>xb,IsNull:()=>Eb,IsNumber:()=>Cb,IsObject:()=>Ib,IsOptional:()=>iI,IsPromise:()=>Db,IsProperties:()=>t0,IsReadonly:()=>nI,IsRecord:()=>Sb,IsRecursive:()=>aI,IsRef:()=>wb,IsRegExp:()=>Ab,IsSchema:()=>Ne,IsString:()=>Fb,IsSymbol:()=>Ob,IsTemplateLiteral:()=>Pb,IsThis:()=>Bb,IsTransform:()=>ft,IsTuple:()=>Mb,IsUint8Array:()=>Tb,IsUndefined:()=>Sa,IsUnion:()=>r0,IsUnionLiteral:()=>uI,IsUnknown:()=>kb,IsUnsafe:()=>_b,IsVoid:()=>Lb,TypeGuardUnknownTypeError:()=>Yp});l();var n0=class n0 extends he{};o(n0,"TypeGuardUnknownTypeError");var Yp=n0,eI=["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 eb(e){try{return new RegExp(e),!0}catch(t){return!1}}o(eb,"IsPattern");function Qp(e){if(!pt(e))return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=7&&r<=13||r===27||r===127)return!1}return!0}o(Qp,"IsControlCharacterFree");function tb(e){return e0(e)||Ne(e)}o(tb,"IsAdditionalProperties");function ts(e){return Ct(e)||Wu(e)}o(ts,"IsOptionalBigInt");function mt(e){return Ct(e)||Cn(e)}o(mt,"IsOptionalNumber");function e0(e){return Ct(e)||Yi(e)}o(e0,"IsOptionalBoolean");function et(e){return Ct(e)||pt(e)}o(et,"IsOptionalString");function tI(e){return Ct(e)||pt(e)&&Qp(e)&&eb(e)}o(tI,"IsOptionalPattern");function rI(e){return Ct(e)||pt(e)&&Qp(e)}o(rI,"IsOptionalFormat");function rb(e){return Ct(e)||Ne(e)}o(rb,"IsOptionalSchema");function nI(e){return at(e)&&e[yi]==="Readonly"}o(nI,"IsReadonly");function iI(e){return at(e)&&e[wr]==="Optional"}o(iI,"IsOptional");function nb(e){return Ue(e,"Any")&&et(e.$id)}o(nb,"IsAny");function ib(e){return Ue(e,"Array")&&e.type==="array"&&et(e.$id)&&Ne(e.items)&&mt(e.minItems)&&mt(e.maxItems)&&e0(e.uniqueItems)&&rb(e.contains)&&mt(e.minContains)&&mt(e.maxContains)}o(ib,"IsArray");function ob(e){return Ue(e,"AsyncIterator")&&e.type==="AsyncIterator"&&et(e.$id)&&Ne(e.items)}o(ob,"IsAsyncIterator");function ab(e){return Ue(e,"BigInt")&&e.type==="bigint"&&et(e.$id)&&ts(e.exclusiveMaximum)&&ts(e.exclusiveMinimum)&&ts(e.maximum)&&ts(e.minimum)&&ts(e.multipleOf)}o(ab,"IsBigInt");function ub(e){return Ue(e,"Boolean")&&e.type==="boolean"&&et(e.$id)}o(ub,"IsBoolean");function sb(e){return Ue(e,"Constructor")&&e.type==="Constructor"&&et(e.$id)&&pr(e.parameters)&&e.parameters.every(t=>Ne(t))&&Ne(e.returns)}o(sb,"IsConstructor");function cb(e){return Ue(e,"Date")&&e.type==="Date"&&et(e.$id)&&mt(e.exclusiveMaximumTimestamp)&&mt(e.exclusiveMinimumTimestamp)&&mt(e.maximumTimestamp)&&mt(e.minimumTimestamp)&&mt(e.multipleOfTimestamp)}o(cb,"IsDate");function lb(e){return Ue(e,"Function")&&e.type==="Function"&&et(e.$id)&&pr(e.parameters)&&e.parameters.every(t=>Ne(t))&&Ne(e.returns)}o(lb,"IsFunction");function mb(e){return Ue(e,"Integer")&&e.type==="integer"&&et(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(mb,"IsInteger");function t0(e){return at(e)&&Object.entries(e).every(([t,r])=>Qp(t)&&Ne(r))}o(t0,"IsProperties");function db(e){return Ue(e,"Intersect")&&!(pt(e.type)&&e.type!=="object")&&pr(e.allOf)&&e.allOf.every(t=>Ne(t)&&!ft(t))&&et(e.type)&&(e0(e.unevaluatedProperties)||rb(e.unevaluatedProperties))&&et(e.$id)}o(db,"IsIntersect");function pb(e){return Ue(e,"Iterator")&&e.type==="Iterator"&&et(e.$id)&&Ne(e.items)}o(pb,"IsIterator");function Ue(e,t){return at(e)&&N in e&&e[N]===t}o(Ue,"IsKindOf");function fb(e){return rs(e)&&pt(e.const)}o(fb,"IsLiteralString");function hb(e){return rs(e)&&Cn(e.const)}o(hb,"IsLiteralNumber");function oI(e){return rs(e)&&Yi(e.const)}o(oI,"IsLiteralBoolean");function rs(e){return Ue(e,"Literal")&&et(e.$id)&&gb(e.const)}o(rs,"IsLiteral");function gb(e){return Yi(e)||Cn(e)||pt(e)}o(gb,"IsLiteralValue");function yb(e){return Ue(e,"MappedKey")&&pr(e.keys)&&e.keys.every(t=>Cn(t)||pt(t))}o(yb,"IsMappedKey");function bb(e){return Ue(e,"MappedResult")&&t0(e.properties)}o(bb,"IsMappedResult");function vb(e){return Ue(e,"Never")&&at(e.not)&&Object.getOwnPropertyNames(e.not).length===0}o(vb,"IsNever");function xb(e){return Ue(e,"Not")&&Ne(e.not)}o(xb,"IsNot");function Eb(e){return Ue(e,"Null")&&e.type==="null"&&et(e.$id)}o(Eb,"IsNull");function Cb(e){return Ue(e,"Number")&&e.type==="number"&&et(e.$id)&&mt(e.exclusiveMaximum)&&mt(e.exclusiveMinimum)&&mt(e.maximum)&&mt(e.minimum)&&mt(e.multipleOf)}o(Cb,"IsNumber");function Ib(e){return Ue(e,"Object")&&e.type==="object"&&et(e.$id)&&t0(e.properties)&&tb(e.additionalProperties)&&mt(e.minProperties)&&mt(e.maxProperties)}o(Ib,"IsObject");function Db(e){return Ue(e,"Promise")&&e.type==="Promise"&&et(e.$id)&&Ne(e.item)}o(Db,"IsPromise");function Sb(e){return Ue(e,"Record")&&e.type==="object"&&et(e.$id)&&tb(e.additionalProperties)&&at(e.patternProperties)&&(t=>{let r=Object.getOwnPropertyNames(t.patternProperties);return r.length===1&&eb(r[0])&&at(t.patternProperties)&&Ne(t.patternProperties[r[0]])})(e)}o(Sb,"IsRecord");function aI(e){return at(e)&&tn in e&&e[tn]==="Recursive"}o(aI,"IsRecursive");function wb(e){return Ue(e,"Ref")&&et(e.$id)&&pt(e.$ref)}o(wb,"IsRef");function Ab(e){return Ue(e,"RegExp")&&et(e.$id)&&pt(e.source)&&pt(e.flags)&&mt(e.maxLength)&&mt(e.minLength)}o(Ab,"IsRegExp");function Fb(e){return Ue(e,"String")&&e.type==="string"&&et(e.$id)&&mt(e.minLength)&&mt(e.maxLength)&&tI(e.pattern)&&rI(e.format)}o(Fb,"IsString");function Ob(e){return Ue(e,"Symbol")&&e.type==="symbol"&&et(e.$id)}o(Ob,"IsSymbol");function Pb(e){return Ue(e,"TemplateLiteral")&&e.type==="string"&&pt(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}o(Pb,"IsTemplateLiteral");function Bb(e){return Ue(e,"This")&&et(e.$id)&&pt(e.$ref)}o(Bb,"IsThis");function ft(e){return at(e)&&yt in e}o(ft,"IsTransform");function Mb(e){return Ue(e,"Tuple")&&e.type==="array"&&et(e.$id)&&Cn(e.minItems)&&Cn(e.maxItems)&&e.minItems===e.maxItems&&(Ct(e.items)&&Ct(e.additionalItems)&&e.minItems===0||pr(e.items)&&e.items.every(t=>Ne(t)))}o(Mb,"IsTuple");function Sa(e){return Ue(e,"Undefined")&&e.type==="undefined"&&et(e.$id)}o(Sa,"IsUndefined");function uI(e){return r0(e)&&e.anyOf.every(t=>fb(t)||hb(t))}o(uI,"IsUnionLiteral");function r0(e){return Ue(e,"Union")&&et(e.$id)&&at(e)&&pr(e.anyOf)&&e.anyOf.every(t=>Ne(t))}o(r0,"IsUnion");function Tb(e){return Ue(e,"Uint8Array")&&e.type==="Uint8Array"&&et(e.$id)&&mt(e.minByteLength)&&mt(e.maxByteLength)}o(Tb,"IsUint8Array");function kb(e){return Ue(e,"Unknown")&&et(e.$id)}o(kb,"IsUnknown");function _b(e){return Ue(e,"Unsafe")}o(_b,"IsUnsafe");function Lb(e){return Ue(e,"Void")&&e.type==="void"&&et(e.$id)}o(Lb,"IsVoid");function Rb(e){return at(e)&&N in e&&pt(e[N])&&!eI.includes(e[N])}o(Rb,"IsKind");function Ne(e){return at(e)&&(nb(e)||ib(e)||ub(e)||ab(e)||ob(e)||sb(e)||cb(e)||lb(e)||mb(e)||db(e)||pb(e)||rs(e)||yb(e)||bb(e)||vb(e)||xb(e)||Eb(e)||Cb(e)||Ib(e)||Db(e)||Sb(e)||wb(e)||Ab(e)||Fb(e)||Ob(e)||Pb(e)||Bb(e)||Mb(e)||Sa(e)||r0(e)||Tb(e)||kb(e)||_b(e)||Lb(e)||Rb(e))}o(Ne,"IsSchema");l();var i0="(true|false)",ns="(0|[1-9][0-9]*)",o0="(.*)",sI="(?!.*)",g9="^".concat(i0,"$"),xi="^".concat(ns,"$"),Ei="^".concat(o0,"$"),Nb="^".concat(sI,"$");l();var Ar={};$i(Ar,{Clear:()=>lI,Delete:()=>mI,Entries:()=>cI,Get:()=>fI,Has:()=>dI,Set:()=>pI});l();var wa=new Map;function cI(){return new Map(wa)}o(cI,"Entries");function lI(){return wa.clear()}o(lI,"Clear");function mI(e){return wa.delete(e)}o(mI,"Delete");function dI(e){return wa.has(e)}o(dI,"Has");function pI(e,t){wa.set(e,t)}o(pI,"Set");function fI(e){return wa.get(e)}o(fI,"Get");var $t={};$i($t,{Clear:()=>gI,Delete:()=>yI,Entries:()=>hI,Get:()=>xI,Has:()=>bI,Set:()=>vI});l();var Aa=new Map;function hI(){return new Map(Aa)}o(hI,"Entries");function gI(){return Aa.clear()}o(gI,"Clear");function yI(e){return Aa.delete(e)}o(yI,"Delete");function bI(e){return Aa.has(e)}o(bI,"Has");function vI(e,t){Aa.set(e,t)}o(vI,"Set");function xI(e){return Aa.get(e)}o(xI,"Get");l();function Ub(e,t){return e.includes(t)}o(Ub,"SetIncludes");function jb(e){return[...new Set(e)]}o(jb,"SetDistinct");function EI(e,t){return e.filter(r=>t.includes(r))}o(EI,"SetIntersect");function CI(e,t){return e.reduce((r,n)=>EI(r,n),t)}o(CI,"SetIntersectManyResolve");function zb(e){return e.length===1?e[0]:e.length>1?CI(e.slice(1),e[0]):[]}o(zb,"SetIntersectMany");function $b(e){let t=[];for(let r of e)t.push(...r);return t}o($b,"SetUnionMany");l();function ro(e){return W({[N]:"Any"},e)}o(ro,"Any");l();function ol(e,t){return W({[N]:"Array",type:"array",items:e},t)}o(ol,"Array");l();function al(e,t){return W({[N]:"AsyncIterator",type:"AsyncIterator",items:e},t)}o(al,"AsyncIterator");l();l();l();function II(e,t){let i=e,{[t]:r}=i;return Do(i,[Cc(t)])}o(II,"DiscardKey");function Ft(e,t){return t.reduce((r,n)=>II(r,n),e)}o(Ft,"Discard");l();function tt(e){return W({[N]:"Never",not:{}},e)}o(tt,"Never");l();l();function ze(e){return W({[N]:"MappedResult",properties:e})}o(ze,"MappedResult");l();l();function ul(e,t,r){return W({[N]:"Constructor",type:"Constructor",parameters:e,returns:t},r)}o(ul,"Constructor");l();function no(e,t,r){return W({[N]:"Function",type:"Function",parameters:e,returns:t},r)}o(no,"Function");l();l();l();l();function is(e,t){return W({[N]:"Union",anyOf:e},t)}o(is,"UnionCreate");function DI(e){return e.some(t=>Vn(t))}o(DI,"IsUnionOptional");function Gb(e){return e.map(t=>Vn(t)?SI(t):t)}o(Gb,"RemoveOptionalFromRest");function SI(e){return Ft(e,[wr])}o(SI,"RemoveOptionalFromType");function wI(e,t){return DI(e)?_r(is(Gb(e),t)):is(Gb(e),t)}o(wI,"ResolveUnion");function Wn(e,t){return e.length===0?tt(t):e.length===1?W(e[0],t):wI(e,t)}o(Wn,"UnionEvaluated");l();function rt(e,t){return e.length===0?tt(t):e.length===1?W(e[0],t):is(e,t)}o(rt,"Union");l();l();l();var u0=class u0 extends he{};o(u0,"TemplateLiteralParserError");var sl=u0;function AI(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}o(AI,"Unescape");function a0(e,t,r){return e[t]===r&&e.charCodeAt(t-1)!==92}o(a0,"IsNonEscaped");function Ci(e,t){return a0(e,t,"(")}o(Ci,"IsOpenParen");function os(e,t){return a0(e,t,")")}o(os,"IsCloseParen");function Zb(e,t){return a0(e,t,"|")}o(Zb,"IsSeparator");function FI(e){if(!(Ci(e,0)&&os(e,e.length-1)))return!1;let t=0;for(let r=0;r<e.length;r++)if(Ci(e,r)&&(t+=1),os(e,r)&&(t-=1),t===0&&r!==e.length-1)return!1;return!0}o(FI,"IsGroup");function OI(e){return e.slice(1,e.length-1)}o(OI,"InGroup");function PI(e){let t=0;for(let r=0;r<e.length;r++)if(Ci(e,r)&&(t+=1),os(e,r)&&(t-=1),Zb(e,r)&&t===0)return!0;return!1}o(PI,"IsPrecedenceOr");function BI(e){for(let t=0;t<e.length;t++)if(Ci(e,t))return!0;return!1}o(BI,"IsPrecedenceAnd");function MI(e){let[t,r]=[0,0],n=[];for(let a=0;a<e.length;a++)if(Ci(e,a)&&(t+=1),os(e,a)&&(t-=1),Zb(e,a)&&t===0){let u=e.slice(r,a);u.length>0&&n.push(Fa(u)),r=a+1}let i=e.slice(r);return i.length>0&&n.push(Fa(i)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}o(MI,"Or");function TI(e){function t(i,a){if(!Ci(i,a))throw new sl("TemplateLiteralParser: Index must point to open parens");let u=0;for(let c=a;c<i.length;c++)if(Ci(i,c)&&(u+=1),os(i,c)&&(u-=1),u===0)return[a,c];throw new sl("TemplateLiteralParser: Unclosed group parens in expression")}o(t,"Group");function r(i,a){for(let u=a;u<i.length;u++)if(Ci(i,u))return[a,u];return[a,i.length]}o(r,"Range");let n=[];for(let i=0;i<e.length;i++)if(Ci(e,i)){let[a,u]=t(e,i),c=e.slice(a,u+1);n.push(Fa(c)),i=u}else{let[a,u]=r(e,i),c=e.slice(a,u);c.length>0&&n.push(Fa(c)),i=u-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}o(TI,"And");function Fa(e){return FI(e)?Fa(OI(e)):PI(e)?MI(e):BI(e)?TI(e):{type:"const",const:AI(e)}}o(Fa,"TemplateLiteralParse");function Oa(e){return Fa(e.slice(1,e.length-1))}o(Oa,"TemplateLiteralParseExact");var c0=class c0 extends he{};o(c0,"TemplateLiteralFiniteError");var s0=c0;function kI(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]*"}o(kI,"IsNumberExpression");function _I(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"}o(_I,"IsBooleanExpression");function LI(e){return e.type==="const"&&e.const===".*"}o(LI,"IsStringExpression");function Lo(e){return kI(e)||LI(e)?!1:_I(e)?!0:e.type==="and"?e.expr.every(t=>Lo(t)):e.type==="or"?e.expr.every(t=>Lo(t)):e.type==="const"?!0:(()=>{throw new s0("Unknown expression type")})()}o(Lo,"IsTemplateLiteralExpressionFinite");function cl(e){let t=Oa(e.pattern);return Lo(t)}o(cl,"IsTemplateLiteralFinite");l();var m0=class m0 extends he{};o(m0,"TemplateLiteralGenerateError");var l0=m0;function*Vb(e){if(e.length===1)return yield*K(e[0]);for(let t of e[0])for(let r of Vb(e.slice(1)))yield"".concat(t).concat(r)}o(Vb,"GenerateReduce");function*RI(e){return yield*K(Vb(e.expr.map(t=>[...as(t)])))}o(RI,"GenerateAnd");function*NI(e){for(let t of e.expr)yield*K(as(t))}o(NI,"GenerateOr");function*UI(e){return yield e.const}o(UI,"GenerateConst");function*as(e){return e.type==="and"?yield*K(RI(e)):e.type==="or"?yield*K(NI(e)):e.type==="const"?yield*K(UI(e)):(()=>{throw new l0("Unknown expression")})()}o(as,"TemplateLiteralExpressionGenerate");function Pa(e){let t=Oa(e.pattern);return Lo(t)?[...as(t)]:[]}o(Pa,"TemplateLiteralGenerate");l();l();function Ke(e,t){return W({[N]:"Literal",const:e,type:typeof e},t)}o(Ke,"Literal");l();function ll(e){return W({[N]:"Boolean",type:"boolean"},e)}o(ll,"Boolean");l();function Ba(e){return W({[N]:"BigInt",type:"bigint"},e)}o(Ba,"BigInt");l();function Hn(e){return W({[N]:"Number",type:"number"},e)}o(Hn,"Number");l();function rn(e){return W({[N]:"String",type:"string"},e)}o(rn,"String");function*jI(e){let t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield ll():t==="number"?yield Hn():t==="bigint"?yield Ba():t==="string"?yield rn():yield(()=>{let r=t.split("|").map(n=>Ke(n.trim()));return r.length===0?tt():r.length===1?r[0]:Wn(r)})()}o(jI,"FromUnion");function*zI(e){if(e[1]!=="{"){let t=Ke("$"),r=d0(e.slice(1));return yield*K([t,...r])}for(let t=2;t<e.length;t++)if(e[t]==="}"){let r=jI(e.slice(2,t)),n=d0(e.slice(t+1));return yield*K([...r,...n])}yield Ke(e)}o(zI,"FromTerminal");function*d0(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){let r=Ke(e.slice(0,t)),n=zI(e.slice(t));return yield*K([r,...n])}yield Ke(e)}o(d0,"FromSyntax");function Wb(e){return[...d0(e)]}o(Wb,"TemplateLiteralSyntax");l();var h0=class h0 extends he{};o(h0,"TemplateLiteralPatternError");var p0=h0;function $I(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o($I,"Escape");function Hb(e,t){return Zr(e)?e.pattern.slice(1,e.pattern.length-1):Ve(e)?"(".concat(e.anyOf.map(r=>Hb(r,t)).join("|"),")"):ko(e)?"".concat(t).concat(ns):To(e)?"".concat(t).concat(ns):Hp(e)?"".concat(t).concat(ns):es(e)?"".concat(t).concat(o0):vi(e)?"".concat(t).concat($I(e.const.toString())):Kp(e)?"".concat(t).concat(i0):(()=>{throw new p0("Unexpected Kind '".concat(e[N],"'"))})()}o(Hb,"Visit");function f0(e){return"^".concat(e.map(t=>Hb(t,"")).join(""),"$")}o(f0,"TemplateLiteralPattern");l();function Ro(e){let r=Pa(e).map(n=>Ke(n));return Wn(r)}o(Ro,"TemplateLiteralToUnion");l();function ml(e,t){let r=pt(e)?f0(Wb(e)):f0(e);return W({[N]:"TemplateLiteral",type:"string",pattern:r},t)}o(ml,"TemplateLiteral");function GI(e){return Pa(e).map(r=>r.toString())}o(GI,"FromTemplateLiteral");function ZI(e){let t=[];for(let r of e)t.push(...Lr(r));return t}o(ZI,"FromUnion");function VI(e){return[e.toString()]}o(VI,"FromLiteral");function Lr(e){return[...new Set(Zr(e)?GI(e):Ve(e)?ZI(e.anyOf):vi(e)?VI(e.const):ko(e)?["[number]"]:To(e)?["[number]"]:[])]}o(Lr,"IndexPropertyKeys");l();function WI(e,t,r){let n={};for(let i of Object.getOwnPropertyNames(t))n[i]=Ma(e,Lr(t[i]),r);return n}o(WI,"FromProperties");function HI(e,t,r){return WI(e,t.properties,r)}o(HI,"FromMappedResult");function Kb(e,t,r){let n=HI(e,t,r);return ze(n)}o(Kb,"IndexFromMappedResult");function Jb(e,t){return e.map(r=>Xb(r,t))}o(Jb,"FromRest");function KI(e){return e.filter(t=>!eo(t))}o(KI,"FromIntersectRest");function qI(e,t){return dl(KI(Jb(e,t)))}o(qI,"FromIntersect");function JI(e){return e.some(t=>eo(t))?[]:e}o(JI,"FromUnionRest");function XI(e,t){return Wn(JI(Jb(e,t)))}o(XI,"FromUnion");function YI(e,t){return t in e?e[t]:t==="[number]"?Wn(e):tt()}o(YI,"FromTuple");function QI(e,t){return t==="[number]"?e:tt()}o(QI,"FromArray");function e2(e,t){return t in e?e[t]:tt()}o(e2,"FromProperty");function Xb(e,t){var r;return _t(e)?qI(e.allOf,t):Ve(e)?XI(e.anyOf,t):In(e)?YI((r=e.items)!=null?r:[],t):bi(e)?QI(e.items,t):zt(e)?e2(e.properties,t):tt()}o(Xb,"IndexFromPropertyKey");function us(e,t){return t.map(r=>Xb(e,r))}o(us,"IndexFromPropertyKeys");function qb(e,t){return Wn(us(e,t))}o(qb,"FromSchema");function Ma(e,t,r){return bt(t)?Kb(e,t,r):Gr(t)?Yb(e,t,r):W(Dn(t)?qb(e,Lr(t)):qb(e,t),r)}o(Ma,"Index");function t2(e,t,r){return{[t]:Ma(e,[t],gt(r))}}o(t2,"MappedIndexPropertyKey");function r2(e,t,r){return t.reduce((n,i)=>U(U({},n),t2(e,i,r)),{})}o(r2,"MappedIndexPropertyKeys");function n2(e,t,r){return r2(e,t.keys,r)}o(n2,"MappedIndexProperties");function Yb(e,t,r){let n=n2(e,t,r);return ze(n)}o(Yb,"IndexFromMappedKey");l();function pl(e,t){return W({[N]:"Iterator",type:"Iterator",items:e},t)}o(pl,"Iterator");l();function i2(e){let t=[];for(let r in e)Vn(e[r])||t.push(r);return t}o(i2,"RequiredKeys");function o2(e,t){let r=i2(e),n=r.length>0?{[N]:"Object",type:"object",properties:e,required:r}:{[N]:"Object",type:"object",properties:e};return W(n,t)}o(o2,"_Object");var ut=o2;l();function fl(e,t){return W({[N]:"Promise",type:"Promise",item:e},t)}o(fl,"Promise");l();l();function a2(e){return W(Ft(e,[yi]))}o(a2,"RemoveReadonly");function u2(e){return W(xe(U({},e),{[yi]:"Readonly"}))}o(u2,"AddReadonly");function s2(e,t){return t===!1?a2(e):u2(e)}o(s2,"ReadonlyWithFlag");function nn(e,t){let r=t!=null?t:!0;return bt(e)?Qb(e,r):s2(e,r)}o(nn,"Readonly");function c2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=nn(e[n],t);return r}o(c2,"FromProperties");function l2(e,t){return c2(e.properties,t)}o(l2,"FromMappedResult");function Qb(e,t){let r=l2(e,t);return ze(r)}o(Qb,"ReadonlyFromMappedResult");l();function Kn(e,t){return W(e.length>0?{[N]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[N]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}o(Kn,"Tuple");function e1(e,t){return e in t?on(e,t[e]):ze(t)}o(e1,"FromMappedResult");function m2(e){return{[e]:Ke(e)}}o(m2,"MappedKeyToKnownMappedResultProperties");function d2(e){let t={};for(let r of e)t[r]=Ke(r);return t}o(d2,"MappedKeyToUnknownMappedResultProperties");function p2(e,t){return Ub(t,e)?m2(e):d2(t)}o(p2,"MappedKeyToMappedResultProperties");function f2(e,t){let r=p2(e,t);return e1(e,r)}o(f2,"FromMappedKey");function ss(e,t){return t.map(r=>on(e,r))}o(ss,"FromRest");function h2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=on(e,t[n]);return r}o(h2,"FromProperties");function on(e,t){var n;let r=U({},t);return Vn(t)?_r(on(e,Ft(t,[wr]))):Q4(t)?nn(on(e,Ft(t,[yi]))):bt(t)?e1(e,t.properties):Gr(t)?f2(e,t.keys):Xu(t)?ul(ss(e,t.parameters),on(e,t.returns),r):Yu(t)?no(ss(e,t.parameters),on(e,t.returns),r):Ju(t)?al(on(e,t.items),r):Qu(t)?pl(on(e,t.items),r):_t(t)?Rr(ss(e,t.allOf),r):Ve(t)?rt(ss(e,t.anyOf),r):In(t)?Kn(ss(e,(n=t.items)!=null?n:[]),r):zt(t)?ut(h2(e,t.properties),r):bi(t)?ol(on(e,t.items),r):_o(t)?fl(on(e,t.item),r):t}o(on,"FromSchemaType");function g2(e,t){let r={};for(let n of e)r[n]=on(n,t);return r}o(g2,"MappedFunctionReturnType");function t1(e,t,r){let n=Dn(e)?Lr(e):e,i=t({[N]:"MappedKey",keys:n}),a=g2(n,i);return ut(a,r)}o(t1,"Mapped");l();function y2(e){return W(Ft(e,[wr]))}o(y2,"RemoveOptional");function b2(e){return W(xe(U({},e),{[wr]:"Optional"}))}o(b2,"AddOptional");function v2(e,t){return t===!1?y2(e):b2(e)}o(v2,"OptionalWithFlag");function _r(e,t){let r=t!=null?t:!0;return bt(e)?r1(e,r):v2(e,r)}o(_r,"Optional");function x2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=_r(e[n],t);return r}o(x2,"FromProperties");function E2(e,t){return x2(e.properties,t)}o(E2,"FromMappedResult");function r1(e,t){let r=E2(e,t);return ze(r)}o(r1,"OptionalFromMappedResult");l();function cs(e,t={}){let r=e.every(i=>zt(i)),n=Dn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return W(t.unevaluatedProperties===!1||Dn(t.unevaluatedProperties)||r?xe(U({},n),{[N]:"Intersect",type:"object",allOf:e}):xe(U({},n),{[N]:"Intersect",allOf:e}),t)}o(cs,"IntersectCreate");function C2(e){return e.every(t=>Vn(t))}o(C2,"IsIntersectOptional");function I2(e){return Ft(e,[wr])}o(I2,"RemoveOptionalFromType");function n1(e){return e.map(t=>Vn(t)?I2(t):t)}o(n1,"RemoveOptionalFromRest");function D2(e,t){return C2(e)?_r(cs(n1(e),t)):cs(n1(e),t)}o(D2,"ResolveIntersect");function dl(e,t={}){if(e.length===0)return tt(t);if(e.length===1)return W(e[0],t);if(e.some(r=>Da(r)))throw new Error("Cannot intersect transform types");return D2(e,t)}o(dl,"IntersectEvaluated");l();function Rr(e,t){if(e.length===0)return tt(t);if(e.length===1)return W(e[0],t);if(e.some(r=>Da(r)))throw new Error("Cannot intersect transform types");return cs(e,t)}o(Rr,"Intersect");function i1(e){return e.map(t=>g0(t))}o(i1,"FromRest");function S2(e){return Rr(i1(e))}o(S2,"FromIntersect");function w2(e){return rt(i1(e))}o(w2,"FromUnion");function A2(e){return g0(e)}o(A2,"FromPromise");function g0(e){return _t(e)?S2(e.allOf):Ve(e)?w2(e.anyOf):_o(e)?A2(e.item):e}o(g0,"AwaitedResolve");function o1(e,t){return W(g0(e),t)}o(o1,"Awaited");l();l();l();l();function a1(e){let t=[];for(let r of e)t.push(Jt(r));return t}o(a1,"FromRest");function F2(e){let t=a1(e);return $b(t)}o(F2,"FromIntersect");function O2(e){let t=a1(e);return zb(t)}o(O2,"FromUnion");function P2(e){return e.map((t,r)=>r.toString())}o(P2,"FromTuple");function B2(e){return["[number]"]}o(B2,"FromArray");function M2(e){return globalThis.Object.getOwnPropertyNames(e)}o(M2,"FromProperties");function T2(e){return y0?globalThis.Object.getOwnPropertyNames(e).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}o(T2,"FromPatternProperties");function Jt(e){var t;return _t(e)?F2(e.allOf):Ve(e)?O2(e.anyOf):In(e)?P2((t=e.items)!=null?t:[]):bi(e)?B2(e.items):zt(e)?M2(e.properties):qp(e)?T2(e.patternProperties):[]}o(Jt,"KeyOfPropertyKeys");var y0=!1;function Ii(e){y0=!0;let t=Jt(e);y0=!1;let r=t.map(n=>"(".concat(n,")"));return"^(".concat(r.join("|"),")$")}o(Ii,"KeyOfPattern");function k2(e){return e.map(t=>t==="[number]"?Hn():Ke(t))}o(k2,"KeyOfPropertyKeysToRest");function hl(e,t){if(bt(e))return u1(e,t);{let r=Jt(e),n=k2(r),i=Wn(n);return W(i,t)}}o(hl,"KeyOf");function _2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=hl(e[n],gt(t));return r}o(_2,"FromProperties");function L2(e,t){return _2(e.properties,t)}o(L2,"FromMappedResult");function u1(e,t){let r=L2(e,t);return ze(r)}o(u1,"KeyOfFromMappedResult");l();function io(e){let t=Jt(e),r=us(e,t);return t.map((n,i)=>[t[i],r[i]])}o(io,"KeyOfPropertyEntries");function R2(e){let t=[];for(let r of e)t.push(...Jt(r));return jb(t)}o(R2,"CompositeKeys");function N2(e){return e.filter(t=>!eo(t))}o(N2,"FilterNever");function U2(e,t){let r=[];for(let n of e)r.push(...us(n,[t]));return N2(r)}o(U2,"CompositeProperty");function j2(e,t){let r={};for(let n of t)r[n]=dl(U2(e,n));return r}o(j2,"CompositeProperties");function s1(e,t){let r=R2(e),n=j2(e,r);return ut(n,t)}o(s1,"Composite");l();l();function gl(e){return W({[N]:"Date",type:"Date"},e)}o(gl,"Date");l();function yl(e){return W({[N]:"Null",type:"null"},e)}o(yl,"Null");l();function bl(e){return W({[N]:"Symbol",type:"symbol"},e)}o(bl,"Symbol");l();function vl(e){return W({[N]:"Undefined",type:"undefined"},e)}o(vl,"Undefined");l();function xl(e){return W({[N]:"Uint8Array",type:"Uint8Array"},e)}o(xl,"Uint8Array");l();function Di(e){return W({[N]:"Unknown"},e)}o(Di,"Unknown");function z2(e){return e.map(t=>b0(t,!1))}o(z2,"FromArray");function $2(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=nn(b0(e[r],!1));return t}o($2,"FromProperties");function El(e,t){return t===!0?e:nn(e)}o(El,"ConditionalReadonly");function b0(e,t){return Up(e)?El(ro(),t):zp(e)?El(ro(),t):pr(e)?nn(Kn(z2(e))):fi(e)?xl():Mo(e)?gl():at(e)?El(ut($2(e)),t):jp(e)?El(no([],Di()),t):Ct(e)?vl():$p(e)?yl():Gp(e)?bl():Wu(e)?Ba():Cn(e)?Ke(e):Yi(e)?Ke(e):pt(e)?Ke(e):ut({})}o(b0,"FromValue");function c1(e,t){return W(b0(e,!0),t)}o(c1,"Const");l();function l1(e,t){return Kn(e.parameters,t)}o(l1,"ConstructorParameters");l();function ls(e,t){return e.map(r=>Sn(r,t))}o(ls,"FromRest");function G2(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Sn(e[n],t);return r}o(G2,"FromProperties");function Z2(e,t){return e.parameters=ls(e.parameters,t),e.returns=Sn(e.returns,t),e}o(Z2,"FromConstructor");function V2(e,t){return e.parameters=ls(e.parameters,t),e.returns=Sn(e.returns,t),e}o(V2,"FromFunction");function W2(e,t){return e.allOf=ls(e.allOf,t),e}o(W2,"FromIntersect");function H2(e,t){return e.anyOf=ls(e.anyOf,t),e}o(H2,"FromUnion");function K2(e,t){return Ct(e.items)||(e.items=ls(e.items,t)),e}o(K2,"FromTuple");function q2(e,t){return e.items=Sn(e.items,t),e}o(q2,"FromArray");function J2(e,t){return e.properties=G2(e.properties,t),e}o(J2,"FromObject");function X2(e,t){return e.item=Sn(e.item,t),e}o(X2,"FromPromise");function Y2(e,t){return e.items=Sn(e.items,t),e}o(Y2,"FromAsyncIterator");function Q2(e,t){return e.items=Sn(e.items,t),e}o(Q2,"FromIterator");function eD(e,t){let r=t.find(i=>i.$id===e.$ref);if(r===void 0)throw Error("Unable to dereference schema with $id ".concat(e.$ref));let n=Ft(r,["$id"]);return Sn(n,t)}o(eD,"FromRef");function tD(e,t){return Xu(e)?Z2(e,t):Yu(e)?V2(e,t):_t(e)?W2(e,t):Ve(e)?H2(e,t):In(e)?K2(e,t):bi(e)?q2(e,t):zt(e)?J2(e,t):_o(e)?X2(e,t):Ju(e)?Y2(e,t):Qu(e)?Q2(e,t):Jp(e)?eD(e,t):e}o(tD,"DerefResolve");function Sn(e,t){return tD(Ku(e),J4(t))}o(Sn,"Deref");l();function m1(e,t){if(Ct(e))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),i=[...new Set(r)].map(a=>Ke(a));return rt(i,xe(U({},t),{[tn]:"Enum"}))}o(m1,"Enum");l();l();l();var S0=class S0 extends he{};o(S0,"ExtendsResolverError");var x0=S0,z;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(z||(z={}));function an(e){return e===z.False?e:z.True}o(an,"IntoBooleanResult");function Ta(e){throw new x0(e)}o(Ta,"Throw");function Nt(e){return A.IsNever(e)||A.IsIntersect(e)||A.IsUnion(e)||A.IsUnknown(e)||A.IsAny(e)}o(Nt,"IsStructuralRight");function Ut(e,t){return A.IsNever(t)?b1(e,t):A.IsIntersect(t)?Cl(e,t):A.IsUnion(t)?D0(e,t):A.IsUnknown(t)?C1(e,t):A.IsAny(t)?I0(e,t):Ta("StructuralRight")}o(Ut,"StructuralRight");function I0(e,t){return z.True}o(I0,"FromAnyRight");function rD(e,t){return A.IsIntersect(t)?Cl(e,t):A.IsUnion(t)&&t.anyOf.some(r=>A.IsAny(r)||A.IsUnknown(r))?z.True:A.IsUnion(t)?z.Union:A.IsUnknown(t)||A.IsAny(t)?z.True:z.Union}o(rD,"FromAny");function nD(e,t){return A.IsUnknown(e)?z.False:A.IsAny(e)?z.Union:A.IsNever(e)?z.True:z.False}o(nD,"FromArrayRight");function iD(e,t){return A.IsObject(t)&&Il(t)?z.True:Nt(t)?Ut(e,t):A.IsArray(t)?an(nt(e.items,t.items)):z.False}o(iD,"FromArray");function oD(e,t){return Nt(t)?Ut(e,t):A.IsAsyncIterator(t)?an(nt(e.items,t.items)):z.False}o(oD,"FromAsyncIterator");function aD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsBigInt(t)?z.True:z.False}o(aD,"FromBigInt");function g1(e,t){return A.IsLiteralBoolean(e)||A.IsBoolean(e)?z.True:z.False}o(g1,"FromBooleanRight");function uD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsBoolean(t)?z.True:z.False}o(uD,"FromBoolean");function sD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsConstructor(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>an(nt(t.parameters[n],r))===z.True)?an(nt(e.returns,t.returns)):z.False:z.False}o(sD,"FromConstructor");function cD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsDate(t)?z.True:z.False}o(cD,"FromDate");function lD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsFunction(t)?e.parameters.length>t.parameters.length?z.False:e.parameters.every((r,n)=>an(nt(t.parameters[n],r))===z.True)?an(nt(e.returns,t.returns)):z.False:z.False}o(lD,"FromFunction");function y1(e,t){return A.IsLiteral(e)&&Le.IsNumber(e.const)||A.IsNumber(e)||A.IsInteger(e)?z.True:z.False}o(y1,"FromIntegerRight");function mD(e,t){return A.IsInteger(t)||A.IsNumber(t)?z.True:Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):z.False}o(mD,"FromInteger");function Cl(e,t){return t.allOf.every(r=>nt(e,r)===z.True)?z.True:z.False}o(Cl,"FromIntersectRight");function dD(e,t){return e.allOf.some(r=>nt(r,t)===z.True)?z.True:z.False}o(dD,"FromIntersect");function pD(e,t){return Nt(t)?Ut(e,t):A.IsIterator(t)?an(nt(e.items,t.items)):z.False}o(pD,"FromIterator");function fD(e,t){return A.IsLiteral(t)&&t.const===e.const?z.True:Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsString(t)?E1(e,t):A.IsNumber(t)?v1(e,t):A.IsInteger(t)?y1(e,t):A.IsBoolean(t)?g1(e,t):z.False}o(fD,"FromLiteral");function b1(e,t){return z.False}o(b1,"FromNeverRight");function hD(e,t){return z.True}o(hD,"FromNever");function d1(e){let[t,r]=[e,0];for(;A.IsNot(t);)t=t.not,r+=1;return r%2===0?t:Di()}o(d1,"UnwrapTNot");function gD(e,t){return A.IsNot(e)?nt(d1(e),t):A.IsNot(t)?nt(e,d1(t)):Ta("Invalid fallthrough for Not")}o(gD,"FromNot");function yD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsNull(t)?z.True:z.False}o(yD,"FromNull");function v1(e,t){return A.IsLiteralNumber(e)||A.IsNumber(e)||A.IsInteger(e)?z.True:z.False}o(v1,"FromNumberRight");function bD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsInteger(t)||A.IsNumber(t)?z.True:z.False}o(bD,"FromNumber");function Nr(e,t){return Object.getOwnPropertyNames(e.properties).length===t}o(Nr,"IsObjectPropertyCount");function p1(e){return Il(e)}o(p1,"IsObjectStringLike");function f1(e){return Nr(e,0)||Nr(e,1)&&"description"in e.properties&&A.IsUnion(e.properties.description)&&e.properties.description.anyOf.length===2&&(A.IsString(e.properties.description.anyOf[0])&&A.IsUndefined(e.properties.description.anyOf[1])||A.IsString(e.properties.description.anyOf[1])&&A.IsUndefined(e.properties.description.anyOf[0]))}o(f1,"IsObjectSymbolLike");function v0(e){return Nr(e,0)}o(v0,"IsObjectNumberLike");function h1(e){return Nr(e,0)}o(h1,"IsObjectBooleanLike");function vD(e){return Nr(e,0)}o(vD,"IsObjectBigIntLike");function xD(e){return Nr(e,0)}o(xD,"IsObjectDateLike");function ED(e){return Il(e)}o(ED,"IsObjectUint8ArrayLike");function CD(e){let t=Hn();return Nr(e,0)||Nr(e,1)&&"length"in e.properties&&an(nt(e.properties.length,t))===z.True}o(CD,"IsObjectFunctionLike");function ID(e){return Nr(e,0)}o(ID,"IsObjectConstructorLike");function Il(e){let t=Hn();return Nr(e,0)||Nr(e,1)&&"length"in e.properties&&an(nt(e.properties.length,t))===z.True}o(Il,"IsObjectArrayLike");function DD(e){let t=no([ro()],ro());return Nr(e,0)||Nr(e,1)&&"then"in e.properties&&an(nt(e.properties.then,t))===z.True}o(DD,"IsObjectPromiseLike");function x1(e,t){return nt(e,t)===z.False||A.IsOptional(e)&&!A.IsOptional(t)?z.False:z.True}o(x1,"Property");function fr(e,t){return A.IsUnknown(e)?z.False:A.IsAny(e)?z.Union:A.IsNever(e)||A.IsLiteralString(e)&&p1(t)||A.IsLiteralNumber(e)&&v0(t)||A.IsLiteralBoolean(e)&&h1(t)||A.IsSymbol(e)&&f1(t)||A.IsBigInt(e)&&vD(t)||A.IsString(e)&&p1(t)||A.IsSymbol(e)&&f1(t)||A.IsNumber(e)&&v0(t)||A.IsInteger(e)&&v0(t)||A.IsBoolean(e)&&h1(t)||A.IsUint8Array(e)&&ED(t)||A.IsDate(e)&&xD(t)||A.IsConstructor(e)&&ID(t)||A.IsFunction(e)&&CD(t)?z.True:A.IsRecord(e)&&A.IsString(E0(e))?t[tn]==="Record"?z.True:z.False:A.IsRecord(e)&&A.IsNumber(E0(e))?Nr(t,0)?z.True:z.False:z.False}o(fr,"FromObjectRight");function SD(e,t){return Nt(t)?Ut(e,t):A.IsRecord(t)?un(e,t):A.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties)){if(!(r in e.properties)&&!A.IsOptional(t.properties[r]))return z.False;if(A.IsOptional(t.properties[r]))return z.True;if(x1(e.properties[r],t.properties[r])===z.False)return z.False}return z.True})():z.False}o(SD,"FromObject");function wD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)&&DD(t)?z.True:A.IsPromise(t)?an(nt(e.item,t.item)):z.False}o(wD,"FromPromise");function E0(e){return xi in e.patternProperties?Hn():Ei in e.patternProperties?rn():Ta("Unknown record key pattern")}o(E0,"RecordKey");function C0(e){return xi in e.patternProperties?e.patternProperties[xi]:Ei in e.patternProperties?e.patternProperties[Ei]:Ta("Unable to get record value schema")}o(C0,"RecordValue");function un(e,t){let[r,n]=[E0(t),C0(t)];return A.IsLiteralString(e)&&A.IsNumber(r)&&an(nt(e,n))===z.True?z.True:A.IsUint8Array(e)&&A.IsNumber(r)||A.IsString(e)&&A.IsNumber(r)||A.IsArray(e)&&A.IsNumber(r)?nt(e,n):A.IsObject(e)?(()=>{for(let i of Object.getOwnPropertyNames(e.properties))if(x1(n,e.properties[i])===z.False)return z.False;return z.True})():z.False}o(un,"FromRecordRight");function AD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?nt(C0(e),C0(t)):z.False}o(AD,"FromRecord");function FD(e,t){let r=A.IsRegExp(e)?rn():e,n=A.IsRegExp(t)?rn():t;return nt(r,n)}o(FD,"FromRegExp");function E1(e,t){return A.IsLiteral(e)&&Le.IsString(e.const)||A.IsString(e)?z.True:z.False}o(E1,"FromStringRight");function OD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsString(t)?z.True:z.False}o(OD,"FromString");function PD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsSymbol(t)?z.True:z.False}o(PD,"FromSymbol");function BD(e,t){return A.IsTemplateLiteral(e)?nt(Ro(e),t):A.IsTemplateLiteral(t)?nt(e,Ro(t)):Ta("Invalid fallthrough for TemplateLiteral")}o(BD,"FromTemplateLiteral");function MD(e,t){return A.IsArray(t)&&e.items!==void 0&&e.items.every(r=>nt(r,t.items)===z.True)}o(MD,"IsArrayOfTuple");function TD(e,t){return A.IsNever(e)?z.True:A.IsUnknown(e)?z.False:A.IsAny(e)?z.Union:z.False}o(TD,"FromTupleRight");function kD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)&&Il(t)||A.IsArray(t)&&MD(e,t)?z.True:A.IsTuple(t)?Le.IsUndefined(e.items)&&!Le.IsUndefined(t.items)||!Le.IsUndefined(e.items)&&Le.IsUndefined(t.items)?z.False:Le.IsUndefined(e.items)&&!Le.IsUndefined(t.items)||e.items.every((r,n)=>nt(r,t.items[n])===z.True)?z.True:z.False:z.False}o(kD,"FromTuple");function _D(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsUint8Array(t)?z.True:z.False}o(_D,"FromUint8Array");function LD(e,t){return Nt(t)?Ut(e,t):A.IsObject(t)?fr(e,t):A.IsRecord(t)?un(e,t):A.IsVoid(t)?UD(e,t):A.IsUndefined(t)?z.True:z.False}o(LD,"FromUndefined");function D0(e,t){return t.anyOf.some(r=>nt(e,r)===z.True)?z.True:z.False}o(D0,"FromUnionRight");function RD(e,t){return e.anyOf.every(r=>nt(r,t)===z.True)?z.True:z.False}o(RD,"FromUnion");function C1(e,t){return z.True}o(C1,"FromUnknownRight");function ND(e,t){return A.IsNever(t)?b1(e,t):A.IsIntersect(t)?Cl(e,t):A.IsUnion(t)?D0(e,t):A.IsAny(t)?I0(e,t):A.IsString(t)?E1(e,t):A.IsNumber(t)?v1(e,t):A.IsInteger(t)?y1(e,t):A.IsBoolean(t)?g1(e,t):A.IsArray(t)?nD(e,t):A.IsTuple(t)?TD(e,t):A.IsObject(t)?fr(e,t):A.IsUnknown(t)?z.True:z.False}o(ND,"FromUnknown");function UD(e,t){return A.IsUndefined(e)||A.IsUndefined(e)?z.True:z.False}o(UD,"FromVoidRight");function jD(e,t){return A.IsIntersect(t)?Cl(e,t):A.IsUnion(t)?D0(e,t):A.IsUnknown(t)?C1(e,t):A.IsAny(t)?I0(e,t):A.IsObject(t)?fr(e,t):A.IsVoid(t)?z.True:z.False}o(jD,"FromVoid");function nt(e,t){return A.IsTemplateLiteral(e)||A.IsTemplateLiteral(t)?BD(e,t):A.IsRegExp(e)||A.IsRegExp(t)?FD(e,t):A.IsNot(e)||A.IsNot(t)?gD(e,t):A.IsAny(e)?rD(e,t):A.IsArray(e)?iD(e,t):A.IsBigInt(e)?aD(e,t):A.IsBoolean(e)?uD(e,t):A.IsAsyncIterator(e)?oD(e,t):A.IsConstructor(e)?sD(e,t):A.IsDate(e)?cD(e,t):A.IsFunction(e)?lD(e,t):A.IsInteger(e)?mD(e,t):A.IsIntersect(e)?dD(e,t):A.IsIterator(e)?pD(e,t):A.IsLiteral(e)?fD(e,t):A.IsNever(e)?hD(e,t):A.IsNull(e)?yD(e,t):A.IsNumber(e)?bD(e,t):A.IsObject(e)?SD(e,t):A.IsRecord(e)?AD(e,t):A.IsString(e)?OD(e,t):A.IsSymbol(e)?PD(e,t):A.IsTuple(e)?kD(e,t):A.IsPromise(e)?wD(e,t):A.IsUint8Array(e)?_D(e,t):A.IsUndefined(e)?LD(e,t):A.IsUnion(e)?RD(e,t):A.IsUnknown(e)?ND(e,t):A.IsVoid(e)?jD(e,t):Ta("Unknown left type operand '".concat(e[N],"'"))}o(nt,"Visit");function oo(e,t){return nt(e,t)}o(oo,"ExtendsCheck");l();l();l();function zD(e,t,r,n,i){let a={};for(let u of globalThis.Object.getOwnPropertyNames(e))a[u]=ka(e[u],t,r,n,gt(i));return a}o(zD,"FromProperties");function $D(e,t,r,n,i){return zD(e.properties,t,r,n,i)}o($D,"FromMappedResult");function I1(e,t,r,n,i){let a=$D(e,t,r,n,i);return ze(a)}o(I1,"ExtendsFromMappedResult");function GD(e,t,r,n){let i=oo(e,t);return i===z.Union?rt([r,n]):i===z.True?r:n}o(GD,"ExtendsResolve");function ka(e,t,r,n,i){return bt(e)?I1(e,t,r,n,i):Gr(e)?W(D1(e,t,r,n,i)):W(GD(e,t,r,n),i)}o(ka,"Extends");function ZD(e,t,r,n,i){return{[e]:ka(Ke(e),t,r,n,gt(i))}}o(ZD,"FromPropertyKey");function VD(e,t,r,n,i){return e.reduce((a,u)=>U(U({},a),ZD(u,t,r,n,i)),{})}o(VD,"FromPropertyKeys");function WD(e,t,r,n,i){return VD(e.keys,t,r,n,i)}o(WD,"FromMappedKey");function D1(e,t,r,n,i){let a=WD(e,t,r,n,i);return ze(a)}o(D1,"ExtendsFromMappedKey");l();function HD(e){return e.allOf.every(t=>Si(t))}o(HD,"Intersect");function KD(e){return e.anyOf.some(t=>Si(t))}o(KD,"Union");function qD(e){return!Si(e.not)}o(qD,"Not");function Si(e){return e[N]==="Intersect"?HD(e):e[N]==="Union"?KD(e):e[N]==="Not"?qD(e):e[N]==="Undefined"}o(Si,"ExtendsUndefinedCheck");l();function S1(e,t){return _a(Ro(e),t)}o(S1,"ExcludeFromTemplateLiteral");function JD(e,t){let r=e.filter(n=>oo(n,t)===z.False);return r.length===1?r[0]:rt(r)}o(JD,"ExcludeRest");function _a(e,t,r={}){return Zr(e)?W(S1(e,t),r):bt(e)?W(w1(e,t),r):W(Ve(e)?JD(e.anyOf,t):oo(e,t)!==z.False?tt():e,r)}o(_a,"Exclude");function XD(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=_a(e[n],t);return r}o(XD,"FromProperties");function YD(e,t){return XD(e.properties,t)}o(YD,"FromMappedResult");function w1(e,t){let r=YD(e,t);return ze(r)}o(w1,"ExcludeFromMappedResult");l();l();l();function A1(e,t){return La(Ro(e),t)}o(A1,"ExtractFromTemplateLiteral");function QD(e,t){let r=e.filter(n=>oo(n,t)!==z.False);return r.length===1?r[0]:rt(r)}o(QD,"ExtractRest");function La(e,t,r){return Zr(e)?W(A1(e,t),r):bt(e)?W(F1(e,t),r):W(Ve(e)?QD(e.anyOf,t):oo(e,t)!==z.False?e:tt(),r)}o(La,"Extract");function eS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=La(e[n],t);return r}o(eS,"FromProperties");function tS(e,t){return eS(e.properties,t)}o(tS,"FromMappedResult");function F1(e,t){let r=tS(e,t);return ze(r)}o(F1,"ExtractFromMappedResult");l();function O1(e,t){return W(e.returns,t)}o(O1,"InstanceType");l();function P1(e){return W({[N]:"Integer",type:"integer"},e)}o(P1,"Integer");l();l();l();function rS(e,t,r){return{[e]:wn(Ke(e),t,gt(r))}}o(rS,"MappedIntrinsicPropertyKey");function nS(e,t,r){return e.reduce((i,a)=>U(U({},i),rS(a,t,r)),{})}o(nS,"MappedIntrinsicPropertyKeys");function iS(e,t,r){return nS(e.keys,t,r)}o(iS,"MappedIntrinsicProperties");function B1(e,t,r){let n=iS(e,t,r);return ze(n)}o(B1,"IntrinsicFromMappedKey");function oS(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),r].join("")}o(oS,"ApplyUncapitalize");function aS(e){let[t,r]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),r].join("")}o(aS,"ApplyCapitalize");function uS(e){return e.toUpperCase()}o(uS,"ApplyUppercase");function sS(e){return e.toLowerCase()}o(sS,"ApplyLowercase");function cS(e,t,r){let n=Oa(e.pattern);if(!Lo(n))return xe(U({},e),{pattern:M1(e.pattern,t)});let u=[...as(n)].map(d=>Ke(d)),c=T1(u,t),m=rt(c);return ml([m],r)}o(cS,"FromTemplateLiteral");function M1(e,t){return typeof e=="string"?t==="Uncapitalize"?oS(e):t==="Capitalize"?aS(e):t==="Uppercase"?uS(e):t==="Lowercase"?sS(e):e:e.toString()}o(M1,"FromLiteralValue");function T1(e,t){return e.map(r=>wn(r,t))}o(T1,"FromRest");function wn(e,t,r={}){return Gr(e)?B1(e,t,r):Zr(e)?cS(e,t,r):Ve(e)?rt(T1(e.anyOf,t),r):vi(e)?Ke(M1(e.const,t),r):W(e,r)}o(wn,"Intrinsic");function k1(e,t={}){return wn(e,"Capitalize",t)}o(k1,"Capitalize");l();function _1(e,t={}){return wn(e,"Lowercase",t)}o(_1,"Lowercase");l();function L1(e,t={}){return wn(e,"Uncapitalize",t)}o(L1,"Uncapitalize");l();function R1(e,t={}){return wn(e,"Uppercase",t)}o(R1,"Uppercase");l();function N1(e,t){return W({[N]:"Not",not:e},t)}o(N1,"Not");l();l();l();function lS(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Ra(e[i],t,gt(r));return n}o(lS,"FromProperties");function mS(e,t,r){return lS(e.properties,t,r)}o(mS,"FromMappedResult");function U1(e,t,r){let n=mS(e,t,r);return ze(n)}o(U1,"OmitFromMappedResult");function dS(e,t){return e.map(r=>w0(r,t))}o(dS,"FromIntersect");function pS(e,t){return e.map(r=>w0(r,t))}o(pS,"FromUnion");function fS(e,t){let i=e,{[t]:r}=i;return Do(i,[Cc(t)])}o(fS,"FromProperty");function hS(e,t){return t.reduce((r,n)=>fS(r,n),e)}o(hS,"FromProperties");function gS(e,t){let r=Ft(e,[yt,"$id","required","properties"]),n=hS(e.properties,t);return ut(n,r)}o(gS,"FromObject");function w0(e,t){return _t(e)?Rr(dS(e.allOf,t)):Ve(e)?rt(pS(e.anyOf,t)):zt(e)?gS(e,t):ut({})}o(w0,"OmitResolve");function Ra(e,t,r){if(Gr(t))return j1(e,t,r);if(bt(e))return U1(e,t,r);let n=Dn(t)?Lr(t):t;return W(U(U({},w0(e,n)),r))}o(Ra,"Omit");function yS(e,t,r){return{[t]:Ra(e,[t],gt(r))}}o(yS,"FromPropertyKey");function bS(e,t,r){return t.reduce((n,i)=>U(U({},n),yS(e,i,r)),{})}o(bS,"FromPropertyKeys");function vS(e,t,r){return bS(e,t.keys,r)}o(vS,"FromMappedKey");function j1(e,t,r){let n=vS(e,t,r);return ze(n)}o(j1,"OmitFromMappedKey");l();function z1(e,t){return Kn(e.parameters,t)}o(z1,"Parameters");l();l();function $1(e){return e.map(t=>G1(t))}o($1,"FromRest");function xS(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=_r(e[r]);return t}o(xS,"FromProperties");function ES(e){let t=Ft(e,[yt,"$id","required","properties"]),r=xS(e.properties);return ut(r,t)}o(ES,"FromObject");function G1(e){return _t(e)?Rr($1(e.allOf)):Ve(e)?rt($1(e.anyOf)):zt(e)?ES(e):ut({})}o(G1,"PartialResolve");function Dl(e,t){return bt(e)?Z1(e,t):W(U(U({},G1(e)),t))}o(Dl,"Partial");function CS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Dl(e[n],gt(t));return r}o(CS,"FromProperties");function IS(e,t){return CS(e.properties,t)}o(IS,"FromMappedResult");function Z1(e,t){let r=IS(e,t);return ze(r)}o(Z1,"PartialFromMappedResult");l();l();l();function DS(e,t,r){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=Na(e[i],t,gt(r));return n}o(DS,"FromProperties");function SS(e,t,r){return DS(e.properties,t,r)}o(SS,"FromMappedResult");function V1(e,t,r){let n=SS(e,t,r);return ze(n)}o(V1,"PickFromMappedResult");function wS(e,t){return e.map(r=>A0(r,t))}o(wS,"FromIntersect");function AS(e,t){return e.map(r=>A0(r,t))}o(AS,"FromUnion");function FS(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}o(FS,"FromProperties");function OS(e,t){let r=Ft(e,[yt,"$id","required","properties"]),n=FS(e.properties,t);return ut(n,r)}o(OS,"FromObject");function A0(e,t){return _t(e)?Rr(wS(e.allOf,t)):Ve(e)?rt(AS(e.anyOf,t)):zt(e)?OS(e,t):ut({})}o(A0,"PickResolve");function Na(e,t,r){if(Gr(t))return W1(e,t,r);if(bt(e))return V1(e,t,r);let n=Dn(t)?Lr(t):t;return W(U(U({},A0(e,n)),r))}o(Na,"Pick");function PS(e,t,r){return{[t]:Na(e,[t],gt(r))}}o(PS,"FromPropertyKey");function BS(e,t,r){return t.reduce((n,i)=>U(U({},n),PS(e,i,r)),{})}o(BS,"FromPropertyKeys");function MS(e,t,r){return BS(e,t.keys,r)}o(MS,"FromMappedKey");function W1(e,t,r){let n=MS(e,t,r);return ze(n)}o(W1,"PickFromMappedKey");l();function H1(e){return nn(_r(e))}o(H1,"ReadonlyOptional");l();function No(e,t,r){return W({[N]:"Record",type:"object",patternProperties:{[e]:t}},r)}o(No,"RecordCreateFromPattern");function F0(e,t,r){let n={};for(let i of e)n[i]=t;return ut(n,xe(U({},r),{[tn]:"Record"}))}o(F0,"RecordCreateFromKeys");function TS(e,t,r){return cl(e)?F0(Lr(e),t,r):No(e.pattern,t,r)}o(TS,"FromTemplateLiteralKey");function kS(e,t,r){return F0(Lr(rt(e)),t,r)}o(kS,"FromUnionKey");function _S(e,t,r){return F0([e.toString()],t,r)}o(_S,"FromLiteralKey");function LS(e,t,r){return No(e.source,t,r)}o(LS,"FromRegExpKey");function RS(e,t,r){let n=Ct(e.pattern)?Ei:e.pattern;return No(n,t,r)}o(RS,"FromStringKey");function NS(e,t,r){return No(Ei,t,r)}o(NS,"FromAnyKey");function US(e,t,r){return No(Nb,t,r)}o(US,"FromNeverKey");function jS(e,t,r){return No(xi,t,r)}o(jS,"FromIntegerKey");function zS(e,t,r){return No(xi,t,r)}o(zS,"FromNumberKey");function K1(e,t,r={}){return Ve(e)?kS(e.anyOf,t,r):Zr(e)?TS(e,t,r):vi(e)?_S(e.const,t,r):To(e)?jS(e,t,r):ko(e)?zS(e,t,r):Xp(e)?LS(e,t,r):es(e)?RS(e,t,r):Wp(e)?NS(e,t,r):eo(e)?US(e,t,r):tt(r)}o(K1,"Record");l();var $S=0;function q1(e,t={}){Ct(t.$id)&&(t.$id="T".concat($S++));let r=Ku(e({[N]:"This",$ref:"".concat(t.$id)}));return r.$id=t.$id,W(U({[tn]:"Recursive"},r),t)}o(q1,"Recursive");l();function J1(e,t){if(pt(e))return W({[N]:"Ref",$ref:e},t);if(Ct(e.$id))throw new Error("Reference target type must specify an $id");return W({[N]:"Ref",$ref:e.$id},t)}o(J1,"Ref");l();function X1(e,t){let r=pt(e)?new globalThis.RegExp(e):e;return W({[N]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},t)}o(X1,"RegExp");l();l();function Y1(e){return e.map(t=>Q1(t))}o(Y1,"FromRest");function GS(e){let t={};for(let r of globalThis.Object.getOwnPropertyNames(e))t[r]=Ft(e[r],[wr]);return t}o(GS,"FromProperties");function ZS(e){let t=Ft(e,[yt,"$id","required","properties"]),r=GS(e.properties);return ut(r,t)}o(ZS,"FromObject");function Q1(e){return _t(e)?Rr(Y1(e.allOf)):Ve(e)?rt(Y1(e.anyOf)):zt(e)?ZS(e):ut({})}o(Q1,"RequiredResolve");function Sl(e,t){return bt(e)?ev(e,t):W(U(U({},Q1(e)),t))}o(Sl,"Required");function VS(e,t){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Sl(e[n],t);return r}o(VS,"FromProperties");function WS(e,t){return VS(e.properties,t)}o(WS,"FromMappedResult");function ev(e,t){let r=WS(e,t);return ze(r)}o(ev,"RequiredFromMappedResult");l();function HS(e){var t;return _t(e)?e.allOf:Ve(e)?e.anyOf:In(e)?(t=e.items)!=null?t:[]:[]}o(HS,"RestResolve");function tv(e){return HS(e)}o(tv,"Rest");l();function rv(e,t){return W(e.returns,t)}o(rv,"ReturnType");l();function nv(e){return JSON.parse(JSON.stringify(e))}o(nv,"Strict");l();var B0=class B0{constructor(t){this.schema=t}Decode(t){return new P0(this.schema,t)}};o(B0,"TransformDecodeBuilder");var O0=B0,M0=class M0{constructor(t,r){this.schema=t,this.decode=r}EncodeTransform(t,r){let a={Encode:o(u=>r[yt].Encode(t(u)),"Encode"),Decode:o(u=>this.decode(r[yt].Decode(u)),"Decode")};return xe(U({},r),{[yt]:a})}EncodeSchema(t,r){let n={Decode:this.decode,Encode:t};return xe(U({},r),{[yt]:n})}Encode(t){return Da(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}};o(M0,"TransformEncodeBuilder");var P0=M0;function iv(e){return new O0(e)}o(iv,"Transform");l();function wl(e={}){var t;return W({[N]:(t=e[N])!=null?t:"Unsafe"},e)}o(wl,"Unsafe");l();function ov(e){return W({[N]:"Void",type:"void"},e)}o(ov,"Void");l();var T0={};$i(T0,{Any:()=>ro,Array:()=>ol,AsyncIterator:()=>al,Awaited:()=>o1,BigInt:()=>Ba,Boolean:()=>ll,Capitalize:()=>k1,Composite:()=>s1,Const:()=>c1,Constructor:()=>ul,ConstructorParameters:()=>l1,Date:()=>gl,Deref:()=>Sn,Enum:()=>m1,Exclude:()=>_a,Extends:()=>ka,Extract:()=>La,Function:()=>no,Index:()=>Ma,InstanceType:()=>O1,Integer:()=>P1,Intersect:()=>Rr,Iterator:()=>pl,KeyOf:()=>hl,Literal:()=>Ke,Lowercase:()=>_1,Mapped:()=>t1,Never:()=>tt,Not:()=>N1,Null:()=>yl,Number:()=>Hn,Object:()=>ut,Omit:()=>Ra,Optional:()=>_r,Parameters:()=>z1,Partial:()=>Dl,Pick:()=>Na,Promise:()=>fl,Readonly:()=>nn,ReadonlyOptional:()=>H1,Record:()=>K1,Recursive:()=>q1,Ref:()=>J1,RegExp:()=>X1,Required:()=>Sl,Rest:()=>tv,ReturnType:()=>rv,Strict:()=>nv,String:()=>rn,Symbol:()=>bl,TemplateLiteral:()=>ml,Transform:()=>iv,Tuple:()=>Kn,Uint8Array:()=>xl,Uncapitalize:()=>L1,Undefined:()=>vl,Union:()=>rt,Unknown:()=>Di,Unsafe:()=>wl,Uppercase:()=>R1,Void:()=>ov});l();var p=T0;l();var ms=p.Object({externalId:p.String({description:"An identifier that can be used to link this entity to data outside of the MVF."}),name:p.String({description:"The name of the entity."}),shortName:p.String({description:"A short name for the entity."}),description:p.String({description:"A description of the entity."}),icon:p.String({format:"uri",description:"A URL to an icon for the entity."})},{$id:"BaseDetails",description:"Additional information about a given entity."}),k0=p.Partial(ms,{$id:"Details",description:"Additional information about a given entity."}),Vr=p.Object({details:p.Optional(p.Ref(k0))},{$id:"WithDetails"}),Uo=o(e=>{let t=[...e].sort(),r=p.Pick(ms,e),n=p.Omit(ms,e);return p.Object({details:p.Intersect([r,p.Partial(n)])},{$id:"WithRequiredDetails_".concat(t.join("_"))})},"WithRequiredDetails"),_0=[ms,k0];l();var Ua=p.Number({$id:"Longitude",minimum:-180,maximum:180,description:"A WGS 84-compatible longitude coordinate value."}),ja=p.Number({$id:"Latitude",minimum:-90,maximum:90,description:"A WGS 84-compatible latitude coordinate value."}),jo=p.Tuple([p.Ref(Ua),p.Ref(ja)],{$id:"Position",minItems:2,maxItems:2,description:"A valid WGS 84 position consisting of a longitude value, followed by a latitude value."}),hr=p.Object({type:p.Literal("Point"),coordinates:p.Ref(jo)},{$id:"Point",description:"An RFC-7946 compatible GeoJSON Point geometry."}),Al=p.Object({type:p.Literal("MultiPoint"),coordinates:p.Array(p.Ref(jo))},{$id:"MultiPoint",description:"An RFC-7946 compatible GeoJSON MultiPoint geometry."}),Fl=p.Object({type:p.Literal("LineString"),coordinates:p.Array(p.Ref(jo),{minItems:2,description:"At least two positions are required."})},{$id:"LineString",description:"An RFC-7946 compatible GeoJSON LineString geometry."}),Ol=p.Object({type:p.Literal("MultiLineString"),coordinates:p.Array(p.Array(p.Ref(jo),{minItems:2}))},{$id:"MultiLineString",description:"An RFC-7946 compatible GeoJSON MultiLineString geometry."}),av=p.Array(p.Ref(jo),{$id:"LinearRing",minItems:4,description:"A linear ring is a building block of a polygon or multi-polygon."}),L0=p.Array(p.Ref(av),{$id:"LinearRings",minItems:1,description:"A collection of linear rings, at least one of which is the exterior ring of a polygon."}),za=p.Object({type:p.Literal("Polygon"),coordinates:p.Ref(L0)},{$id:"Polygon",description:"An RFC-7946 compatible GeoJSON Polygon geometry."}),$a=p.Object({type:p.Literal("MultiPolygon"),coordinates:p.Array(p.Ref(L0))},{$id:"MultiPolygon",description:"An RFC-7946 compatible GeoJSON MultiPolygon geometry."}),ir=o((e,t,r)=>p.Object({type:p.Literal("Feature"),geometry:e,properties:t},r),"Feature"),Fr=o((e,t,r)=>p.Object({type:p.Literal("FeatureCollection"),features:p.Array(e,r)},t),"FeatureCollection"),R0=[Ua,ja,jo,hr,Al,Fl,Ol,av,L0,za,$a];l();var Ot=o((e,t)=>p.Unsafe(p.String({$id:t,pattern:"^".concat(e,"_[A-Za-z0-9-]+$")})),"Ident"),gr=Ot("g","GeometryId"),_e=Ot("f","FloorId"),N0=[gr,_e];l();l();l();var U0=class U0{constructor(t){h(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(U0,"OptionIterator");var Pl=U0,j0=class j0{constructor(t){h(this,"_tag","Some");h(this,"_value");this._value=t}get value(){return this._value}isSome(){return!0}isSomeAnd(t){return t(this.value)}isNone(){return!1}equals(t){return t.isSome()&&t.value===this.value}expect(t){return this.value}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectNone(t){return this}map(t){return uv(t(this.value))}mapAsync(t){return t(this.value).then(r=>uv(r))}mapOr(t,r){return this.map(t).unwrapOr(r)}mapOrAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOr(r))}mapOrElse(t,r){return this.map(t).unwrapOrElse(r)}mapOrElseAsync(t,r){return this.mapAsync(t).then(n=>n.unwrapOrElse(r))}and(t){return t}andThen(t){return t(this.value)}andThenAsync(t){return t(this.value)}filter(t){return t(this.value)?this:ao()}or(t){return this}orElse(t){return this}xor(t){return t.isSome()?ao():this}toString(){return"Some(".concat(this.value,")")}okOr(t){return ue(this.value)}okOrElse(t){return ue(this.value)}iter(){return new Pl(this.value)}[Symbol.iterator](){return this.iter()}zip(t){return t.isSome()?Ga([this.value,t.value]):ao()}zipWith(t,r){return t.isSome()?Ga(r(this.value,t.value)):ao()}get[Symbol.toStringTag](){return"Some"}};o(j0,"Some");var Bl=j0,z0=class z0{constructor(){h(this,"_tag","None")}get value(){return null}isSome(){return!1}isSomeAnd(t){return!1}isNone(){return!0}equals(t){return t.isNone()}expect(t){throw new Error(t)}unwrap(){throw new Error("Tried to unwrap a None value!")}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(t){return this}inspectNone(t){return t(),this}map(t){return this}mapAsync(t){return Promise.resolve(this)}mapOr(t,r){return r}mapOrAsync(t,r){return Promise.resolve(r)}mapOrElse(t,r){return r()}mapOrElseAsync(t,r){return r()}and(t){return this}andThen(t){return this}andThenAsync(t){return Promise.resolve(this)}filter(t){return this}or(t){return t}orElse(t){return t()}xor(t){return t}toString(){return"None"}okOr(t){return se(t)}okOrElse(t){return se(t())}iter(){return new Pl(null)}[Symbol.iterator](){return this.iter()}zip(t){return this}zipWith(t,r){return this}get[Symbol.toStringTag](){return"None"}};o(z0,"None");var Ml=z0,Ga=o(e=>new Bl(e),"some"),ao=o(()=>new Ml,"none"),uv=o(e=>e instanceof Bl||e instanceof Ml?e:e==null?ao():Ga(e),"option");var Z0=class Z0{constructor(t){h(this,"_value");this._value=t}[Symbol.iterator](){return this}next(){if(this._value==null)return{done:!0,value:void 0};let t=this._value;return this._value=null,{done:!1,value:t}}};o(Z0,"ResultIterator");var Tl=Z0,V0=class V0{constructor(t){h(this,"_tag","Ok");h(this,"_value");this._value=t}get value(){return this._value}get error(){return null}isOk(){return!0}isOkAnd(t){return t(this.value)}isErr(){return!1}isErrAnd(t){return!1}ok(){return Ga(this.value)}err(){return ao()}expect(t){return this.value}expectErr(t){throw new Error(t)}unwrap(){return this.value}unwrapOr(t){return this.value}unwrapOrElse(t){return this.value}inspect(t){return t(this.value),this}inspectErr(){return this}map(t){return ue(t(this.value))}async mapAsync(t){return t(this.value).then(ue)}mapOr(t,r){return t(this.value)}async mapOrAsync(t,r){return t(this.value)}mapOrElse(t,r){return t(this.value)}async mapOrElseAsync(t,r){return t(this.value)}mapErr(t){return this}iter(){return new Tl(this.value)}[Symbol.iterator](){return this.iter()}and(t){return t}andThen(t){return t(this.value)}or(t){return this}orElse(t){return this}async andThenAsync(t){return t(this.value)}toString(){return"Ok(".concat(this.value,")")}get[Symbol.toStringTag](){return"Ok"}};o(V0,"Ok");var $0=V0,kl=class kl{constructor(t){h(this,"_tag","Err");h(this,"_error");this._error=t}get value(){return null}get error(){return this._error}isOk(){return!1}isOkAnd(t){return!1}isErr(){return!0}isErrAnd(t){return t(this.error)}ok(){return ao()}err(){return Ga(this.error)}expect(t){throw new Error(t)}expectErr(t){return this.error}unwrap(){throw this.error}unwrapOr(t){return t}unwrapOrElse(t){return t()}inspect(){return this}inspectErr(t){return t(this.error),this}map(t){return this}iter(){return new Tl(null)}[Symbol.iterator](){return this.iter()}async mapAsync(t){return this}mapOr(t,r){return r}async mapOrAsync(t,r){return r}mapOrElse(t,r){return r()}async mapOrElseAsync(t,r){return r()}mapErr(t){return new kl(t(this.error))}and(t){return this}andThen(t){return this}async andThenAsync(t){return this}or(t){return t}orElse(t){return t(this.error)}toString(){return"Err(".concat(this.error,")")}get[Symbol.toStringTag](){return"Err"}};o(kl,"Err");var G0=kl,ue=o(e=>new $0(e),"ok"),se=o(e=>new G0(e),"err");l();var Ur;(function(e){e.GeometryMissingError="GeometryMissingError",e.FloorMissingError="FloorMissingError",e.UnknownFloorError="UnknownFloorError",e.UnknownGeometryError="UnknownGeometryError",e.DuplicateIdError="DuplicateIdError"})(Ur||(Ur={}));l();l();l();l();var H0=class H0 extends he{constructor(t){super("Duplicate type kind '".concat(t,"' detected"))}};o(H0,"TypeSystemDuplicateTypeKind");var W0=H0,K0=class K0 extends he{constructor(t){super("Duplicate string format '".concat(t,"' detected"))}};o(K0,"TypeSystemDuplicateFormat");var ds=K0,_l;(function(e){function t(n,i){if($t.Has(n))throw new W0(n);return $t.Set(n,i),(a={})=>wl(xe(U({},a),{[N]:n}))}o(t,"Type"),e.Type=t;function r(n,i){if(Ar.Has(n))throw new ds(n);return Ar.Set(n,i),n}o(r,"Format"),e.Format=r})(_l||(_l={}));l();function KS(e){switch(e.errorType){case j.ArrayContains:return"Expected array to contain at least one matching value";case j.ArrayMaxContains:return"Expected array to contain no more than ".concat(e.schema.maxContains," matching values");case j.ArrayMinContains:return"Expected array to contain at least ".concat(e.schema.minContains," matching values");case j.ArrayMaxItems:return"Expected array length to be less or equal to ".concat(e.schema.maxItems);case j.ArrayMinItems:return"Expected array length to be greater or equal to ".concat(e.schema.minItems);case j.ArrayUniqueItems:return"Expected array elements to be unique";case j.Array:return"Expected array";case j.AsyncIterator:return"Expected AsyncIterator";case j.BigIntExclusiveMaximum:return"Expected bigint to be less than ".concat(e.schema.exclusiveMaximum);case j.BigIntExclusiveMinimum:return"Expected bigint to be greater than ".concat(e.schema.exclusiveMinimum);case j.BigIntMaximum:return"Expected bigint to be less or equal to ".concat(e.schema.maximum);case j.BigIntMinimum:return"Expected bigint to be greater or equal to ".concat(e.schema.minimum);case j.BigIntMultipleOf:return"Expected bigint to be a multiple of ".concat(e.schema.multipleOf);case j.BigInt:return"Expected bigint";case j.Boolean:return"Expected boolean";case j.DateExclusiveMinimumTimestamp:return"Expected Date timestamp to be greater than ".concat(e.schema.exclusiveMinimumTimestamp);case j.DateExclusiveMaximumTimestamp:return"Expected Date timestamp to be less than ".concat(e.schema.exclusiveMaximumTimestamp);case j.DateMinimumTimestamp:return"Expected Date timestamp to be greater or equal to ".concat(e.schema.minimumTimestamp);case j.DateMaximumTimestamp:return"Expected Date timestamp to be less or equal to ".concat(e.schema.maximumTimestamp);case j.DateMultipleOfTimestamp:return"Expected Date timestamp to be a multiple of ".concat(e.schema.multipleOfTimestamp);case j.Date:return"Expected Date";case j.Function:return"Expected function";case j.IntegerExclusiveMaximum:return"Expected integer to be less than ".concat(e.schema.exclusiveMaximum);case j.IntegerExclusiveMinimum:return"Expected integer to be greater than ".concat(e.schema.exclusiveMinimum);case j.IntegerMaximum:return"Expected integer to be less or equal to ".concat(e.schema.maximum);case j.IntegerMinimum:return"Expected integer to be greater or equal to ".concat(e.schema.minimum);case j.IntegerMultipleOf:return"Expected integer to be a multiple of ".concat(e.schema.multipleOf);case j.Integer:return"Expected integer";case j.IntersectUnevaluatedProperties:return"Unexpected property";case j.Intersect:return"Expected all values to match";case j.Iterator:return"Expected Iterator";case j.Literal:return"Expected ".concat(typeof e.schema.const=="string"?"'".concat(e.schema.const,"'"):e.schema.const);case j.Never:return"Never";case j.Not:return"Value should not match";case j.Null:return"Expected null";case j.NumberExclusiveMaximum:return"Expected number to be less than ".concat(e.schema.exclusiveMaximum);case j.NumberExclusiveMinimum:return"Expected number to be greater than ".concat(e.schema.exclusiveMinimum);case j.NumberMaximum:return"Expected number to be less or equal to ".concat(e.schema.maximum);case j.NumberMinimum:return"Expected number to be greater or equal to ".concat(e.schema.minimum);case j.NumberMultipleOf:return"Expected number to be a multiple of ".concat(e.schema.multipleOf);case j.Number:return"Expected number";case j.Object:return"Expected object";case j.ObjectAdditionalProperties:return"Unexpected property";case j.ObjectMaxProperties:return"Expected object to have no more than ".concat(e.schema.maxProperties," properties");case j.ObjectMinProperties:return"Expected object to have at least ".concat(e.schema.minProperties," properties");case j.ObjectRequiredProperty:return"Expected required property";case j.Promise:return"Expected Promise";case j.RegExp:return"Expected string to match regular expression";case j.StringFormatUnknown:return"Unknown format '".concat(e.schema.format,"'");case j.StringFormat:return"Expected string to match '".concat(e.schema.format,"' format");case j.StringMaxLength:return"Expected string length less or equal to ".concat(e.schema.maxLength);case j.StringMinLength:return"Expected string length greater or equal to ".concat(e.schema.minLength);case j.StringPattern:return"Expected string to match '".concat(e.schema.pattern,"'");case j.String:return"Expected string";case j.Symbol:return"Expected symbol";case j.TupleLength:return"Expected tuple to have ".concat(e.schema.maxItems||0," elements");case j.Tuple:return"Expected tuple";case j.Uint8ArrayMaxByteLength:return"Expected byte length less or equal to ".concat(e.schema.maxByteLength);case j.Uint8ArrayMinByteLength:return"Expected byte length greater or equal to ".concat(e.schema.minByteLength);case j.Uint8Array:return"Expected Uint8Array";case j.Undefined:return"Expected undefined";case j.Union:return"Expected union value";case j.Void:return"Expected void";case j.Kind:return"Expected kind '".concat(e.schema[N],"'");default:return"Unknown error type"}}o(KS,"DefaultErrorFunction");var qS=KS;function sv(){return qS}o(sv,"GetErrorFunction");l();var J0=class J0 extends he{constructor(t){super("Unable to dereference schema with $id '".concat(t.$ref,"'")),this.schema=t}};o(J0,"TypeDereferenceError");var q0=J0;function JS(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new q0(e);return $e(r,t)}o(JS,"Resolve");function sn(e,t){return!Re(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(sn,"Pushref");function $e(e,t){return e[N]==="This"||e[N]==="Ref"?JS(e,t):e}o($e,"Deref");l();var Y0=class Y0 extends he{constructor(t){super("Unable to hash value"),this.value=t}};o(Y0,"ValueHashError");var X0=Y0,Wr;(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"})(Wr||(Wr={}));var Za=BigInt("14695981039346656037"),[XS,YS]=[BigInt("1099511628211"),BigInt("18446744073709551616")],QS=Array.from({length:256}).map((e,t)=>BigInt(t)),cv=new Float64Array(1),lv=new DataView(cv.buffer),mv=new Uint8Array(cv.buffer);function*ew(e){let t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let r=0;r<t;r++)yield e>>8*(t-1-r)&255}o(ew,"NumberToBytes");function tw(e){yr(Wr.Array);for(let t of e)Va(t)}o(tw,"ArrayType");function rw(e){yr(Wr.Boolean),yr(e?1:0)}o(rw,"BooleanType");function nw(e){yr(Wr.BigInt),lv.setBigInt64(0,e);for(let t of mv)yr(t)}o(nw,"BigIntType");function iw(e){yr(Wr.Date),Va(e.getTime())}o(iw,"DateType");function ow(e){yr(Wr.Null)}o(ow,"NullType");function aw(e){yr(Wr.Number),lv.setFloat64(0,e);for(let t of mv)yr(t)}o(aw,"NumberType");function uw(e){yr(Wr.Object);for(let t of globalThis.Object.getOwnPropertyNames(e).sort())Va(t),Va(e[t])}o(uw,"ObjectType");function sw(e){yr(Wr.String);for(let t=0;t<e.length;t++)for(let r of ew(e.charCodeAt(t)))yr(r)}o(sw,"StringType");function cw(e){yr(Wr.Symbol),Va(e.description)}o(cw,"SymbolType");function lw(e){yr(Wr.Uint8Array);for(let t=0;t<e.length;t++)yr(e[t])}o(lw,"Uint8ArrayType");function mw(e){return yr(Wr.Undefined)}o(mw,"UndefinedType");function Va(e){if(ve(e))return tw(e);if(Zn(e))return rw(e);if(rr(e))return nw(e);if(Sr(e))return iw(e);if(hi(e))return ow(e);if(pe(e))return aw(e);if(Ce(e))return uw(e);if(Re(e))return sw(e);if(gi(e))return cw(e);if(Ia(e))return lw(e);if(It(e))return mw(e);throw new X0(e)}o(Va,"Visit");function yr(e){Za=Za^QS[e],Za=Za*XS%YS}o(yr,"FNV1A64");function uo(e){return Za=BigInt("14695981039346656037"),Va(e),Za}o(uo,"Hash");l();var ef=class ef extends he{constructor(t){super("Unknown type"),this.schema=t}};o(ef,"ValueCheckUnknownTypeError");var Q0=ef;function dw(e){return e[N]==="Any"||e[N]==="Unknown"}o(dw,"IsAnyOrUnknown");function Be(e){return e!==void 0}o(Be,"IsDefined");function pw(e,t,r){return!0}o(pw,"FromAny");function fw(e,t,r){if(!ve(r)||Be(e.minItems)&&!(r.length>=e.minItems)||Be(e.maxItems)&&!(r.length<=e.maxItems)||!r.every(a=>or(e.items,t,a))||e.uniqueItems===!0&&!function(){let a=new Set;for(let u of r){let c=uo(u);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(Be(e.contains)||pe(e.minContains)||pe(e.maxContains)))return!0;let n=Be(e.contains)?e.contains:tt(),i=r.reduce((a,u)=>or(n,t,u)?a+1:a,0);return!(i===0||pe(e.minContains)&&i<e.minContains||pe(e.maxContains)&&i>e.maxContains)}o(fw,"FromArray");function hw(e,t,r){return tl(r)}o(hw,"FromAsyncIterator");function gw(e,t,r){return!(!rr(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==BigInt(0))}o(gw,"FromBigInt");function yw(e,t,r){return Zn(r)}o(yw,"FromBoolean");function bw(e,t,r){return or(e.returns,t,r.prototype)}o(bw,"FromConstructor");function vw(e,t,r){return!(!Sr(r)||Be(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)||Be(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)||Be(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)||Be(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)||Be(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0)}o(vw,"FromDate");function xw(e,t,r){return Qi(r)}o(xw,"FromFunction");function Ew(e,t,r){return!(!il(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(Ew,"FromInteger");function Cw(e,t,r){let n=e.allOf.every(i=>or(i,t,r));if(e.unevaluatedProperties===!1){let i=new RegExp(Ii(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u));return n&&a}else if(Ne(e.unevaluatedProperties)){let i=new RegExp(Ii(e)),a=Object.getOwnPropertyNames(r).every(u=>i.test(u)||or(e.unevaluatedProperties,t,r[u]));return n&&a}else return n}o(Cw,"FromIntersect");function Iw(e,t,r){return rl(r)}o(Iw,"FromIterator");function Dw(e,t,r){return r===e.const}o(Dw,"FromLiteral");function Sw(e,t,r){return!1}o(Sw,"FromNever");function ww(e,t,r){return!or(e.not,t,r)}o(ww,"FromNot");function Aw(e,t,r){return hi(r)}o(Aw,"FromNull");function Fw(e,t,r){return!(!Ye.IsNumberLike(r)||Be(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)||Be(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)||Be(e.minimum)&&!(r>=e.minimum)||Be(e.maximum)&&!(r<=e.maximum)||Be(e.multipleOf)&&r%e.multipleOf!==0)}o(Fw,"FromNumber");function Ow(e,t,r){if(!Ye.IsObjectLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let n=Object.getOwnPropertyNames(e.properties);for(let i of n){let a=e.properties[i];if(e.required&&e.required.includes(i)){if(!or(a,t,r[i])||(Si(a)||dw(a))&&!(i in r))return!1}else if(Ye.IsExactOptionalProperty(r,i)&&!or(a,t,r[i]))return!1}if(e.additionalProperties===!1){let i=Object.getOwnPropertyNames(r);return e.required&&e.required.length===n.length&&i.length===n.length?!0:i.every(a=>n.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(a=>n.includes(a)||or(e.additionalProperties,t,r[a])):!0}o(Ow,"FromObject");function Pw(e,t,r){return nl(r)}o(Pw,"FromPromise");function Bw(e,t,r){if(!Ye.IsRecordLike(r)||Be(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)||Be(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties))return!1;let[n,i]=Object.entries(e.patternProperties)[0],a=new RegExp(n),u=Object.entries(r).every(([d,f])=>a.test(d)?or(i,t,f):!0),c=typeof e.additionalProperties=="object"?Object.entries(r).every(([d,f])=>a.test(d)?!0:or(e.additionalProperties,t,f)):!0,m=e.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>a.test(d)):!0;return u&&c&&m}o(Bw,"FromRecord");function Mw(e,t,r){return or($e(e,t),t,r)}o(Mw,"FromRef");function Tw(e,t,r){let n=new RegExp(e.source,e.flags);return Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)?!1:n.test(r)}o(Tw,"FromRegExp");function kw(e,t,r){return!Re(r)||Be(e.minLength)&&!(r.length>=e.minLength)||Be(e.maxLength)&&!(r.length<=e.maxLength)||Be(e.pattern)&&!new RegExp(e.pattern).test(r)?!1:Be(e.format)?Ar.Has(e.format)?Ar.Get(e.format)(r):!1:!0}o(kw,"FromString");function _w(e,t,r){return gi(r)}o(_w,"FromSymbol");function Lw(e,t,r){return Re(r)&&new RegExp(e.pattern).test(r)}o(Lw,"FromTemplateLiteral");function Rw(e,t,r){return or($e(e,t),t,r)}o(Rw,"FromThis");function Nw(e,t,r){if(!ve(r)||e.items===void 0&&r.length!==0||r.length!==e.maxItems)return!1;if(!e.items)return!0;for(let n=0;n<e.items.length;n++)if(!or(e.items[n],t,r[n]))return!1;return!0}o(Nw,"FromTuple");function Uw(e,t,r){return It(r)}o(Uw,"FromUndefined");function jw(e,t,r){return e.anyOf.some(n=>or(n,t,r))}o(jw,"FromUnion");function zw(e,t,r){return!(!Ia(r)||Be(e.maxByteLength)&&!(r.length<=e.maxByteLength)||Be(e.minByteLength)&&!(r.length>=e.minByteLength))}o(zw,"FromUint8Array");function $w(e,t,r){return!0}o($w,"FromUnknown");function Gw(e,t,r){return Ye.IsVoidLike(r)}o(Gw,"FromVoid");function Zw(e,t,r){return $t.Has(e[N])?$t.Get(e[N])(e,r):!1}o(Zw,"FromKind");function or(e,t,r){let n=Be(e.$id)?[...t,e]:t,i=e;switch(i[N]){case"Any":return pw(i,n,r);case"Array":return fw(i,n,r);case"AsyncIterator":return hw(i,n,r);case"BigInt":return gw(i,n,r);case"Boolean":return yw(i,n,r);case"Constructor":return bw(i,n,r);case"Date":return vw(i,n,r);case"Function":return xw(i,n,r);case"Integer":return Ew(i,n,r);case"Intersect":return Cw(i,n,r);case"Iterator":return Iw(i,n,r);case"Literal":return Dw(i,n,r);case"Never":return Sw(i,n,r);case"Not":return ww(i,n,r);case"Null":return Aw(i,n,r);case"Number":return Fw(i,n,r);case"Object":return Ow(i,n,r);case"Promise":return Pw(i,n,r);case"Record":return Bw(i,n,r);case"Ref":return Mw(i,n,r);case"RegExp":return Tw(i,n,r);case"String":return kw(i,n,r);case"Symbol":return _w(i,n,r);case"TemplateLiteral":return Lw(i,n,r);case"This":return Rw(i,n,r);case"Tuple":return Nw(i,n,r);case"Undefined":return Uw(i,n,r);case"Union":return jw(i,n,r);case"Uint8Array":return zw(i,n,r);case"Unknown":return $w(i,n,r);case"Void":return Gw(i,n,r);default:if(!$t.Has(i[N]))throw new Q0(i);return Zw(i,n,r)}}o(or,"Visit");function Ae(...e){return e.length===3?or(e[0],e[1],e[2]):or(e[0],[],e[1])}o(Ae,"Check");var j;(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"})(j||(j={}));var rf=class rf extends he{constructor(t){super("Unknown type"),this.schema=t}};o(rf,"ValueErrorsUnknownTypeError");var tf=rf;function wi(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}o(wi,"EscapeKey");function Me(e){return e!==void 0}o(Me,"IsDefined");var nf=class nf{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){let t=this.iterator.next();return t.done?void 0:t.value}};o(nf,"ValueErrorIterator");var cn=nf;function re(e,t,r,n,i=[]){return{type:e,schema:t,path:r,value:n,message:sv()({errorType:e,path:r,schema:t,value:n,errors:i}),errors:i}}o(re,"Create");function*Vw(e,t,r,n){}o(Vw,"FromAny");function*Ww(e,t,r,n){if(!ve(n))return yield re(j.Array,e,r,n);Me(e.minItems)&&!(n.length>=e.minItems)&&(yield re(j.ArrayMinItems,e,r,n)),Me(e.maxItems)&&!(n.length<=e.maxItems)&&(yield re(j.ArrayMaxItems,e,r,n));for(let u=0;u<n.length;u++)yield*K(ar(e.items,t,"".concat(r,"/").concat(u),n[u]));if(e.uniqueItems===!0&&!function(){let u=new Set;for(let c of n){let m=uo(c);if(u.has(m))return!1;u.add(m)}return!0}()&&(yield re(j.ArrayUniqueItems,e,r,n)),!(Me(e.contains)||Me(e.minContains)||Me(e.maxContains)))return;let i=Me(e.contains)?e.contains:tt(),a=n.reduce((u,c,m)=>ar(i,t,"".concat(r).concat(m),c).next().done===!0?u+1:u,0);a===0&&(yield re(j.ArrayContains,e,r,n)),pe(e.minContains)&&a<e.minContains&&(yield re(j.ArrayMinContains,e,r,n)),pe(e.maxContains)&&a>e.maxContains&&(yield re(j.ArrayMaxContains,e,r,n))}o(Ww,"FromArray");function*Hw(e,t,r,n){tl(n)||(yield re(j.AsyncIterator,e,r,n))}o(Hw,"FromAsyncIterator");function*Kw(e,t,r,n){if(!rr(n))return yield re(j.BigInt,e,r,n);Me(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield re(j.BigIntExclusiveMaximum,e,r,n)),Me(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield re(j.BigIntExclusiveMinimum,e,r,n)),Me(e.maximum)&&!(n<=e.maximum)&&(yield re(j.BigIntMaximum,e,r,n)),Me(e.minimum)&&!(n>=e.minimum)&&(yield re(j.BigIntMinimum,e,r,n)),Me(e.multipleOf)&&n%e.multipleOf!==BigInt(0)&&(yield re(j.BigIntMultipleOf,e,r,n))}o(Kw,"FromBigInt");function*qw(e,t,r,n){Zn(n)||(yield re(j.Boolean,e,r,n))}o(qw,"FromBoolean");function*Jw(e,t,r,n){yield*K(ar(e.returns,t,r,n.prototype))}o(Jw,"FromConstructor");function*Xw(e,t,r,n){if(!Sr(n))return yield re(j.Date,e,r,n);Me(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)&&(yield re(j.DateExclusiveMaximumTimestamp,e,r,n)),Me(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)&&(yield re(j.DateExclusiveMinimumTimestamp,e,r,n)),Me(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)&&(yield re(j.DateMaximumTimestamp,e,r,n)),Me(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)&&(yield re(j.DateMinimumTimestamp,e,r,n)),Me(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0&&(yield re(j.DateMultipleOfTimestamp,e,r,n))}o(Xw,"FromDate");function*Yw(e,t,r,n){Qi(n)||(yield re(j.Function,e,r,n))}o(Yw,"FromFunction");function*Qw(e,t,r,n){if(!il(n))return yield re(j.Integer,e,r,n);Me(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield re(j.IntegerExclusiveMaximum,e,r,n)),Me(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield re(j.IntegerExclusiveMinimum,e,r,n)),Me(e.maximum)&&!(n<=e.maximum)&&(yield re(j.IntegerMaximum,e,r,n)),Me(e.minimum)&&!(n>=e.minimum)&&(yield re(j.IntegerMinimum,e,r,n)),Me(e.multipleOf)&&n%e.multipleOf!==0&&(yield re(j.IntegerMultipleOf,e,r,n))}o(Qw,"FromInteger");function*eA(e,t,r,n){let i=!1;for(let a of e.allOf)for(let u of ar(a,t,r,n))i=!0,yield u;if(i)return yield re(j.Intersect,e,r,n);if(e.unevaluatedProperties===!1){let a=new RegExp(Ii(e));for(let u of Object.getOwnPropertyNames(n))a.test(u)||(yield re(j.IntersectUnevaluatedProperties,e,"".concat(r,"/").concat(u),n))}if(typeof e.unevaluatedProperties=="object"){let a=new RegExp(Ii(e));for(let u of Object.getOwnPropertyNames(n))if(!a.test(u)){let c=ar(e.unevaluatedProperties,t,"".concat(r,"/").concat(u),n[u]).next();c.done||(yield c.value)}}}o(eA,"FromIntersect");function*tA(e,t,r,n){rl(n)||(yield re(j.Iterator,e,r,n))}o(tA,"FromIterator");function*rA(e,t,r,n){n!==e.const&&(yield re(j.Literal,e,r,n))}o(rA,"FromLiteral");function*nA(e,t,r,n){yield re(j.Never,e,r,n)}o(nA,"FromNever");function*iA(e,t,r,n){ar(e.not,t,r,n).next().done===!0&&(yield re(j.Not,e,r,n))}o(iA,"FromNot");function*oA(e,t,r,n){hi(n)||(yield re(j.Null,e,r,n))}o(oA,"FromNull");function*aA(e,t,r,n){if(!Ye.IsNumberLike(n))return yield re(j.Number,e,r,n);Me(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)&&(yield re(j.NumberExclusiveMaximum,e,r,n)),Me(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)&&(yield re(j.NumberExclusiveMinimum,e,r,n)),Me(e.maximum)&&!(n<=e.maximum)&&(yield re(j.NumberMaximum,e,r,n)),Me(e.minimum)&&!(n>=e.minimum)&&(yield re(j.NumberMinimum,e,r,n)),Me(e.multipleOf)&&n%e.multipleOf!==0&&(yield re(j.NumberMultipleOf,e,r,n))}o(aA,"FromNumber");function*uA(e,t,r,n){if(!Ye.IsObjectLike(n))return yield re(j.Object,e,r,n);Me(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield re(j.ObjectMinProperties,e,r,n)),Me(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield re(j.ObjectMaxProperties,e,r,n));let i=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),u=Object.getOwnPropertyNames(n);for(let c of i)u.includes(c)||(yield re(j.ObjectRequiredProperty,e.properties[c],"".concat(r,"/").concat(wi(c)),void 0));if(e.additionalProperties===!1)for(let c of u)a.includes(c)||(yield re(j.ObjectAdditionalProperties,e,"".concat(r,"/").concat(wi(c)),n[c]));if(typeof e.additionalProperties=="object")for(let c of u)a.includes(c)||(yield*K(ar(e.additionalProperties,t,"".concat(r,"/").concat(wi(c)),n[c])));for(let c of a){let m=e.properties[c];e.required&&e.required.includes(c)?(yield*K(ar(m,t,"".concat(r,"/").concat(wi(c)),n[c])),Si(e)&&!(c in n)&&(yield re(j.ObjectRequiredProperty,m,"".concat(r,"/").concat(wi(c)),void 0))):Ye.IsExactOptionalProperty(n,c)&&(yield*K(ar(m,t,"".concat(r,"/").concat(wi(c)),n[c])))}}o(uA,"FromObject");function*sA(e,t,r,n){nl(n)||(yield re(j.Promise,e,r,n))}o(sA,"FromPromise");function*cA(e,t,r,n){if(!Ye.IsRecordLike(n))return yield re(j.Object,e,r,n);Me(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)&&(yield re(j.ObjectMinProperties,e,r,n)),Me(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties)&&(yield re(j.ObjectMaxProperties,e,r,n));let[i,a]=Object.entries(e.patternProperties)[0],u=new RegExp(i);for(let[c,m]of Object.entries(n))u.test(c)&&(yield*K(ar(a,t,"".concat(r,"/").concat(wi(c)),m)));if(typeof e.additionalProperties=="object")for(let[c,m]of Object.entries(n))u.test(c)||(yield*K(ar(e.additionalProperties,t,"".concat(r,"/").concat(wi(c)),m)));if(e.additionalProperties===!1){for(let[c,m]of Object.entries(n))if(!u.test(c))return yield re(j.ObjectAdditionalProperties,e,"".concat(r,"/").concat(wi(c)),m)}}o(cA,"FromRecord");function*lA(e,t,r,n){yield*K(ar($e(e,t),t,r,n))}o(lA,"FromRef");function*mA(e,t,r,n){if(!Re(n))return yield re(j.String,e,r,n);if(Me(e.minLength)&&!(n.length>=e.minLength)&&(yield re(j.StringMinLength,e,r,n)),Me(e.maxLength)&&!(n.length<=e.maxLength)&&(yield re(j.StringMaxLength,e,r,n)),!new RegExp(e.source,e.flags).test(n))return yield re(j.RegExp,e,r,n)}o(mA,"FromRegExp");function*dA(e,t,r,n){if(!Re(n))return yield re(j.String,e,r,n);Me(e.minLength)&&!(n.length>=e.minLength)&&(yield re(j.StringMinLength,e,r,n)),Me(e.maxLength)&&!(n.length<=e.maxLength)&&(yield re(j.StringMaxLength,e,r,n)),Re(e.pattern)&&(new RegExp(e.pattern).test(n)||(yield re(j.StringPattern,e,r,n))),Re(e.format)&&(Ar.Has(e.format)?Ar.Get(e.format)(n)||(yield re(j.StringFormat,e,r,n)):yield re(j.StringFormatUnknown,e,r,n))}o(dA,"FromString");function*pA(e,t,r,n){gi(n)||(yield re(j.Symbol,e,r,n))}o(pA,"FromSymbol");function*fA(e,t,r,n){if(!Re(n))return yield re(j.String,e,r,n);new RegExp(e.pattern).test(n)||(yield re(j.StringPattern,e,r,n))}o(fA,"FromTemplateLiteral");function*hA(e,t,r,n){yield*K(ar($e(e,t),t,r,n))}o(hA,"FromThis");function*gA(e,t,r,n){if(!ve(n))return yield re(j.Tuple,e,r,n);if(e.items===void 0&&n.length!==0)return yield re(j.TupleLength,e,r,n);if(n.length!==e.maxItems)return yield re(j.TupleLength,e,r,n);if(e.items)for(let i=0;i<e.items.length;i++)yield*K(ar(e.items[i],t,"".concat(r,"/").concat(i),n[i]))}o(gA,"FromTuple");function*yA(e,t,r,n){It(n)||(yield re(j.Undefined,e,r,n))}o(yA,"FromUndefined");function*bA(e,t,r,n){if(Ae(e,t,n))return;let i=e.anyOf.map(a=>new cn(ar(a,t,r,n)));yield re(j.Union,e,r,n,i)}o(bA,"FromUnion");function*vA(e,t,r,n){if(!Ia(n))return yield re(j.Uint8Array,e,r,n);Me(e.maxByteLength)&&!(n.length<=e.maxByteLength)&&(yield re(j.Uint8ArrayMaxByteLength,e,r,n)),Me(e.minByteLength)&&!(n.length>=e.minByteLength)&&(yield re(j.Uint8ArrayMinByteLength,e,r,n))}o(vA,"FromUint8Array");function*xA(e,t,r,n){}o(xA,"FromUnknown");function*EA(e,t,r,n){Ye.IsVoidLike(n)||(yield re(j.Void,e,r,n))}o(EA,"FromVoid");function*CA(e,t,r,n){$t.Get(e[N])(e,n)||(yield re(j.Kind,e,r,n))}o(CA,"FromKind");function*ar(e,t,r,n){let i=Me(e.$id)?[...t,e]:t,a=e;switch(a[N]){case"Any":return yield*K(Vw(a,i,r,n));case"Array":return yield*K(Ww(a,i,r,n));case"AsyncIterator":return yield*K(Hw(a,i,r,n));case"BigInt":return yield*K(Kw(a,i,r,n));case"Boolean":return yield*K(qw(a,i,r,n));case"Constructor":return yield*K(Jw(a,i,r,n));case"Date":return yield*K(Xw(a,i,r,n));case"Function":return yield*K(Yw(a,i,r,n));case"Integer":return yield*K(Qw(a,i,r,n));case"Intersect":return yield*K(eA(a,i,r,n));case"Iterator":return yield*K(tA(a,i,r,n));case"Literal":return yield*K(rA(a,i,r,n));case"Never":return yield*K(nA(a,i,r,n));case"Not":return yield*K(iA(a,i,r,n));case"Null":return yield*K(oA(a,i,r,n));case"Number":return yield*K(aA(a,i,r,n));case"Object":return yield*K(uA(a,i,r,n));case"Promise":return yield*K(sA(a,i,r,n));case"Record":return yield*K(cA(a,i,r,n));case"Ref":return yield*K(lA(a,i,r,n));case"RegExp":return yield*K(mA(a,i,r,n));case"String":return yield*K(dA(a,i,r,n));case"Symbol":return yield*K(pA(a,i,r,n));case"TemplateLiteral":return yield*K(fA(a,i,r,n));case"This":return yield*K(hA(a,i,r,n));case"Tuple":return yield*K(gA(a,i,r,n));case"Undefined":return yield*K(yA(a,i,r,n));case"Union":return yield*K(bA(a,i,r,n));case"Uint8Array":return yield*K(vA(a,i,r,n));case"Unknown":return yield*K(xA(a,i,r,n));case"Void":return yield*K(EA(a,i,r,n));default:if(!$t.Has(a[N]))throw new tf(e);return yield*K(CA(a,i,r,n))}}o(ar,"Visit");function qn(...e){let t=e.length===3?ar(e[0],e[1],"",e[2]):ar(e[0],[],"",e[1]);return new cn(t)}o(qn,"Errors");l();l();var IA=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},pv=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},of,Ll,fv,uf=class uf extends he{constructor(t){let r=t.First();super(r===void 0?"Invalid Value":r.message),of.add(this),Ll.set(this,void 0),IA(this,Ll,t,"f"),this.error=r}Errors(){return new cn(pv(this,of,"m",fv).call(this))}};o(uf,"AssertError");var af=uf;Ll=new WeakMap,of=new WeakSet,fv=o(function*(){this.error&&(yield this.error),yield*K(pv(this,Ll,"f"))},"_AssertError_Iterator");function dv(e,t,r){if(!Ae(e,t,r))throw new af(qn(e,t,r))}o(dv,"AssertValue");function Rl(...e){return e.length===3?dv(e[0],e[1],e[2]):dv(e[0],[],e[1])}o(Rl,"Assert");l();l();l();function DA(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=Ge(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=Ge(e[r]);return t}o(DA,"FromObject");function SA(e){return e.map(t=>Ge(t))}o(SA,"FromArray");function wA(e){return e.slice()}o(wA,"FromTypedArray");function AA(e){return new Map(Ge([...e.entries()]))}o(AA,"FromMap");function FA(e){return new Set(Ge([...e.entries()]))}o(FA,"FromSet");function OA(e){return new Date(e.toISOString())}o(OA,"FromDate");function Ge(e){if(ve(e))return SA(e);if(Sr(e))return OA(e);if(en(e))return wA(e);if(X4(e))return AA(e);if(Y4(e))return FA(e);if(Ce(e))return DA(e);if(nr(e))return e;throw new Error("ValueClone: Unable to clone value")}o(Ge,"Clone");var sf=class sf extends he{constructor(t,r){super(r),this.schema=t}};o(sf,"ValueCreateError");var Hr=sf;function Ze(e){return Qi(e)?e():Ge(e)}o(Ze,"FromDefault");function PA(e,t){return ye(e,"default")?Ze(e.default):{}}o(PA,"FromAny");function BA(e,t){if(e.uniqueItems===!0&&!ye(e,"default"))throw new Hr(e,"Array with the uniqueItems constraint requires a default value");if("contains"in e&&!ye(e,"default"))throw new Hr(e,"Array with the contains constraint requires a default value");return"default"in e?Ze(e.default):e.minItems!==void 0?Array.from({length:e.minItems}).map(r=>Kr(e.items,t)):[]}o(BA,"FromArray");function MA(e,t){return ye(e,"default")?Ze(e.default):function(){return Ey(this,null,function*(){})}()}o(MA,"FromAsyncIterator");function TA(e,t){return ye(e,"default")?Ze(e.default):BigInt(0)}o(TA,"FromBigInt");function kA(e,t){return ye(e,"default")?Ze(e.default):!1}o(kA,"FromBoolean");function _A(e,t){if(ye(e,"default"))return Ze(e.default);{let r=Kr(e.returns,t);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,i]of Object.entries(r)){let a=this;a[n]=i}}}:class{}}}o(_A,"FromConstructor");function LA(e,t){return ye(e,"default")?Ze(e.default):e.minimumTimestamp!==void 0?new Date(e.minimumTimestamp):new Date}o(LA,"FromDate");function RA(e,t){return ye(e,"default")?Ze(e.default):()=>Kr(e.returns,t)}o(RA,"FromFunction");function NA(e,t){return ye(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(NA,"FromInteger");function UA(e,t){if(ye(e,"default"))return Ze(e.default);{let r=e.allOf.reduce((n,i)=>{let a=Kr(i,t);return typeof a=="object"?U(U({},n),a):a},{});if(!Ae(e,t,r))throw new Hr(e,"Intersect produced invalid value. Consider using a default value.");return r}}o(UA,"FromIntersect");function jA(e,t){return ye(e,"default")?Ze(e.default):function*(){}()}o(jA,"FromIterator");function zA(e,t){return ye(e,"default")?Ze(e.default):e.const}o(zA,"FromLiteral");function $A(e,t){if(ye(e,"default"))return Ze(e.default);throw new Hr(e,"Never types cannot be created. Consider using a default value.")}o($A,"FromNever");function GA(e,t){if(ye(e,"default"))return Ze(e.default);throw new Hr(e,"Not types must have a default value")}o(GA,"FromNot");function ZA(e,t){return ye(e,"default")?Ze(e.default):null}o(ZA,"FromNull");function VA(e,t){return ye(e,"default")?Ze(e.default):e.minimum!==void 0?e.minimum:0}o(VA,"FromNumber");function WA(e,t){if(ye(e,"default"))return Ze(e.default);{let r=new Set(e.required),n={};for(let[i,a]of Object.entries(e.properties))r.has(i)&&(n[i]=Kr(a,t));return n}}o(WA,"FromObject");function HA(e,t){return ye(e,"default")?Ze(e.default):Promise.resolve(Kr(e.item,t))}o(HA,"FromPromise");function KA(e,t){let[r,n]=Object.entries(e.patternProperties)[0];if(ye(e,"default"))return Ze(e.default);if(r===Ei||r===xi)return{};{let i=r.slice(1,r.length-1).split("|"),a={};for(let u of i)a[u]=Kr(n,t);return a}}o(KA,"FromRecord");function qA(e,t){return ye(e,"default")?Ze(e.default):Kr($e(e,t),t)}o(qA,"FromRef");function JA(e,t){if(ye(e,"default"))return Ze(e.default);throw new Hr(e,"RegExp types cannot be created. Consider using a default value.")}o(JA,"FromRegExp");function XA(e,t){if(e.pattern!==void 0){if(ye(e,"default"))return Ze(e.default);throw new Hr(e,"String types with patterns must specify a default value")}else if(e.format!==void 0){if(ye(e,"default"))return Ze(e.default);throw new Hr(e,"String types with formats must specify a default value")}else return ye(e,"default")?Ze(e.default):e.minLength!==void 0?Array.from({length:e.minLength}).map(()=>" ").join(""):""}o(XA,"FromString");function YA(e,t){return ye(e,"default")?Ze(e.default):"value"in e?Symbol.for(e.value):Symbol()}o(YA,"FromSymbol");function QA(e,t){if(ye(e,"default"))return Ze(e.default);if(!cl(e))throw new Hr(e,"Can only create template literals that produce a finite variants. Consider using a default value.");return Pa(e)[0]}o(QA,"FromTemplateLiteral");function e5(e,t){if(hv++>s5)throw new Hr(e,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return ye(e,"default")?Ze(e.default):Kr($e(e,t),t)}o(e5,"FromThis");function t5(e,t){return ye(e,"default")?Ze(e.default):e.items===void 0?[]:Array.from({length:e.minItems}).map((r,n)=>Kr(e.items[n],t))}o(t5,"FromTuple");function r5(e,t){if(ye(e,"default"))return Ze(e.default)}o(r5,"FromUndefined");function n5(e,t){if(ye(e,"default"))return Ze(e.default);if(e.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return Kr(e.anyOf[0],t)}o(n5,"FromUnion");function i5(e,t){return ye(e,"default")?Ze(e.default):e.minByteLength!==void 0?new Uint8Array(e.minByteLength):new Uint8Array(0)}o(i5,"FromUint8Array");function o5(e,t){return ye(e,"default")?Ze(e.default):{}}o(o5,"FromUnknown");function a5(e,t){if(ye(e,"default"))return Ze(e.default)}o(a5,"FromVoid");function u5(e,t){if(ye(e,"default"))return Ze(e.default);throw new Error("User defined types must specify a default value")}o(u5,"FromKind");function Kr(e,t){let r=sn(e,t),n=e;switch(n[N]){case"Any":return PA(n,r);case"Array":return BA(n,r);case"AsyncIterator":return MA(n,r);case"BigInt":return TA(n,r);case"Boolean":return kA(n,r);case"Constructor":return _A(n,r);case"Date":return LA(n,r);case"Function":return RA(n,r);case"Integer":return NA(n,r);case"Intersect":return UA(n,r);case"Iterator":return jA(n,r);case"Literal":return zA(n,r);case"Never":return $A(n,r);case"Not":return GA(n,r);case"Null":return ZA(n,r);case"Number":return VA(n,r);case"Object":return WA(n,r);case"Promise":return HA(n,r);case"Record":return KA(n,r);case"Ref":return qA(n,r);case"RegExp":return JA(n,r);case"String":return XA(n,r);case"Symbol":return YA(n,r);case"TemplateLiteral":return QA(n,r);case"This":return e5(n,r);case"Tuple":return t5(n,r);case"Undefined":return r5(n,r);case"Union":return n5(n,r);case"Uint8Array":return i5(n,r);case"Unknown":return o5(n,r);case"Void":return a5(n,r);default:if(!$t.Has(n[N]))throw new Hr(n,"Unknown type");return u5(n,r)}}o(Kr,"Visit");var s5=512,hv=0;function ln(...e){return hv=0,e.length===2?Kr(e[0],e[1]):Kr(e[0],[])}o(ln,"Create");var lf=class lf extends he{constructor(t,r){super(r),this.schema=t}};o(lf,"ValueCastError");var Nl=lf;function c5(e,t,r){if(e[N]==="Object"&&typeof r=="object"&&!hi(r)){let n=e,i=Object.getOwnPropertyNames(r),a=Object.entries(n.properties),[u,c]=[1/a.length,a.length];return a.reduce((m,[d,f])=>{let g=f[N]==="Literal"&&f.const===r[d]?c:0,v=Ae(f,t,r[d])?u:0,b=i.includes(d)?u:0;return m+(g+v+b)},0)}else return Ae(e,t,r)?1:0}o(c5,"ScoreUnion");function l5(e,t,r){let n=e.anyOf.map(u=>$e(u,t)),[i,a]=[n[0],0];for(let u of n){let c=c5(u,t,r);c>a&&(i=u,a=c)}return i}o(l5,"SelectUnion");function m5(e,t,r){if("default"in e)return typeof r=="function"?e.default:Ge(e.default);{let n=l5(e,t,r);return cf(n,t,r)}}o(m5,"CastUnion");function d5(e,t,r){return Ae(e,t,r)?Ge(r):ln(e,t)}o(d5,"DefaultClone");function p5(e,t,r){return Ae(e,t,r)?r:ln(e,t)}o(p5,"Default");function f5(e,t,r){if(Ae(e,t,r))return Ge(r);let n=ve(r)?Ge(r):ln(e,t),i=pe(e.minItems)&&n.length<e.minItems?[...n,...Array.from({length:e.minItems-n.length},()=>null)]:n,u=(pe(e.maxItems)&&i.length>e.maxItems?i.slice(0,e.maxItems):i).map(m=>Jn(e.items,t,m));if(e.uniqueItems!==!0)return u;let c=[...new Set(u)];if(!Ae(e,t,c))throw new Nl(e,"Array cast produced invalid data due to uniqueItems constraint");return c}o(f5,"FromArray");function h5(e,t,r){if(Ae(e,t,r))return ln(e,t);let n=new Set(e.returns.required||[]),i=o(function(){},"result");for(let[a,u]of Object.entries(e.returns.properties))!n.has(a)&&r.prototype[a]===void 0||(i.prototype[a]=Jn(u,t,r.prototype[a]));return i}o(h5,"FromConstructor");function g5(e,t,r){let n=ln(e,t),i=Ce(n)&&Ce(r)?U(U({},n),r):r;return Ae(e,t,i)?i:ln(e,t)}o(g5,"FromIntersect");function y5(e,t,r){throw new Nl(e,"Never types cannot be cast")}o(y5,"FromNever");function b5(e,t,r){if(Ae(e,t,r))return r;if(r===null||typeof r!="object")return ln(e,t);let n=new Set(e.required||[]),i={};for(let[a,u]of Object.entries(e.properties))!n.has(a)&&r[a]===void 0||(i[a]=Jn(u,t,r[a]));if(typeof e.additionalProperties=="object"){let a=Object.getOwnPropertyNames(e.properties);for(let u of Object.getOwnPropertyNames(r))a.includes(u)||(i[u]=Jn(e.additionalProperties,t,r[u]))}return i}o(b5,"FromObject");function v5(e,t,r){if(Ae(e,t,r))return Ge(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return ln(e,t);let n=Object.getOwnPropertyNames(e.patternProperties)[0],i=e.patternProperties[n],a={};for(let[u,c]of Object.entries(r))a[u]=Jn(i,t,c);return a}o(v5,"FromRecord");function x5(e,t,r){return Jn($e(e,t),t,r)}o(x5,"FromRef");function E5(e,t,r){return Jn($e(e,t),t,r)}o(E5,"FromThis");function C5(e,t,r){return Ae(e,t,r)?Ge(r):ve(r)?e.items===void 0?[]:e.items.map((n,i)=>Jn(n,t,r[i])):ln(e,t)}o(C5,"FromTuple");function I5(e,t,r){return Ae(e,t,r)?Ge(r):m5(e,t,r)}o(I5,"FromUnion");function Jn(e,t,r){let n=Re(e.$id)?[...t,e]:t,i=e;switch(e[N]){case"Array":return f5(i,n,r);case"Constructor":return h5(i,n,r);case"Intersect":return g5(i,n,r);case"Never":return y5(i,n,r);case"Object":return b5(i,n,r);case"Record":return v5(i,n,r);case"Ref":return x5(i,n,r);case"This":return E5(i,n,r);case"Tuple":return C5(i,n,r);case"Union":return I5(i,n,r);case"Date":case"Symbol":case"Uint8Array":return d5(e,t,r);default:return p5(i,n,r)}}o(Jn,"Visit");function cf(...e){return e.length===3?Jn(e[0],e[1],e[2]):Jn(e[0],[],e[1])}o(cf,"Cast");l();function D5(e){return to(e)&&e[N]!=="Unsafe"}o(D5,"IsCheckable");function S5(e,t,r){return ve(r)?r.map(n=>qr(e.items,t,n)):r}o(S5,"FromArray");function w5(e,t,r){let n=e.unevaluatedProperties,a=e.allOf.map(c=>qr(c,t,Ge(r))).reduce((c,m)=>Ce(m)?U(U({},c),m):m,{});if(!Ce(r)||!Ce(a)||!to(n))return a;let u=Jt(e);for(let c of Object.getOwnPropertyNames(r))u.includes(c)||Ae(n,t,r[c])&&(a[c]=qr(n,t,r[c]));return a}o(w5,"FromIntersect");function A5(e,t,r){if(!Ce(r)||ve(r))return r;let n=e.additionalProperties;for(let i of Object.getOwnPropertyNames(r)){if(ye(e.properties,i)){r[i]=qr(e.properties[i],t,r[i]);continue}if(to(n)&&Ae(n,t,r[i])){r[i]=qr(n,t,r[i]);continue}delete r[i]}return r}o(A5,"FromObject");function F5(e,t,r){if(!Ce(r))return r;let n=e.additionalProperties,i=Object.getOwnPropertyNames(r),[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of i){if(c.test(m)){r[m]=qr(u,t,r[m]);continue}if(to(n)&&Ae(n,t,r[m])){r[m]=qr(n,t,r[m]);continue}delete r[m]}return r}o(F5,"FromRecord");function O5(e,t,r){return qr($e(e,t),t,r)}o(O5,"FromRef");function P5(e,t,r){return qr($e(e,t),t,r)}o(P5,"FromThis");function B5(e,t,r){if(!ve(r))return r;if(It(e.items))return[];let n=Math.min(r.length,e.items.length);for(let i=0;i<n;i++)r[i]=qr(e.items[i],t,r[i]);return r.length>n?r.slice(0,n):r}o(B5,"FromTuple");function M5(e,t,r){for(let n of e.anyOf)if(D5(n)&&Ae(n,t,r))return qr(n,t,r);return r}o(M5,"FromUnion");function qr(e,t,r){let n=Re(e.$id)?[...t,e]:t,i=e;switch(i[N]){case"Array":return S5(i,n,r);case"Intersect":return w5(i,n,r);case"Object":return A5(i,n,r);case"Record":return F5(i,n,r);case"Ref":return O5(i,n,r);case"This":return P5(i,n,r);case"Tuple":return B5(i,n,r);case"Union":return M5(i,n,r);default:return r}}o(qr,"Visit");function Ul(...e){return e.length===3?qr(e[0],e[1],e[2]):qr(e[0],[],e[1])}o(Ul,"Clean");l();function jl(e){return Re(e)&&!isNaN(e)&&!isNaN(parseFloat(e))}o(jl,"IsStringNumeric");function T5(e){return rr(e)||Zn(e)||pe(e)}o(T5,"IsValueToString");function ps(e){return e===!0||pe(e)&&e===1||rr(e)&&e===BigInt("1")||Re(e)&&(e.toLowerCase()==="true"||e==="1")}o(ps,"IsValueTrue");function fs(e){return e===!1||pe(e)&&(e===0||Object.is(e,-0))||rr(e)&&e===BigInt("0")||Re(e)&&(e.toLowerCase()==="false"||e==="0"||e==="-0")}o(fs,"IsValueFalse");function k5(e){return Re(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(e)}o(k5,"IsTimeStringWithTimeZone");function _5(e){return Re(e)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(e)}o(_5,"IsTimeStringWithoutTimeZone");function L5(e){return Re(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)}o(L5,"IsDateTimeStringWithTimeZone");function R5(e){return Re(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)}o(R5,"IsDateTimeStringWithoutTimeZone");function N5(e){return Re(e)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(e)}o(N5,"IsDateString");function U5(e,t){let r=yv(e);return r===t?r:e}o(U5,"TryConvertLiteralString");function j5(e,t){let r=bv(e);return r===t?r:e}o(j5,"TryConvertLiteralNumber");function z5(e,t){let r=gv(e);return r===t?r:e}o(z5,"TryConvertLiteralBoolean");function $5(e,t){return Re(e.const)?U5(t,e.const):pe(e.const)?j5(t,e.const):Zn(e.const)?z5(t,e.const):t}o($5,"TryConvertLiteral");function gv(e){return ps(e)?!0:fs(e)?!1:e}o(gv,"TryConvertBoolean");function G5(e){let t=o(r=>r.split(".")[0],"truncateInteger");return jl(e)?BigInt(t(e)):pe(e)?BigInt(Math.trunc(e)):fs(e)?BigInt(0):ps(e)?BigInt(1):e}o(G5,"TryConvertBigInt");function yv(e){return T5(e)?e.toString():gi(e)&&e.description!==void 0?e.description.toString():e}o(yv,"TryConvertString");function bv(e){return jl(e)?parseFloat(e):ps(e)?1:fs(e)?0:e}o(bv,"TryConvertNumber");function Z5(e){return jl(e)?parseInt(e):pe(e)?e|0:ps(e)?1:fs(e)?0:e}o(Z5,"TryConvertInteger");function V5(e){return Re(e)&&e.toLowerCase()==="null"?null:e}o(V5,"TryConvertNull");function W5(e){return Re(e)&&e==="undefined"?void 0:e}o(W5,"TryConvertUndefined");function H5(e){return Sr(e)?e:pe(e)?new Date(e):ps(e)?new Date(1):fs(e)?new Date(0):jl(e)?new Date(parseInt(e)):_5(e)?new Date("1970-01-01T".concat(e,".000Z")):k5(e)?new Date("1970-01-01T".concat(e)):R5(e)?new Date("".concat(e,".000Z")):L5(e)?new Date(e):N5(e)?new Date("".concat(e,"T00:00:00.000Z")):e}o(H5,"TryConvertDate");function K5(e,t,r){return(ve(r)?r:[r]).map(i=>Xn(e.items,t,i))}o(K5,"FromArray");function q5(e,t,r){return G5(r)}o(q5,"FromBigInt");function J5(e,t,r){return gv(r)}o(J5,"FromBoolean");function X5(e,t,r){return H5(r)}o(X5,"FromDate");function Y5(e,t,r){return Z5(r)}o(Y5,"FromInteger");function Q5(e,t,r){return e.allOf.reduce((n,i)=>Xn(i,t,n),r)}o(Q5,"FromIntersect");function eF(e,t,r){return $5(e,r)}o(eF,"FromLiteral");function tF(e,t,r){return V5(r)}o(tF,"FromNull");function rF(e,t,r){return bv(r)}o(rF,"FromNumber");function nF(e,t,r){if(!Ce(r))return r;for(let n of Object.getOwnPropertyNames(e.properties))ye(r,n)&&(r[n]=Xn(e.properties[n],t,r[n]));return r}o(nF,"FromObject");function iF(e,t,r){if(!Ce(r))return r;let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=e.patternProperties[i];for(let[u,c]of Object.entries(r))r[u]=Xn(a,t,c);return r}o(iF,"FromRecord");function oF(e,t,r){return Xn($e(e,t),t,r)}o(oF,"FromRef");function aF(e,t,r){return yv(r)}o(aF,"FromString");function uF(e,t,r){return Re(r)||pe(r)?Symbol(r):r}o(uF,"FromSymbol");function sF(e,t,r){return Xn($e(e,t),t,r)}o(sF,"FromThis");function cF(e,t,r){return ve(r)&&!It(e.items)?r.map((i,a)=>a<e.items.length?Xn(e.items[a],t,i):i):r}o(cF,"FromTuple");function lF(e,t,r){return W5(r)}o(lF,"FromUndefined");function mF(e,t,r){for(let n of e.anyOf){let i=Xn(n,t,Ge(r));if(Ae(n,t,i))return i}return r}o(mF,"FromUnion");function Xn(e,t,r){let n=sn(e,t),i=e;switch(e[N]){case"Array":return K5(i,n,r);case"BigInt":return q5(i,n,r);case"Boolean":return J5(i,n,r);case"Date":return X5(i,n,r);case"Integer":return Y5(i,n,r);case"Intersect":return Q5(i,n,r);case"Literal":return eF(i,n,r);case"Null":return tF(i,n,r);case"Number":return rF(i,n,r);case"Object":return nF(i,n,r);case"Record":return iF(i,n,r);case"Ref":return oF(i,n,r);case"String":return aF(i,n,r);case"Symbol":return uF(i,n,r);case"This":return sF(i,n,r);case"Tuple":return cF(i,n,r);case"Undefined":return lF(i,n,r);case"Union":return mF(i,n,r);default:return r}}o(Xn,"Visit");function zl(...e){return e.length===3?Xn(e[0],e[1],e[2]):Xn(e[0],[],e[1])}o(zl,"Convert");l();l();var mf=class mf extends he{constructor(t,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(mf,"TransformDecodeCheckError");var Wa=mf,df=class df extends he{constructor(t,r,n,i){super(i instanceof Error?i.message:"Unknown error"),this.schema=t,this.path=r,this.value=n,this.error=i}};o(df,"TransformDecodeError");var zo=df;function Dt(e,t,r){try{return ft(e)?e[yt].Decode(r):r}catch(n){throw new zo(e,t,r,n)}}o(Dt,"Default");function dF(e,t,r,n){return ve(n)?Dt(e,r,n.map((i,a)=>Yn(e.items,t,"".concat(r,"/").concat(a),i))):Dt(e,r,n)}o(dF,"FromArray");function pF(e,t,r,n){if(!Ce(n)||nr(n))return Dt(e,r,n);let i=io(e),a=i.map(f=>f[0]),u=U({},n);for(let[f,g]of i)f in u&&(u[f]=Yn(g,t,"".concat(r,"/").concat(f),u[f]));if(!ft(e.unevaluatedProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.unevaluatedProperties,d=U({},u);for(let f of c)a.includes(f)||(d[f]=Dt(m,"".concat(r,"/").concat(f),d[f]));return Dt(e,r,d)}o(pF,"FromIntersect");function fF(e,t,r,n){return Dt(e,r,Yn(e.not,t,r,n))}o(fF,"FromNot");function hF(e,t,r,n){if(!Ce(n))return Dt(e,r,n);let i=Jt(e),a=U({},n);for(let d of i)ye(a,d)&&(It(a[d])&&(!Sa(e.properties[d])||Ye.IsExactOptionalProperty(a,d))||(a[d]=Yn(e.properties[d],t,"".concat(r,"/").concat(d),a[d])));if(!Ne(e.additionalProperties))return Dt(e,r,a);let u=Object.getOwnPropertyNames(a),c=e.additionalProperties,m=U({},a);for(let d of u)i.includes(d)||(m[d]=Dt(c,"".concat(r,"/").concat(d),m[d]));return Dt(e,r,m)}o(hF,"FromObject");function gF(e,t,r,n){if(!Ce(n))return Dt(e,r,n);let i=Object.getOwnPropertyNames(e.patternProperties)[0],a=new RegExp(i),u=U({},n);for(let f of Object.getOwnPropertyNames(n))a.test(f)&&(u[f]=Yn(e.patternProperties[i],t,"".concat(r,"/").concat(f),u[f]));if(!Ne(e.additionalProperties))return Dt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=U({},u);for(let f of c)a.test(f)||(d[f]=Dt(m,"".concat(r,"/").concat(f),d[f]));return Dt(e,r,d)}o(gF,"FromRecord");function yF(e,t,r,n){let i=$e(e,t);return Dt(e,r,Yn(i,t,r,n))}o(yF,"FromRef");function bF(e,t,r,n){let i=$e(e,t);return Dt(e,r,Yn(i,t,r,n))}o(bF,"FromThis");function vF(e,t,r,n){return ve(n)&&ve(e.items)?Dt(e,r,e.items.map((i,a)=>Yn(i,t,"".concat(r,"/").concat(a),n[a]))):Dt(e,r,n)}o(vF,"FromTuple");function xF(e,t,r,n){for(let i of e.anyOf){if(!Ae(i,t,n))continue;let a=Yn(i,t,r,n);return Dt(e,r,a)}return Dt(e,r,n)}o(xF,"FromUnion");function Yn(e,t,r,n){let i=sn(e,t),a=e;switch(e[N]){case"Array":return dF(a,i,r,n);case"Intersect":return pF(a,i,r,n);case"Not":return fF(a,i,r,n);case"Object":return hF(a,i,r,n);case"Record":return gF(a,i,r,n);case"Ref":return yF(a,i,r,n);case"Symbol":return Dt(a,r,n);case"This":return bF(a,i,r,n);case"Tuple":return vF(a,i,r,n);case"Union":return xF(a,i,r,n);default:return Dt(a,r,n)}}o(Yn,"Visit");function Ha(e,t,r){return Yn(e,t,"",r)}o(Ha,"TransformDecode");l();var pf=class pf extends he{constructor(t,r,n){super("The encoded value does not match the expected schema"),this.schema=t,this.value=r,this.error=n}};o(pf,"TransformEncodeCheckError");var Ka=pf,ff=class ff extends he{constructor(t,r,n,i){super("".concat(i instanceof Error?i.message:"Unknown error")),this.schema=t,this.path=r,this.value=n,this.error=i}};o(ff,"TransformEncodeError");var $o=ff;function br(e,t,r){try{return ft(e)?e[yt].Encode(r):r}catch(n){throw new $o(e,t,r,n)}}o(br,"Default");function EF(e,t,r,n){let i=br(e,r,n);return ve(i)?i.map((a,u)=>Qn(e.items,t,"".concat(r,"/").concat(u),a)):i}o(EF,"FromArray");function CF(e,t,r,n){let i=br(e,r,n);if(!Ce(n)||nr(n))return i;let a=io(e),u=a.map(g=>g[0]),c=U({},i);for(let[g,v]of a)g in c&&(c[g]=Qn(v,t,"".concat(r,"/").concat(g),c[g]));if(!ft(e.unevaluatedProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,f=U({},c);for(let g of m)u.includes(g)||(f[g]=br(d,"".concat(r,"/").concat(g),f[g]));return f}o(CF,"FromIntersect");function IF(e,t,r,n){return br(e.not,r,br(e,r,n))}o(IF,"FromNot");function DF(e,t,r,n){let i=br(e,r,n);if(!Ce(i))return i;let a=Jt(e),u=U({},i);for(let f of a)ye(u,f)&&(It(u[f])&&(!Sa(e.properties[f])||Ye.IsExactOptionalProperty(u,f))||(u[f]=Qn(e.properties[f],t,"".concat(r,"/").concat(f),u[f])));if(!Ne(e.additionalProperties))return u;let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=U({},u);for(let f of c)a.includes(f)||(d[f]=br(m,"".concat(r,"/").concat(f),d[f]));return d}o(DF,"FromObject");function SF(e,t,r,n){let i=br(e,r,n);if(!Ce(n))return i;let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=U({},i);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=Qn(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g]));if(!Ne(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=U({},c);for(let g of m)u.test(g)||(f[g]=br(d,"".concat(r,"/").concat(g),f[g]));return f}o(SF,"FromRecord");function wF(e,t,r,n){let i=$e(e,t),a=Qn(i,t,r,n);return br(e,r,a)}o(wF,"FromRef");function AF(e,t,r,n){let i=$e(e,t),a=Qn(i,t,r,n);return br(e,r,a)}o(AF,"FromThis");function FF(e,t,r,n){let i=br(e,r,n);return ve(e.items)?e.items.map((a,u)=>Qn(a,t,"".concat(r,"/").concat(u),i[u])):[]}o(FF,"FromTuple");function OF(e,t,r,n){for(let i of e.anyOf){if(!Ae(i,t,n))continue;let a=Qn(i,t,r,n);return br(e,r,a)}for(let i of e.anyOf){let a=Qn(i,t,r,n);if(Ae(e,t,a))return br(e,r,a)}return br(e,r,n)}o(OF,"FromUnion");function Qn(e,t,r,n){let i=sn(e,t),a=e;switch(e[N]){case"Array":return EF(a,i,r,n);case"Intersect":return CF(a,i,r,n);case"Not":return IF(a,i,r,n);case"Object":return DF(a,i,r,n);case"Record":return SF(a,i,r,n);case"Ref":return wF(a,i,r,n);case"This":return AF(a,i,r,n);case"Tuple":return FF(a,i,r,n);case"Union":return OF(a,i,r,n);default:return br(a,r,n)}}o(Qn,"Visit");function $l(e,t,r){return Qn(e,t,"",r)}o($l,"TransformEncode");l();function PF(e,t){return ft(e)||Xt(e.items,t)}o(PF,"FromArray");function BF(e,t){return ft(e)||Xt(e.items,t)}o(BF,"FromAsyncIterator");function MF(e,t){return ft(e)||Xt(e.returns,t)||e.parameters.some(r=>Xt(r,t))}o(MF,"FromConstructor");function TF(e,t){return ft(e)||Xt(e.returns,t)||e.parameters.some(r=>Xt(r,t))}o(TF,"FromFunction");function kF(e,t){return ft(e)||ft(e.unevaluatedProperties)||e.allOf.some(r=>Xt(r,t))}o(kF,"FromIntersect");function _F(e,t){return ft(e)||Xt(e.items,t)}o(_F,"FromIterator");function LF(e,t){return ft(e)||Xt(e.not,t)}o(LF,"FromNot");function RF(e,t){return ft(e)||Object.values(e.properties).some(r=>Xt(r,t))||Ne(e.additionalProperties)&&Xt(e.additionalProperties,t)}o(RF,"FromObject");function NF(e,t){return ft(e)||Xt(e.item,t)}o(NF,"FromPromise");function UF(e,t){let r=Object.getOwnPropertyNames(e.patternProperties)[0],n=e.patternProperties[r];return ft(e)||Xt(n,t)||Ne(e.additionalProperties)&&ft(e.additionalProperties)}o(UF,"FromRecord");function jF(e,t){return ft(e)?!0:Xt($e(e,t),t)}o(jF,"FromRef");function zF(e,t){return ft(e)?!0:Xt($e(e,t),t)}o(zF,"FromThis");function $F(e,t){return ft(e)||!It(e.items)&&e.items.some(r=>Xt(r,t))}o($F,"FromTuple");function GF(e,t){return ft(e)||e.anyOf.some(r=>Xt(r,t))}o(GF,"FromUnion");function Xt(e,t){let r=sn(e,t),n=e;if(e.$id&&hf.has(e.$id))return!1;switch(e.$id&&hf.add(e.$id),e[N]){case"Array":return PF(n,r);case"AsyncIterator":return BF(n,r);case"Constructor":return MF(n,r);case"Function":return TF(n,r);case"Intersect":return kF(n,r);case"Iterator":return _F(n,r);case"Not":return LF(n,r);case"Object":return RF(n,r);case"Promise":return NF(n,r);case"Record":return UF(n,r);case"Ref":return jF(n,r);case"This":return zF(n,r);case"Tuple":return $F(n,r);case"Union":return GF(n,r);default:return ft(e)}}o(Xt,"Visit");var hf=new Set;function ei(e,t){return hf.clear(),Xt(e,t)}o(ei,"HasTransform");function vv(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!Ae(t,r,n))throw new Wa(t,n,qn(t,r,n).First());return ei(t,r)?Ha(t,r,n):n}o(vv,"Decode");l();function Ai(e,t){let r=ye(e,"default")?e.default:void 0,n=Qi(r)?r():Ge(r);return It(t)?n:Ce(t)&&Ce(n)?Object.assign(n,t):t}o(Ai,"ValueOrDefault");function gf(e){return to(e)&&"default"in e}o(gf,"HasDefaultProperty");function ZF(e,t,r){let n=Ai(e,r);if(!ve(n))return n;for(let i=0;i<n.length;i++)n[i]=Jr(e.items,t,n[i]);return n}o(ZF,"FromArray");function VF(e,t,r){return Sr(r)?r:Ai(e,r)}o(VF,"FromDate");function WF(e,t,r){let n=Ai(e,r);return e.allOf.reduce((i,a)=>{let u=Jr(a,t,n);return Ce(u)?U(U({},i),u):u},{})}o(WF,"FromIntersect");function HF(e,t,r){let n=Ai(e,r);if(!Ce(n))return n;let i=Object.getOwnPropertyNames(e.properties);for(let a of i){let u=Jr(e.properties[a],t,n[a]);It(u)||(n[a]=Jr(e.properties[a],t,n[a]))}if(!gf(e.additionalProperties))return n;for(let a of Object.getOwnPropertyNames(n))i.includes(a)||(n[a]=Jr(e.additionalProperties,t,n[a]));return n}o(HF,"FromObject");function KF(e,t,r){let n=Ai(e,r);if(!Ce(n))return n;let i=e.additionalProperties,[a,u]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(let m of Object.getOwnPropertyNames(n))c.test(m)&&gf(u)&&(n[m]=Jr(u,t,n[m]));if(!gf(i))return n;for(let m of Object.getOwnPropertyNames(n))c.test(m)||(n[m]=Jr(i,t,n[m]));return n}o(KF,"FromRecord");function qF(e,t,r){return Jr($e(e,t),t,Ai(e,r))}o(qF,"FromRef");function JF(e,t,r){return Jr($e(e,t),t,r)}o(JF,"FromThis");function XF(e,t,r){let n=Ai(e,r);if(!ve(n)||It(e.items))return n;let[i,a]=[e.items,Math.max(e.items.length,n.length)];for(let u=0;u<a;u++)u<i.length&&(n[u]=Jr(i[u],t,n[u]));return n}o(XF,"FromTuple");function YF(e,t,r){let n=Ai(e,r);for(let i of e.anyOf){let a=Jr(i,t,Ge(n));if(Ae(i,t,a))return a}return n}o(YF,"FromUnion");function Jr(e,t,r){let n=sn(e,t),i=e;switch(i[N]){case"Array":return ZF(i,n,r);case"Date":return VF(i,n,r);case"Intersect":return WF(i,n,r);case"Object":return HF(i,n,r);case"Record":return KF(i,n,r);case"Ref":return qF(i,n,r);case"This":return JF(i,n,r);case"Tuple":return XF(i,n,r);case"Union":return YF(i,n,r);default:return Ai(i,r)}}o(Jr,"Visit");function Gl(...e){return e.length===3?Jr(e[0],e[1],e[2]):Jr(e[0],[],e[1])}o(Gl,"Default");l();l();var mn={};$i(mn,{Delete:()=>eO,Format:()=>hs,Get:()=>rO,Has:()=>tO,Set:()=>QF,ValuePointerRootDeleteError:()=>Vl,ValuePointerRootSetError:()=>Zl});l();var yf=class yf extends he{constructor(t,r,n){super("Cannot set root value"),this.value=t,this.path=r,this.update=n}};o(yf,"ValuePointerRootSetError");var Zl=yf,bf=class bf extends he{constructor(t,r){super("Cannot delete root value"),this.value=t,this.path=r}};o(bf,"ValuePointerRootDeleteError");var Vl=bf;function xv(e){return e.indexOf("~")===-1?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}o(xv,"Escape");function*hs(e){if(e==="")return;let[t,r]=[0,0];for(let n=0;n<e.length;n++)e.charAt(n)==="/"?(n===0||(r=n,yield xv(e.slice(t,r))),t=n+1):r=n;yield xv(e.slice(t))}o(hs,"Format");function QF(e,t,r){if(t==="")throw new Zl(e,t,r);let[n,i,a]=[null,e,""];for(let u of hs(t))i[u]===void 0&&(i[u]={}),n=i,i=i[u],a=u;n[a]=r}o(QF,"Set");function eO(e,t){if(t==="")throw new Vl(e,t);let[r,n,i]=[null,e,""];for(let a of hs(t)){if(n[a]===void 0||n[a]===null)return;r=n,n=n[a],i=a}if(Array.isArray(r)){let a=parseInt(i);r.splice(a,1)}else delete r[i]}o(eO,"Delete");function tO(e,t){if(t==="")return!0;let[r,n,i]=[null,e,""];for(let a of hs(t)){if(n[a]===void 0)return!1;r=n,n=n[a],i=a}return Object.getOwnPropertyNames(r).includes(i)}o(tO,"Has");function rO(e,t){if(t==="")return e;let r=e;for(let n of hs(t)){if(r[n]===void 0)return;r=r[n]}return r}o(rO,"Get");l();function nO(e,t){if(!Ce(t))return!1;let r=[...Object.keys(e),...Object.getOwnPropertySymbols(e)],n=[...Object.keys(t),...Object.getOwnPropertySymbols(t)];return r.length!==n.length?!1:r.every(i=>Go(e[i],t[i]))}o(nO,"ObjectType");function iO(e,t){return Sr(t)&&e.getTime()===t.getTime()}o(iO,"DateType");function oO(e,t){return!ve(t)||e.length!==t.length?!1:e.every((r,n)=>Go(r,t[n]))}o(oO,"ArrayType");function aO(e,t){return!en(t)||e.length!==t.length||Object.getPrototypeOf(e).constructor.name!==Object.getPrototypeOf(t).constructor.name?!1:e.every((r,n)=>Go(r,t[n]))}o(aO,"TypedArrayType");function uO(e,t){return e===t}o(uO,"ValueType");function Go(e,t){if(Sr(e))return iO(e,t);if(en(e))return aO(e,t);if(ve(e))return oO(e,t);if(Ce(e))return nO(e,t);if(nr(e))return uO(e,t);throw new Error("ValueEquals: Unable to compare value")}o(Go,"Equal");var sO=ut({type:Ke("insert"),path:rn(),value:Di()}),cO=ut({type:Ke("update"),path:rn(),value:Di()}),lO=ut({type:Ke("delete"),path:rn()}),Cv=rt([sO,cO,lO]),vf=class vf extends he{constructor(t,r){super(r),this.value=t}};o(vf,"ValueDiffError");var Wl=vf;function Hl(e,t){return{type:"update",path:e,value:t}}o(Hl,"CreateUpdate");function Iv(e,t){return{type:"insert",path:e,value:t}}o(Iv,"CreateInsert");function Dv(e){return{type:"delete",path:e}}o(Dv,"CreateDelete");function Ev(e){if(globalThis.Object.getOwnPropertySymbols(e).length>0)throw new Wl(e,"Cannot diff objects with symbols")}o(Ev,"AssertDiffable");function*mO(e,t,r){if(Ev(t),Ev(r),!Zp(r))return yield Hl(e,r);let n=globalThis.Object.getOwnPropertyNames(t),i=globalThis.Object.getOwnPropertyNames(r);for(let a of i)ye(t,a)||(yield Iv("".concat(e,"/").concat(a),r[a]));for(let a of n)ye(r,a)&&(Go(t,r)||(yield*K(Kl("".concat(e,"/").concat(a),t[a],r[a]))));for(let a of n)ye(r,a)||(yield Dv("".concat(e,"/").concat(a)))}o(mO,"ObjectType");function*dO(e,t,r){if(!ve(r))return yield Hl(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(Kl("".concat(e,"/").concat(n),t[n],r[n]));for(let n=0;n<r.length;n++)n<t.length||(yield Iv("".concat(e,"/").concat(n),r[n]));for(let n=t.length-1;n>=0;n--)n<r.length||(yield Dv("".concat(e,"/").concat(n)))}o(dO,"ArrayType");function*pO(e,t,r){if(!en(r)||t.length!==r.length||globalThis.Object.getPrototypeOf(t).constructor.name!==globalThis.Object.getPrototypeOf(r).constructor.name)return yield Hl(e,r);for(let n=0;n<Math.min(t.length,r.length);n++)yield*K(Kl("".concat(e,"/").concat(n),t[n],r[n]))}o(pO,"TypedArrayType");function*fO(e,t,r){t!==r&&(yield Hl(e,r))}o(fO,"ValueType");function*Kl(e,t,r){if(Zp(t))return yield*K(mO(e,t,r));if(ve(t))return yield*K(dO(e,t,r));if(en(t))return yield*K(pO(e,t,r));if(nr(t))return yield*K(fO(e,t,r));throw new Wl(t,"Unable to diff value")}o(Kl,"Visit");function Sv(e,t){return[...Kl("",e,t)]}o(Sv,"Diff");function hO(e){return e.length>0&&e[0].path===""&&e[0].type==="update"}o(hO,"IsRootUpdate");function gO(e){return e.length===0}o(gO,"IsIdentity");function wv(e,t){if(hO(t))return Ge(t[0].value);if(gO(t))return Ge(e);let r=Ge(e);for(let n of t)switch(n.type){case"insert":{mn.Set(r,n.path,n.value);break}case"update":{mn.Set(r,n.path,n.value);break}case"delete":{mn.Delete(r,n.path);break}}return r}o(wv,"Patch");l();function Av(...e){let[t,r,n]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]],i=ei(t,r)?$l(t,r,n):n;if(!Ae(t,r,i))throw new Ka(t,i,qn(t,r,i).First());return i}o(Av,"Encode");l();var Ef=class Ef extends he{constructor(t){super(t)}};o(Ef,"ValueMutateError");var ql=Ef;function yO(e,t,r,n){if(!Ce(r))mn.Set(e,t,Ge(n));else{let i=Object.getOwnPropertyNames(r),a=Object.getOwnPropertyNames(n);for(let u of i)a.includes(u)||delete r[u];for(let u of a)i.includes(u)||(r[u]=null);for(let u of a)xf(e,"".concat(t,"/").concat(u),r[u],n[u])}}o(yO,"ObjectType");function bO(e,t,r,n){if(!ve(r))mn.Set(e,t,Ge(n));else{for(let i=0;i<n.length;i++)xf(e,"".concat(t,"/").concat(i),r[i],n[i]);r.splice(n.length)}}o(bO,"ArrayType");function vO(e,t,r,n){if(en(r)&&r.length===n.length)for(let i=0;i<r.length;i++)r[i]=n[i];else mn.Set(e,t,Ge(n))}o(vO,"TypedArrayType");function xO(e,t,r,n){r!==n&&mn.Set(e,t,n)}o(xO,"ValueType");function xf(e,t,r,n){if(ve(n))return bO(e,t,r,n);if(en(n))return vO(e,t,r,n);if(Ce(n))return yO(e,t,r,n);if(nr(n))return xO(e,t,r,n)}o(xf,"Visit");function Fv(e){return en(e)||nr(e)}o(Fv,"IsNonMutableValue");function EO(e,t){return Ce(e)&&ve(t)||ve(e)&&Ce(t)}o(EO,"IsMismatchedValue");function Ov(e,t){if(Fv(e)||Fv(t))throw new ql("Only object and array types can be mutated at the root level");if(EO(e,t))throw new ql("Cannot assign due type mismatch of assignable values");xf(e,"",e,t)}o(Ov,"Mutate");l();var CO=[(e,t,r)=>Ge(r),(e,t,r)=>Gl(e,t,r),(e,t,r)=>Ul(e,t,r),(e,t,r)=>zl(e,t,r),(e,t,r)=>(Rl(e,t,r),r),(e,t,r)=>ei(e,t)?Ha(e,t,r):r];function Pv(e,t,r){return CO.reduce((n,i)=>i(e,t,n),r)}o(Pv,"ParseValue");function Bv(...e){return e.length===3?Pv(e[0],e[1],e[2]):Pv(e[0],[],e[1])}o(Bv,"Parse");l();var dn={};$i(dn,{Assert:()=>Rl,Cast:()=>cf,Check:()=>Ae,Clean:()=>Ul,Clone:()=>Ge,Convert:()=>zl,Create:()=>ln,Decode:()=>vv,Default:()=>Gl,Diff:()=>Sv,Edit:()=>Cv,Encode:()=>Av,Equal:()=>Go,Errors:()=>qn,Hash:()=>uo,Mutate:()=>Ov,Parse:()=>Bv,Patch:()=>wv,ValueErrorIterator:()=>cn});l();l();var Mv={},IO=o(function(e,t,r,n,i){var a=new Worker(Mv[t]||(Mv[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(u){var c=u.data,m=c.$e$;if(m){var d=new Error(m[0]);d.code=m[1],d.stack=m[2],i(d,null)}else i(null,c)},a.postMessage(r,n),a},"wk"),st=Uint8Array,Or=Uint16Array,vs=Int32Array,Qa=new st([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]),eu=new st([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]),gs=new st([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_v=o(function(e,t){for(var r=new Or(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new vs(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},"freb"),Lv=_v(Qa,2),Af=Lv.b,em=Lv.r;Af[28]=258,em[258]=28;var Rv=_v(eu,0),Nv=Rv.b,If=Rv.r,ys=new Or(32768);for(Je=0;Je<32768;++Je)Fi=(Je&43690)>>1|(Je&21845)<<1,Fi=(Fi&52428)>>2|(Fi&13107)<<2,Fi=(Fi&61680)>>4|(Fi&3855)<<4,ys[Je]=((Fi&65280)>>8|(Fi&255)<<8)>>1;var Fi,Je,fn=o(function(e,t,r){for(var n=e.length,i=0,a=new Or(t);i<n;++i)e[i]&&++a[e[i]-1];var u=new Or(t);for(i=1;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;var c;if(r){c=new Or(1<<t);var m=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],f=t-e[i],g=u[e[i]-1]++<<f,v=g|(1<<f)-1;g<=v;++g)c[ys[g]>>m]=d}else for(c=new Or(n),i=0;i<n;++i)e[i]&&(c[i]=ys[u[e[i]-1]++]>>15-e[i]);return c},"hMap"),Oi=new st(288);for(Je=0;Je<144;++Je)Oi[Je]=8;var Je;for(Je=144;Je<256;++Je)Oi[Je]=9;var Je;for(Je=256;Je<280;++Je)Oi[Je]=7;var Je;for(Je=280;Je<288;++Je)Oi[Je]=8;var Je,Xa=new st(32);for(Je=0;Je<32;++Je)Xa[Je]=5;var Je,Uv=fn(Oi,9,0),jv=fn(Oi,9,1),zv=fn(Xa,5,0),$v=fn(Xa,5,1),Xl=o(function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},"max"),pn=o(function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},"bits"),Yl=o(function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},"bits16"),xs=o(function(e){return(e+7)/8|0},"shft"),so=o(function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new st(e.subarray(t,r))},"slc"),im={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},Gv=["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"],St=o(function(e,t,r){var n=new Error(t||Gv[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,St),!r)throw n;return n},"err"),Zv=o(function(e,t,r,n){var i=e.length,a=n?n.length:0;if(!i||t.f&&!t.l)return r||new st(0);var u=!r,c=u||t.i!=2,m=t.i;u&&(r=new st(i*3));var d=o(function(P){var oe=r.length;if(P>oe){var X=new st(Math.max(oe*2,P));X.set(r),r=X}},"cbuf"),f=t.f||0,g=t.p||0,v=t.b||0,b=t.l,S=t.d,F=t.m,E=t.n,x=i*8;do{if(!b){f=pn(e,g,1);var D=pn(e,g+1,3);if(g+=3,D)if(D==1)b=jv,S=$v,F=9,E=5;else if(D==2){var V=pn(e,g,31)+257,$=pn(e,g+10,15)+4,T=V+pn(e,g+5,31)+1;g+=14;for(var w=new st(T),L=new st(19),_=0;_<$;++_)L[gs[_]]=pn(e,g+_*3,7);g+=$*3;for(var G=Xl(L),ie=(1<<G)-1,Q=fn(L,G,1),_=0;_<T;){var le=Q[pn(e,g,ie)];g+=le&15;var I=le>>4;if(I<16)w[_++]=I;else{var Z=0,Y=0;for(I==16?(Y=3+pn(e,g,3),g+=2,Z=w[_-1]):I==17?(Y=3+pn(e,g,7),g+=3):I==18&&(Y=11+pn(e,g,127),g+=7);Y--;)w[_++]=Z}}var ee=w.subarray(0,V),q=w.subarray(V);F=Xl(ee),E=Xl(q),b=fn(ee,F,1),S=fn(q,E,1)}else St(1);else{var I=xs(g)+4,C=e[I-4]|e[I-3]<<8,k=I+C;if(k>i){m&&St(0);break}c&&d(v+C),r.set(e.subarray(I,k),v),t.b=v+=C,t.p=g=k*8,t.f=f;continue}if(g>x){m&&St(0);break}}c&&d(v+131072);for(var ce=(1<<F)-1,Ie=(1<<E)-1,Te=g;;Te=g){var Z=b[Yl(e,g)&ce],We=Z>>4;if(g+=Z&15,g>x){m&&St(0);break}if(Z||St(2),We<256)r[v++]=We;else if(We==256){Te=g,b=null;break}else{var He=We-254;if(We>264){var _=We-257,Fe=Qa[_];He=pn(e,g,(1<<Fe)-1)+Af[_],g+=Fe}var it=S[Yl(e,g)&Ie],jt=it>>4;it||St(3),g+=it&15;var q=Nv[jt];if(jt>3){var Fe=eu[jt];q+=Yl(e,g)&(1<<Fe)-1,g+=Fe}if(g>x){m&&St(0);break}c&&d(v+131072);var qt=v+He;if(v<q){var O=a-q,J=Math.min(q,qt);for(O+v<0&&St(3);v<J;++v)r[v]=n[O+v]}for(;v<qt;++v)r[v]=r[v-q]}}t.l=b,t.p=Te,t.b=v,t.f=f,b&&(f=1,t.m=F,t.d=S,t.n=E)}while(!f);return v!=r.length&&u?so(r,0,v):r.subarray(0,v)},"inflt"),ti=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},"wbits"),qa=o(function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},"wbits16"),Ql=o(function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,a=r.slice();if(!i)return{t:Of,l:0};if(i==1){var u=new st(r[0].s+1);return u[r[0].s]=1,{t:u,l:1}}r.sort(function(k,V){return k.f-V.f}),r.push({s:-1,f:25001});var c=r[0],m=r[1],d=0,f=1,g=2;for(r[0]={s:-1,f:c.f+m.f,l:c,r:m};f!=i-1;)c=r[r[d].f<r[g].f?d++:g++],m=r[d!=f&&r[d].f<r[g].f?d++:g++],r[f++]={s:-1,f:c.f+m.f,l:c,r:m};for(var v=a[0].s,n=1;n<i;++n)a[n].s>v&&(v=a[n].s);var b=new Or(v+1),S=tm(r[f-1],b,0);if(S>t){var n=0,F=0,E=S-t,x=1<<E;for(a.sort(function(V,$){return b[$.s]-b[V.s]||V.f-$.f});n<i;++n){var D=a[n].s;if(b[D]>t)F+=x-(1<<S-b[D]),b[D]=t;else break}for(F>>=E;F>0;){var I=a[n].s;b[I]<t?F-=1<<t-b[I]++-1:++n}for(;n>=0&&F;--n){var C=a[n].s;b[C]==t&&(--b[C],++F)}S=t}return{t:new st(b),l:S}},"hTree"),tm=o(function(e,t,r){return e.s==-1?Math.max(tm(e.l,t,r+1),tm(e.r,t,r+1)):t[e.s]=r},"ln"),Df=o(function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Or(++t),n=0,i=e[0],a=1,u=o(function(m){r[n++]=m},"w"),c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(i),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(i);a=1,i=e[c]}return{c:r.subarray(0,n),n:t}},"lc"),Ja=o(function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},"clen"),Ff=o(function(e,t,r){var n=r.length,i=xs(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<n;++a)e[i+a+4]=r[a];return(i+4+n)*8},"wfblk"),Sf=o(function(e,t,r,n,i,a,u,c,m,d,f){ti(t,f++,r),++i[256];for(var g=Ql(i,15),v=g.t,b=g.l,S=Ql(a,15),F=S.t,E=S.l,x=Df(v),D=x.c,I=x.n,C=Df(F),k=C.c,V=C.n,$=new Or(19),T=0;T<D.length;++T)++$[D[T]&31];for(var T=0;T<k.length;++T)++$[k[T]&31];for(var w=Ql($,7),L=w.t,_=w.l,G=19;G>4&&!L[gs[G-1]];--G);var ie=d+5<<3,Q=Ja(i,Oi)+Ja(a,Xa)+u,le=Ja(i,v)+Ja(a,F)+u+14+3*G+Ja($,L)+2*$[16]+3*$[17]+7*$[18];if(m>=0&&ie<=Q&&ie<=le)return Ff(t,f,e.subarray(m,m+d));var Z,Y,ee,q;if(ti(t,f,1+(le<Q)),f+=2,le<Q){Z=fn(v,b,0),Y=v,ee=fn(F,E,0),q=F;var ce=fn(L,_,0);ti(t,f,I-257),ti(t,f+5,V-1),ti(t,f+10,G-4),f+=14;for(var T=0;T<G;++T)ti(t,f+3*T,L[gs[T]]);f+=3*G;for(var Ie=[D,k],Te=0;Te<2;++Te)for(var We=Ie[Te],T=0;T<We.length;++T){var He=We[T]&31;ti(t,f,ce[He]),f+=L[He],He>15&&(ti(t,f,We[T]>>5&127),f+=We[T]>>12)}}else Z=Uv,Y=Oi,ee=zv,q=Xa;for(var T=0;T<c;++T){var Fe=n[T];if(Fe>255){var He=Fe>>18&31;qa(t,f,Z[He+257]),f+=Y[He+257],He>7&&(ti(t,f,Fe>>23&31),f+=Qa[He]);var it=Fe&31;qa(t,f,ee[it]),f+=q[it],it>3&&(qa(t,f,Fe>>5&8191),f+=eu[it])}else qa(t,f,Z[Fe]),f+=Y[Fe]}return qa(t,f,Z[256]),f+Y[256]},"wblk"),Vv=new vs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Of=new st(0),Wv=o(function(e,t,r,n,i,a){var u=a.z||e.length,c=new st(n+u+5*(1+Math.ceil(u/7e3))+i),m=c.subarray(n,c.length-i),d=a.l,f=(a.r||0)&7;if(t){f&&(m[0]=a.r>>3);for(var g=Vv[t-1],v=g>>13,b=g&8191,S=(1<<r)-1,F=a.p||new Or(32768),E=a.h||new Or(S+1),x=Math.ceil(r/3),D=2*x,I=o(function(te){return(e[te]^e[te+1]<<x^e[te+2]<<D)&S},"hsh"),C=new vs(25e3),k=new Or(288),V=new Or(32),$=0,T=0,w=a.i||0,L=0,_=a.w||0,G=0;w+2<u;++w){var ie=I(w),Q=w&32767,le=E[ie];if(F[Q]=le,E[ie]=Q,_<=w){var Z=u-w;if(($>7e3||L>24576)&&(Z>423||!d)){f=Sf(e,m,0,C,k,V,T,L,G,w-G,f),L=$=T=0,G=w;for(var Y=0;Y<286;++Y)k[Y]=0;for(var Y=0;Y<30;++Y)V[Y]=0}var ee=2,q=0,ce=b,Ie=Q-le&32767;if(Z>2&&ie==I(w-Ie))for(var Te=Math.min(v,Z)-1,We=Math.min(32767,w),He=Math.min(258,Z);Ie<=We&&--ce&&Q!=le;){if(e[w+ee]==e[w+ee-Ie]){for(var Fe=0;Fe<He&&e[w+Fe]==e[w+Fe-Ie];++Fe);if(Fe>ee){if(ee=Fe,q=Ie,Fe>Te)break;for(var it=Math.min(Ie,Fe-2),jt=0,Y=0;Y<it;++Y){var qt=w-Ie+Y&32767,O=F[qt],J=qt-O&32767;J>jt&&(jt=J,le=qt)}}}Q=le,le=F[Q],Ie+=Q-le&32767}if(q){C[L++]=268435456|em[ee]<<18|If[q];var P=em[ee]&31,oe=If[q]&31;T+=Qa[P]+eu[oe],++k[257+P],++V[oe],_=w+ee,++$}else C[L++]=e[w],++k[e[w]]}}for(w=Math.max(w,_);w<u;++w)C[L++]=e[w],++k[e[w]];f=Sf(e,m,d,C,k,V,T,L,G,w-G,f),d||(a.r=f&7|m[f/8|0]<<3,f-=7,a.h=E,a.p=F,a.i=w,a.w=_)}else{for(var w=a.w||0;w<u+d;w+=65535){var X=w+65535;X>=u&&(m[f/8|0]=d,X=u),f=Ff(m,f+1,e.subarray(w,X))}a.i=u}return so(c,0,n+xs(f)+i)},"dflt"),DO=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),Hv=o(function(){var e=-1;return{p:o(function(t){for(var r=e,n=0;n<t.length;++n)r=DO[r&255^t[n]]^r>>>8;e=r},"p"),d:o(function(){return~e},"d")}},"crc");var Kv=o(function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),u=new st(a.length+e.length);u.set(a),u.set(e,a.length),e=u,i.w=a.length}return Wv(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,i)},"dopt"),om=o(function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},"mrg"),Tv=o(function(e,t,r){for(var n=e(),i=e.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),u=0;u<n.length;++u){var c=n[u],m=a[u];if(typeof c=="function"){t+=";"+m+"=";var d=c.toString();if(c.prototype)if(d.indexOf("[native code]")!=-1){var f=d.indexOf(" ",8)+1;t+=d.slice(f,d.indexOf("(",f))}else{t+=d;for(var g in c.prototype)t+=";"+m+".prototype."+g+"="+c.prototype[g].toString()}else t+=d}else r[m]=c}return t},"wcln"),Jl=[],SO=o(function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t},"cbfs"),wO=o(function(e,t,r,n){if(!Jl[r]){for(var i="",a={},u=e.length-1,c=0;c<u;++c)i=Tv(e[c],i,a);Jl[r]={c:Tv(e[u],i,a),e:a}}var m=om({},Jl[r].e);return IO(Jl[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,m,SO(m),n)},"wrkr"),AO=o(function(){return[st,Or,vs,Qa,eu,gs,Af,Nv,jv,$v,ys,Gv,fn,Xl,pn,Yl,xs,so,St,Zv,sm,am,qv]},"bInflt"),FO=o(function(){return[st,Or,vs,Qa,eu,gs,em,If,Uv,Oi,zv,Xa,ys,Vv,Of,fn,ti,qa,Ql,tm,Df,Ja,Ff,Sf,xs,so,Wv,Kv,um,am]},"bDflt");var am=o(function(e){return postMessage(e,[e.buffer])},"pbf"),qv=o(function(e){return e&&{out:e.size&&new st(e.size),dictionary:e.dictionary}},"gopt"),Jv=o(function(e,t,r,n,i,a){var u=wO(r,n,i,function(c,m){u.terminate(),a(c,m)});return u.postMessage([e,t],t.consume?[e.buffer]:[]),function(){u.terminate()}},"cbify");var An=o(function(e,t){return e[t]|e[t+1]<<8},"b2"),sr=o(function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},"b4"),Cf=o(function(e,t){return sr(e,t)+sr(e,t+4)*4294967296},"b8"),ur=o(function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},"wbytes");function OO(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),Jv(e,t,[FO],function(n){return am(um(n.data[0],n.data[1]))},0,r)}o(OO,"deflate");function um(e,t){return Kv(e,t||{},0,0)}o(um,"deflateSync");function PO(e,t,r){return r||(r=t,t={}),typeof r!="function"&&St(7),Jv(e,t,[AO],function(n){return am(sm(n.data[0],qv(n.data[1])))},1,r)}o(PO,"inflate");function sm(e,t){return Zv(e,{i:2},t&&t.out,t&&t.dictionary)}o(sm,"inflateSync");var Pf=o(function(e,t,r,n){for(var i in e){var a=e[i],u=t+i,c=n;Array.isArray(a)&&(c=om(n,a[1]),a=a[0]),a instanceof st?r[u]=[a,c]:(r[u+="/"]=[new st(0),c],Pf(a,u,r,n))}},"fltn"),kv=typeof TextEncoder<"u"&&new TextEncoder,wf=typeof TextDecoder<"u"&&new TextDecoder,BO=0;try{wf.decode(Of,{stream:!0}),BO=1}catch(e){}var MO=o(function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:so(e,r-1)};i?i==3?(n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):i&1?t+=String.fromCharCode((n&31)<<6|e[r++]&63):t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(n)}},"dutf8");function Ya(e,t){if(t){for(var r=new st(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(kv)return kv.encode(e);for(var i=e.length,a=new st(e.length+(e.length>>1)),u=0,c=o(function(f){a[u++]=f},"w"),n=0;n<i;++n){if(u+5>a.length){var m=new st(u+8+(i-n<<1));m.set(a),a=m}var d=e.charCodeAt(n);d<128||t?c(d):d<2048?(c(192|d>>6),c(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++n)&1023,c(240|d>>18),c(128|d>>12&63),c(128|d>>6&63),c(128|d&63)):(c(224|d>>12),c(128|d>>6&63),c(128|d&63))}return so(a,0,u)}o(Ya,"strToU8");function Bf(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}else{if(wf)return wf.decode(e);var i=MO(e),a=i.s,r=i.r;return r.length&&St(8),a}}o(Bf,"strFromU8");var Xv=o(function(e,t){return t+30+An(e,t+26)+An(e,t+28)},"slzh"),Yv=o(function(e,t,r){var n=An(e,t+28),i=Bf(e.subarray(t+46,t+46+n),!(An(e,t+8)&2048)),a=t+46+n,u=sr(e,t+20),c=r&&u==4294967295?TO(e,a):[u,sr(e,t+24),sr(e,t+42)],m=c[0],d=c[1],f=c[2];return[An(e,t+10),m,d,i,a+An(e,t+30)+An(e,t+32),f]},"zh"),TO=o(function(e,t){for(;An(e,t)!=1;t+=4+An(e,t+2));return[Cf(e,t+12),Cf(e,t+4),Cf(e,t+20)]},"z64e"),bs=o(function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&St(9),t+=n+4}return t},"exfl"),rm=o(function(e,t,r,n,i,a,u,c){var m=n.length,d=r.extra,f=c&&c.length,g=bs(d);ur(e,t,u!=null?33639248:67324752),t+=4,u!=null&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var v=new Date(r.mtime==null?Date.now():r.mtime),b=v.getFullYear()-1980;if((b<0||b>119)&&St(10),ur(e,t,b<<25|v.getMonth()+1<<21|v.getDate()<<16|v.getHours()<<11|v.getMinutes()<<5|v.getSeconds()>>1),t+=4,a!=-1&&(ur(e,t,r.crc),ur(e,t+4,a<0?-a-2:a),ur(e,t+8,r.size)),ur(e,t+12,m),ur(e,t+14,g),t+=16,u!=null&&(ur(e,t,f),ur(e,t+6,r.attrs),ur(e,t+10,u),t+=14),e.set(n,t),t+=m,g)for(var S in d){var F=d[S],E=F.length;ur(e,t,+S),ur(e,t+2,E),e.set(F,t+4),t+=4+E}return f&&(e.set(c,t),t+=f),t},"wzh"),Qv=o(function(e,t,r,n,i){ur(e,t,101010256),ur(e,t+8,r),ur(e,t+10,r),ur(e,t+12,n),ur(e,t+16,i)},"wzf");function ex(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n={};Pf(e,"",n,t);var i=Object.keys(n),a=i.length,u=0,c=0,m=a,d=new Array(a),f=[],g=o(function(){for(var E=0;E<f.length;++E)f[E]()},"tAll"),v=o(function(E,x){nm(function(){r(E,x)})},"cbd");nm(function(){v=r});var b=o(function(){var E=new st(c+22),x=u,D=c-u;c=0;for(var I=0;I<m;++I){var C=d[I];try{var k=C.c.length;rm(E,c,C,C.f,C.u,k);var V=30+C.f.length+bs(C.extra),$=c+V;E.set(C.c,$),rm(E,u,C,C.f,C.u,k,c,C.m),u+=16+V+(C.m?C.m.length:0),c=$+k}catch(T){return v(T,null)}}Qv(E,u,d.length,D,x),v(null,E)},"cbf");a||b();for(var S=o(function(E){var x=i[E],D=n[x],I=D[0],C=D[1],k=Hv(),V=I.length;k.p(I);var $=Ya(x),T=$.length,w=C.comment,L=w&&Ya(w),_=L&&L.length,G=bs(C.extra),ie=C.level==0?0:8,Q=o(function(le,Z){if(le)g(),v(le,null);else{var Y=Z.length;d[E]=om(C,{size:V,crc:k.d(),c:Z,f:$,m:L,u:T!=x.length||L&&w.length!=_,compression:ie}),u+=30+T+G+Y,c+=76+2*(T+G)+(_||0)+Y,--a||b()}},"cbl");if(T>65535&&Q(St(11,0,1),null),!ie)Q(null,I);else if(V<16e4)try{Q(null,um(I,C))}catch(le){Q(le,null)}else f.push(OO(I,C,Q))},"_loop_1"),F=0;F<m;++F)S(F);return g}o(ex,"zip");function tx(e,t){t||(t={});var r={},n=[];Pf(e,"",r,t);var i=0,a=0;for(var u in r){var c=r[u],m=c[0],d=c[1],f=d.level==0?0:8,g=Ya(u),v=g.length,b=d.comment,S=b&&Ya(b),F=S&&S.length,E=bs(d.extra);v>65535&&St(11);var x=f?um(m,d):m,D=x.length,I=Hv();I.p(m),n.push(om(d,{size:m.length,crc:I.d(),c:x,f:g,m:S,u:v!=u.length||S&&b.length!=F,o:i,compression:f})),i+=30+v+E+D,a+=76+2*(v+E)+(F||0)+D}for(var C=new st(a+22),k=i,V=a-i,$=0;$<n.length;++$){var g=n[$];rm(C,g.o,g,g.f,g.u,g.c.length);var T=30+g.f.length+bs(g.extra);C.set(g.c,g.o+T),rm(C,i,g,g.f,g.u,g.c.length,g.o,g.m),i+=16+T+(g.m?g.m.length:0)}return Qv(C,i,n.length,V,k),C}o(tx,"zipSync");var nm=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(e){e()};function rx(e,t,r){r||(r=t,t={}),typeof r!="function"&&St(7);var n=[],i=o(function(){for(var E=0;E<n.length;++E)n[E]()},"tAll"),a={},u=o(function(E,x){nm(function(){r(E,x)})},"cbd");nm(function(){u=r});for(var c=e.length-22;sr(e,c)!=101010256;--c)if(!c||e.length-c>65558)return u(St(13,0,1),null),i;var m=An(e,c+8);if(m){var d=m,f=sr(e,c+16),g=f==4294967295||d==65535;if(g){var v=sr(e,c-12);g=sr(e,v)==101075792,g&&(d=m=sr(e,v+32),f=sr(e,v+48))}for(var b=t&&t.filter,S=o(function(E){var x=Yv(e,f,g),D=x[0],I=x[1],C=x[2],k=x[3],V=x[4],$=x[5],T=Xv(e,$);f=V;var w=o(function(_,G){_?(i(),u(_,null)):(G&&(a[k]=G),--m||u(null,a))},"cbl");if(!b||b({name:k,size:I,originalSize:C,compression:D}))if(!D)w(null,so(e,T,T+I));else if(D==8){var L=e.subarray(T,T+I);if(C<524288||I>.8*C)try{w(null,sm(L,{out:new st(C)}))}catch(_){w(_,null)}else n.push(PO(L,{size:C},w))}else w(St(14,"unknown compression type "+D,1),null);else w(null,null)},"_loop_3"),F=0;F<d;++F)S(F)}else u(null,{});return i}o(rx,"unzip");function nx(e,t){for(var r={},n=e.length-22;sr(e,n)!=101010256;--n)(!n||e.length-n>65558)&&St(13);var i=An(e,n+8);if(!i)return{};var a=sr(e,n+16),u=a==4294967295||i==65535;if(u){var c=sr(e,n-12);u=sr(e,c)==101075792,u&&(i=sr(e,c+32),a=sr(e,c+48))}for(var m=t&&t.filter,d=0;d<i;++d){var f=Yv(e,a,u),g=f[0],v=f[1],b=f[2],S=f[3],F=f[4],E=f[5],x=Xv(e,E);a=F,(!m||m({name:S,size:v,originalSize:b,compression:g}))&&(g?g==8?r[S]=sm(e.subarray(x,x+v),{out:new st(b)}):St(14,"unknown compression type "+g):r[S]=so(e,x,x+v))}return r}o(nx,"unzipSync");l();var kO=o(e=>{if(e!=null)return e.trim()===""?void 0:e},"maybePath"),_O=o(e=>e!=null,"notNull"),cm=o((e,t,r=0)=>{var n;if(A.IsNull(e))return"null";if(A.IsUndefined(e))return"undefined";if(A.IsString(e))return"<string>";if(A.IsNumber(e))return"<number>";if(A.IsBoolean(e))return"<boolean>";if(A.IsLiteral(e))return typeof e.const=="string"?"'".concat(e.const,"'"):"".concat(e.const);if(A.IsRef(e)){let i=t.find(a=>a.$id===e.$ref);return i==null?e.$ref:cm(i,t,r)}if(A.IsArray(e))return"".concat(cm(e.items,t,r+1),"[]");if(A.IsUnion(e)&&(!(e.anyOf.length>5)||e.$id==null)){let a="".concat(e.anyOf.map(u=>cm(u,t,r+1)).filter(_O).join(" | "));return r>0?"(".concat(a,")"):a}return(n=e.$id)!=null?n:""},"resolveSchemaIdent"),LO=o((e,t,r)=>{var a;let n=t.message;A.IsUnion(t.schema)&&(n="Expected one of: ".concat(cm(t.schema,r)));let i="#/definitions/".concat(e).concat((a=kO(t.path))!=null?a:"");return"".concat(i,": ").concat(n)},"errorHandler"),lm=o((e,t,r)=>{let n=t.First();if(n!=null)return LO(e,n,r)},"shortError");var tu;(function(e){e.Archive="Archive",e.Validate="Validate",e.Encode="Encode",e.Unknown="Unknown"})(tu||(tu={}));var Mf=class Mf extends Error{constructor(r,n){super(n);h(this,"name");h(this,"kind");this.name="CompressError",this.kind=r}};o(Mf,"CompressError");var ru=Mf,RO=o(e=>new ru(tu.Archive,e.message),"flateErrorIntoCompressError"),NO=o(e=>{let t=Object.values(im);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),UO=o((e,t,r)=>{var n;return new ru(tu.Validate,(n=lm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoCompressError"),jO=o(e=>new ru(tu.Encode,e.message),"encodeErrorIntoCompressError"),zO=o(e=>new ru(tu.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoCompressError"),Es=o((e,t,r)=>t instanceof $o?jO(t):t instanceof cn?UO(e,t,r):NO(t)?RO(t):zO(t),"intoCompressError");l();var nu;(function(e){e.Unarchive="Unarchive",e.Validate="Validate",e.Decode="Decode",e.Unknown="Unknown"})(nu||(nu={}));var Tf=class Tf extends Error{constructor(r,n){super(n);h(this,"name");h(this,"kind");this.name="DecompressError",this.kind=r}};o(Tf,"DecompressError");var iu=Tf,$O=o(e=>new iu(nu.Unarchive,e.message),"flateErrorIntoDecompressError"),GO=o(e=>{let t=Object.values(im);return e instanceof Error&&"code"in e&&typeof e.code=="number"&&t.includes(e.code)},"isFlateError"),ZO=o((e,t,r)=>{var n;return new iu(nu.Validate,(n=lm(e,t,r))!=null?n:"Unknown validate error")},"checkErrorIntoDecompressError"),VO=o(e=>new iu(nu.Decode,e.message),"decodeErrorIntoDecompressError"),WO=o(e=>new iu(nu.Unknown,e instanceof Error?e.message:String(e)),"unknownErrorIntoDecompressError"),Cs=o((e,t,r)=>t instanceof zo?VO(t):t instanceof cn?ZO(e,t,r):GO(t)?$O(t):WO(t),"intoDecompressError");var ix=o(function*(e,t=""){if(e!=null){if(Array.isArray(e)){for(let r=0;r<e.length;r++)yield[t+"[".concat(r,"]"),e[r]];return}if("features"in e){for(let r=0;r<e.features.length;r++)yield[t===""?"features[".concat(r,"]"):"".concat(t,".features[").concat(r,"]"),e.features[r]];return}for(let[r,n]of Object.entries(e)){let i=t===""?r:"".concat(t,".").concat(r);yield*K(ix(n,i))}}},"iterRecord"),HO=o((e,t)=>e===""?t:t.startsWith("[")?"".concat(e).concat(t):"".concat(e,".").concat(t),"getPath"),Pt=o((e,t,r)=>{let n=new Set;for(let[i,a]of ix(e)){let u=t(a);if(n.has(u))return se({kind:Ur.DuplicateIdError,properties:{id:u,path:HO(r,i)}});n.add(u)}return ue(!0)},"ensureUniqueIds");var ox=o(e=>e.floors==null?se({kind:Ur.FloorMissingError,properties:null}):Pt(e.floors.features,t=>t.properties.id,"floors"),"validateFloors");var ax=p.Intersect([p.Object({id:p.Ref(_e),elevation:p.Integer({description:"An ordinal representing the elevation of this map relative to other maps in the stack."}),subtitle:p.Optional(p.String({description:"The subtitle of the floor."})),maxHeight:p.Optional(p.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}))}),Vr],{$id:"FloorProperties"}),ux=ir(p.Union([p.Ref(za),p.Ref($a),p.Null()]),p.Ref(ax),{$id:"FloorFeature"}),sx=Fr(p.Ref(ux),{$id:"FloorCollection"}),KO=p.Object({floors:p.Ref(sx)}),cx={name:"core:floors",intoBundle:o(function*(e){e.floors!=null&&(yield{path:"floors.geojson",contents:e.floors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="floors.geojson")return{floors:r(t)}},"fromBundle"),integrityCheck:ox,schema:KO,references:[ax,ux,sx]};l();l();var Bt=o(e=>p.Unsafe(e),"PartialRecord");l();var Qe=o(e=>Object.keys(e),"typedKeys");l();l();var qO=o(e=>{var t,r;return new Map((r=(t=e.floors)==null?void 0:t.features.map(n=>[n.properties.id,n]))!=null?r:[])},"createFloorMap"),Fn=o(e=>{let t=qO(e);return o(n=>{let i=t.get(n);return i==null?se({kind:Ur.UnknownFloorError,properties:{floorId:n}}):ue(i)},"floorLookup")},"createFloorLookup");var lx=o(e=>{if(e.floors==null)return se({kind:Ur.FloorMissingError,properties:null});if(e.geometry==null)return se({kind:Ur.GeometryMissingError,properties:null});let t=Pt(e.geometry,n=>n.properties.id,"geometry");if(t.isErr())return t;let r=Fn(e);for(let n of Qe(e.geometry)){let i=r(n);if(i.isErr())return i}return ue(!0)},"validateGeometry");var mx=p.Intersect([p.Object({id:p.Ref(gr)}),Vr],{$id:"GeometryProperties"}),dx=ir(p.Union([p.Ref(hr),p.Ref(Al),p.Ref(Fl),p.Ref(Ol),p.Ref(za),p.Ref($a)]),p.Ref(mx),{$id:"GeometryFeature"}),px=Fr(p.Ref(dx),{$id:"GeometryCollection"}),JO=p.Object({geometry:Bt(p.Record(_e,p.Ref(px),{additionalProperties:!1}))},{$id:"GeometrySchema"}),XO=/^geometry\/(.*)\.geojson$/,fx={name:"core:geometry",schema:JO,intoBundle:o(function*(e){if(e.geometry!=null)for(let t of Qe(e.geometry))yield{path:"geometry/".concat(t,".geojson"),contents:e.geometry[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(XO))==null?void 0:i[1];if(n)return{geometry:{[n]:r(t)}}},"fromBundle"),references:[mx,dx,px],integrityCheck:lx};l();var kf=p.Object({type:p.Literal("file"),name:p.String({description:"The name of the file."})},{$id:"ManifestFile"}),hx=p.Recursive(e=>p.Object({type:p.Literal("folder"),name:p.String({description:"The name of the folder."}),children:p.Array(p.Union([e,p.Ref(kf)]),{minItems:1,description:"The children of the folder."})}),{$id:"ManifestFolder"}),gx=p.Object({name:p.String({description:"The name of the map."}),version:p.Literal("3.0.0",{description:"The version of the manifest."}),orgId:p.Optional(p.String({description:"The identifier of the organization that the map this MVF is for belongs to."})),mapId:p.Optional(p.String({description:"The identifier of the map that this MVF is for."})),contents:p.Array(p.Union([p.Ref(hx),p.Ref(kf)]),{minItems:1,description:"The contents of the MVF bundle."}),time:p.String({format:"date-time",description:"An ISO 8601 date-time string, including timezone offset."}),tzid:p.Optional(p.Unsafe(p.String({description:"A valid IANA timezone identifier.",pattern:"^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$"}))),naturalBearing:p.Optional(p.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:p.Optional(p.Ref(_e,{description:"The default floor ID of the map."})),language:p.Optional(p.String({description:"The language code of the map."}))},{$id:"ManifestProperties"}),yx=Fr(ir(hr,p.Ref(gx)),{$id:"ManifestCollection"},{minItems:1,maxItems:1}),YO=p.Object({manifest:p.Ref(yx)}),bx={name:"core:manifest",intoBundle:o(function*(e){e.manifest!=null&&(yield{path:"manifest.geojson",contents:e.manifest})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="manifest.geojson")return{manifest:r(t)}},"fromBundle"),schema:YO,references:[kf,hx,gx,yx]};l();l();l();l();var Lf=class Lf extends he{constructor(r){super("Unable to dereference schema with $id '".concat(r.$ref,"'"));h(this,"schema");this.schema=r}};o(Lf,"TypeDereferenceError");var _f=Lf;function QO(e,t){let r=t.find(n=>n.$id===e.$ref);if(r===void 0)throw new _f(e);return Zo(r,t)}o(QO,"Resolve");function mm(e,t){return!Le.IsString(e.$id)||t.some(r=>r.$id===e.$id)||t.push(e),t}o(mm,"Pushref");function Zo(e,t){return e[N]==="This"||e[N]==="Ref"?QO(e,t):e}o(Zo,"Deref");l();function e7(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=ei(t,r);return e.set(t,i),i}o(e7,"HasTransformCached");function dm(){let e=new WeakMap;return{HasTransform:o((t,r)=>e7(e,t,r),"HasTransform")}}o(dm,"CreateTransformCache");function wt(e,t,r){try{return A.IsTransform(e)?e[yt].Decode(r):r}catch(n){throw new zo(e,t,r,n)}}o(wt,"Default");function t7(e,t,r,n,i){return Le.IsArray(n)?wt(e,r,n.map((a,u)=>ri(e.items,t,"".concat(r,"/").concat(u),a,i))):wt(e,r,n)}o(t7,"FromArray");function r7(e,t,r,n,i){if(!Le.IsObject(n)||nr(n))return wt(e,r,n);let a=io(e),u=a.map(g=>g[0]),c=U({},n);for(let[g,v]of a)g in c&&(c[g]=ri(v,t,"".concat(r,"/").concat(g),c[g],i));if(!A.IsTransform(e.unevaluatedProperties))return wt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.unevaluatedProperties,f=U({},c);for(let g of m)u.includes(g)||(f[g]=wt(d,"".concat(r,"/").concat(g),f[g]));return wt(e,r,f)}o(r7,"FromIntersect");function n7(e,t,r,n,i){return wt(e,r,ri(e.not,t,r,n,i))}o(n7,"FromNot");function i7(e,t,r,n,i){if(!Le.IsObject(n))return wt(e,r,n);let a=Jt(e),u=U({},n);for(let f of a)Le.HasPropertyKey(u,f)&&(Le.IsUndefined(u[f])&&(!A.IsUndefined(e.properties[f])||Ye.IsExactOptionalProperty(u,f))||(u[f]=ri(e.properties[f],t,"".concat(r,"/").concat(f),u[f],i)));if(!A.IsSchema(e.additionalProperties))return wt(e,r,u);let c=Object.getOwnPropertyNames(u),m=e.additionalProperties,d=U({},u);for(let f of c)a.includes(f)||(d[f]=wt(m,"".concat(r,"/").concat(f),d[f]));return wt(e,r,d)}o(i7,"FromObject");function o7(e,t,r,n,i){if(!Le.IsObject(n))return wt(e,r,n);let a=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(a),c=U({},n);for(let g of Object.getOwnPropertyNames(n))u.test(g)&&(c[g]=ri(e.patternProperties[a],t,"".concat(r,"/").concat(g),c[g],i));if(!A.IsSchema(e.additionalProperties))return wt(e,r,c);let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=U({},c);for(let g of m)u.test(g)||(f[g]=wt(d,"".concat(r,"/").concat(g),f[g]));return wt(e,r,f)}o(o7,"FromRecord");function a7(e,t,r,n,i){let a=Zo(e,t);return wt(e,r,ri(a,t,r,n,i))}o(a7,"FromRef");function u7(e,t,r,n,i){let a=Zo(e,t);return wt(e,r,ri(a,t,r,n,i))}o(u7,"FromThis");function s7(e,t,r,n,i){return Le.IsArray(n)&&Le.IsArray(e.items)?wt(e,r,e.items.map((a,u)=>ri(a,t,"".concat(r,"/").concat(u),n[u],i))):wt(e,r,n)}o(s7,"FromTuple");function c7(e,t,r,n,i){for(let a of e.anyOf){if(!dn.Check(a,t,n))continue;let u=ri(a,t,r,n,i);return wt(e,r,u)}return wt(e,r,n)}o(c7,"FromUnion");function ri(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=mm(e,t),u=e;switch(e[N]){case"Array":return t7(u,a,r,n,i);case"Intersect":return r7(u,a,r,n,i);case"Not":return n7(u,a,r,n,i);case"Object":return i7(u,a,r,n,i);case"Record":return o7(u,a,r,n,i);case"Ref":return a7(u,a,r,n,i);case"Symbol":return wt(u,r,n);case"This":return u7(u,a,r,n,i);case"Tuple":return s7(u,a,r,n,i);case"Union":return c7(u,a,r,n,i);default:return wt(u,r,n)}}o(ri,"Visit");function vx(e,t,r){let n=dm();return ri(e,t,"",r,n)}o(vx,"FastTransformDecode");l();function vr(e,t,r){try{return A.IsTransform(e)?e[yt].Encode(r):r}catch(n){throw new $o(e,t,r,n)}}o(vr,"Default");function l7(e,t,r,n,i){let a=vr(e,r,n);return Le.IsArray(a)?a.map((u,c)=>ni(e.items,t,"".concat(r,"/").concat(c),u,i)):a}o(l7,"FromArray");function m7(e,t,r,n,i){let a=vr(e,r,n);if(!Le.IsObject(n)||nr(n))return a;let u=io(e),c=u.map(v=>v[0]),m=U({},a);for(let[v,b]of u)v in m&&(m[v]=ni(b,t,"".concat(r,"/").concat(v),m[v],i));if(!A.IsTransform(e.unevaluatedProperties))return m;let d=Object.getOwnPropertyNames(m),f=e.unevaluatedProperties,g=U({},m);for(let v of d)c.includes(v)||(g[v]=vr(f,"".concat(r,"/").concat(v),g[v]));return g}o(m7,"FromIntersect");function d7(e,t,r,n){return vr(e.not,r,vr(e,r,n))}o(d7,"FromNot");function p7(e,t,r,n,i){let a=vr(e,r,n);if(!Le.IsObject(a))return a;let u=Jt(e),c=U({},a);for(let g of u)Le.HasPropertyKey(c,g)&&(Le.IsUndefined(c[g])&&(!A.IsUndefined(e.properties[g])||Ye.IsExactOptionalProperty(c,g))||(c[g]=ni(e.properties[g],t,"".concat(r,"/").concat(g),c[g],i)));if(!A.IsSchema(e.additionalProperties))return c;let m=Object.getOwnPropertyNames(c),d=e.additionalProperties,f=U({},c);for(let g of m)u.includes(g)||(f[g]=vr(d,"".concat(r,"/").concat(g),f[g]));return f}o(p7,"FromObject");function f7(e,t,r,n,i){let a=vr(e,r,n);if(!Le.IsObject(n))return a;let u=Object.getOwnPropertyNames(e.patternProperties)[0],c=new RegExp(u),m=U({},a);for(let v of Object.getOwnPropertyNames(n))c.test(v)&&(m[v]=ni(e.patternProperties[u],t,"".concat(r,"/").concat(v),m[v],i));if(!A.IsSchema(e.additionalProperties))return m;let d=Object.getOwnPropertyNames(m),f=e.additionalProperties,g=U({},m);for(let v of d)c.test(v)||(g[v]=vr(f,"".concat(r,"/").concat(v),g[v]));return g}o(f7,"FromRecord");function h7(e,t,r,n,i){let a=Zo(e,t),u=ni(a,t,r,n,i);return vr(e,r,u)}o(h7,"FromRef");function g7(e,t,r,n,i){let a=Zo(e,t),u=ni(a,t,r,n,i);return vr(e,r,u)}o(g7,"FromThis");function y7(e,t,r,n,i){let a=vr(e,r,n);return Le.IsArray(e.items)?e.items.map((u,c)=>ni(u,t,"".concat(r,"/").concat(c),a[c],i)):[]}o(y7,"FromTuple");function b7(e,t,r,n,i){for(let a of e.anyOf){if(!dn.Check(a,t,n))continue;let u=ni(a,t,r,n,i);return vr(e,r,u)}for(let a of e.anyOf){let u=ni(a,t,r,n,i);if(dn.Check(e,t,u))return vr(e,r,u)}return vr(e,r,n)}o(b7,"FromUnion");function ni(e,t,r,n,i){if(!i.HasTransform(e,t))return n;let a=mm(e,t),u=e;switch(e[N]){case"Array":return l7(u,a,r,n,i);case"Intersect":return m7(u,a,r,n,i);case"Not":return d7(u,a,r,n);case"Object":return p7(u,a,r,n,i);case"Record":return f7(u,a,r,n,i);case"Ref":return h7(u,a,r,n,i);case"This":return g7(u,a,r,n,i);case"Tuple":return y7(u,a,r,n,i);case"Union":return b7(u,a,r,n,i);default:return vr(u,r,n)}}o(ni,"Visit");function xx(e,t,r){let n=dm();return ni(e,t,"",r,n)}o(xx,"FastTransformEncode");l();var zf=class zf{constructor(t,r,n,i){this.schema=t,this.references=r,this.checkFunc=n,this.code=i,this.hasTransform=ei(t,r)}Code(){return this.code}Errors(t){return qn(this.schema,this.references,t)}Check(t){return this.checkFunc(t)}Decode(t){if(!this.checkFunc(t))throw new Wa(this.schema,t,this.Errors(t).First());return this.hasTransform?Ha(this.schema,this.references,t):t}Encode(t){let r=this.hasTransform?$l(this.schema,this.references,t):t;if(!this.checkFunc(r))throw new Ka(this.schema,t,this.Errors(t).First());return r}};o(zf,"TypeCheck");var Rf=zf,Pi;(function(e){function t(a){return a===36}o(t,"DollarSign"),e.DollarSign=t;function r(a){return a===95}o(r,"IsUnderscore"),e.IsUnderscore=r;function n(a){return a>=65&&a<=90||a>=97&&a<=122}o(n,"IsAlpha"),e.IsAlpha=n;function i(a){return a>=48&&a<=57}o(i,"IsNumeric"),e.IsNumeric=i})(Pi||(Pi={}));var pm;(function(e){function t(a){return a.length===0?!1:Pi.IsNumeric(a.charCodeAt(0))}o(t,"IsFirstCharacterNumeric");function r(a){if(t(a))return!1;for(let u=0;u<a.length;u++){let c=a.charCodeAt(u);if(!(Pi.IsAlpha(c)||Pi.IsNumeric(c)||Pi.DollarSign(c)||Pi.IsUnderscore(c)))return!1}return!0}o(r,"IsAccessor");function n(a){return a.replace(/'/g,"\\'")}o(n,"EscapeHyphen");function i(a,u){return r(u)?"".concat(a,".").concat(u):"".concat(a,"['").concat(n(u),"']")}o(i,"Encode"),e.Encode=i})(pm||(pm={}));var Nf;(function(e){function t(r){let n=[];for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);Pi.IsNumeric(a)||Pi.IsAlpha(a)?n.push(r.charAt(i)):n.push("_".concat(a,"_"))}return n.join("").replace(/__/g,"_")}o(t,"Encode"),e.Encode=t})(Nf||(Nf={}));var Uf;(function(e){function t(r){return r.replace(/'/g,"\\'")}o(t,"Escape"),e.Escape=t})(Uf||(Uf={}));var $f=class $f extends he{constructor(t){super("Unknown type"),this.schema=t}};o($f,"TypeCompilerUnknownTypeError");var jf=$f,Gf=class Gf extends he{constructor(t){super("Preflight validation check failed to guard for the given schema"),this.schema=t}};o(Gf,"TypeCompilerTypeGuardError");var fm=Gf,Vo;(function(e){function t(u,c,m){return Ye.ExactOptionalPropertyTypes?"('".concat(c,"' in ").concat(u," ? ").concat(m," : true)"):"(".concat(pm.Encode(u,c)," !== undefined ? ").concat(m," : true)")}o(t,"IsExactOptionalProperty"),e.IsExactOptionalProperty=t;function r(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null)"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,"))")}o(r,"IsObjectLike"),e.IsObjectLike=r;function n(u){return Ye.AllowArrayObject?"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))"):"(typeof ".concat(u," === 'object' && ").concat(u," !== null && !Array.isArray(").concat(u,") && !(").concat(u," instanceof Date) && !(").concat(u," instanceof Uint8Array))")}o(n,"IsRecordLike"),e.IsRecordLike=n;function i(u){return Ye.AllowNaN?"typeof ".concat(u," === 'number'"):"Number.isFinite(".concat(u,")")}o(i,"IsNumberLike"),e.IsNumberLike=i;function a(u){return Ye.AllowNullVoid?"(".concat(u," === undefined || ").concat(u," === null)"):"".concat(u," === undefined")}o(a,"IsVoidLike"),e.IsVoidLike=a})(Vo||(Vo={}));var hm;(function(e){function t(O){return O[N]==="Any"||O[N]==="Unknown"}o(t,"IsAnyOrUnknown");function*r(O,J,P){yield"true"}o(r,"FromAny");function*n(O,J,P){yield"Array.isArray(".concat(P,")");let[oe,X]=[He("value","any"),He("acc","number")];pe(O.maxItems)&&(yield"".concat(P,".length <= ").concat(O.maxItems)),pe(O.minItems)&&(yield"".concat(P,".length >= ").concat(O.minItems));let te=ce(O.items,J,"value");if(yield"".concat(P,".every((").concat(oe,") => ").concat(te,")"),Ne(O.contains)||pe(O.minContains)||pe(O.maxContains)){let De=Ne(O.contains)?O.contains:tt(),vt=ce(De,J,"value"),Ir=pe(O.minContains)?["(count >= ".concat(O.minContains,")")]:[],fe=pe(O.maxContains)?["(count <= ".concat(O.maxContains,")")]:[],me="const count = value.reduce((".concat(X,", ").concat(oe,") => ").concat(vt," ? acc + 1 : acc, 0)"),ht=["(count > 0)",...Ir,...fe].join(" && ");yield"((".concat(oe,") => { ").concat(me,"; return ").concat(ht,"})(").concat(P,")")}if(O.uniqueItems===!0){let vt="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(oe,") => { ").concat(vt," )(").concat(P,")")}}o(n,"FromArray");function*i(O,J,P){yield"(typeof value === 'object' && Symbol.asyncIterator in ".concat(P,")")}o(i,"FromAsyncIterator");function*a(O,J,P){yield"(typeof ".concat(P," === 'bigint')"),rr(O.exclusiveMaximum)&&(yield"".concat(P," < BigInt(").concat(O.exclusiveMaximum,")")),rr(O.exclusiveMinimum)&&(yield"".concat(P," > BigInt(").concat(O.exclusiveMinimum,")")),rr(O.maximum)&&(yield"".concat(P," <= BigInt(").concat(O.maximum,")")),rr(O.minimum)&&(yield"".concat(P," >= BigInt(").concat(O.minimum,")")),rr(O.multipleOf)&&(yield"(".concat(P," % BigInt(").concat(O.multipleOf,")) === 0"))}o(a,"FromBigInt");function*u(O,J,P){yield"(typeof ".concat(P," === 'boolean')")}o(u,"FromBoolean");function*c(O,J,P){yield*K(ee(O.returns,J,"".concat(P,".prototype")))}o(c,"FromConstructor");function*m(O,J,P){yield"(".concat(P," instanceof Date) && Number.isFinite(").concat(P,".getTime())"),pe(O.exclusiveMaximumTimestamp)&&(yield"".concat(P,".getTime() < ").concat(O.exclusiveMaximumTimestamp)),pe(O.exclusiveMinimumTimestamp)&&(yield"".concat(P,".getTime() > ").concat(O.exclusiveMinimumTimestamp)),pe(O.maximumTimestamp)&&(yield"".concat(P,".getTime() <= ").concat(O.maximumTimestamp)),pe(O.minimumTimestamp)&&(yield"".concat(P,".getTime() >= ").concat(O.minimumTimestamp)),pe(O.multipleOfTimestamp)&&(yield"(".concat(P,".getTime() % ").concat(O.multipleOfTimestamp,") === 0"))}o(m,"FromDate");function*d(O,J,P){yield"(typeof ".concat(P," === 'function')")}o(d,"FromFunction");function*f(O,J,P){yield"Number.isInteger(".concat(P,")"),pe(O.exclusiveMaximum)&&(yield"".concat(P," < ").concat(O.exclusiveMaximum)),pe(O.exclusiveMinimum)&&(yield"".concat(P," > ").concat(O.exclusiveMinimum)),pe(O.maximum)&&(yield"".concat(P," <= ").concat(O.maximum)),pe(O.minimum)&&(yield"".concat(P," >= ").concat(O.minimum)),pe(O.multipleOf)&&(yield"(".concat(P," % ").concat(O.multipleOf,") === 0"))}o(f,"FromInteger");function*g(O,J,P){let oe=O.allOf.map(X=>ce(X,J,P)).join(" && ");if(O.unevaluatedProperties===!1){let X=Te("".concat(new RegExp(Ii(O)),";")),te="Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(X,".test(key))");yield"(".concat(oe," && ").concat(te,")")}else if(Ne(O.unevaluatedProperties)){let X=Te("".concat(new RegExp(Ii(O)),";")),te="Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(X,".test(key) || ").concat(ce(O.unevaluatedProperties,J,"".concat(P,"[key]")),")");yield"(".concat(oe," && ").concat(te,")")}else yield"(".concat(oe,")")}o(g,"FromIntersect");function*v(O,J,P){yield"(typeof value === 'object' && Symbol.iterator in ".concat(P,")")}o(v,"FromIterator");function*b(O,J,P){typeof O.const=="number"||typeof O.const=="boolean"?yield"(".concat(P," === ").concat(O.const,")"):yield"(".concat(P," === '").concat(Uf.Escape(O.const),"')")}o(b,"FromLiteral");function*S(O,J,P){yield"false"}o(S,"FromNever");function*F(O,J,P){let oe=ce(O.not,J,P);yield"(!".concat(oe,")")}o(F,"FromNot");function*E(O,J,P){yield"(".concat(P," === null)")}o(E,"FromNull");function*x(O,J,P){yield Vo.IsNumberLike(P),pe(O.exclusiveMaximum)&&(yield"".concat(P," < ").concat(O.exclusiveMaximum)),pe(O.exclusiveMinimum)&&(yield"".concat(P," > ").concat(O.exclusiveMinimum)),pe(O.maximum)&&(yield"".concat(P," <= ").concat(O.maximum)),pe(O.minimum)&&(yield"".concat(P," >= ").concat(O.minimum)),pe(O.multipleOf)&&(yield"(".concat(P," % ").concat(O.multipleOf,") === 0"))}o(x,"FromNumber");function*D(O,J,P){yield Vo.IsObjectLike(P),pe(O.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length >= ").concat(O.minProperties)),pe(O.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length <= ").concat(O.maxProperties));let oe=Object.getOwnPropertyNames(O.properties);for(let X of oe){let te=pm.Encode(P,X),De=O.properties[X];if(O.required&&O.required.includes(X))yield*K(ee(De,J,te)),(Si(De)||t(De))&&(yield"('".concat(X,"' in ").concat(P,")"));else{let vt=ce(De,J,te);yield Vo.IsExactOptionalProperty(P,X,vt)}}if(O.additionalProperties===!1)if(O.required&&O.required.length===oe.length)yield"Object.getOwnPropertyNames(".concat(P,").length === ").concat(oe.length);else{let X="[".concat(oe.map(te=>"'".concat(te,"'")).join(", "),"]");yield"Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(X,".includes(key))")}if(typeof O.additionalProperties=="object"){let X=ce(O.additionalProperties,J,"".concat(P,"[key]")),te="[".concat(oe.map(De=>"'".concat(De,"'")).join(", "),"]");yield"(Object.getOwnPropertyNames(".concat(P,").every(key => ").concat(te,".includes(key) || ").concat(X,"))")}}o(D,"FromObject");function*I(O,J,P){yield"(typeof value === 'object' && typeof ".concat(P,".then === 'function')")}o(I,"FromPromise");function*C(O,J,P){yield Vo.IsRecordLike(P),pe(O.minProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length >= ").concat(O.minProperties)),pe(O.maxProperties)&&(yield"Object.getOwnPropertyNames(".concat(P,").length <= ").concat(O.maxProperties));let[oe,X]=Object.entries(O.patternProperties)[0],te=Te("".concat(new RegExp(oe))),De=ce(X,J,"value"),vt=Ne(O.additionalProperties)?ce(O.additionalProperties,J,P):O.additionalProperties===!1?"false":"true",Ir="(".concat(te,".test(key) ? ").concat(De," : ").concat(vt,")");yield"(Object.entries(".concat(P,").every(([key, value]) => ").concat(Ir,"))")}o(C,"FromRecord");function*k(O,J,P){let oe=$e(O,J);if(q.functions.has(O.$ref))return yield"".concat(Ie(O.$ref),"(").concat(P,")");yield*K(ee(oe,J,P))}o(k,"FromRef");function*V(O,J,P){let oe=Te("".concat(new RegExp(O.source,O.flags),";"));yield"(typeof ".concat(P," === 'string')"),pe(O.maxLength)&&(yield"".concat(P,".length <= ").concat(O.maxLength)),pe(O.minLength)&&(yield"".concat(P,".length >= ").concat(O.minLength)),yield"".concat(oe,".test(").concat(P,")")}o(V,"FromRegExp");function*$(O,J,P){if(yield"(typeof ".concat(P," === 'string')"),pe(O.maxLength)&&(yield"".concat(P,".length <= ").concat(O.maxLength)),pe(O.minLength)&&(yield"".concat(P,".length >= ").concat(O.minLength)),O.pattern!==void 0){let oe=Te("".concat(new RegExp(O.pattern),";"));yield"".concat(oe,".test(").concat(P,")")}O.format!==void 0&&(yield"format('".concat(O.format,"', ").concat(P,")"))}o($,"FromString");function*T(O,J,P){yield"(typeof ".concat(P," === 'symbol')")}o(T,"FromSymbol");function*w(O,J,P){yield"(typeof ".concat(P," === 'string')");let oe=Te("".concat(new RegExp(O.pattern),";"));yield"".concat(oe,".test(").concat(P,")")}o(w,"FromTemplateLiteral");function*L(O,J,P){yield"".concat(Ie(O.$ref),"(").concat(P,")")}o(L,"FromThis");function*_(O,J,P){if(yield"Array.isArray(".concat(P,")"),O.items===void 0)return yield"".concat(P,".length === 0");yield"(".concat(P,".length === ").concat(O.maxItems,")");for(let oe=0;oe<O.items.length;oe++){let X=ce(O.items[oe],J,"".concat(P,"[").concat(oe,"]"));yield"".concat(X)}}o(_,"FromTuple");function*G(O,J,P){yield"".concat(P," === undefined")}o(G,"FromUndefined");function*ie(O,J,P){let oe=O.anyOf.map(X=>ce(X,J,P));yield"(".concat(oe.join(" || "),")")}o(ie,"FromUnion");function*Q(O,J,P){yield"".concat(P," instanceof Uint8Array"),pe(O.maxByteLength)&&(yield"(".concat(P,".length <= ").concat(O.maxByteLength,")")),pe(O.minByteLength)&&(yield"(".concat(P,".length >= ").concat(O.minByteLength,")"))}o(Q,"FromUint8Array");function*le(O,J,P){yield"true"}o(le,"FromUnknown");function*Z(O,J,P){yield Vo.IsVoidLike(P)}o(Z,"FromVoid");function*Y(O,J,P){let oe=q.instances.size;q.instances.set(oe,O),yield"kind('".concat(O[N],"', ").concat(oe,", ").concat(P,")")}o(Y,"FromKind");function*ee(O,J,P,oe=!0){let X=Re(O.$id)?[...J,O]:J,te=O;if(oe&&Re(O.$id)){let De=Ie(O.$id);if(q.functions.has(De))return yield"".concat(De,"(").concat(P,")");{let vt=We(De,O,J,"value",!1);return q.functions.set(De,vt),yield"".concat(De,"(").concat(P,")")}}switch(te[N]){case"Any":return yield*K(r(te,X,P));case"Array":return yield*K(n(te,X,P));case"AsyncIterator":return yield*K(i(te,X,P));case"BigInt":return yield*K(a(te,X,P));case"Boolean":return yield*K(u(te,X,P));case"Constructor":return yield*K(c(te,X,P));case"Date":return yield*K(m(te,X,P));case"Function":return yield*K(d(te,X,P));case"Integer":return yield*K(f(te,X,P));case"Intersect":return yield*K(g(te,X,P));case"Iterator":return yield*K(v(te,X,P));case"Literal":return yield*K(b(te,X,P));case"Never":return yield*K(S(te,X,P));case"Not":return yield*K(F(te,X,P));case"Null":return yield*K(E(te,X,P));case"Number":return yield*K(x(te,X,P));case"Object":return yield*K(D(te,X,P));case"Promise":return yield*K(I(te,X,P));case"Record":return yield*K(C(te,X,P));case"Ref":return yield*K(k(te,X,P));case"RegExp":return yield*K(V(te,X,P));case"String":return yield*K($(te,X,P));case"Symbol":return yield*K(T(te,X,P));case"TemplateLiteral":return yield*K(w(te,X,P));case"This":return yield*K(L(te,X,P));case"Tuple":return yield*K(_(te,X,P));case"Undefined":return yield*K(G(te,X,P));case"Union":return yield*K(ie(te,X,P));case"Uint8Array":return yield*K(Q(te,X,P));case"Unknown":return yield*K(le(te,X,P));case"Void":return yield*K(Z(te,X,P));default:if(!$t.Has(te[N]))throw new jf(O);return yield*K(Y(te,X,P))}}o(ee,"Visit");let q={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function ce(O,J,P,oe=!0){return"(".concat([...ee(O,J,P,oe)].join(" && "),")")}o(ce,"CreateExpression");function Ie(O){return"check_".concat(Nf.Encode(O))}o(Ie,"CreateFunctionName");function Te(O){let J="local_".concat(q.variables.size);return q.variables.set(J,"const ".concat(J," = ").concat(O)),J}o(Te,"CreateVariable");function We(O,J,P,oe,X=!0){let[te,De]=["\n",me=>"".padStart(me," ")],vt=He("value","any"),Ir=Fe("boolean"),fe=[...ee(J,P,oe,X)].map(me=>"".concat(De(4)).concat(me)).join(" &&".concat(te));return"function ".concat(O,"(").concat(vt,")").concat(Ir," {").concat(te).concat(De(2),"return (").concat(te).concat(fe).concat(te).concat(De(2),")\n}")}o(We,"CreateFunction");function He(O,J){let P=q.language==="typescript"?": ".concat(J):"";return"".concat(O).concat(P)}o(He,"CreateParameter");function Fe(O){return q.language==="typescript"?": ".concat(O):""}o(Fe,"CreateReturns");function it(O,J,P){let oe=We("check",O,J,"value"),X=He("value","any"),te=Fe("boolean"),De=[...q.functions.values()],vt=[...q.variables.values()],Ir=Re(O.$id)?"return function check(".concat(X,")").concat(te," {\n return ").concat(Ie(O.$id),"(value)\n}"):"return ".concat(oe);return[...vt,...De,Ir].join("\n")}o(it,"Build");function jt(...O){let J={language:"javascript"},[P,oe,X]=O.length===2&&ve(O[1])?[O[0],O[1],J]:O.length===2&&!ve(O[1])?[O[0],[],O[1]]:O.length===3?[O[0],O[1],O[2]]:O.length===1?[O[0],[],J]:[null,[],J];if(q.language=X.language,q.variables.clear(),q.functions.clear(),q.instances.clear(),!Ne(P))throw new fm(P);for(let te of oe)if(!Ne(te))throw new fm(te);return it(P,oe,X)}o(jt,"Code"),e.Code=jt;function qt(O,J=[]){let P=jt(O,J,{language:"javascript"}),oe=globalThis.Function("kind","format","hash",P),X=new Map(q.instances);function te(fe,me,ht){if(!$t.Has(fe)||!X.has(me))return!1;let zi=$t.Get(fe),Tu=X.get(me);return zi(Tu,ht)}o(te,"typeRegistryFunction");function De(fe,me){return Ar.Has(fe)?Ar.Get(fe)(me):!1}o(De,"formatRegistryFunction");function vt(fe){return uo(fe)}o(vt,"hashFunction");let Ir=oe(te,De,vt);return new Rf(O,J,Ir,P)}o(qt,"Compile"),e.Compile=qt})(hm||(hm={}));l();l();l();var v7=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,x7=[0,31,28,31,30,31,30,31,31,30,31,30,31],E7=o(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),gm=o(e=>{let t=v7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&E7(r)?29:x7[n])},"isDate");l();var C7=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i,ym=o(e=>{let t=C7.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3],a=t[4],u=t[5]==="-"?-1:1,c=+(t[6]||0),m=+(t[7]||0);if(c>23||m>59||!a)return!1;if(r<=23&&n<=59&&i<60)return!0;let d=n-m*u,f=r-c*u-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&i<61},"isTime");var I7=/t|\s/i,Ex=o(e=>{let t=e.split(I7);return t.length===2&&gm(t[0])&&ym(t[1])},"isDateTime");l();var D7=/\/|:/,S7=/^(?:[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,Cx=o(e=>D7.test(e)&&S7.test(e),"isUri");var w7=[["date",gm],["time",ym],["date-time",Ex],["uri",Cx]],Ix=o(()=>{for(let[e,t]of w7)try{_l.Format(e,t)}catch(r){if(r instanceof ds)continue;throw r}},"registerFormats");l();var Zf=p.Record(p.String(),p.Unknown(),{$id:"Extra"}),On=p.Object({extra:p.Optional(p.Ref(Zf))}),Vf=[Zf];l();l();l();l();l();l();var xr=o(e=>Object.entries(e),"typedEntries");var A7=o(e=>{var r;let t=new Map;for(let[n,i]of xr((r=e.geometry)!=null?r:{}))t.set(n,new Map(i==null?void 0:i.features.map(a=>[a.properties.id,a])));return t},"createLookupMap"),Gt=o(e=>{let t=A7(e);return o((n,i)=>{let a=t.get(n);if(a==null)return se({kind:Ur.UnknownFloorError,properties:{floorId:n}});let u=a.get(i);return u==null?se({kind:Ur.UnknownGeometryError,properties:{floorId:n,geometryId:i}}):ue(u)},"geometryLookup")},"createGeometryLookup");l();var hn=p.Object({geometryId:p.Ref(gr)},{$id:"WithGeometryId"}),ou=p.Object({geometryIds:p.Array(p.Ref(gr))},{$id:"WithGeometryIds"}),Wf=[hn,ou];l();l();l();var Dx=o(e=>e instanceof Error?e:new Error(String(e)),"asError");var au=o(e=>(...t)=>{try{return ue(e(...t))}catch(r){return se(Dx(r))}},"safeFn");var Sx=au((e,t)=>{let r={};for(let n of t)for(let i of n.intoBundle(e))r[i.path]=Ya(JSON.stringify(i.contents));return r}),Hf=o(async(e,t,r)=>Sx(e,t).andThenAsync(n=>new Promise(i=>{ex(n,xe(U({},r),{consume:!0}),(a,u)=>{i(a?se(a):ue(u))})})),"compress"),F7=au(tx),Kf=o((e,t,r)=>Sx(e,t).andThen(n=>F7(n,r)),"compressSync");l();l();function bm(e,t,r=[]){let n=U({},e);for(let[i,a]of Object.entries(t))if(a!==void 0)if(i in n){let u=i;if(Array.isArray(a)&&a.length>0){let c=O7(a[0],r);if(c){let m=n[u];if(!Array.isArray(m))throw new Error("Expected array at ".concat(i,", got ").concat(typeof m));let d=new Map(a.map(v=>[wx(v,c),v])),g=m.map(v=>{let b=d.get(wx(v,c));return b?bm(v,b,r):v});n[u]=g}else n[u]=a}else{let c=n[u];typeof c=="object"&&c!==null&&typeof a=="object"&&a!==null?Object.keys(a).length===0?n[u]=a:n[u]=bm(c,a,r):n[i]=a}}else n[i]=a;return n}o(bm,"deepMergeOn");function O7(e,t){function r(n){if(typeof n!="object"||n===null)return null;for(let i of t)if(i in n&&typeof n[i]<"u")return[i];if(Array.isArray(n))return null;for(let[i,a]of Object.entries(n)){let u=r(a);if(u)return[i,...u]}return null}return o(r,"search"),r(e)}o(O7,"findIdentifierKey");function wx(e,t){return t.reduce((r,n)=>{if(r&&typeof r=="object")return r[n]},e)}o(wx,"getValueByKeyPath");var P7=o(e=>e,"identity"),B7=o(e=>JSON.parse(Bf(e)),"jsonDecode"),Ax=o((e,t)=>t.some(r=>r.fromBundle(e.name,new Uint8Array,P7)!==void 0),"isFileExpected"),Fx=au((e,t)=>{let r={};for(let n of Object.keys(e)){let i=e[n];for(let a of t){let u=a.fromBundle(n,i,B7);if(u){r=bm(r,u,[]);break}}}return r}),qf=o(async(e,t)=>new Promise(r=>rx(e,{filter:o(n=>Ax(n,t),"filter")},(n,i)=>{r(n?se(n):ue(i))})).then(r=>r.andThen(n=>Fx(n,t))),"decompress"),M7=au(nx),Jf=o((e,t)=>M7(e,{filter:o(r=>Ax(r,t),"filter")}).andThen(r=>Fx(r,t)),"decompressSync");l();var T7=o(e=>typeof e=="object"&&e!=null&&"$ref"in e&&typeof e.$ref=="string","isRef"),k7=o(e=>{if(e.length<2)return!1;let t=e.filter(T7);if(t.length!==e.length)return!1;let r=t[0].$ref;return t.slice(1).every(n=>n.$ref===r)},"isDuplicateRef"),vm=o(e=>typeof e=="object"&&e!=null&&"allOf"in e&&Array.isArray(e.allOf)&&k7(e.allOf)?e.allOf[0]:typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,vm(r)])):Array.isArray(e)?e.map(vm):e,"fixDuplicateAllOf");l();var xm=o(e=>typeof e=="object"&&e!=null&&"$ref"in e?xe(U({},e),{$ref:"#/definitions/".concat(e.$ref)}):typeof e=="object"&&e!=null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,xm(r)])):Array.isArray(e)?e.map(xm):e,"prefixReferences");var uu;(function(e){e.InvalidTypeboxSchema="InvalidTypeboxSchema",e.MissingReferenceId="MissingReferenceId",e.DuplicateReferenceId="DuplicateReferenceId",e.TypeboxError="TypeboxError",e.UnknownError="UnknownError"})(uu||(uu={}));var _7=o(e=>({next(){for(let r of e){let n=r.next();if(!n.done)return n}return{done:!0,value:void 0}},[Symbol.iterator](){return this}}),"join"),L7=o((...e)=>{let t=new Map;for(let r of _7(e)){if(!r.$id)continue;let n=t.get(r.$id);if(n!=null&&n!==r)return se({kind:uu.DuplicateReferenceId,message:"Failed to register a reference for a schema with an $id that has already been used",schema:r});t.set(r.$id,r)}return ue(t)},"computeReferenceMap"),Yt,su,Xr,cr,Cm=class Cm{constructor(t,r,n,i){R(this,Yt);R(this,su);R(this,Xr,[]);R(this,cr);H(this,Yt,t),H(this,su,r),H(this,Xr,n),H(this,cr,i),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(t,r="CoreMVF",n=!1){let i=p.Composite(t.extensions.map(u=>u.schema),{$id:r});if(!A.IsSchema(i))return se({kind:uu.InvalidTypeboxSchema,message:"Attempting to merge schemas produced an invalid schema",schema:i});let a=L7(R0.values(),N0.values(),_0.values(),Vf.values(),Xf.values(),Wf.values(),t.extensions.flatMap(u=>{var c;return(c=u.references)!=null?c:[]}).values());if(!a.isOk())return a;try{Ix();let u=n?null:hm.Compile(i,[...a.value.values()]);return ue(new Cm(i,u,t.extensions,a.value))}catch(u){return u instanceof he?se({kind:uu.TypeboxError,message:u.message,original:u}):se({kind:uu.UnknownError,message:"An unknown error occurred while compiling the schema",original:u})}}is(t){var r,n;return(n=(r=s(this,su))==null?void 0:r.Check(t))!=null?n:dn.Check(s(this,Yt),[...s(this,cr).values()],t)}parse(t){var r,n;return this.is(t)?ue(t):se((n=(r=s(this,su))==null?void 0:r.Errors(t))!=null?n:dn.Errors(s(this,Yt),[...s(this,cr).values()],t))}decode(t){try{return ue(vx(s(this,Yt),[...s(this,cr).values()],t))}catch(r){return se(r)}}encode(t){try{return ue(xx(s(this,Yt),[...s(this,cr).values()],t))}catch(r){return se(r)}}verify(t){for(let r of s(this,Xr))if(r.integrityCheck){let n=r.integrityCheck(t);if(n.isErr())return se(n.error)}return ue(!0)}jsonSchema(){var n;let t=JSON.parse(JSON.stringify([s(this,Yt),...s(this,cr).values()])),r=vm(xm({$id:"#/definitions/".concat((n=s(this,Yt).$id)!=null?n:"CoreMVF"),$schema:"http://json-schema.org/draft-07/schema#",references:t}));return JSON.stringify(r,null,2)}async compress(t){return this.encode(t).andThen(r=>this.parse(r)).andThenAsync(r=>Hf(r,s(this,Xr))).then(r=>r.mapErr(n=>{var i;return Es((i=s(this,Yt).$id)!=null?i:"CoreMVF",n,[...s(this,cr).values()])}))}async compressUnsafe(t){return this.encode(t).andThenAsync(r=>Hf(r,s(this,Xr))).then(r=>r.mapErr(n=>{var i;return Es((i=s(this,Yt).$id)!=null?i:"CoreMVF",n,[...s(this,cr).values()])}))}compressSync(t){return this.encode(t).andThen(r=>this.parse(r)).andThen(r=>Kf(r,s(this,Xr))).mapErr(r=>{var n;return Es((n=s(this,Yt).$id)!=null?n:"CoreMVF",r,[...s(this,cr).values()])})}compressUnsafeSync(t){return this.encode(t).andThen(r=>Kf(r,s(this,Xr))).mapErr(r=>{var n;return Es((n=s(this,Yt).$id)!=null?n:"CoreMVF",r,[...s(this,cr).values()])})}async decompress(t){return qf(t,s(this,Xr)).then(r=>r.andThen(n=>this.parse(n)).andThen(n=>this.decode(n)).mapErr(n=>{var i;return Cs((i=s(this,Yt).$id)!=null?i:"CoreMVF",n,[...s(this,cr).values()])}))}async decompressUnsafe(t){return qf(t,s(this,Xr)).then(r=>r.andThen(n=>this.decode(n)).mapErr(n=>{var i;return Cs((i=s(this,Yt).$id)!=null?i:"CoreMVF",n,[...s(this,cr).values()])}))}decompressSync(t){return Jf(t,s(this,Xr)).andThen(r=>this.parse(r)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return Cs((n=s(this,Yt).$id)!=null?n:"CoreMVF",r,[...s(this,cr).values()])})}decompressUnsafeSync(t){return Jf(t,s(this,Xr)).andThen(r=>this.decode(r)).mapErr(r=>{var n;return Cs((n=s(this,Yt).$id)!=null?n:"CoreMVF",r,[...s(this,cr).values()])})}};Yt=new WeakMap,su=new WeakMap,Xr=new WeakMap,cr=new WeakMap,o(Cm,"MVFParser");var Em=Cm;var cu,Yf=class Yf{constructor(){R(this,cu,[]);this.extend=this.extend.bind(this)}extend(t){return s(this,cu).push(t),this}extendOptional(t){let r=xe(U({},t),{schema:p.Partial(t.schema)});return s(this,cu).push(r),this}build(t){return Em.create(this,void 0,t==null?void 0:t.cspSafe)}get extensions(){return s(this,cu)}};cu=new WeakMap,o(Yf,"MVFParserBuilder");var Im=Yf;l();l();l();l();var lu=p.Object({geometryId:p.Ref(gr),floorId:p.Ref(_e)},{$id:"GeometryAnchor"}),R7=p.Object({geometryAnchor:p.Ref(lu)}),Is=o((e,t)=>p.Object({geometryAnchors:p.Array(p.Ref(lu),e)},t),"WithGeometryAnchors"),Xf=[lu];l();l();l();var Ox=o((e,t)=>p.Unsafe(p.Transform(p.String(t)).Decode(r=>e.includes(r)?r:"unknown").Encode(r=>r)),"SafeStringEnumSchema"),lr=o((e,t)=>{let r=Ox(e,t),n=[...e,"unknown"],i=Object.freeze(Object.fromEntries([...e,"unknown"].map(u=>[u,u])));return{schema:r,values:n,record:i,is:o(u=>Object.hasOwn(i,u),"is")}},"SafeStringEnum");var Px=o(()=>new Im().extend(cx).extend(fx).extend(bx),"createParser");l();l();l();l();l();l();var Ds;(function(e){e.AnnotationNonPointGeometryError="AnnotationNonPointGeometryError",e.AnnotationUnknownSymbolError="AnnotationUnknownSymbolError"})(Ds||(Ds={}));var Bx=o(e=>{var i;if(e.annotations==null)return ue(!0);let t=Pt(e.annotations,a=>a.id,"annotations");if(t.isErr())return t;let r=Gt(e),n=new Set(Qe((i=e.annotationSymbols)!=null?i:{}));for(let a of Qe(e.annotations)){let u=e.annotations[a];if(u!=null)for(let c of u){if(!n.has(c.symbolKey))return se({kind:Ds.AnnotationUnknownSymbolError,properties:{annotationId:c.id,symbolKey:c.symbolKey}});let m=r(a,c.geometryId);if(m.isErr())return m;if(m.value.geometry.type!=="Point")return se({kind:Ds.AnnotationNonPointGeometryError,properties:{annotationId:c.id,floorId:a,geometryId:c.geometryId}})}}return ue(!0)},"validateAnnotations");var Mx=Ot("a","AnnotationId"),Qf=p.Intersect([hn,p.Object({id:p.Ref(Mx,{description:"The unique identifier for the annotation."}),externalId:p.Optional(p.String({description:"The external identifier for the annotation."})),symbolKey:p.String({description:"The symbol identifier for the annotation."})})],{$id:"AnnotationProperties"}),Tx=p.Object({url:p.String({format:"uri",description:"The URL for the symbol."}),name:p.String({description:"The name of the symbol."})},{$id:"AnnotationSymbol"}),N7=p.Object({annotations:Bt(p.Record(_e,p.Array(p.Ref(Qf)),{additionalProperties:!1})),annotationSymbols:Bt(p.Record(p.Index(Qf,["symbolKey"]),p.Ref(Tx)))},{$id:"AnnotationsSchema"}),U7=/^annotations\/(.*)\.json$/,kx={name:"ext:mvf-annotations",schema:N7,intoBundle:o(function*(e){if(e.annotations!=null)for(let t of Qe(e.annotations))yield{path:"annotations/".concat(t,".json"),contents:e.annotations[t]};e.annotationSymbols!=null&&(yield{path:"annotation-symbols.json",contents:e.annotationSymbols})},"intoBundle"),fromBundle:o((e,t,r)=>{var i;if(e==="annotation-symbols.json")return{annotationSymbols:r(t)};let n=(i=e.match(U7))==null?void 0:i[1];if(n)return{annotations:{[n]:r(t)}}},"fromBundle"),references:[Mx,Qf,Tx],integrityCheck:Bx};l();l();l();var Bi=Ot("lcat","LocationCategoryId"),eh=p.Intersect([p.Object({id:p.Ref(Bi),parent:p.Optional(p.Ref(Bi))}),Uo(["name"]),On],{$id:"LocationCategory"}),_x=[Bi,eh];l();l();var Wo;(function(e){e.UnknownCategoryError="UnknownCategoryError",e.UnknownParentCategoryError="UnknownParentCategoryError",e.UnknownParentLocationError="UnknownParentLocationError"})(Wo||(Wo={}));var Lx=o(e=>{var i,a,u,c,m,d,f,g,v;if(e.locationCategories==null&&e.locations==null)return ue(!0);if(e.locationCategories!=null){let b=Pt(e.locationCategories,S=>S.id,"locationCategories");if(b.isErr())return b}if(e.locations!=null){let b=Pt(e.locations,S=>S.id,"locations");if(b.isErr())return b}if(e.locationInstances!=null){let b=Pt(e.locationInstances,S=>S.id,"locationInstances");if(b.isErr())return b}let t=new Set((a=(i=e.locationCategories)==null?void 0:i.map(b=>b.id))!=null?a:[]);for(let b of(u=e.locationCategories)!=null?u:[])if(b.parent!=null&&!t.has(b.parent))return se({kind:Wo.UnknownParentCategoryError,properties:{categoryId:b.id,parentCategoryId:b.parent}});let r=Gt(e);for(let b of(c=e.locations)!=null?c:[]){for(let S of b.categories)if(!t.has(S))return se({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of b.geometryAnchors){let F=r(S.floorId,S.geometryId);if(F.isErr())return F}}let n=new Set((d=(m=e.locations)==null?void 0:m.map(b=>b.id))!=null?d:[]);for(let b of(f=e.locationInstances)!=null?f:[]){if(!n.has(b.parentId))return se({kind:Wo.UnknownParentLocationError,properties:{locationInstanceId:b.id,parentLocationId:b.parentId}});for(let S of(g=b.categories)!=null?g:[])if(!t.has(S))return se({kind:Wo.UnknownCategoryError,properties:{locationId:b.id,categoryId:S}});for(let S of(v=b.geometryAnchors)!=null?v:[]){let F=r(S.floorId,S.geometryId);if(F.isErr())return F}}return ue(!0)},"validateLocations");l();var Mi=Ot("loc","LocationId"),Dm=Ot("loci","LocationInstanceId"),Rx=p.Object({name:p.String(),url:p.String({format:"uri"})},{$id:"LocationSocial"}),Nx=p.Object({url:p.String({format:"uri"})},{$id:"LocationImage"}),th=p.Object({label:p.String(),url:p.String({format:"uri"})},{$id:"LocationLink"}),rh=p.String({pattern:"^[0-2][0-9]:[0-6][0-9](:[0-6][0-9])?$",$id:"OpeningHoursTime"}),Ux=p.Union([p.Literal("Sunday"),p.Literal("Monday"),p.Literal("Tuesday"),p.Literal("Wednesday"),p.Literal("Thursday"),p.Literal("Friday"),p.Literal("Saturday")],{$id:"OpeningHoursDay"}),j7="PublicHolidays",nh=p.Union([Ux,p.Literal(j7)],{$id:"OpeningHoursDayOrPublicHoliday"}),Sm=p.Object({"@type":p.Optional(p.Literal("OpeningHoursSpecification",{description:"The type of opening hours"})),opens:p.Optional(p.Ref(rh,{description:"The time the opening hours start"})),closes:p.Optional(p.Ref(rh,{description:"The time the opening hours end"})),dayOfWeek:p.Optional(p.Union([p.Ref(nh),p.Array(p.Ref(nh))],{description:"The days of the week the opening hours apply to"})),validFrom:p.Optional(p.String({format:"date",description:"The date the opening hours start, in ISO 8601 format"})),validThrough:p.Optional(p.String({format:"date",description:"The date the opening hours end, in ISO 8601 format"}))},{$id:"OpeningHoursSpecification"}),wm=p.Intersect([p.Object({id:p.Ref(Mi),categories:p.Array(p.Ref(Bi)),logo:p.Optional(p.String({format:"uri"})),phone:p.Optional(p.String()),social:p.Array(p.Ref(Rx)),images:p.Array(p.Ref(Nx)),links:p.Array(p.Ref(th)),website:p.Optional(p.Ref(th)),openingHours:p.Optional(p.Array(p.Ref(Sm)))}),Uo(["name"]),Is(),On],{$id:"Location"}),ih=p.Intersect([p.Object({id:p.Ref(Dm),parentId:p.Ref(Mi)}),p.Partial(p.Omit(wm,["id","parentId","details"])),Vr],{$id:"LocationInstance",description:"A location instance is a particular instance of an location that has some properties different from the parent."}),Am=[Mi,Dm,Rx,Nx,th,rh,Ux,nh,Sm,wm,ih];var z7=p.Object({locations:p.Array(p.Ref(wm)),locationCategories:p.Array(p.Ref(eh)),locationInstances:p.Optional(p.Array(p.Ref(ih)))},{$id:"LocationsExtensionSchema"}),jx="locations.json",zx="location-categories.json",$x="location-instances.json",Gx={name:"ext:locations",schema:z7,intoBundle:o(function*(e){e.locations!=null&&(yield{path:jx,contents:e.locations}),e.locationCategories!=null&&(yield{path:zx,contents:e.locationCategories}),e.locationInstances!=null&&(yield{path:$x,contents:e.locationInstances})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===jx)return{locations:r(t)};if(e===zx)return{locationCategories:r(t)};if(e===$x)return{locationInstances:r(t)}},"fromBundle"),references:[..._x,...Am],integrityCheck:Lx};l();l();var Pn;(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"})(Pn||(Pn={}));var Zx=o(e=>{var v,b,S,F,E,x,D,I,C,k,V,$,T,w,L,_,G,ie,Q,le;if(e.cms==null)return ue(!0);let t=e.cms,r=Pt(e.cms.categories,Z=>Z.id,"cms.categories");if(r.isErr())return r;let n=new Set((b=(v=e.locationCategories)==null?void 0:v.map(Z=>Z.id))!=null?b:[]);for(let Z of(S=t.categories)!=null?S:[])if(!n.has(Z.categoryId))return se({kind:Pn.EnterpriseCategoryWithUnknownLocationCategoryError,properties:{enterpriseCategoryId:Z.id,locationCategoryId:Z.categoryId}});let i=Pt(e.cms.locations,Z=>Z.id,"cms.locations");if(i.isErr())return i;let a=new Map((E=(F=e.locations)==null?void 0:F.map(Z=>[Z.id,Z]))!=null?E:[]);for(let Z of(x=t.locations)!=null?x:[]){if(!a.has(Z.locationId))return se({kind:Pn.EnterpriseLocationWithUnknownLocationError,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId}});for(let Y of(D=Z.siblingGroups)!=null?D:[])for(let ee of(I=Y.siblings)!=null?I:[])if(!a.has(ee))return se({kind:Pn.EnterpriseLocationWithUnknownSibling,properties:{enterpriseLocationId:Z.id,siblingLocationId:ee,label:Y.label}});if(Z.primaryCategory!=null){let Y=a.get(Z.locationId);if(Y!=null&&!Y.categories.includes(Z.primaryCategory))return se({kind:Pn.EnterpriseLocationWithInvalidPrimaryCategory,properties:{enterpriseLocationId:Z.id,locationId:Z.locationId,primaryCategory:Z.primaryCategory}})}}if(((C=t.venue)==null?void 0:C.topLocations)!=null){for(let Z of t.venue.topLocations)if(!a.has(Z))return se({kind:Pn.EnterpriseVenueWithUnknownTopLocationError,properties:{locationId:Z}})}let u=new Set((V=(k=e.cms.locations)==null?void 0:k.map(Z=>Z.id))!=null?V:[]),c=Pt(e.cms.locationInstances,Z=>Z.id,"cms.locationInstances");if(c.isErr())return c;let m=new Set((T=($=e.locationInstances)==null?void 0:$.map(Z=>Z.id))!=null?T:[]);for(let Z of(w=t.locationInstances)!=null?w:[]){if(!u.has(Z.parentId))return se({kind:Pn.InstanceWithUnknownEnterpriseLocationError,properties:{enterpriseLocationInstanceId:Z.id,enterpriseLocationId:Z.parentId}});if(!m.has(Z.locationInstanceId))return se({kind:Pn.InstanceWithUnknownLocationInstanceError,properties:{enterpriseLocationInstanceId:Z.id,locationInstanceId:Z.locationInstanceId}});for(let Y of(L=Z.siblingGroups)!=null?L:[])for(let ee of(_=Y.siblings)!=null?_:[])if(!a.has(ee))return se({kind:Pn.EnterpriseLocationInstanceWithUnknownSibling,properties:{enterpriseLocationInstanceId:Z.id,siblingLocationId:ee,label:Y.label}})}let d=Fn(e),f=Gt(e),g=Pt(e.cms.floorText,Z=>Z.properties.id,"cms.floorText");if(g.isErr())return g;for(let[Z,Y]of xr((G=t.floorText)!=null?G:{})){let ee=d(Z);if(ee.isErr())return ee;for(let q of Y.features){if(!("geometryId"in q.properties))continue;let ce=f(Z,q.properties.geometryId);if(ce.isErr())return ce}}for(let[Z,Y]of xr((ie=t.textures)!=null?ie:{})){let ee=d(Z);if(ee.isErr())return ee;for(let q of Y){let ce=f(Z,q.geometryId);if(ce.isErr())return ce}}for(let[Z,Y]of xr((Q=t.layers)!=null?Q:{})){let ee=d(Z);if(ee.isErr())return ee;for(let q of Qe(Y!=null?Y:{})){let ce=f(Z,q);if(ce.isErr())return ce}}for(let[Z,Y]of xr((le=t.textAreas)!=null?le:{})){let ee=d(Z);if(ee.isErr())return ee;for(let q of Y.features)if("geometryId"in q.properties){let ce=f(Z,q.properties.geometryId);if(ce.isErr())return ce}}return ue(!0)},"validateCMS");l();l();var Ss=Ot("el","EnterpriseLocationId"),oh=Ot("ec","EnterpriseCategoryId"),ah=Ot("eli","EnterpriseLocationInstanceId"),uh=Ot("ev","EnterpriseVenueId"),sh=Ot("eft","EnterpriseFloorTextId"),Vx=[Ss,oh,ah,uh,sh];var Wx=p.Object({id:p.Ref(oh),categoryId:p.Ref(Bi),color:p.Optional(p.String()),sortOrder:p.Number(),iconFromDefaultList:p.Optional(p.Union([p.String(),p.Null()])),picture:p.Optional(p.String({format:"uri",description:"The category's picture"}))},{$id:"EnterpriseCategory"}),ch=p.Object({categories:p.Optional(p.Array(p.Ref(Wx)))},{$id:"EnterpriseCategoriesSchema"}),Hx=[Wx,ch];l();var Fm=lr(["left","center","right"]),$7=Fm.schema,Ioe=Fm.values,Doe=Fm.record,Soe=Fm.is,lh=p.Object({id:p.Ref(sh),text:p.String(),visible:p.Boolean({default:!0}),fontSize:p.Number({default:12,exclusiveMinimum:0}),fontFamily:p.String({default:"Droid Sans"}),color:p.String({default:"black"}),rotation:p.Number({minimum:0,maximum:360}),align:$7},{$id:"FloorTextCommonProperties"}),mh=p.Intersect([p.Ref(lh),hn],{$id:"AnchoredFloorTextProperties"}),dh=p.Intersect([p.Ref(lh),p.Object({verticalOffset:p.Number()})],{$id:"FloatingFloorTextProperties"}),Kx=p.Union([p.Ref(mh),p.Ref(dh)],{$id:"FloorTextProperties"}),qx=ir(hr,p.Ref(Kx),{$id:"FloorTextFeature"}),G7=ir(hr,p.Ref(mh),{$id:"AnchoredFloorTextFeature"}),Z7=ir(hr,p.Ref(dh),{$id:"FloatingFloorTextFeature"}),Jx=Fr(p.Ref(qx),{$id:"EnterpriseFloorTextFeatureCollection"}),Xx=p.Record(_e,p.Ref(Jx),{$id:"EnterpriseFloorTextCollectionsByFloor",additionalProperties:!1}),ph=p.Object({floorText:p.Optional(p.Ref(Xx))},{$id:"EnterpriseFloorTextSchema"}),Yx=[lh,mh,dh,Kx,qx,G7,Z7,Jx,Xx,ph];l();var Qx=Bt(p.Record(gr,p.String({minLength:1}),{additionalProperties:!1,$id:"EnterpriseLayers"})),e3=Bt(p.Record(_e,p.Ref(Qx),{additionalProperties:!1,$id:"EnterpriseLayersByFloor"})),fh=p.Object({layers:p.Optional(p.Ref(e3))},{$id:"EnterpriseLayersSchema"}),t3=[Qx,e3,fh];l();l();l();var{schema:r3,values:Loe,record:Roe,is:Noe}=lr(["reference-point","checkpoint","checkpoint-passport","parent"],{$id:"EnterpriseSiblingGroupType"}),Om=lr(["closed-temporarily","new","pop-up","coming-soon","relocated"]),V7=Om.schema,Uoe=Om.values,joe=Om.record,zoe=Om.is,hh=p.Object({type:V7,start:p.Optional(p.String({format:"date",description:"The start date of the state"})),end:p.Optional(p.String({format:"date",description:"The end date of the state"}))},{$id:"LocationState",description:"The state of a location. Start and end dates are optional."}),gh=p.Object({label:p.String(),siblings:p.Array(p.Ref(Mi)),type:p.Optional(p.Ref(r3)),subtype:p.Optional(p.String())},{$id:"SiblingGroup"}),Pm=p.Object({name:p.String(),code:p.String()},{$id:"Language"}),n3=[hh,gh,Pm,r3];var Bm=p.Object({id:p.Ref(Ss),locationId:p.Ref(Mi),cmsId:p.String(),type:p.String(),sortOrder:p.Number(),tags:p.Optional(p.Array(p.String())),picture:p.Optional(p.String({format:"uri",description:"The picture of the location"})),states:p.Optional(p.Array(p.Ref(hh),{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:p.Optional(p.Array(p.Ref(gh))),gallery:p.Optional(p.Array(p.Object({caption:p.Optional(p.String()),image:p.String({format:"uri"}),embeddedUrl:p.Optional(p.String({format:"uri",description:"The URL to link from the image"}))},{description:"The location's image gallery"}),{description:"The location's image gallery"})),showFloatingLabelWhenImagePresent:p.Optional(p.Boolean({description:"Whether to show the flat label when an image is present"})),amenity:p.Optional(p.String({description:"The location's amenity type. Only set if the location is an amenity"})),showLogo:p.Optional(p.Boolean({description:"Whether to show the logo of the location"})),primaryCategory:p.Optional(p.Ref(Bi)),headerImage:p.Optional(p.String({format:"uri",description:"The location's header image"}))},{$id:"EnterpriseLocation"}),yh=p.Object({locations:p.Optional(p.Array(p.Ref(Bm)))},{$id:"EnterpriseLocationsSchema"}),i3=[Bm,yh];var o3=p.Intersect([p.Object({id:p.Ref(ah),parentId:p.Ref(Ss),locationInstanceId:p.Ref(Dm)}),p.Partial(p.Omit(Bm,["id","parentId","locationId"]))],{$id:"EnterpriseLocationInstance",description:"A locationInstance is a particular instance of an Enterprise Location that has some properties different from the parent."}),bh=p.Object({locationInstances:p.Optional(p.Array(p.Ref(o3)))},{$id:"EnterpriseLocationInstancesSchema"}),a3=[o3,bh];l();var Mm=lr(["near","center"],{$id:"EnterpriseTextAreaAlignment"}),u3=Mm.schema,aae=Mm.values,uae=Mm.record,sae=Mm.is,vh=p.Object({maxWidth:p.Number({exclusiveMinimum:0,description:"The maximum width of the label, in meters."}),maxHeight:p.Number({exclusiveMinimum:0,description:"The maximum height of the label, in meters."}),align:p.Ref(u3),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"EnterpriseBaseTextAreaProperties"}),s3=p.Intersect([p.Ref(vh),hn],{$id:"EnterpriseAnchoredTextAreaProperties"}),c3=p.Intersect([p.Ref(vh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"EnterpriseFloatingTextAreaProperties"}),l3=p.Union([s3,c3],{$id:"EnterpriseTextAreaProperties"}),m3=ir(p.Ref(hr),l3,{$id:"EnterpriseTextAreaFeature"}),d3=Fr(p.Ref(m3),{$id:"EnterpriseTextAreaCollection"}),p3=p.Record(_e,p.Ref(d3),{$id:"EnterpriseTextAreasByFloor",additionalProperties:!1}),f3=p.Object({textAreas:p.Optional(p.Ref(p3))},{$id:"EnterpriseTextAreasSchema"}),h3=[u3,vh,s3,c3,l3,m3,d3,p3];l();var xh=p.Object({u:p.Number(),v:p.Number()},{$id:"EnterpriseTextureUV"}),Tm=lr(["top","side"],{$id:"EnterpriseTextureFace"}),g3=Tm.schema,pae=Tm.values,fae=Tm.record,hae=Tm.is,km=lr(["inside","outside","both"],{$id:"EnterpriseTextureSurface"}),y3=km.schema,gae=km.values,yae=km.record,bae=km.is,b3=p.Tuple([Ua,ja,Ua,ja],{$id:"EnterpriseTextureBounds"}),v3=p.Intersect([p.Object({repeat:p.Ref(xh),offset:p.Ref(xh),rotation:p.Number({minimum:0,maximum:360}),path:p.String({format:"uri"}),face:p.Ref(g3),surface:p.Ref(y3),bounds:p.Ref(b3)},{$id:"EnterpriseTextureProperties"}),hn],{$id:"EnterpriseTexture"}),x3=p.Array(p.Ref(v3),{$id:"EnterpriseTextures"}),E3=p.Record(_e,p.Ref(x3),{$id:"EnterpriseTexturesByFloor",additionalProperties:!1}),Eh=p.Object({textures:p.Optional(p.Ref(E3))},{$id:"EnterpriseTexturesSchema"}),C3=[v3,x3,Eh,xh,g3,y3,b3,E3];l();var{schema:I3,values:wae,record:Aae,is:Fae}=lr(["agriculture","airport","casino","city-district","convention-center","entertainment","event-centre","first-responder-building","government-building","grocery-store","healthcare","higher-education","hotel","library","manufacturing","medical-centre","mixed-use","multifamily","museum","office-building","oil-and-energy","other","parking-facility","religious-institution","resort","retail-store","schools-k-12","shopping-mall","stadium-or-arena","storage-facility","theme-park","transit","transportation-hub","warehousing"],{$id:"EnterpriseVenueType"}),D3=p.Intersect([p.Object({id:p.Ref(uh),slug:p.String(),defaultLanguage:p.Ref(Pm),languages:p.Array(p.Ref(Pm)),countrycode:p.Optional(p.String()),logo:p.Optional(p.String({format:"uri"})),mappedinWebUrl:p.Optional(p.String({format:"uri"})),topLocations:p.Optional(p.Array(p.Ref(Mi))),operationHours:p.Optional(p.Array(p.Ref(Sm))),coverImage:p.Optional(p.String({format:"uri"})),type:p.Optional(p.Ref(I3))}),Uo(["name"]),On],{$id:"EnterpriseVenue"}),Ch=p.Object({venue:p.Optional(p.Ref(D3))},{$id:"EnterpriseVenueSchema"}),S3=[D3,Ch,I3];var A3=p.Intersect([Ch,yh,bh,ch,Eh,ph,fh,f3],{$id:"CMSProperties"}),w3=p.Object({cms:p.Optional(p.Ref(A3))},{$id:"CMSExtensionSchema"}),W7=/^cms\/(?:([^/]+)\/)?([^/]+)\.(?:json|geojson)$/,F3={name:"ext:cms",schema:w3,intoBundle:o(function*(e){var r,n,i,a,u,c;if(e.cms==null)return;let t=e.cms;for(let m of Qe(t))switch(m){case"floorText":for(let d of Qe((r=t.floorText)!=null?r:{}))yield{path:"cms/floorText/".concat(d,".geojson"),contents:((n=t.floorText)!=null?n:{})[d]};continue;case"textures":for(let d of Qe((i=t.textures)!=null?i:{}))yield{path:"cms/textures/".concat(d,".json"),contents:((a=t.textures)!=null?a:{})[d]};continue;case"textAreas":for(let d of Qe((u=t.textAreas)!=null?u:{}))yield{path:"cms/textAreas/".concat(d,".geojson"),contents:((c=t.textAreas)!=null?c:{})[d]};continue;default:yield{path:"cms/".concat(m,".json"),contents:t[m]};continue}},"intoBundle"),fromBundle:o((e,t,r)=>{let n=e.match(W7);if(!n)return;let[,i,a]=n,u=r(t);switch(i){case"floorText":case"textures":case"textAreas":return{cms:{[i]:{[a]:u}}};default:return{cms:{[a]:u}}}},"fromBundle"),references:[A3,w3,...S3,...i3,...a3,...Hx,...C3,...t3,...Yx,...h3,...Vx,...n3,...Am],integrityCheck:Zx};l();l();l();l();var Bn;(function(e){e.NavigationFlagMissingDeclaration="NavigationFlagMissingDeclaration",e.NavigationFlagDuplicateBit="NavigationFlagDuplicateBit",e.NavigationFlagIncorrectFlagsLength="NavigationFlagIncorrectFlagsLength",e.NavigationFlagValueTooBig="NavigationFlagValueTooBig"})(Bn||(Bn={}));var O3=o(e=>{let{navigationFlags:t}=e;if(!t||Object.keys(t).length===0)return ue(!0);let r=Object.entries(t).map(([a,u])=>U({key:a},u)).sort((a,u)=>a.index!==u.index?a.index-u.index:a.bit-u.bit),n=0,i=-1;for(let a of r){if(a.bit===i)return se({kind:Bn.NavigationFlagDuplicateBit,properties:{index:a.index,bit:a.bit,path:"navigationFlags.".concat(a.key)}});if(a.index!=n){if(i!=31)return se({kind:Bn.NavigationFlagMissingDeclaration,properties:{index:n,bit:i+1,path:"navigationFlags"}});if(a.index!=n+1||a.bit!=0)return se({kind:Bn.NavigationFlagMissingDeclaration,properties:{index:n+1,bit:0,path:"navigationFlags"}});n=a.index,i=0}else{if(a.bit!==i+1)return se({kind:Bn.NavigationFlagMissingDeclaration,properties:{index:a.index,bit:i+1,path:"navigationFlags"}});i=a.bit}}return ue(!0)},"validateNavigationFlags");l();var P3=2**32-1,ws=o(e=>{var i;let t=Object.keys((i=e.navigationFlags)!=null?i:{}).length;if(t===0)return{index:-1,flag:0};let r=Math.floor(t/32),n=t%32;return{index:r,flag:2**n-1}},"determineMaxNavigationFlags"),mu=o((e,t,r)=>{if(t.index==-1&&e.length===0)return ue(!0);let n=t.flag>0||t.index===-1?t.index+1:t.index;if(e.length!==n)return se({kind:Bn.NavigationFlagIncorrectFlagsLength,properties:{expected:n,actual:e.length,path:r}});for(let i=0;i<e.length;i++){let a=e[i];if(i<t.index){if(a>P3)return se({kind:Bn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:P3,path:r}});continue}else if(a>t.flag)return se({kind:Bn.NavigationFlagValueTooBig,properties:{index:i,flagValue:a,expectedMaxFlagValue:t.flag,path:r}})}return ue(!0)},"validateFlags");var H7=p.Object({index:p.Integer({description:"The index of the flag in a flags array.",minimum:0}),bit:p.Integer({description:"The bit position of the flag in a flag's bitfield.",minimum:0,maximum:31})},{$id:"NavigationFlagDeclarationCore"}),B3=p.Intersect([H7,Vr],{$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.'});var M3=p.Record(p.String(),B3,{$id:"NavigationFlagDeclarations",description:"Any well known and custom flags present in the MVF"}),K7=p.Object({navigationFlags:p.Ref(M3)},{$id:"NavigationFlagsSchema"}),_m=p.Array(p.Integer({minimum:0,maximum:Math.pow(2,32)-1}),{$id:"Flags"}),Ih=p.Object({flags:p.Ref(_m)},{$id:"WithFlags"}),Ho=p.Intersect([lu,Ih],{$id:"FlaggedGeometryAnchor"}),q7=p.Object({geometryAnchor:Ho},{$id:"WithFlaggedGeometryAnchor"}),J7=p.Object({geometryAnchors:p.Array(Ho)},{$id:"WithFlaggedGeometryAnchors"}),T3={name:"ext:mvf-navigation-flags",schema:K7,intoBundle:o(function*(e){e.navigationFlags!=null&&(yield{path:"navigationFlags.json",contents:e.navigationFlags})},"intoBundle"),fromBundle:o((e,t,r)=>e!=="navigationFlags.json"?void 0:{navigationFlags:r(t)},"fromBundle"),references:[B3,M3,_m,Ho,q7,J7],integrityCheck:O3};l();var k3=o(e=>{if(e.connections==null)return ue(!0);let t=Pt(e.connections,i=>i.id,"connections");if(t.isErr())return t;let r=Gt(e),n=ws(e);for(let[i,a]of e.connections.entries()){for(let[u,c]of a.entrances.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=mu(c.flags,n,"connections[".concat(i,"].entrances[").concat(u,"]"));if(d.isErr())return d}for(let[u,c]of a.exits.entries()){let m=r(c.floorId,c.geometryId);if(m.isErr())return m;let d=mu(c.flags,n,"connections[".concat(i,"].exits[").concat(u,"]"));if(d.isErr())return d}}return ue(!0)},"validateConnections");var L3=Ot("c","ConnectionId"),{schema:X7,values:wue,record:Aue,is:Fue}=lr(["elevator","escalator","travelator","stairs","door","ramp","ladder"],{$id:"ConnectionType"}),R3=X7;var N3=p.Intersect([p.Object({id:p.Ref(L3,{description:"The unique identifier for the connection."}),entrances:p.Array(p.Ref(Ho)),exits:p.Array(p.Ref(Ho)),entryCost:p.Number({description:"The cost to enter the connection.",minimum:0}),floorCostMultiplier:p.Number({description:"The cost multiplier for each floor transitioned.",minimum:1}),type:p.Ref(R3,{description:"The type of connection."})}),Vr,On],{$id:"ConnectionsProperties"}),U3=p.Array(p.Ref(N3),{$id:"ConnectionsCollection"}),Y7=p.Object({connections:p.Ref(U3)},{$id:"ConnectionsExtensionSchema"}),_3="connections.json",j3={name:"ext:connections",schema:Y7,intoBundle:o(function*(e){e.connections!=null&&(yield{path:_3,contents:e.connections})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===_3)return{connections:r(t)}},"fromBundle"),references:[N3,U3,R3,L3,Ho,_m],integrityCheck:k3};l();l();var z3=o(e=>{if(e.defaultStyle==null)return ue(!0);let t=Gt(e);for(let r of Object.values(e.defaultStyle))if(r!=null)for(let n of r.geometryAnchors){let i=t(n.floorId,n.geometryId);if(i.isErr())return i}return ue(!0)},"validateDefaultStyle");var $3=p.Intersect([Is(),On,p.Object({altitude:p.Number({description:"How far off the bottom of the floor the objects with this style should be drawn, in meters."}),color:p.String({pattern:"^#[0-9a-fA-F]{6}$",description:"Color should be represented with a hash (#), followed by 6 hexadecimal digits. ex: #RRGGBB"}),height:p.Number({minimum:0,description:"The height of the objects belonging to this layer, in meters."}),opacity:p.Number({minimum:0,maximum:1,description:"The opacity of the objects belonging to this layer, from 0 to 1."}),buffer:p.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:p.Optional(p.Boolean({description:"Whether or not the objects with this style should be hidden."}))})],{$id:"DefaultStyle"}),G3=p.Record(p.String(),p.Ref($3),{$id:"DefaultStyleCollection",additionalProperties:!1}),Q7=p.Object({defaultStyle:p.Ref(G3)},{$id:"DefaultStyleSchema"}),Z3={name:"ext:mvf-default-style",schema:Q7,intoBundle:o(function*(e){e.defaultStyle!=null&&(yield{path:"default-style.json",contents:e.defaultStyle})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="default-style.json")return{defaultStyle:r(t)}},"fromBundle"),references:[$3,G3],integrityCheck:z3};l();l();l();l();var Lm;(function(e){e.InvalidDefaultFloorError="InvalidDefaultFloorError"})(Lm||(Lm={}));var V3=o(e=>{if(e.floorStacks==null)return ue(!0);let t=Pt(e.floorStacks,n=>n.id,"floorStacks");if(t.isErr())return t;let r=Fn(e);for(let n of e.floorStacks){for(let i of n.floors){let a=r(i);if(a.isErr())return a}if(n.defaultFloor!=null&&!n.floors.includes(n.defaultFloor))return se({kind:Lm.InvalidDefaultFloorError,properties:{floorStackId:n.id,floorId:n.defaultFloor}})}return ue(!0)},"validateFloorStacks");var As=Ot("fs","FloorStackId"),H3=p.Intersect([p.Object({id:p.Ref(As,{description:"The unique identifier for the floor stack."}),floors:p.Array(p.Ref(_e),{uniqueItems:!0,minItems:1,description:"The floors that are part of this floor stack."}),defaultFloor:p.Optional(p.Ref(_e,{description:"The default floor for the floor stack."}))}),Vr],{$id:"FloorStacksProperties"}),K3=p.Array(p.Ref(H3),{$id:"FloorStackCollection"}),eP=p.Object({floorStacks:p.Ref(K3)},{$id:"FloorStackExtensionSchema"}),W3="floor-stacks.json",q3={name:"ext:floor-stacks",schema:eP,intoBundle:o(function*(e){e.floorStacks!=null&&(yield{path:W3,contents:e.floorStacks})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===W3)return{floorStacks:r(t)}},"fromBundle"),references:[As,H3,K3],integrityCheck:V3};l();l();var Fs;(function(e){e.MissingFloorStackError="MissingFloorStackError",e.UnknownFloorStackError="UnknownFloorStackError"})(Fs||(Fs={}));var J3=o(e=>{if(e.facade==null)return ue(!0);if(e.floorStacks==null)return se({kind:Fs.MissingFloorStackError,properties:null});let t=new Set(e.floorStacks.map(i=>i.id)),r=Gt(e),n=Fn(e);for(let[i,a]of xr(e.facade)){if(a==null)continue;let u=n(i);if(u.isErr())return u;for(let c of a){let{floorStackId:m,geometryIds:d}=c;if(!t.has(m))return se({kind:Fs.UnknownFloorStackError,properties:{floorStackId:m}});for(let f of d){let g=r(i,f);if(g.isErr())return g}}}return ue(!0)},"validateFacade");var X3=p.Intersect([p.Object({floorStackId:p.Ref(As)}),ou],{$id:"Facade"}),tP=p.Object({facade:Bt(p.Record(_e,p.Array(p.Ref(X3)),{additionalProperties:!1}))},{$id:"FacadeExtensionSchema"}),rP=/^facade\/(.*)\.json$/,Y3={name:"ext:facade",schema:tP,intoBundle:o(function*(e){if(e.facade!=null)for(let t of Qe(e.facade))yield{path:"facade/".concat(t,".json"),contents:e.facade[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(rP))==null?void 0:i[1];if(n)return{facade:{[n]:r(t)}}},"fromBundle"),references:[As,X3],integrityCheck:J3};l();l();var Q3=o(e=>{if(e.floorImages==null)return ue(!0);let t=Gt(e);for(let[r,n]of xr(e.floorImages))if(n!=null)for(let i of n.features){if(!("geometryId"in i.properties))continue;let a=i.properties.geometryId,u=t(r,a);if(u.isErr())return u}return ue(!0)},"validateFloorImages");var Dh=p.Object({path:p.String({format:"uri",description:"The path to the image. This will be a remote URL."}),width:p.Number({minimum:0,description:"The width of the image when represented on the map, in meters."}),height:p.Number({minimum:0,description:"The height of the image when represented on the map, in meters."}),rotation:p.Number({minimum:0,maximum:360,description:"Rotation in degrees, about the center of the image. North is 0, east is 90."})},{$id:"BaseFloorImageProperties"}),eE=p.Intersect([p.Ref(Dh),hn],{$id:"AnchoredFloorImageProperties"}),tE=p.Intersect([p.Ref(Dh),p.Object({verticalOffset:p.Number({minimum:0,description:"How high to position the image, in meters, relative to the ground plane."})})],{$id:"FloatingFloorImageProperties"}),rE=p.Union([eE,tE],{$id:"FloorImageProperties"}),nE=ir(p.Ref(hr),rE,{$id:"FloorImageFeature"}),iE=Fr(p.Ref(nE),{$id:"FloorImageCollection"}),nP=p.Object({floorImages:Bt(p.Record(_e,p.Ref(iE),{additionalProperties:!1}))},{$id:"FloorImagesExtensionSchema"}),iP=/^floorImages\/(.*)\.geojson$/,oE={name:"ext:floor-images",schema:nP,intoBundle:o(function*(e){if(e.floorImages!=null)for(let t of Qe(e.floorImages))yield{path:"floorImages/".concat(t,".geojson"),contents:e.floorImages[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(iP))==null?void 0:i[1];if(n)return{floorImages:{[n]:r(t)}}},"fromBundle"),references:[Dh,eE,tE,rE,nE,iE],integrityCheck:Q3};l();l();var aE=o(e=>{if(e.kinds==null)return ue(!0);let t=Gt(e);for(let[r,n]of xr(e.kinds))if(n!=null)for(let i of Qe(n)){let a=t(r,i);if(a.isErr())return a}return ue(!0)},"validateKinds");var{values:Jse,schema:oP,record:Xse}=lr(["room","hallway","wall","object","poi","area","window"],{$id:"Kind"}),uE=oP;var sE=Bt(p.Record(gr,p.Ref(uE),{additionalProperties:!1,$id:"GeometryKinds"})),aP=p.Object({kinds:Bt(p.Record(_e,p.Ref(sE),{additionalProperties:!1}))},{$id:"KindsExtensionSchema"}),uP=/^kinds\/(.*)\.json$/,cE={name:"ext:kinds",schema:aP,intoBundle:o(function*(e){if(e.kinds!=null)for(let t of Qe(e.kinds))yield{path:"kinds/".concat(t,".json"),contents:e.kinds[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(uP))==null?void 0:i[1];if(n)return{kinds:{[n]:r(t)}}},"fromBundle"),references:[uE,sE],integrityCheck:aE};l();l();l();var Os;(function(e){e.UnknownNeighbor="UnknownNeighbor",e.SelfReference="SelfReference"})(Os||(Os={}));var lE=o(e=>{if(e.nodes==null)return ue(!0);let t=Pt(e.nodes,i=>i.properties.id,"nodes");if(t.isErr())return t;let r=Gt(e),n=ws(e);for(let[i,a]of xr(e.nodes)){if(a==null)continue;let u=new Set(a.features.map(c=>c.properties.id));for(let[c,m]of a.features.entries()){for(let d of m.properties.geometryIds){let f=r(i,d);if(f.isErr())return f}for(let[d,f]of m.properties.neighbors.entries()){if(!u.has(f.id))return se({kind:Os.UnknownNeighbor,properties:{floorId:i,nodeId:m.properties.id,neighborId:f.id}});if(f.id===m.properties.id)return se({kind:Os.SelfReference,properties:{floorId:i,nodeId:m.properties.id}});let g=mu(f.flags,n,'nodes["'.concat(i,'"].features[').concat(c,"].properties.neighbors[").concat(d,"]"));if(g.isErr())return g}}}return ue(!0)},"validateNodes");var Sh=Ot("n","NodeId"),mE=p.Intersect([p.Object({id:p.Ref(Sh,{description:"The unique identifier for the node."}),extraCost:p.Number({minimum:0,description:"The extra cost to traverse to the node, above the straight-line distance."})}),Ih],{$id:"NodeNeighbor"}),dE=p.Intersect([p.Object({id:p.Ref(Sh,{description:"The unique identifier for the node."}),neighbors:p.Array(p.Ref(mE),{description:"The neighbors of the node."})}),ou],{$id:"NodeProperties"}),pE=ir(p.Ref(hr),dE,{$id:"NodeFeature"}),fE=Fr(p.Ref(pE),{$id:"NodeCollection"}),sP=p.Object({nodes:Bt(p.Record(_e,p.Ref(fE),{additionalProperties:!1}))},{$id:"NodesExtensionSchema"}),cP=/^nodes\/(.*)\.(geo)?json$/,hE={name:"ext:nodes",schema:sP,intoBundle:o(function*(e){if(e.nodes!=null)for(let t of Qe(e.nodes))yield{path:"nodes/".concat(t,".geojson"),contents:e.nodes[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var i;let n=(i=e.match(cP))==null?void 0:i[1];if(n)return{nodes:{[n]:r(t)}}},"fromBundle"),references:[Sh,mE,dE,pE,fE],integrityCheck:lE};l();l();l();var Rm;(function(e){e.FloorInFloorStackError="FloorInFloorStackError"})(Rm||(Rm={}));var gE=o(e=>{if(e.outdoors==null)return ue(!0);let t=Fn(e);for(let r of e.outdoors.floors){let n=t(r);if(n.isErr())return n;if(e.floorStacks!=null){for(let i of e.floorStacks)if(i.floors.includes(r))return se({kind:Rm.FloorInFloorStackError,properties:{floorId:r,floorStackId:i.id}})}}return ue(!0)},"validateOutdoors");var bE=p.Object({floors:p.Array(p.Ref(_e),{uniqueItems:!0,description:"A list of floor IDs that should be considered to contain outdoor features."})},{$id:"Outdoors"}),lP=p.Object({outdoors:p.Ref(bE)},{$id:"OutdoorsExtensionSchema"}),yE="outdoors.json",vE={name:"ext:outdoors",schema:lP,intoBundle:o(function*(e){e.outdoors!=null&&(yield{path:yE,contents:e.outdoors})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e===yE)return{outdoors:r(t)}},"fromBundle"),references:[bE],integrityCheck:gE};l();l();l();var Nm;(function(e){e.TilesetDuplicateKeyError="TilesetDuplicateKeyError"})(Nm||(Nm={}));var xE=o(e=>{if(e.tileset==null)return ue(!0);let t=new Set;if(t.add(e.tileset.default.key),e.tileset.others)for(let r of e.tileset.others){if(t.has(r.key))return se({kind:Nm.TilesetDuplicateKeyError,properties:{key:r.key}});t.add(r.key)}return ue(!0)},"validateTilesets");var wh=p.Object({key:p.String({minLength:1,description:"Unique identifier for the tileset style."}),name:p.String({minLength:1,description:"Display name of the tileset style."}),url:p.String({format:"uri",description:"URL of the tileset style."})},{$id:"TilesetStyle",description:"A tileset style definition."}),EE=p.Object({default:p.Ref(wh,{description:"The default tileset style, which should be used."}),others:p.Optional(p.Array(p.Ref(wh,{description:"Additional tileset styles that can be used."})))},{$id:"TilesetCollection"}),mP=p.Object({tileset:p.Ref(EE)},{$id:"TilesetExtensionSchema"}),CE={name:"ext:mvf-tileset",schema:mP,intoBundle:o(function*(e){e.tileset!=null&&(yield{path:"tileset.json",contents:e.tileset})},"intoBundle"),fromBundle:o((e,t,r)=>{if(e==="tileset.json")return{tileset:r(t)}},"fromBundle"),references:[wh,EE],integrityCheck:xE};l();var IE=p.Object({},{$id:"WalkableProperties"}),DE=p.Object({},{$id:"NonWalkableProperties"}),SE=Bt(p.Record(gr,p.Ref(IE),{$id:"WalkableGeometries",additionalProperties:!1})),wE=Bt(p.Record(gr,p.Ref(DE),{$id:"NonWalkableGeometries",additionalProperties:!1})),dP=p.Object({walkable:Bt(p.Record(_e,p.Ref(SE),{additionalProperties:!1})),nonwalkable:Bt(p.Record(_e,p.Ref(wE),{additionalProperties:!1}))},{$id:"TraversabilitySchema"}),pP=/^walkable\/(.*)\.json$/,fP=/^nonwalkable\/(.*)\.json$/,AE={name:"ext:mvf-traversability",schema:dP,intoBundle:o(function*(e){if(e.walkable!=null)for(let t of Qe(e.walkable))yield{path:"walkable/".concat(t,".json"),contents:e.walkable[t]};if(e.nonwalkable!=null)for(let t of Qe(e.nonwalkable))yield{path:"nonwalkable/".concat(t,".json"),contents:e.nonwalkable[t]}},"intoBundle"),fromBundle:o((e,t,r)=>{var a,u;let n=(a=e.match(pP))==null?void 0:a[1];if(n!=null)return{walkable:{[n]:r(t)}};let i=(u=e.match(fP))==null?void 0:u[1];if(i!=null)return{nonwalkable:{[i]:r(t)}}},"fromBundle"),references:[IE,DE,SE,wE]};l();l();l();l();l();l();l();l();l();l();l();var vP=xy(PE(),1);l();l();l();l();var rde=Px().extendOptional(T3).extendOptional(hE).extendOptional(j3).extendOptional(cE).extendOptional(AE).extendOptional(Z3).extendOptional(q3).extendOptional(vE).extendOptional(CE).extendOptional(oE).extendOptional(Y3).extendOptional(kx).extendOptional(Gx).extendOptional(F3).build({cspSafe:!0}).expect("Invalid parser, this should never happen. Likely a bug in the MVFv2 library, or one of the extensions.");l();l();var Ph="\xA9 Mappedin",EP="https://info.mappedin.com/feedback",Mh=["top-left","top-right","bottom-left","bottom-right"],CP=640,IP=o(()=>"<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>","getAttributionButtonIcon"),Bh={custom:[],position:"bottom-right",feedback:!0},du,Th=class Th{constructor(t,r={}){h(this,"controlContainerEl");h(this,"controlPositions");h(this,"compact");R(this,du);h(this,"attribContainerEl");h(this,"attribInnerEl");h(this,"attribButtonEl");h(this,"feedbackLinkEl");h(this,"attribHTML",Ph);h(this,"customAttributions",[]);h(this,"toggleAttribution",o(t=>{this.attribContainerEl!=null&&(t.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",""))))},"toggleAttribution"));H(this,du,!!r.outdoorEnabled),this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=Mh.reduce((n,i)=>{let a=document.createElement("div");return a.classList.add("mappedin-ctrl-".concat(i)),this.controlContainerEl.appendChild(a),n[i]=a,n},{})}addAttributionControl(t=Bh){var i;let r=t.position&&Mh.includes(t.position)?t.position:Bh.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib","mappedin-ctrl-attrib-".concat(r)),this.attribContainerEl.open=!0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[r].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=IP(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribHTML=s(this,du)?Ph:"",this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.appendChild(this.attribInnerEl),((i=t.feedback)!=null?i:Bh.feedback)&&(this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=EP,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)),t.custom&&(this.customAttributions=t.custom),this.updateAttributionDisplay()}updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let r=s(this,du)?[Ph]:[],n=t.style.sourceCaches;for(let i in n){let a=n[i];if(a.used||a.usedForTerrain){let u=a.getSource();u.attribution&&r.indexOf(u.attribution)<0&&r.push(u.attribution)}}r=r.filter(i=>String(i).trim()),r=r.filter((i,a)=>{for(let u=a+1;u<r.length;u++)if(r[u].indexOf(i)>=0)return!1;return!0}),this.attribHTML=r.join(" "),this.updateAttributionDisplay()}updateAttributionDisplay(){let t=[...new Set([this.attribHTML,...this.customAttributions])].filter(Boolean).join(" ");this.attribInnerEl&&(this.attribInnerEl.innerHTML=t)}resizeAttribution(t){this.attribContainerEl&&(t<=CP||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(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};du=new WeakMap,o(Th,"HTMLControlsSystem");var jm=Th;l();l();var gn=Object.freeze({Linear:Object.freeze({None:o(function(e){return e},"None"),In:o(function(e){return e},"In"),Out:o(function(e){return e},"Out"),InOut:o(function(e){return e},"InOut")}),Quadratic:Object.freeze({In:o(function(e){return e*e},"In"),Out:o(function(e){return e*(2-e)},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},"InOut")}),Cubic:Object.freeze({In:o(function(e){return e*e*e},"In"),Out:o(function(e){return--e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},"InOut")}),Quartic:Object.freeze({In:o(function(e){return e*e*e*e},"In"),Out:o(function(e){return 1- --e*e*e*e},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},"InOut")}),Quintic:Object.freeze({In:o(function(e){return e*e*e*e*e},"In"),Out:o(function(e){return--e*e*e*e*e+1},"Out"),InOut:o(function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},"InOut")}),Sinusoidal:Object.freeze({In:o(function(e){return 1-Math.sin((1-e)*Math.PI/2)},"In"),Out:o(function(e){return Math.sin(e*Math.PI/2)},"Out"),InOut:o(function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))},"InOut")}),Exponential:Object.freeze({In:o(function(e){return e===0?0:Math.pow(1024,e-1)},"In"),Out:o(function(e){return e===1?1:1-Math.pow(2,-10*e)},"Out"),InOut:o(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)},"InOut")}),Circular:Object.freeze({In:o(function(e){return 1-Math.sqrt(1-e*e)},"In"),Out:o(function(e){return Math.sqrt(1- --e*e)},"Out"),InOut:o(function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},"InOut")}),Elastic:Object.freeze({In:o(function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},"In"),Out:o(function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},"Out"),InOut:o(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)},"InOut")}),Back:Object.freeze({In:o(function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},"In"),Out:o(function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},"Out"),InOut:o(function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},"InOut")}),Bounce:Object.freeze({In:o(function(e){return 1-gn.Bounce.Out(1-e)},"In"),Out:o(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},"Out"),InOut:o(function(e){return e<.5?gn.Bounce.In(e*2)*.5:gn.Bounce.Out(e*2-1)*.5+.5},"InOut")}),generatePow:o(function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:o(function(t){return Math.pow(t,e)},"In"),Out:o(function(t){return 1-Math.pow(1-t,e)},"Out"),InOut:o(function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5},"InOut")}},"generatePow")}),Ps=o(function(){return performance.now()},"now"),zm=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return o(e,"Group"),e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(r){return t._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var u=a[i];(t=u._group)===null||t===void 0||t.remove(u),u._group=this,this._tweens[u.getId()]=u,this._tweensAddedDuringUpdate[u.getId()]=u}},e.prototype.remove=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,r){t===void 0&&(t=Ps()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var a=this._tweens[n[i]],u=!r;a&&a.update(t,u)===!1&&!r&&this.remove(a)}n=Object.keys(this._tweensAddedDuringUpdate)}},e}(),pu={Linear:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=pu.Utils.Linear;return t<0?a(e[0],e[1],n):t>1?a(e[r],e[r-1],r-n):a(e[i],e[i+1>r?r:i+1],n-i)},"Linear"),Bezier:o(function(e,t){for(var r=0,n=e.length-1,i=Math.pow,a=pu.Utils.Bernstein,u=0;u<=n;u++)r+=i(1-t,n-u)*i(t,u)*e[u]*a(n,u);return r},"Bezier"),CatmullRom:o(function(e,t){var r=e.length-1,n=r*t,i=Math.floor(n),a=pu.Utils.CatmullRom;return e[0]===e[r]?(t<0&&(i=Math.floor(n=r*(1+t))),a(e[(i-1+r)%r],e[i],e[(i+1)%r],e[(i+2)%r],n-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[r]-(a(e[r],e[r],e[r-1],e[r-1],n-r)-e[r]):a(e[i?i-1:0],e[i],e[r<i+1?r:i+1],e[r<i+2?r:i+2],n-i)},"CatmullRom"),Utils:{Linear:o(function(e,t,r){return(t-e)*r+e},"Linear"),Bernstein:o(function(e,t){var r=pu.Utils.Factorial;return r(e)/r(t)/r(e-t)},"Bernstein"),Factorial:function(){var e=[1];return function(t){var r=1;if(e[t])return e[t];for(var n=t;n>1;n--)r*=n;return e[t]=r,r}}(),CatmullRom:o(function(e,t,r,n,i){var a=(r-e)*.5,u=(n-t)*.5,c=i*i,m=i*c;return(2*t-2*r+a+u)*m+(-3*t+3*r-2*a-u)*c+a*i+t},"CatmullRom")}},BE=function(){function e(){}return o(e,"Sequence"),e.nextId=function(){return e._nextId++},e._nextId=0,e}(),kh=new zm,ME=function(){function e(t,r){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=gn.Linear.None,this._interpolationFunction=pu.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=BE.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=kh,kh.add(this))}return o(e,"Tween"),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(t,r){if(r===void 0&&(r=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=t,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,r){if(t===void 0&&(t=Ps()),r===void 0&&(r=!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=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,r,n,i,a){for(var u in n){var c=t[u],m=Array.isArray(c),d=m?"array":typeof c,f=!m&&Array.isArray(n[u]);if(!(d==="undefined"||d==="function")){if(f){var g=n[u];if(g.length===0)continue;for(var v=[c],b=0,S=g.length;b<S;b+=1){var F=this._handleRelativeValue(c,g[b]);if(isNaN(F)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}v.push(F)}f&&(n[u]=v)}if((d==="object"||m)&&c&&!f){r[u]=m?[]:{};var E=c;for(var x in E)r[u][x]=E[x];i[u]=m?[]:{};var g=n[u];if(!this._isDynamic){var D={};for(var x in g)D[x]=g[x];n[u]=g=D}this._setupProperties(E,r[u],g,i[u],a)}else(typeof r[u]>"u"||a)&&(r[u]=c),m||(r[u]*=1),f?i[u]=n[u].slice().reverse():i[u]=r[u]||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(t){return t===void 0&&(t=Ps()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=Ps()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,r=this._chainedTweens.length;t<r;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=gn.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=pu.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,r){var n=this,i;if(t===void 0&&(t=Ps()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<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 u=t-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),m=this._duration+this._repeat*c,d=o(function(){if(n._duration===0||u>m)return 1;var F=Math.trunc(u/c),E=u-F*c,x=Math.min(E/n._duration,1);return x===0&&u===n._duration?1:x},"calculateElapsedPortion"),f=d(),g=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||u>=this._duration)if(this._repeat>0){var v=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=v);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*v,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,S=this._chainedTweens.length;b<S;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,r,n,i){for(var a in n)if(r[a]!==void 0){var u=r[a]||0,c=n[a],m=Array.isArray(t[a]),d=Array.isArray(c),f=!m&&d;f?t[a]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(t[a],u,c,i):(c=this._handleRelativeValue(u,c),typeof c=="number"&&(t[a]=u+(c-u)*i))}},e.prototype._handleRelativeValue=function(t,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?t+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(t){var r=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=r},e.autoStartOnUpdate=!1,e}();var Qde=BE.nextId,ii=kh,epe=ii.getAll.bind(ii),tpe=ii.removeAll.bind(ii),rpe=ii.add.bind(ii),npe=ii.remove.bind(ii),ipe=ii.update.bind(ii);l();l();l();l();l();var TE=o((e,t)=>(t-e+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),kE=o((e,t)=>new Se(e.clientX-t.offsetLeft,e.clientY-t.offsetTop),"getTouchPos"),_h=o((e,t)=>Math.atan2(t.y-e.y,t.x-e.x),"angle"),Bs=o((e,t)=>Math.sqrt((t.y-e.y)**2+(t.x-e.x)**2),"distance"),Lh=o((e,t)=>new Se((e.x+t.x)/2,(e.y+t.y)/2),"average"),Rh=o(e=>{let t=0,{wheelDelta:r,detail:n}=e;return r!==void 0?t=r:n!==void 0&&(t=-n),t},"getScrollDelta");var Nh=class Nh{constructor(t,r){h(this,"input1");h(this,"input2");h(this,"lastAngle");h(this,"lastDistance");h(this,"totalDistance");h(this,"first");h(this,"second");this.input1=t,this.input2=r,this.lastAngle=_h(t,r),this.lastDistance=Bs(t,r),this.totalDistance=0,this.first=t,this.second=r}update(t,r){let n=Bs(t,r);this.input1=t,this.input2=r;let i=_h(t,r);this.lastAngle=i,this.lastDistance=n,this.totalDistance+=(Bs(this.first,t)+Bs(this.second,r))/2,this.first=Lh(this.first,t),this.second=Lh(this.second,r)}};o(Nh,"InputSet");var $m=Nh;l();var Uh=class Uh{constructor(t,r,n){h(this,"touch");h(this,"camera");h(this,"cameraPlane");h(this,"viewCoordinate");h(this,"snapHolderMatrix");h(this,"snapCamera");h(this,"cameraPosition");h(this,"raycaster");h(this,"worldCoordinate");h(this,"snapshotted",!1);this.touch=t,this.camera=r,this.cameraPlane=n,this.viewCoordinate={x:t.x,y:t.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 t=new Se(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Un,this.raycaster.setFromCamera(t,this.snapCamera);let r=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=r&&r.length>0?r[0].point:null,this.snapshotted=!0}updateAnchorState(t,r){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(r),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var n,i;let t=new Se(this.viewCoordinate.x,this.viewCoordinate.y);(n=this.raycaster)==null||n.setFromCamera(t,this.snapCamera);let r=(i=this.raycaster)==null?void 0:i.intersectObject(this.cameraPlane,!0)[0];return r?r.point:void 0}};o(Uh,"TouchAnchor");var Ms=Uh;var yn={};$i(yn,{BLOCK_MERCATOR_ZOOM_LEVEL:()=>SP,CLIPPING_RADIUS:()=>Ts,CONTROL_OPTIONS:()=>DP,DEFAULT_ANIMATION_DURATION:()=>Zh,DEFAULT_BEARING:()=>PP,DEFAULT_MAX_ZOOM_LEVEL:()=>FP,DEFAULT_MIN_ZOOM_LEVEL:()=>Vh,DEFAULT_PITCH:()=>OP,DEFAULT_ZOOM_LEVEL:()=>AP,EVENTS:()=>Wm,MAPLIBRE_TILE_SIZE:()=>Gm,MAX_LAT:()=>zh,MAX_MERCATOR_ZOOM_LEVEL:()=>Vm,MIN_LAT:()=>jh,MIN_MERCATOR_ZOOM_LEVEL:()=>Zm,ROOM_MERCATOR_ZOOM_LEVEL:()=>wP,TWO_PI:()=>$h,WHEEL_ZOOM_MULTIPLIER:()=>Gh,ZRANGE:()=>fu});l();var Gm=512,jh=-85.051129,zh=85.051129,Ts=1e4,DP={chain:"chain",cancel:"cancel"},$h=Math.PI*2,fu=100,Gh=1e4,Zm=0,Vm=24,SP=17,wP=20,Zh=200,Wm=["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"],AP=18,Vh=12,FP=22,OP=0,PP=0;var Hm=!1,BP=!1;var Km,qm=class qm extends ke{constructor(r,n,i,a,u){super();h(this,"dirty",!1);h(this,"zoomDirty",!1);h(this,"rotationDirty",!1);h(this,"panDirty",!1);h(this,"stateDirty",!1);R(this,Km,Vh);h(this,"zoomSpeed",5);h(this,"rotateSpeed",100);h(this,"enabled",!0);h(this,"enableZoom",!0);h(this,"enablePan",!0);h(this,"enablePedestal",!1);h(this,"maxPedestal",1/0);h(this,"minPedestal",0);h(this,"enableRotate",!0);h(this,"minZoomAltitude",0);h(this,"maxZoomAltitude",1/0);h(this,"ignoreZoomLimits",!1);h(this,"zoomFactor",1);h(this,"panBounds",{min:new ae(1/0,1/0),max:new ae(-1/0,-1/0),center:new ae(0,0,0),radius:1/0});h(this,"minTilt",0);h(this,"maxTilt",1.2);h(this,"MOUSE_BUTTONS",{ORBIT:Ic.RIGHT,ZOOM:Ic.MIDDLE,PAN:Ic.LEFT});h(this,"camera");h(this,"scene");h(this,"renderer");h(this,"elevation");h(this,"orbit");h(this,"cameraPlane");h(this,"raycaster",new Un);h(this,"rendererState");h(this,"options");h(this,"state",-1);h(this,"intersection");h(this,"viewState",null);h(this,"tweens",new Map);h(this,"clock",new Ry(!0));h(this,"coords",{mouse:new Se,rotateStart:new Se,rotateEnd:new Se,rotateDelta:new Se,panStart:new ae,panCameraStart:new ae,panEnd:new ae,panDelta:new ae,initialShiftPos:new Se,initialPedestal:0,floorAnchor:new ae});h(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});h(this,"scrollTimer",null);h(this,"lastWheelTime",0);h(this,"resetZoom",!1);h(this,"zoomStart");h(this,"pedestalScaleFactor",1);h(this,"isUserZooming",!1);h(this,"stayInsideBounds",!0);h(this,"userInteracting",!1);h(this,"cameraMoving",!1);h(this,"lastCameraMoveTime",Date.now());h(this,"raycastToFloor",o(r=>{this.raycaster.setFromCamera(r,this.camera);let n=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return n?n.point:new ae},"raycastToFloor"));h(this,"isUserInteracting",o(()=>this.userInteracting,"isUserInteracting"));h(this,"getPosition",o(()=>new ae(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z),"getPosition"));h(this,"getPedestal",o(()=>this.orbit.position.z,"getPedestal"));h(this,"pan",o((r,n)=>{isNaN(r)||isNaN(n)||(this.setPosition(this.orbit.position.x+r,this.orbit.position.y+n),this.publish("position-updated"))},"pan"));h(this,"postRender",o(()=>{(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"))},"postRender"));h(this,"isCameraMoving",o(()=>this.cameraMoving,"isCameraMoving"));h(this,"lastCameraStoppedMovingTime",o(()=>this.lastCameraMoveTime,"lastCameraStoppedMovingTime"));h(this,"setPosition",o((r,n)=>{r===void 0||n===void 0||isNaN(r)||isNaN(n)||(this.state===-1&&this.publish("pan-start"),this.updateCameraPosition(r,n),this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0,this.stateDirty=!0)},"setPosition"));h(this,"updateCameraPosition",o((r,n)=>{let i=r-this.panBounds.center.x,a=n-this.panBounds.center.y,u=Math.sqrt(i*i+a*a);if(this.stayInsideBounds&&u>this.panBounds.radius){let c=Math.atan2(a,i),m={x:Math.cos(c)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(c)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=m.x,this.orbit.position.y=m.y}else this.orbit.position.x=r,this.orbit.position.y=n},"updateCameraPosition"));h(this,"tilt",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(r+this.getTilt(),this.maxTilt),this.minTilt):r+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},"tilt"));h(this,"zoomIn",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a/1.5},r,n,i)},"zoomIn"));h(this,"zoomOut",o((r,n,i)=>{let a=this.getZoomAltitude();this.animateCamera({zoom:a*1.5},r,n,i)},"zoomOut"));h(this,"getRotation",o(()=>(-this.orbit.rotation.z+Math.PI*2)%(Math.PI*2),"getRotation"));h(this,"cancelAnimation",o(()=>{let r=Array.from(this.tweens.keys());if(r.length<1)return;let n=r[r.length-1];n.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(n)},"cancelAnimation"));h(this,"animateCamera",o((r,n,i,a,u,c)=>{let m=U({interruptible:!0},c),d={},f={},g=this.getPosition();if(r.position!=null&&(r.position.x!==void 0&&(d.x=g.x,f.x=r.position.x),r.position.y!==void 0&&(d.y=g.y,f.y=r.position.y),r.position.z!==void 0&&(d.z=g.z,f.z=r.position.z)),r.zoom!==void 0&&(d.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.zoom=r.zoom:f.zoom=Math.min(Math.max(r.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),r.rotation!==void 0){let{start:I,end:C}=Vy(this.getRotation(),r.rotation);d.rotation=I,f.rotation=C}r.tilt!==void 0&&(d.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.tilt=r.tilt:f.tilt=Math.max(Math.min(r.tilt,this.maxTilt),this.minTilt));let v=d.zoom!==f.zoom,b=d.rotation!==f.rotation,S=d.tilt!==f.tilt,F=new ME(d).to(f,y.env.TESTING?0:n).onUpdate(I=>{this.setMulti({x:I.x,y:I.y,z:I.z},I.zoom,I.rotation,I.tilt)}).onComplete(()=>{this.completeTween(F),this.publish("multi-end",{zooming:v,rotating:b,tilting:S}),a&&a()}).onStart(()=>{this.state!==7&&(this.state=7,F.state=7,this.publish("multi-start",{zooming:v,rotating:b,tilting:S})),this.publish("change")});this.rendererState.internalTweenGroup.add(F);let E=Array.from(this.tweens.entries()),x=E[E.length-1],D=!1;return x!=null&&(x[1].interruptible?(typeof x[1].cancelledCallback=="function"&&x[1].cancelledCallback(),this.completeTween(x[0])):(D=!0,x[0].chain(F))),this.tweens.set(F,{cancelledCallback:u,interruptible:m.interruptible}),i?F.easing(i):F.easing(gn.Quadratic.In),!r.doNotAutoStart&&!D&&(F.start(),this.publish("change")),F.cameraAnimation=!0,F},"animateCamera"));h(this,"setMulti",o((r,n,i,a,u=!0)=>{this.state===-1&&this.publish("multi-start");let c=!1;r!=null&&(r.x!==void 0&&!isNaN(r.x)&&r.y!==void 0&&!isNaN(r.y)&&(this.updateCameraPosition(r.x,r.y),c=!0),r.z!==void 0&&!isNaN(r.z)&&(this.setPedestal(r.z,!0,!1),c=!0)),c&&this.publish("position-updated");let m={zooming:!1,tilting:!!n,rotating:!1};if(n!==void 0&&!isNaN(n)){let d=this.stayInsideBounds?Math.min(Math.max(n,this.getZoomScaledMin()),this.getZoomScaledMax()):n;d!==this.camera.position.z&&(m.zooming=!0,this.camera.position.z=d,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?n>Ts&&(this.camera.near=n-Ts,this.camera.far=n+Ts):(this.camera.near=n/fu,this.camera.far=n*fu),this.camera.updateProjectionMatrix())}if(i!==void 0&&!isNaN(i)&&i!==this.getRotation()&&(m.rotating=!0,this.orbit.rotation.z=-i,this.publish("rotation-updated")),a!==void 0&&!isNaN(a)){let d=this.stayInsideBounds?Math.max(Math.min(a,this.maxTilt),this.minTilt):a;d!==this.elevation.rotation.x&&(m.tilting=!0,this.elevation.rotation.x=d,this.publish("tilt-updated"))}u&&this.publish("change"),this.state===-1&&this.publish("multi-end",m),this.stateDirty=!0},"setMulti"));h(this,"getZoomScaledMin",o(()=>this.minZoomAltitude*this.zoomFactor,"getZoomScaledMin"));h(this,"getZoomScaledMax",o(()=>{let r=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,r)},"getZoomScaledMax"));h(this,"setRotation",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=-(r%$h);i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,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)},"setRotation"));h(this,"setZoomAltitude",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.stayInsideBounds?Math.min(Math.max(r,this.getZoomScaledMin()),this.getZoomScaledMax()):r;n!==this.camera.position.z&&(this.camera.position.z=n,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=n/fu,this.camera.far=n*fu,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0,this.stateDirty=!0},"setZoomAltitude"));h(this,"setZoomLevel",o(r=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(r))},"setZoomLevel"));h(this,"getZoomAltitude",o(()=>this.camera.position.z,"getZoomAltitude"));h(this,"getZoomLevel",o(()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()),"getZoomLevel"));h(this,"setTilt",o((r,n)=>{if(isNaN(r))return;this.state===-1&&!n&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(r,this.maxTilt),this.minTilt):r;i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,n||this.publish("tilt-updated")),n||this.publish("change"),this.state===-1&&!n&&this.publish("rotate-end"),this.dirty=!0,n||(this.stateDirty=!0)},"setTilt"));h(this,"getTilt",o(()=>this.elevation.rotation.x,"getTilt"));h(this,"setCameraPlaneElevation",o(r=>{this.cameraPlane.position.z=r},"setCameraPlaneElevation"));h(this,"zoom",o(r=>{if(isNaN(r))return;this.state===-1&&this.publish("zoom-start");let n=this.getZoomAltitude()-r;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},"zoom"));h(this,"getProjectionScaleFactor",o((r,n,i)=>Ip(r,n,i),"getProjectionScaleFactor"));h(this,"update",o(()=>{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())},"update"));h(this,"setPedestal",o((r,n=!1,i=!0)=>{typeof r=="number"&&!isNaN(r)&&(this.orbit.position.z=r,n&&(this.publishPedestalChangeEvent(r),this.publish("pedestal-change",{pedestal:r})),this.publish("change"),this.dirty=!0,i&&(this.stateDirty=!0))},"setPedestal"));h(this,"dispose",o(()=>{for(let r of Wm)r.endsWith("start")?(this.off(r,this.setCameraMoving),r.startsWith("user")&&this.off(r,this.setUserInteracting)):(r.endsWith("end")||r.endsWith("cancel"))&&(this.off(r,this.unsetCameraMoving),r.startsWith("user")&&this.off(r,this.unsetUserInteracting));this.removeEventListeners(),this.scene.remove(this.cameraPlane),this.destroy()},"dispose"));h(this,"createCameraPlane",o(()=>{let r=Hm?2e3:1e10,n=Hm?100:1,i=new En(r,r,n,n),a=new dr({color:0,wireframe:Hm,visible:Hm}),u=new Pe(i,a);return this.scene.add(u),u},"createCameraPlane"));h(this,"addEventListeners",o(()=>{let{domElement:r}=this.renderer;for(let n of Wm)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));r.addEventListener("contextmenu",this.onContextMenu,!1),r.addEventListener("mousedown",this.onMouseDown,!1),r.addEventListener("wheel",this.onMouseWheel,{passive:!1}),r.addEventListener("touchstart",this.onTouchStart,!1),r.addEventListener("touchend",this.onTouchEnd,!1),r.addEventListener("touchmove",this.onTouchMove,!1)},"addEventListeners"));h(this,"addMouseEventListeners",o(()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)},"addMouseEventListeners"));h(this,"addMouseMoveEventListeners",o(()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)},"addMouseMoveEventListeners"));h(this,"removeMouseMoveEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)},"removeMouseMoveEventListeners"));h(this,"removeEventListeners",o(()=>{let{domElement:r}=this.renderer;r.removeEventListener("contextmenu",this.onContextMenu,!1),r.removeEventListener("mousedown",this.onMouseDown,!1),r.removeEventListener("wheel",this.onMouseWheel,!1),r.removeEventListener("touchstart",this.onTouchStart,!1),r.removeEventListener("touchend",this.onTouchEnd,!1),r.removeEventListener("touchmove",this.onTouchMove,!1),r.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeEventListeners"));h(this,"removeMouseUpEventListeners",o(()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)},"removeMouseUpEventListeners"));h(this,"onContextMenu",o(r=>{r.preventDefault()},"onContextMenu"));h(this,"onMouseUp",o(()=>{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}},"onMouseUp"));h(this,"onMouseMove",o(r=>{if(this.enabled!==!1)if(r.preventDefault(),this.mouseToScene(r),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(r)}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(r)},"onMouseMove"));h(this,"onTouchStart",o(r=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(r),r.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(r),this.state=9):this.enablePan&&(this.handleTouchStartPan(r),this.state=6);break;case 2:this.touch.inputs=new $m(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}},"onTouchStart"));h(this,"onTouchMove",o(r=>{if(this.enabled!==!1)switch(this.touchToScene(r),r.touches.length){case 2:r.preventDefault(),r.stopPropagation();let n=U({},this.touch.inputs.first),i=U({},this.touch.inputs.second),a=new Se(this.touch.touches[0].x,this.touch.touches[0].y),u=new Se(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(r);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let c=n.y<a.y&&i.y<u.y,m=n.y>a.y&&i.y>u.y;this.enableRotate&&this.state!==4&&(m||c)?(this.handleTouchStartTilt(r),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(r.preventDefault(),r.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(r):this.enablePan&&this.state===6&&this.handleTouchMovePan(r);break;default:this.state=-1}},"onTouchMove"));h(this,"onTouchEnd",o(r=>{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}r.touches.length?this.onTouchStart(r):this.state=-1}},"onTouchEnd"));h(this,"handleTouchMovePan",o(r=>{let n=Object.hasOwn(r,"x")?new Se(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panEnd.set(i.x,i.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},"handleTouchMovePan"));h(this,"handleTouchStartDolly",o(()=>{let r=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 i=new Se(this.touch.touches[0].x-r/2,this.touch.touches[0].y-n/2);this.coords.floorAnchor=this.raycastToFloor(i),this.orbit.updateMatrixWorld(),this.touch.anchor1=new Ms(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new Ms(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")},"handleTouchStartDolly"));h(this,"handleMouseMovePan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(r.x,r.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},"handleMouseMovePan"));h(this,"handleTouchStartTilt",o(r=>{this.coords.rotateStart.set(r.touches[1].clientX,r.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")},"handleTouchStartTilt"));h(this,"handleTouchMovePedestal",o(r=>{this.handleMouseMovePedestal(r.touches[0])},"handleTouchMovePedestal"));h(this,"handleTouchMoveTilt",o(r=>{this.coords.rotateEnd.set(r.touches[1].clientX,r.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)},"handleTouchMoveTilt"));h(this,"handleTouchMoveDolly",o(()=>{let r=this.touch.inputs.first,n=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:r.x,y:r.y},this.touch.anchor2.viewCoordinate={x:n.x,y:n.y};let i=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);i&&this.setCameraFromTransformMatrix(i),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,r),this.touch.anchor2.updateAnchorState(this.camera,n)},"handleTouchMoveDolly"));h(this,"handleTouchEnd",o(()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end"),this.panDirty=!1},"handleTouchEnd"));h(this,"handleTouchStartPan",o(r=>{let n=Object.hasOwn(r,"x")?new Se(r.x,r.y):this.touch.touches[0],i=this.raycastToFloor(n);this.coords.panStart.set(i.x,i.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")},"handleTouchStartPan"));h(this,"handleTouchStartPedestal",o(r=>{this.handleMouseDownPedestal(r.touches[0])},"handleTouchStartPedestal"));h(this,"onMouseDown",o(r=>{if(this.enabled!==!1){if(this.mouseToScene(r),r.preventDefault(),this.state===3&&this.publish("zoom-end"),r.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(r),this.state=0}else r.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(r),this.state=8));this.state!==-1&&this.addMouseEventListeners()}},"onMouseDown"));h(this,"onMouseWheel",o(r=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(r.preventDefault(),r.stopPropagation(),this.mouseToScene(r),this.canScrollZoom(r)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(r)&&(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(r))},"onMouseWheel"));h(this,"handleMouseWheel",o(r=>{if(this.publish("zoom-start"),!this.canScrollZoom(r)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let n=this.getZoomAltitude(),i=n-Rh(r)*n/Gh*this.zoomSpeed;if(this.setZoomAltitude(i),this.enablePan){let a=i/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-a),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y)}this.publish("change")},"handleMouseWheel"));h(this,"setCameraFromTransformMatrix",o(r=>{this.orbit.updateMatrixWorld();let n=new sa;n.setFromRotationMatrix(r,"ZYX");let i=(r.elements[14]-this.cameraPlane.position.z)/Math.cos(n.x),a=n.z,u=new ae(0,0,1);u.applyEuler(n),u.setLength(i);let c=new ae;c.setFromMatrixPosition(r),c.sub(u),this.enablePan&&this.setPosition(c.x,c.y),this.enableZoom&&this.setZoomAltitude(i),this.enableRotate&&this.setRotation(-a)},"setCameraFromTransformMatrix"));h(this,"makeTransformFromTouchAnchors",o((r,n)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let i=this.camera.projectionMatrix.clone(),a=r.worldCoordinate,u=n.worldCoordinate,c=r.reUnproject(),m=n.reUnproject();if(!c||!m||!a||!u)return null;let d=r.viewCoordinate,f=n.viewCoordinate,g=u.x-a.x,v=u.y-a.y,b=Math.atan2(v,g),S=m.x-c.x,F=m.y-c.y,E=Math.atan2(F,S),x=TE(b,E),D=new zr;D.makeRotationZ(-x);let I=D.clone();I.multiply(r.snapHolderMatrix);let C=o((wC,AC,FC)=>wC.elements[(AC-1)*4+FC-1],"m"),k=C(i,1,1)*C(I,1,1)-d.x*C(i,3,4)*C(I,3,1),V=C(i,1,1)*C(I,1,2)-d.x*C(i,3,4)*C(I,3,2),$=C(i,1,1)*C(I,1,3)-d.x*C(i,3,4)*C(I,3,3),T=a.x*k+a.y*V+a.z*$,w=C(i,2,2)*C(I,2,1)-d.y*C(i,3,4)*C(I,3,1),L=C(i,2,2)*C(I,2,2)-d.y*C(i,3,4)*C(I,3,2),_=C(i,2,2)*C(I,2,3)-d.y*C(i,3,4)*C(I,3,3),G=a.x*w+a.y*L+a.z*_,ie=C(i,1,1)*C(I,1,1)-f.x*C(i,3,4)*C(I,3,1),Q=C(i,1,1)*C(I,1,2)-f.x*C(i,3,4)*C(I,3,2),le=C(i,1,1)*C(I,1,3)-f.x*C(i,3,4)*C(I,3,3),Z=u.x*ie+u.y*Q+u.z*le,Y=C(i,2,2)*C(I,2,1)-f.y*C(i,3,4)*C(I,3,1),ee=C(i,2,2)*C(I,2,2)-f.y*C(i,3,4)*C(I,3,2),q=C(i,2,2)*C(I,2,3)-f.y*C(i,3,4)*C(I,3,3),ce=u.x*Y+u.y*ee+u.z*q,Ie=Math.abs(ie-k),Te=Math.abs(Q-V),We=Math.abs(le-$),He=Math.abs(ie-w),Fe=Math.abs(Q-L),it=Math.abs(le-_),jt=Math.abs(Y-k),qt=Math.abs(ee-V),O=Math.abs(q-$),J=Math.abs(Y-w),P=Math.abs(ee-L),oe=Math.abs(q-_),X=Math.min(Ie+Te+We,He+Fe+it),te=Math.min(jt+qt+O,J+P+oe);X<te&&(ie=Y,Q=ee,le=q,Z=ce);let De=w*$-k*_,vt=L*$-V*_,Ir=G*$-T*_,fe=ie*_-w*le,me=Q*_-L*le,ht=Z*_-G*le,zi=(ht*vt-Ir*me)/(fe*vt-De*me),Tu=(ht*De-Ir*fe)/(me*De-vt*fe),xc=L*k-V*w,ku=_*k-$*w,DC=G*k-T*w,by=Q*w-L*ie,SC=le*w-_*ie,vy=((Z*w-G*ie)*xc-DC*by)/(SC*xc-ku*by),Ec=I.clone();return Ec.elements[12]=zi,Ec.elements[13]=Tu,Ec.elements[14]=vy,vy>0?Ec:null},"makeTransformFromTouchAnchors"));h(this,"updateTouchOrigin",o(()=>{let r=this.renderer.domElement;this.touch.origin.offsetLeft=r.getBoundingClientRect().left,this.touch.origin.offsetTop=r.getBoundingClientRect().top},"updateTouchOrigin"));h(this,"touchToScene",o(r=>{this.touch.touches=[];for(let n=0,i=r.touches.length;n<i;n++){let a=r.touches[n],u=kE(a,this.touch.origin);this.touch.touches.push(new Se(u.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(u.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]},"touchToScene"));h(this,"canScrollZoom",o(r=>{let n=Rh(r),i=this.getZoomAltitude();return!(n<0&&i===this.getZoomScaledMax()||n>0&&i===this.getZoomScaledMin())},"canScrollZoom"));h(this,"mouseToScene",o(r=>{let n=this.getMousePos(r);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},"mouseToScene"));h(this,"getMousePos",o(r=>({x:r.offsetX,y:r.offsetY}),"getMousePos"));h(this,"handleMouseDownRotate",o(r=>{this.coords.rotateStart.set(r.clientX,r.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")},"handleMouseDownRotate"));h(this,"handleMouseDownPan",o(()=>{let r=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(r.x,r.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")},"handleMouseDownPan"));h(this,"handleMouseDownPedestal",o(r=>{let n=new Se(r.clientX,r.clientY);this.coords.initialShiftPos=n,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=Ip(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")},"handleMouseDownPedestal"));h(this,"handleMouseMovePedestal",o(r=>{let n={x:r.clientX,y:r.clientY},i=this.coords.initialPedestal+this.pedestalScaleFactor*(n.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(i<this.minPedestal?i=Math.max(i,this.minPedestal):i>this.maxPedestal&&(i=Math.min(i,this.maxPedestal))),i!==this.getPedestal()&&this.setPedestal(i,!0)},"handleMouseMovePedestal"));h(this,"handleMouseMoveRotate",o(r=>{this.coords.rotateEnd.set(r.clientX,r.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")},"handleMouseMoveRotate"));h(this,"publishUserZoomDebounced",da(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));h(this,"publishUserZoomEvent",o(()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())},"publishUserZoomEvent"));h(this,"setCameraMoving",o(()=>{this.cameraMoving=!0},"setCameraMoving"));h(this,"unsetCameraMoving",o(()=>{this.cameraMoving=!1,this.lastCameraMoveTime=Date.now()},"unsetCameraMoving"));h(this,"setUserInteracting",o(()=>{this.userInteracting=!0},"setUserInteracting"));h(this,"unsetUserInteracting",o(()=>{this.userInteracting=!1},"unsetUserInteracting"));h(this,"publishPedestalChangeEvent",o(r=>{this.publish("pedestal-change",{pedestal:r,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})},"publishPedestalChangeEvent"));h(this,"convertAltitudeToZoomLevel",o(r=>{let[,n]=this.center,i=this.computeMetersPerPixelFromAltitude(r),a=Math.cos(Oe.degToRad(n))*2*Math.PI*bp/i;return Oe.clamp(Math.log2(a/512),Zm,Vm)},"convertAltitudeToZoomLevel"));h(this,"convertZoomLevelToAltitude",o(r=>this.computeMetersPerPixelFromZoomLevel(r)*this.options.canvasHeight/2/Math.tan(Oe.degToRad(this.camera.fov)/2),"convertZoomLevelToAltitude"));h(this,"completeTween",o(r=>{r.isPlaying()&&r.stop(),this.rendererState.internalTweenGroup.remove(r),this.tweens.delete(r)},"completeTween"));h(this,"debugContainer",new wo);this.camera=r,this.renderer=i,this.rendererState=a,this.scene=n,this.options=u,this.elevation=r.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=r.position.z,u.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(r){this.minZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get defaultMinZoomLevel(){return s(this,Km)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(r){this.maxZoomAltitude=this.convertZoomLevelToAltitude(r),this.stateDirty=!0}get scrollPercent(){let r=this.minPedestal,n=this.maxPedestal,i=this.getPedestal();return i=Math.min(i,n),i=Math.max(i,r),(i-r)/(n-r)*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 a,u,c,m;let r=this.getPosition(),{lat:n,lon:i}=Gc((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(m=(c=this.rendererState.center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n]}setCenter(r,n){var u,c,m,d;let{x:i,y:a}=Zc((c=(u=this.rendererState.center)==null?void 0:u[1])!=null?c:0,(d=(m=this.rendererState.center)==null?void 0:m[0])!=null?d:0,n,r);this.setPosition(i,a)}get isAnimating(){return this.rendererState.internalTweenGroup.getAll().some(r=>r.cameraAnimation)}getCameraFrameForCoordinates(r,n){var v,b;let i=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,a=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,u=this.options.canvasWidth,c=this.options.canvasHeight,m=this.getRotation(),d=this.getTilt(),f=this.getPosition();this.setRotation((v=n.rotation)!=null?v:m,!0),this.setTilt((b=n.tilt)!=null?b:d,!0);let g=_E(r,{canvasWidth:u,canvasHeight:c,paddingOption:n.padding,verticalPadding:n.verticalPadding,minZoom:i,maxZoom:a,position:f,camera:this.camera,orbit:this.orbit});return this.setRotation(m,!0),this.setTilt(d,!0),{center:g.position,zoomLevel:this.convertAltitudeToZoomLevel(g.zoom)}}focusOn(r,n){if(BP){this.debugContainer&&Rt(this.debugContainer);let E=new Zi(4,4,4),x=new dr({color:65280,depthTest:!1}),D=new Nn(E,x,r.length),I=new zr;r.forEach((C,k)=>{I.setPosition(C),D.setMatrixAt(k,I)}),D.instanceMatrix.needsUpdate=!0,this.debugContainer.add(D),this.scene.add(this.debugContainer)}let i=n.curve,a=n.callback,u=n.cancelledCallback,c=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,d=this.options.canvasWidth,f=this.options.canvasHeight,g;n.duration!==void 0?g=n.duration:y.env.TESTING==="true"?g=0:g=Zh;let v=n.padding,b=this.getRotation(),S=this.getTilt();n.rotation!=null&&this.setRotation(n.rotation),n.tilt!=null&&this.setTilt(n.tilt);let F=_E(r,{canvasHeight:f,paddingOption:v,canvasWidth:d,minZoom:c,maxZoom:m,camera:this.camera,orbit:this.orbit,position:this.getPosition(),verticalPadding:n.verticalPadding});this.setRotation(b),this.setTilt(S),this.animateCamera({position:F.position,tilt:n.tilt,rotation:n.rotation,zoom:F.zoom},g,i,a,u,n)}resize(r,n){this.options.canvasWidth=r,this.options.canvasHeight=n}computeMetersPerPixelFromZoomLevel(r){let[,n]=this.center,i=Oe.clamp(r,Zm,Vm),a=Math.pow(2,i),u=Oe.clamp(n,jh,zh),c=a*512;return Math.cos(Oe.degToRad(u))*Math.PI*2*bp/c}computeMetersPerPixelFromAltitude(r){return r*2*Math.tan(Oe.degToRad(this.camera.fov)/2)/this.options.canvasHeight}getCurrentMetersPerPixel(){return this.computeMetersPerPixelFromAltitude(this.getZoomAltitude())}};Km=new WeakMap,o(qm,"CameraSystem"),h(qm,"CAMERA_FRAME_PADDING_SIDES",["top","bottom","left","right"]);var hu=qm;function _E(e,{canvasWidth:t,orbit:r,paddingOption:n,verticalPadding:i=0,canvasHeight:a,minZoom:u,maxZoom:c,camera:m,position:d}){let f={zoom:u,position:d};if(e.length===0)return f;for(let De of hu.CAMERA_FRAME_PADDING_SIDES)typeof n[De]!="number"&&(n[De]=0);let g=n.type==="portion"?{top:n.top*a,bottom:n.bottom*a,left:n.left*t,right:n.right*t,type:"pixel"}:n;if(g.left+g.right>=t||g.top+g.bottom>=a)return f;r.updateMatrixWorld();let v=m.matrixWorldInverse,b=m.fov*(Math.PI/180)/2,S=b,E=Math.atan(Math.tan(b)*(t/a)),x=new ae(1/0,1/0,1/0),D=new ae(-1/0,-1/0,-1/0),I=new er,C=new ae;for(let De=0,vt=e.length;De<vt;De++)C.copy(e[De]),I.expandByPoint(C),C.applyMatrix4(v),x.min(C),D.max(C),C.copy(e[De]),C.z-=i,C.applyMatrix4(v),x.min(C),D.max(C),C.copy(e[De]),C.z+=i,C.applyMatrix4(v),x.min(C),D.max(C);let k=D.x-x.x,V=D.y-x.y,$=t-g.left-g.right,T=a-g.top-g.bottom,w=(D.x+x.x)/2,L=(D.y+x.y)/2,_=k/$,G=V/T,ie=u,Q=c,le=ie*Math.tan(E)*2,Z=Q*Math.tan(E)*2,Y=le/t,ee=Z/t,q=Math.max(_,G);q=Oe.clamp(q,Y,ee);let ce=$*q,Ie=T*q,Te={min:{x:w-ce/2-g.left*q,y:L-Ie/2-g.bottom*q},max:{x:w+ce/2+g.right*q,y:L+Ie/2+g.top*q}},We=(Te.min.x+Te.max.x)/2,He=(Te.min.y+Te.max.y)/2,Fe=I.getCenter(new ae),it=Math.abs(We-Te.min.x),jt=Math.abs(He-Te.min.y),qt=it/Math.tan(E),O=jt/Math.tan(S),J=new ae;J.set(We,He,D.z+Math.max(qt,O)),J.applyMatrix4(m.matrixWorld);let P=new ae;P.set(We,He,D.z),P.applyMatrix4(m.matrixWorld);let oe=new ae().subVectors(P,J),X=(Fe.z-J.z)/oe.z,te=new ae().copy(J).add(oe.clone().multiplyScalar(X));return P.set(te.x,te.y,te.z),J.sub(P),{position:te,zoom:J.length()}}o(_E,"getCameraFrameForPoints");var MP=0,TP=90,kP=(y.env.NODE_ENV==="test",!1),Jm={linear:gn.Linear.None,"ease-in":gn.Quadratic.In,"ease-out":gn.Quadratic.Out,"ease-in-out":gn.Quadratic.InOut},_P=-50,de,be,Ti,ks,_s,Hh,Kh=class Kh{constructor(t,r,n){R(this,_s);R(this,de);R(this,be);R(this,Ti);R(this,ks);H(this,de,t),H(this,be,r),H(this,Ti,n),s(this,de).map&&s(this,de).map.transform.setMinElevationForCurrentTile(_P),s(this,be).cameraSystem.on("pedestal-change",({pedestal:i})=>{s(this,be).cameraSystem.setCameraPlaneElevation(i)})}get center(){var t,r;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(r=(t=s(this,de).map).getCenter)==null?void 0:r.call(t).toArray():s(this,be).cameraSystem.center}setCenter(t){var r;if(s(this,de).mode==="outdoors-overlay"&&s(this,de).map){(r=s(this,de).map)==null||r.setCenter(t),s(this,be).interactionSystem.handleHover();return}s(this,be).cameraSystem.setCenter(t[0],t[1]),s(this,be).interactionSystem.handleHover()}get zoomLevel(){var t;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(t=s(this,de).map)==null?void 0:t.getZoom():s(this,be).cameraSystem.getZoomLevel()}setZoomLevel(t){var r;s(this,de).mode==="outdoors-overlay"&&s(this,de).map&&((r=s(this,de).map)==null||r.setZoom(t)),s(this,be).cameraSystem.setZoomLevel(jn(t,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,be).cameraSystem.isAnimating}cancelAnimation(){s(this,be).cameraSystem.cancelAnimation()}get maxZoomLevel(){return s(this,be).cameraSystem.maxZoomLevel}get minZoomLevel(){return s(this,be).cameraSystem.minZoomLevel}setAutoMinZoomLevel(t){s(this,be).panBoundsSystem.autoMinZoomLevel=t,t&&(s(this,be).panBoundsSystem.dirty=!0,s(this,be).panBoundsSystem.update())}get autoMinZoomLevel(){return s(this,be).panBoundsSystem.autoMinZoomLevel}setMinZoomLevel(t,r=!1){var i;r&&this.setAutoMinZoomLevel(!1);let n=jn(t,yn.MIN_MERCATOR_ZOOM_LEVEL,this.maxZoomLevel,"setMinZoomLevel was clamped. minZoomLevel must be between ".concat(yn.MIN_MERCATOR_ZOOM_LEVEL," and maxZoomLevel."));s(this,be).cameraSystem.setMinZoomLevel(n),this.zoomLevel<n&&this.setZoomLevel(n),(i=s(this,de).map)==null||i.setMinZoom(n)}setMaxZoomLevel(t){var n;let r=jn(t,this.minZoomLevel,yn.MAX_MERCATOR_ZOOM_LEVEL,"setMaxZoomLevel was clamped. maxZoomLevel must be between minZoomLevel and ".concat(yn.MAX_MERCATOR_ZOOM_LEVEL,"."));s(this,be).cameraSystem.setMaxZoomLevel(r),this.zoomLevel>r&&this.setZoomLevel(r),(n=s(this,de).map)==null||n.setMaxZoom(r)}get maxPitch(){var t,r;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(r=(t=s(this,de).map)==null?void 0:t.getMaxPitch)==null?void 0:r.call(t):Oe.radToDeg(s(this,be).cameraSystem.maxTilt)}get minPitch(){var t,r;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(r=(t=s(this,de).map)==null?void 0:t.getMinPitch)==null?void 0:r.call(t):Oe.radToDeg(s(this,be).cameraSystem.minTilt)}setMinPitch(t){var n;let r=Math.max(MP,t);(n=s(this,de).map)==null||n.setMinPitch(r),s(this,be).cameraSystem.minTilt=Oe.degToRad(r)}setMaxPitch(t){var n;let r=Math.min(TP,t);(n=s(this,de).map)==null||n.setMaxPitch(r),s(this,be).cameraSystem.maxTilt=Oe.degToRad(r)}get bearing(){var t;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(t=s(this,de).map)==null?void 0:t.getBearing():Oe.radToDeg(s(this,be).cameraSystem.getRotation())}setBearing(t){var r;if(s(this,de).mode==="outdoors-overlay"&&s(this,de).map){(r=s(this,de).map)==null||r.setBearing(t);return}s(this,be).cameraSystem.setRotation(Oe.degToRad(t))}get pitch(){var t;return s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(t=s(this,de).map)==null?void 0:t.getPitch():Oe.radToDeg(s(this,be).cameraSystem.getTilt())}setPitch(t){var r;if(s(this,de).mode==="outdoors-overlay"&&s(this,de).map){(r=s(this,de).map)==null||r.setPitch(t);return}s(this,be).cameraSystem.setTilt(Oe.degToRad(jn(t,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,be).cameraSystem.getPedestal()}setElevation(t){s(this,be).cameraSystem.setPedestal(t,!0)}animateElevation(t,r){return s(this,ks)&&s(this,ks).stop(),new Promise(n=>{var i;s(this,be).cameraSystem.animateCamera({position:{z:t}},(r==null?void 0:r.duration)||300,Jm[(r==null?void 0:r.easing)||"ease-in-out"],n,n,{interruptible:(i=r==null?void 0:r.interruptible)!=null?i:!0})})}get insetsPadding(){return s(this,Ti).insetsPadding}get panMode(){return s(this,be).cameraSystem.enablePan===!1&&s(this,be).cameraSystem.enablePedestal===!0?"elevation":"default"}setPanMode(t){if(t!=="default"&&t!=="elevation")throw new Error("Invalid pan mode");t!==this.panMode&&(t==="default"?(s(this,be).cameraSystem.enablePan=!0,s(this,be).cameraSystem.enablePedestal=!1):(s(this,be).cameraSystem.enablePan=!1,s(this,be).cameraSystem.enablePedestal=!0))}setInsetPadding(t){s(this,Ti).insetsPadding=Object.assign({},s(this,Ti).insetsPadding,t)}animateTo(t){var u,c,m,d,f,g;if(s(this,de).mode==="outdoors-overlay"&&s(this,de).map)return(g=s(this,de).map)==null||g.flyTo({center:(u=t.center)!=null?u:this.center,zoom:(c=t.zoomLevel)!=null?c:this.zoomLevel,bearing:(m=t.bearing)!=null?m:this.bearing,pitch:(d=t.pitch)!=null?d:this.pitch,duration:(f=t.duration)!=null?f:600}),Promise.resolve();let r=t.center?s(this,de).convertTo3DMapPosition(t.center[1],t.center[0],t.center[2]||this.elevation):void 0,n=t.zoomLevel!==void 0?s(this,be).cameraSystem.convertZoomLevelToAltitude(jn(t.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,i=t.bearing!==void 0?Oe.degToRad(t.bearing):void 0,a=t.pitch!==void 0?Oe.degToRad(jn(t.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(v=>{var b;s(this,be).cameraSystem.animateCamera({position:r,zoom:n,rotation:i,tilt:a},t.duration||0,Jm[t.easing||"ease-in-out"],()=>{s(this,be).interactionSystem.handleHover(),v()},v,{interruptible:(b=t==null?void 0:t.interruptible)!=null?b:!0})})}getCameraFrameForCoordinates(t,r){let n=dt(this,_s,Hh).call(this,r||{},()=>Promise.resolve()),{pointCloud:i}=LE(t,s(this,de),s(this,Ti).geometry3DMap);if(i.length===0)return Ee.error("No valid coordinates found in targets:",t),{center:this.center,zoomLevel:this.zoomLevel};let{center:a,zoomLevel:u}=s(this,be).cameraSystem.getCameraFrameForCoordinates(i,n);return{center:s(this,de).convert3DMapPositionToCoordinate(a),zoomLevel:u}}focusOn(t,r){var u,c,m,d;let{pointCloud:n,geoBounds:i,firstPosition:a}=LE(t,s(this,de),s(this,Ti).geometry3DMap);return n.length===0?(Ee.error("No valid coordinates found in targets:",t),Promise.resolve()):s(this,de).mode==="outdoors-overlay"&&s(this,de).map?(n.length===1&&a?(u=s(this,de).map)==null||u.flyTo({center:[a[0],a[1]],duration:(r==null?void 0:r.duration)||s(this,de).map.getBearing(),animate:!0,bearing:(r==null?void 0:r.bearing)===void 0?s(this,de).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,de).map.getPitch():r==null?void 0:r.pitch,zoom:(r==null?void 0:r.maxZoomLevel)||s(this,de).map.getMaxZoom()}):(kP&&LP(s(this,de),i),(d=s(this,de).map)==null||d.fitBounds(i,{duration:(c=r==null?void 0:r.duration)!=null?c:yn.DEFAULT_ANIMATION_DURATION,bearing:(r==null?void 0:r.bearing)===void 0?s(this,de).map.getBearing():r==null?void 0:r.bearing,pitch:(r==null?void 0:r.pitch)===void 0?s(this,de).map.getPitch():r==null?void 0:r.pitch,maxZoom:(m=r==null?void 0:r.maxZoomLevel)!=null?m:s(this,de).map.getMaxZoom()})),s(this,be).interactionSystem.handleHover(),Promise.resolve()):new Promise(f=>{s(this,be).cameraSystem.focusOn(n,dt(this,_s,Hh).call(this,r||{},f))})}};de=new WeakMap,be=new WeakMap,Ti=new WeakMap,ks=new WeakMap,_s=new WeakSet,Hh=o(function(t,r){var n;return{minZoom:(t==null?void 0:t.maxZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(jn(t.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(t==null?void 0:t.minZoomLevel)===void 0?void 0:s(this,be).cameraSystem.convertZoomLevelToAltitude(jn(t.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:t!=null&&t.padding?Object.assign({},$c,t==null?void 0:t.padding):this.insetsPadding,curve:Jm[(t==null?void 0:t.easing)||"ease-in-out"],rotation:(t==null?void 0:t.bearing)===void 0?void 0:Oe.degToRad(t.bearing),tilt:(t==null?void 0:t.pitch)!==void 0?Oe.degToRad(jn(t.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:t==null?void 0:t.duration,callback:o(()=>{s(this,be).interactionSystem.handleHover(),r()},"callback"),cancelledCallback:r,interruptible:(n=t==null?void 0:t.interruptible)!=null?n:!0,verticalPadding:t==null?void 0:t.verticalPadding}},"#convertToLegacy"),o(Kh,"Camera");var Xm=Kh;function Wh(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}o(Wh,"updateBounds");function LE(e,t,r){var c;let n=[],i=[1/0,1/0,-1/0,-1/0],a=null;if(!e||!Array.isArray(e)||e.length===0)return{pointCloud:n,geoBounds:i,firstPosition:a};let u=t.getSystems().renderSystem;for(let m of e)if(typeof m=="string"){(u.threeDdirty||u.twoDdirty)&&t.renderSync();let d=r.get(m);if(!d){Ee.error("Entity not found with id:",m);continue}let f=new er;e4(t,"userData"in d&&(c=d.userData.entityId)!=null?c:d.id,n,f,d instanceof tr?d.position.z:void 0);let g=t.convert3DMapPositionToCoordinate(f.min),v=t.convert3DMapPositionToCoordinate(f.max);Wh(i,g),Wh(i,v),a||(a=t.convert3DMapPositionToCoordinate(f.getCenter(new ae)))}else n.push(t.convertTo3DMapPosition(m[1],m[0],m[2]||0)),Wh(i,m),a||(a=m);return{pointCloud:n,geoBounds:i,firstPosition:a}}o(LE,"processTargets");function LP(e,t){var n,i,a,u;let r=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]];(n=e.map)!=null&&n.getLayer("bounds-outline")&&e.map.removeLayer("bounds-outline"),(i=e.map)!=null&&i.getSource("bounds-source")&&e.map.removeSource("bounds-source"),(a=e.map)==null||a.addSource("bounds-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:r}}}),(u=e.map)==null||u.addLayer({id:"bounds-outline",type:"line",source:"bounds-source",layout:{},paint:{"line-color":"#FF0000","line-width":2,"line-opacity":.8}})}o(LP,"drawBounds");var qh="";var gu=!1,RP=150,Xh=class Xh extends ke{constructor(r,n,i=!0){super();h(this,"worker");h(this,"debugContext");h(this,"debugCanvas");h(this,"collidersDirty",!0);h(this,"packedMessage",[[],0,0,0,0,0,"bottom-left"]);h(this,"visibleCollidersQTree",new Qr(new we(0,0,0,0)));h(this,"interactiveCollidersQTree",new Qr(new we(0,0,0,0)));h(this,"coreState");h(this,"postMessage");h(this,"showCollisionBoxes",o(()=>{gu=!0,this.debugCanvas.style.display="block"},"showCollisionBoxes"));h(this,"hideCollisionBoxes",o(()=>{gu=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"},"hideCollisionBoxes"));h(this,"currentMsgId","");h(this,"working",!1);h(this,"_postMessage",o(()=>{this.worker.postMessage(this.packedMessage)},"_postMessage"));h(this,"componentArray",[]);h(this,"update",o((r,n,i="bottom-left",a=!1,u=[])=>{let c=!1;if(this.collidersDirty){this.packedMessage=[[],0,0,0,0,0,"bottom-left"],this.componentArray=[];let f;for(let g of this.coreState.geometry2DsInScene)f=g.components[0],this.componentArray.push(f);this.resize(r,n,i),this.collidersDirty=!1,c=!0}else c=this.componentArray.some(f=>f.collisionDirty===!0);c&&this.componentArray.sort((f,g)=>g.rank-f.rank);let m=0;for(let f of u)this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=[[f.h/2,f.h/2,f.w/2,f.w/2,Lp]],this.packedMessage[0][m][1]=1,this.packedMessage[0][m][2]=1,this.packedMessage[0][m][3]=f.x,this.packedMessage[0][m][4]=f.y,this.packedMessage[0][m][5]=0,this.packedMessage[0][m][6]=-1,m++;let d=0;for(;m<this.componentArray.length+u.length;){if(this.packedMessage){let f=this.componentArray[d].toPackedMessage(a&&!c);this.packedMessage[0][m]==null&&(this.packedMessage[0][m]=[]),this.packedMessage[0][m][0]==null&&(this.packedMessage[0][m][0]=[]),this.packedMessage[0][m][0]=f.bboxes,this.packedMessage[0][m][1]=f.enabled&&this.componentArray[d].visible&&!this.componentArray[d].isOccluded?1:0,this.packedMessage[0][m][2]=f.rank===ha?1:0,this.packedMessage[0][m][3]=f.x,this.packedMessage[0][m][4]=f.y,this.packedMessage[0][m][5]=f.shouldCollideWithScreenEdges?1:0,this.packedMessage[0][m][6]=f.lockedToStrategyIndex}m++,d++}this.working||this.postMessage()},"update"));h(this,"resolve",o(r=>{if(this.working=!1,this.collidersDirty||!r.data)return;let n=r.data.colliders,i=-1,a,u,c,m=new we(0,0,this.debugCanvas.width,this.debugCanvas.height);if(this.visibleCollidersQTree=new Qr(m),this.interactiveCollidersQTree=new Qr(m),gu)for(let d of r.data.staticColliders)this.visibleCollidersQTree.insert(new we(d.x,d.y,d.w,d.h));for(let d=0;d<this.componentArray.length;d++){let f=this.componentArray[d];n[d]!=null&&(i=n[d][0],a=n[d][2],f.offscreen=n[d][1]===1,i!==-1&&a!=null?(c=new we(a.x,a.y,a.w,a.h,{entityId:f.id}),this.visibleCollidersQTree.insert(c),u=this.coreState.geometry2DMap.get(f.id),(u==null?void 0:u.components[1])!=null&&this.interactiveCollidersQTree.insert(c),(f.canShow===!1||f.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in f&&(f.visibilityNeedsUpdate="show"),i!==-1&&i!==f.currentStrategyIndex&&(f.activeBoundingBox=c,f.onStrategySelected(i))):((f.canShow===!0||f.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in f&&(f.visibilityNeedsUpdate="hide"),i!==-1&&i!==f.currentStrategyIndex&&f.onStrategySelected(i)))}gu&&this.drawDebug(),this.publish("visibility-changed")},"resolve"));h(this,"drawDebug",o(()=>{gu&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))},"drawDebug"));h(this,"destroy",o(()=>{this.worker.terminate()},"destroy"));this.worker=i===!1?new Vu:qh!==""?new Worker(qh):new Worker(URL.createObjectURL(new Blob([$4],{type:"text/javascript"}))),this.worker.onerror=()=>{this.worker=new Vu,this.worker.onmessage=a=>this.resolve(a)},this.coreState=n,this.debugCanvas=r,this.debugContext=r.getContext("2d"),this.worker.onmessage=a=>this.resolve(a),this.postMessage=pa(this._postMessage,RP),gu?this.showCollisionBoxes():this.hideCollisionBoxes()}resize(r,n,i){this.packedMessage[6]=i,this.packedMessage[5]=n,this.packedMessage[4]=r,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}};o(Xh,"CollisionSystem");var Ym=Xh;l();l();l();l();var Qh=class Qh{constructor(t){h(this,"type");h(this,"event");this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};o(Qh,"Tap");var Qm=Qh,eg=class eg{constructor(){h(this,"taps",[])}add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,r;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((r=this.taps[1])==null?void 0:r.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(r=>t-r.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};o(eg,"TapsController");var ed=eg;l();function tg(e){let t=new Set;for(let r of e){let n=r.object;for(;n.visible&&n.parent&&n.parent.visible===!0&&!t.has(n.parent);)n=n.parent,n instanceof tr&&n.type==="group-container"&&n.visible&&n.components[0]&&t.add(n)}return Array.from(t)}o(tg,"getUniqueIntersectedGroupContainers");var rg=class rg extends ke{constructor(r,n,i,a,u){super();h(this,"raycaster",new Un);h(this,"state",{hovered3DEntity:void 0,hovered2DEntities:new Set,hovered3DContainers:void 0,lastHover:void 0,interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});h(this,"coreState");h(this,"camera");h(this,"worldPlane");h(this,"_quadtree",new Qr(new we(0,0,0,0)));h(this,"_container");h(this,"lastPointerEvent");h(this,"cursor","grab");h(this,"touchesCount",0);h(this,"isUserMovingCamera");h(this,"hasTouched",!1);h(this,"onPointerMove",pa(r=>{r&&(r.preventDefault(),this.updateInteractionStateIfPanning(r),(r.pointerType!=="touch"||r.pointerType===void 0&&this.hasTouched)&&this.handleHover(r),this.handleCursor())},y.env.NODE_ENV==="test"?0:16,{leading:!0}));h(this,"tapsControl",new ed);h(this,"onPointerDown",o(r=>{r.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:r.timeStamp,offsetX:r.offsetX,offsetY:r.offsetY},this.lastPointerEvent=r,this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),r.pointerType==="touch"&&(this.tapsControl.add(new Qm(r)),this.touchesCount=Math.max(0,this.touchesCount+1)))},"onPointerDown"));h(this,"clickTimeout");h(this,"onPointerUp",o(r=>{this.tapsControl.discardOutsideOfWaitWindow(r.timeStamp),this.lastPointerEvent=r,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(r);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)&&(r.pointerType==="touch"&&!this.isUserMovingCamera()?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",r),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(r),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",r),this.flush()):this.handleClick(r)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())},"onPointerUp"));h(this,"dirty3D",!0);h(this,"cachedHitBoxes",{entities:[]});h(this,"ndcPoint",new Se);h(this,"debugPanel");this.isUserMovingCamera=u,this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1),this.camera=i,this._container=r,this.coreState=n,this.worldPlane=a,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMove,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(r){this._quadtree=r}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let r=this.state.hovered3DEntity.components[2];r&&(r.dirty=!0)}}getThreeDIntersectsFromXY(r){this.raycaster.setFromCamera(r,this.camera),this.raycaster.layers.enable(0);let n=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(a=>{var u,c;return((u=a.object)==null?void 0:u.name)==="worldPlane"||((c=a.object)==null?void 0:c.visible)}),i=n.findIndex(a=>{var u;return((u=a.object)==null?void 0:u.name)==="worldPlane"});return i!==-1&&n.push(n.splice(i,1)[0]),n}getGroupContainerIntersectsFromXY(r){let n=this.getThreeDIntersectsFromXY(r),i;return n!=null&&n.length>0&&(i=tg(n)),i}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(r){let n=r||this.lastPointerEvent;if(this.state.interaction.mouseDownStart||!n||this.isUserMovingCamera())return;let{entity3D:i,entity2D:a,position:u,groupContainers:c}=this.intersect(n);(this.detect3DEntityHover(i)||this.detect2DEntityHover(a)||this.detect3DContainerHover(c))&&(this.state.hovered3DEntity=i,this.state.lastHover=i,this.state.hovered2DEntities=new Set(a.map(m=>m.id)),this.state.hovered3DContainers=c,this.publish("hover",{entity2D:a,entity3D:this.state.hovered3DEntity,position:u,groupContainers:c})),this.handleCursor()}handleCursor(){var u;let r=!!(this.state.hovered3DEntity&&((u=this.state.hovered3DEntity)!=null&&u.components[2])||this.state.hovered2DEntities.size>0),n=!!this.state.interaction.mouseDownStart,i=this.state.interaction.isPanning,a=jP(r,i,n);this.cursor!==a&&(this.cursor=a,a==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}detect2DEntityHover(r){if(r.length!==this.state.hovered2DEntities.size)return!0;for(let n=0;n<r.length;n++)if(!this.state.hovered2DEntities.has(r[n].id))return!0;return!1}handleClick(r){let n=this.intersect(r);this.publish("click",{entity2D:n.entity2D,entity3D:n.entity3D,position:n.position,groupContainers:n.groupContainers,pointerEvent:{button:r.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[];let r;for(let n of this.coreState.geometry3DIdsInScene)r=this.coreState.geometry3DMap.get(n),((r==null?void 0:r.type)==="geometry"||(r==null?void 0:r.type)==="model"||(r==null?void 0:r.type)==="path"||(r==null?void 0:r.type)==="custom-geometry")&&r.components[0].mesh&&!this.cachedHitBoxes.entities.includes(r.components[0].mesh)&&this.cachedHitBoxes.entities.push(r.components[0].mesh);return this.dirty3D=!1,this.cachedHitBoxes.entities.push(this.worldPlane),this.cachedHitBoxes}return this.cachedHitBoxes}intersect(r){var D,I,C,k,V;let{offsetX:n,offsetY:i}=r,a=[n,i],c=this._quadtree.queryPoint(a).filter($=>$.intersectsPoint(a));this.ndcPoint.x=n/this._container.clientWidth*2-1,this.ndcPoint.y=-(i/this._container.clientHeight)*2+1;let m=this.getThreeDIntersectsFromXY(this.ndcPoint),d=(D=m[0])==null?void 0:D.point,f=[],g=[],v=m.filter($=>$.object.name!=="worldPlane");for(let $ of v)$.object instanceof Pe&&$.object.material.depthTest===!1?f.push($):g.push($);let b=(C=(I=f[0])!=null?I:g[0])!=null?C:void 0,S,F;if(b!=null){if(S=$P(b.object,this.coreState.geometry3DMap),!S){let $=(k=b==null?void 0:b.instanceId)!=null?k:b==null?void 0:b.batchId;S=$!=null&&(b!=null&&b.object.userData.entities)?this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entities[$]):this.coreState.geometry3DMap.get(b==null?void 0:b.object.userData.entityId)}S!=null&&S.components[2]&&(F=S)}let E=tg(v),x=[];for(let $ of c)if(((V=$==null?void 0:$.userData)==null?void 0:V.entityId)==="watermark")x.push({id:"watermark"});else{let T=this.coreState.geometry2DMap.get($==null?void 0:$.userData.entityId);T&&x.push(T)}return GP(x),{entity2D:x,entity3D:F,position:d,groupContainers:E.length>0?E:void 0}}detect3DEntityHover(r){return this.state.lastHover!==r&&(this.state.lastHover&&$E(this.state.lastHover,!1,this.coreState),r&&$E(r,!0,this.coreState)),this.state.hovered3DEntity!==r}detect3DContainerHover(r){return!Gy(this.state.hovered3DContainers,r)}updateInteractionStateIfPanning(r){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(r.offsetX-this.state.interaction.mouseDownStart.offsetX,2)+Math.pow(r.offsetY-this.state.interaction.mouseDownStart.offsetY,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 r=document.createElement("div");r.style.position="absolute",r.style.top="0",r.style.right="0",r.style.backgroundColor="white",r.style.padding="10px",document.body.append(r),r.id="interaction-debug-panel",this.debugPanel=r,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 i,a,u;this.queueDebugMessage("CLICK \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.map(c=>c.id).join(", ")," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#fdffb6")}),this.on("hover",n=>{var i,a,u;this.queueDebugMessage("HOVER \n3D: ".concat((i=n.entity3D)==null?void 0:i.id," \n2D: ").concat((a=n.entity2D)==null?void 0:a.map(c=>c.id).join(", ")," \nPos: ").concat((u=n.position)==null?void 0:u.toArray().join(", ")),"#caffbf")})}get _state(){return this.state}queueDebugMessage(r,n){var a;let i=document.createElement("pre");i.style.maxWidth="300px",i.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",i.style.backgroundColor=n,i.textContent=r,(a=this.debugPanel)==null||a.prepend(i),setTimeout(()=>{i.style.opacity="0",setTimeout(()=>{i.remove()},500)},2500)}getCursor(){return this.cursor}};o(rg,"InteractionSystem");var Ls=rg;function $E(e,t,r){var u;let n=e.components[2];n&&n.hover!==!0&&(n.hover=t?"user-interaction":!1,n.dirty=!0);let i=(u=e.components[0].textMesh)==null?void 0:u.userData.entityId;if(!i)return;let a=r.geometry3DMap.get(i);(a==null?void 0:a.type)==="text3d"&&(a.components[1].hoverByPolygon=t,a.components[1].dirty=!0)}o($E,"updateHover");function jP(e,t,r){return t?"grabbing":e?"pointer":r?"grabbing":"grab"}o(jP,"processCursor");function zP(e){let t=e;for(;t!=null&&t.parent;){if(t instanceof Wi)return;if(t.userData.isSingleModel)return t;t=t.parent}}o(zP,"findModelParent");function $P(e,t){let r=zP(e);return r?t.get(r.userData.entityId):void 0}o($P,"findModelParentEntity");function GP(e){if(e.length<=1)return;let t=[],r=[];for(let i=0;i<e.length;i++){let a=e[i];a.type==="marker"?t.push(a):r.push(a)}if(t.length>1){let i,a;t.sort((u,c)=>{i=u.components[0],a=c.components[0];let m=i.projection.y,d=a.projection.y;return m!==d?d-m:i.markerContainer.compareDocumentPosition(a.markerContainer)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})}if(r.length>1){let i=[];for(let a=0;a<r.length;a++){let u=r[a],c=u.components[0];i.push({entity:u,y:c.projection.y,idx:a})}i.sort((a,u)=>a.y!==u.y?u.y-a.y:u.idx-a.idx);for(let a=0;a<i.length;a++)r[a]=i[a].entity}let n=0;for(let i=0;i<t.length;i++)e[n++]=t[i];for(let i=0;i<r.length;i++)e[n++]=r[i]}o(GP,"sort2DEntitiesByVisualPriority");l();l();var Ko,lo,td,mo,GE,Ns,rd,ZE,VE,Us,nd,js,zs,id,ng=class ng{constructor(t){R(this,mo);R(this,Ko,null);R(this,lo);h(this,"getCurrentSceneGLTF",o(async t=>{let r=U({onlyVisible:!0,binary:!0,light:!0,scale:1},t),n=await dt(this,mo,GE).call(this),i=s(this,td).call(this,r),a=await n.parseAsync(i,{trs:!1,maxTextureSize:1/0,onlyVisible:r.onlyVisible,binary:r.binary,scale:r.scale}),u;if(a instanceof ArrayBuffer)u=new Blob([a],{type:"application/octet-stream"});else{let c=JSON.stringify(a,null,2);u=new Blob([c],{type:"text/plain"})}return u},"getCurrentSceneGLTF"));R(this,td,o(t=>{let{scale:r,light:n,onlyVisible:i}=t,a=new Wi,u=new er().setFromObject(s(this,lo).geometryScene);if(s(this,Ns).call(this,s(this,lo).geometryScene,a,i),n){let c=new Rc(16777215,.3*Math.PI);c.position.set(0,Math.max(u.max.x,u.max.y)*r*.5,u.max.y*r*4),c.lookAt(0,0,-1),c.target.position.set(0,0,-1),c.add(c.target),a.add(c)}return a},"#getExportedScene"));R(this,Ns,o((t,r,n)=>{t.material&&(t instanceof kc?dt(this,mo,ZE).call(this,t).forEach(i=>r.add(i)):t instanceof Ru&&r.add(dt(this,mo,VE).call(this,t))),t.children.forEach(i=>{(!n||i.visible)&&s(this,Ns).call(this,i,r,n)})},"#processObject3D"));R(this,rd,o((t,r,n)=>{let i=new Nu({color:new Tt(t),metalness:0});return i.opacity=r,i.transparent=n,i},"#createStandardMaterial"));R(this,Us,o(t=>{let{geometry:r,material:n,position:i,rotation:a,quaternion:u,scale:c}=t;if(!(r!=null&&r.isBufferGeometry))return t;let m=r.attributes.position,d=r.attributes.normal,f=r.attributes.uv;return s(this,nd).call(this,m,d),s(this,zs).call(this,i,c,a,u),f&&s(this,id).call(this,f),n!=null&&n.map&&r.type==="PlaneGeometry"&&(t.side=li),t},"#convertGeometry"));R(this,nd,o((t,r)=>{let n=new ae,i=new ae;for(let a=0;a<t.count;a++)n.fromBufferAttribute(t,a),s(this,js).call(this,n),t.setXYZ(a,n.x,n.y,n.z),r&&(i.fromBufferAttribute(r,a),s(this,js).call(this,i),r.setXYZ(a,i.x,i.y,i.z))},"#convertAttributes"));R(this,js,o(t=>{let r=t.y;t.y=t.z,t.z=-r},"#convertVector"));R(this,zs,o((t,r,n,i)=>{let a=t.y;t.y=t.z,t.z=-a;let u=r.y;if(r.y=r.z,r.z=u,n instanceof sa)n.order="YXZ",n.set(n.x,n.y,n.z,n.order);else{let c=i.y;i.set(i.x,i.z,-c,i.w)}},"#convertObjectProperties"));R(this,id,o(t=>{for(let r=0;r<t.count;r++){let n=t.getX(r),i=t.getY(r);t.setXY(r,n,i)}},"#convertUVs"));H(this,lo,t)}destroy(){H(this,Ko,null)}};Ko=new WeakMap,lo=new WeakMap,td=new WeakMap,mo=new WeakSet,GE=o(async function(){if(!s(this,Ko)){let{GLTFExporter:t}=await import("./GLTFExporter-JJK7H6NT.js");H(this,Ko,new t)}return s(this,Ko)},"#getGLTFExporter"),Ns=new WeakMap,rd=new WeakMap,ZE=o(function(t){var u,c;let r=[],i=((u=t.userData)!=null&&u.entities?Object.values((c=t.userData)==null?void 0:c.entities):[]).map(m=>s(this,lo).geometry3DMap.get(m)),a=new Map;return i.forEach(m=>{var b;if(!m||!(m instanceof ot))return;let d=m.components[1],f=m.components[2];if(!d.visible||d instanceof $n&&d.opacity===0||d instanceof Gu||d instanceof Wc)return;let g=f!=null&&f.hover?d.hoverColor||s(this,lo).hoverColor:d.color,v="".concat(g,"-").concat(d.opacity,"-").concat(Number(d.visible));a.has(v)||a.set(v,[]),(b=a.get(v))==null||b.push(m)}),a.forEach((m,d)=>{let[f,g,v]=d.split("-"),b=m.reduce((x,D)=>{if(D.type==="custom-geometry")return x;let I=D.components[0];return"geometry"in I&&I.geometry instanceof Bc&&x.push(I.geometry),x},[]);if(b.length===0){Ee.error("No geometries found for batched mesh");return}let S=s(this,rd).call(this,f,Number(g),t.material.transparent),F=Yr(b,!0);if(!F){Ee.error("No merged geometry found for batched mesh");return}let E=new Pe(F,S);E.position.copy(t.position),E.rotation.copy(t.rotation),E.scale.copy(t.scale),E.visible=!!v,s(this,zs).call(this,E.position,E.scale,E.rotation,E.quaternion),r.push(s(this,Us).call(this,E))}),r},"#processBatchedMesh"),VE=o(function(t){let r=t.geometry.clone(),n=t.material,i=new dr({color:n.color,side:li});i.opacity=n.opacity,i.transparent=n.transparent;let a=new Ru(r,i);return a.position.copy(t.position),a.rotation.copy(t.rotation),a.scale.copy(t.scale),a.visible=t.visible,s(this,Us).call(this,a)},"#processLineSegments"),Us=new WeakMap,nd=new WeakMap,js=new WeakMap,zs=new WeakMap,id=new WeakMap,o(ng,"ExporterSystem");var Rs=ng;l();l();var ZP="gray",VP=.1,$s=100,ig=new zn.ClipperOffset;function WP(e,t){ig.Clear(),t/=2;let r=e.map(i=>({X:i.x*$s,Y:i.y*$s}));ig.AddPath(r,zn.JoinType.jtMiter,zn.EndType.etClosedPolygon);let n=new zn.Paths;return ig.Execute(n,t*$s),n.length?n.map(a=>a.map(u=>({x:u.X/$s,y:u.Y/$s}))):[e]}o(WP,"offset");function ad(e,t,r){var b,S,F,E,x;let{color:n=ZP,opacity:i=1,altitude:a=0,height:u=VP}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a},center:{x:0,y:0,z:(u+a)/2}},d=e.geometry.coordinates[0].map(D=>{let I=t(D[1],D[0]);return c.min.x=Math.min(c.min.x,I.x),c.min.y=Math.min(c.min.y,I.y),c.max.x=Math.max(c.max.x,I.x),c.max.y=Math.max(c.max.y,I.y),I});((S=(b=e.properties)==null?void 0:b.style)==null?void 0:S.edgeOffset)!=null&&e.properties.style.edgeOffset!==0||((F=e.properties)==null?void 0:F.image)!=null?d=WP(d,((x=(E=e.properties)==null?void 0:E.style)==null?void 0:x.edgeOffset)||0):d=[d];let f=[];for(let D of d){let I=new la;I.moveTo(D[0].x,D[0].y),D.slice(1).forEach($=>I.lineTo($.x,$.y)),I.lineTo(D[0].x,D[0].y);let C=e.geometry.coordinates.slice(1);I.holes=C.map($=>{let T=$.map(L=>t(L[1],L[0])),w=new ca;return w.moveTo(T[0].x,T[0].y),T.slice(1).forEach(L=>w.lineTo(L.x,L.y)),w.lineTo(T[0].x,T[0].y),w});let k=zu(r==null?void 0:r.bevel,u),V=new ma(I,k);V.userData={style:{color:n,opacity:i},usedBevelSettings:k},f.push(V)}if(f.length===1)return f[0];let g=Yr(f);f.forEach(D=>D.dispose());let v=zu(r==null?void 0:r.bevel,u);return g.userData={style:{color:n,opacity:i},usedBevelSettings:v,_split:!0},g}o(ad,"renderPolygonGeometry");l();var HP="gray",KP=.1;function ud(e,t,r){let{color:n=HP,opacity:i=1,altitude:a=0,height:u=KP}=r||{};Array.isArray(i)&&(i=1);let c={min:{x:1/0,y:1/0,z:a},max:{x:-1/0,y:-1/0,z:u+a}},m=zu(r==null?void 0:r.bevel,u),d=[];e.geometry.coordinates.forEach(g=>{let v=new la,b=g[0].map(E=>{let x=t(E[1],E[0]);return c.min.x=Math.min(c.min.x,x.x),c.min.y=Math.min(c.min.y,x.y),c.max.x=Math.max(c.max.x,x.x),c.max.y=Math.max(c.max.y,x.y),x});v.moveTo(b[0].x,b[0].y),b.slice(1).forEach(E=>v.lineTo(E.x,E.y)),v.lineTo(b[0].x,b[0].y);let S=g.slice(1);v.holes=S.map(E=>{let x=E.map(I=>t(I[1],I[0])),D=new ca;return D.moveTo(x[0].x,x[0].y),x.slice(1).forEach(I=>D.lineTo(I.x,I.y)),D.lineTo(x[0].x,x[0].y),D});let F=new ma(v,m);d.push(F)});let f=Yr(d);return d.forEach(g=>g.dispose()),f.translate(0,0,a||0),f.userData={style:{color:n,opacity:i},usedBevelSettings:m},f}o(ud,"renderMultiPolygonGeometry");l();var Pr=100,qP=.22,JP=.01;function WE(e,t,r={}){let{width:n=qP,height:i=JP,color:a="gray",opacity:u=1,altitude:c=0}=r,m={min:{x:1/0,y:1/0,z:c},max:{x:-1/0,y:-1/0,z:c+i}},d={bevelEnabled:!1,depth:i},f=new zn.ClipperOffset,g=e.geometry.coordinates.map(F=>F.map(E=>t(E[1],E[0])));f.AddPaths(g.map(F=>F.map(E=>({X:E.x*Pr,Y:E.y*Pr}))),zn.JoinType.jsMiter,zn.EndType.etOpenRound);let v=new zn.PolyTree;f.Execute(v,n/2*Pr);let b=[];for(let F of v.m_AllPolys){let E=new la;if(F.IsHole())continue;m.min.x=Math.min(m.min.x,F.m_polygon[0].X),m.min.y=Math.min(m.min.y,F.m_polygon[0].Y),m.max.x=Math.max(m.max.x,F.m_polygon[0].X),m.max.y=Math.max(m.max.y,F.m_polygon[0].Y);let x=F.m_polygon;E.moveTo(x[0].X/Pr,x[0].Y/Pr),x.slice(1).forEach(D=>E.lineTo(D.X/Pr,D.Y/Pr)),E.lineTo(x[0].X/Pr,x[0].Y/Pr),E.holes=F.m_Childs.map(D=>{let I=new ca,C=D.m_polygon;return I.moveTo(C[0].X/Pr,C[0].Y/Pr),C.slice(1).forEach(k=>I.lineTo(k.X/Pr,k.Y/Pr)),I.lineTo(C[0].X/Pr,C[0].Y/Pr),I}),b.push(new ma(E,d))}let S=Yr(b);return S.translate(0,0,c||0),S.userData={style:{color:a,opacity:u}},f.Clear(),S}o(WE,"renderMultiLineStringGeometry");l();l();var yu=ne.object({type:ne.enum(["Point"]),coordinates:ne.array(ne.number()).min(2).max(3)});var XP=ne.object({rotation:ne.array(ne.number()).length(3).optional(),altitude:ne.number().optional(),scale:ne.array(ne.number()).length(3).optional(),interactive:ne.boolean().optional(),verticalOffset:ne.number().optional(),id:ne.union([ne.number(),ne.string()]).optional()}),YP=ne.object({type:ne.enum(["Feature"]),geometry:yu,properties:XP}),QP=ne.object({type:ne.enum(["FeatureCollection"]),features:ne.array(YP)}),eB=ne.object({color:ne.string()}),tB=ne.object({url:ne.string(),color:ne.string().optional(),opacity:ne.number().optional(),material:ne.record(ne.string(),eB).optional()});function KE(e,t,r){ne.union([ne.number(),ne.string()]).parse(e),QP.parse(t),tB.parse(r)}o(KE,"validateModelGroup");var Gs,Zs,Vs,bu,Mn,og=class og{constructor(t){h(this,"mesh");h(this,"type","model");h(this,"positionDirty",!0);h(this,"outline");h(this,"geometry");h(this,"material");h(this,"feature");h(this,"instanceIndex",-1);R(this,Gs,!0);h(this,"color",new Tt);h(this,"clippingPlane");h(this,"position",new ae);R(this,Zs,0);R(this,Vs,1);R(this,bu,kr.GEOMETRY);R(this,Mn,!1);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:s(this,Gs)}set visible(t){H(this,Gs,t),this.mesh&&(this.mesh.visible=t)}setOpacity(){}setColor(){}get modelScene(){var t;return this.clippingPlane?(t=this.mesh)==null?void 0:t.children.find(r=>r.name!=="hole-fill-mesh"):this.mesh}get altitude(){return s(this,Zs)}set altitude(t){this.modelScene&&(this.modelScene.position.z=t,H(this,Zs,t))}getRotation(){return this.modelScene?[this.modelScene.rotation.x,this.modelScene.rotation.y,this.modelScene.rotation.z]:void 0}setRotation(t){this.modelScene&&this.modelScene.rotation.set(Oe.degToRad(t[0]),Oe.degToRad(t[1]),Oe.degToRad(t[2]))}getScale(){return this.modelScene?[this.modelScene.scale.x,this.modelScene.scale.y,this.modelScene.scale.z]:void 0}setScale(t){var r;this.modelScene&&((r=this.modelScene)==null||r.scale.set(t[0],t[1],t[2]))}get opacity(){return s(this,Vs)}set opacity(t){var r,n,i;if(this.mesh){if(this.mesh.children[0]instanceof Nn){for(let a of this.mesh.children)if(a instanceof Nn){((r=a.userData)==null?void 0:r.originalOpacity)===void 0&&(a.userData.originalOpacity=a.material.opacity);let u=Fo(t,0,(n=a.userData)==null?void 0:n.originalOpacity,0,1);a.material.opacity=u,a.material.transparent=u<1,a.material.needsUpdate=!0}}else(i=this.mesh)==null||i.traverse(a=>{a instanceof Pe&&a.material&&(Array.isArray(a.material)?a.material.forEach(u=>{HE(u,t)}):HE(a.material,t))});H(this,Vs,t)}}get renderOrder(){return s(this,bu)}set renderOrder(t){var r;if(!(!this.mesh||t===s(this,bu)))if(H(this,bu,t),this.mesh.children[0]instanceof Nn){this.mesh.renderOrder=t;for(let n of this.mesh.children)n instanceof Nn&&(n.material.depthWrite=!s(this,Mn),n.material.depthTest=!s(this,Mn),n.material.needsUpdate=!0)}else(r=this.mesh)==null||r.traverse(n=>{n instanceof Pe&&n.material&&(n.renderOrder=t,Array.isArray(n.material)?n.material.forEach(i=>{i.depthWrite=!s(this,Mn),i.depthTest=!s(this,Mn),i.needsUpdate=!0}):(n.material.depthWrite=!s(this,Mn),n.material.depthTest=!s(this,Mn),n.material.needsUpdate=!0))})}get visibleThroughGeometry(){return s(this,Mn)}set visibleThroughGeometry(t){H(this,Mn,t)}};Gs=new WeakMap,Zs=new WeakMap,Vs=new WeakMap,bu=new WeakMap,Mn=new WeakMap,o(og,"ModelComponent");var po=og;function HE(e,t){e.opacity!==t&&(t===1?(e.opacity=1,e.transparent=!1):(e.opacity=t,e.transparent=!0),e.needsUpdate=!0)}o(HE,"updateMaterialOpacity");l();function sd(e){var c,m;let t=e.components[0],r=e.components[1];r.opacity!=null&&r.opacity!==t.opacity&&(t.opacity=r.opacity);let n=r.material,i=r.color;if(n||i){let d=rB(i,n);(c=t.mesh)==null||c.traverse(f=>{f instanceof Pe&&f.material&&(Array.isArray(f.material)?f.material.forEach(g=>{d[g.name]?(g.color.set(d[g.name].color),g.vertexColors=!1):g.color.set(i)}):d[f.material.name]?(f.material.color.set(d[f.material.name].color),f.material.vertexColors=!1):f.material.color.set(i))})}let a=(m=t.feature.geometry.coordinates[2])!=null?m:0,u=r.verticalOffset+a;t.altitude!==u&&(t.altitude=u),r.visible!==t.visible&&(t.visible=r.visible),r.rotation&&t.setRotation(r.rotation),r.scale&&t.setScale(r.scale),r.visibleThroughGeometry!==t.visibleThroughGeometry&&(t.visibleThroughGeometry=r.visibleThroughGeometry)}o(sd,"applyModelGeometryStyle");function rB(e,t){let r={};if(t)for(let n in t)t[n].color&&(r[n]={color:t[n].color});if(e){let n=["Default","Fabric","Mpdn_Logo","CouchLogo"];for(let i of n)r[i]||(r[i]={color:e})}return r}o(rB,"consolidateColorAndMaterial");function qE(e,t){var u,c;let r=e.components[0],i=(u=e.components[1].verticalOffset)!=null?u:0,a=r.feature.geometry.coordinates.slice();a[2]=((c=a[2])!=null?c:0)+i,r.mesh?r.mesh.position.copy(t(a)):r.position.copy(t(a))}o(qE,"applyModelPosition");function _i(e){return e instanceof kt?e.material:null}o(_i,"getMaterial");function JE(e){return e.side===_u?"back":e.side===So?"front":"double"}o(JE,"getMaterialSide");function XE(e,t){e.side=t==="back"?_u:t==="front"?So:li}o(XE,"setMaterialSide");function nB(e){let t=e[1],r=e[6],{opacity:n}=t!=null?t:{},{texture:i,topTexture:a}=r!=null?r:{};return"".concat(n).concat((i==null?void 0:i.path)||"").concat((a==null?void 0:a.path)||"")}o(nB,"generateIndex");var ag=class ag extends ke{constructor(r,n){super();h(this,"state");h(this,"convertTo3DMapPosition");h(this,"loader");h(this,"optimizePromise",[]);this.state=r,this.convertTo3DMapPosition=n}async getGLTFLoader(){if(this.loader)return this.loader;let{GLTFLoader:r}=await import("./GLTFLoader-WKP6OR25.js");return this.loader=new r,this.loader}createEntityFromFeature(r,n,i){var f,g,v,b;let a=new kt(n),u=(f=n==null?void 0:n.properties)==null?void 0:f.bevel,c=i&&"bevel"in i?i.bevel:void 0,m;c?m=U(U({},u),c):u&&(m=u);let d=new ot(a,new $n(xe(U({},i),{url:(v=(g=n.properties)==null?void 0:g.image)==null?void 0:v.path,bevel:m})));return i!=null&&i.outline&&(d.components[3]=new d4(h4(i.color))),i!=null&&i.focusable&&(d.components[4]=new Zu),((b=n.properties)==null?void 0:b.textures)!=null&&Array.isArray(n.properties.textures)&&n.properties.textures.length>0?d.components[6]=new Oo(n.properties.textures.find(S=>S.face==="side"),n.properties.textures.find(S=>S.face==="top")):(i!=null&&"texture"in i&&i.texture!=null||i!=null&&"topTexture"in i&&i.topTexture!=null)&&(d.components[6]=new Oo(i.texture,i.topTexture)),d.id=r,d}createModelFromFeature(r,n,i){let a=new po(n),u=U({},i);n.properties.verticalOffset!=null&&(u.verticalOffset=n.properties.verticalOffset),n.properties.rotation!=null&&(u.rotation=n.properties.rotation),n.properties.scale!=null&&(u.scale=n.properties.scale);let c=new Wc(u),m=new ot(a,c);return m.id=r,m}populateEntityMesh(r,n){let i=r.components[0];i.geometry=n,i.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},i.currentHeight=r.components[1].height,i.dirty=!1}async populateModelGroup(r,n,i){let a=new zr,u=new sa,c=new Pc,m=new ae,d=new Ki,f=await this.getGLTFLoader(),g=new Promise(v=>{let b=o(F=>{"entities3D"in i.userData&&(i.userData.entities3D.size>1?F.scene.traverse(E=>{let x=E;if("isMesh"in x&&x.isMesh===!0){let D=new Nn(x.geometry,x.material,r.size);D.userData={entities:{}},d.add(D),i.add(d)}}):(F.scene.traverse(E=>{"isMesh"in E&&E.isMesh===!0&&(E.position.set(0,0,0),E.rotation.set(0,0,0),E.scale.set(1,1,1),E.updateMatrix())}),d.add(F.scene),i.add(d),d.userData.isSingleModel=!0,d.userData.entityId=r.values().next().value,d.userData.type="model")),v()},"processGLTF");if(n.trimStart().startsWith("{")||n.startsWith("data:")&&n.includes("application/json")){let F=n.startsWith("data:")?atob(n.split(",")[1]):n;f.parse(F,"",b)}else f.load(n,b)});return this.optimizePromise.push(g.then(()=>{var S,F,E,x,D,I,C,k,V,$,T,w;let v=0,b;for(let L of r.values()){if(b=this.state.geometry3DMap.get(L),!b||(b==null?void 0:b.type)!=="model")continue;let _=b.components[0],G=b.components[1],ie=b.components[0].feature;_.mesh=d,_.instanceIndex=v,sd(b),b.components[1].dirty=!1;let{x:Q,y:le}=this.convertTo3DMapPosition(ie.geometry.coordinates[1],ie.geometry.coordinates[0],0);_.position.set(Q,le,_.altitude),u.set(Oe.degToRad((F=(S=G.rotation)==null?void 0:S[0])!=null?F:xa[0]),Oe.degToRad((x=(E=G.rotation)==null?void 0:E[1])!=null?x:xa[1]),Oe.degToRad((I=(D=G.rotation)==null?void 0:D[2])!=null?I:xa[2])),m.set((k=(C=G.scale)==null?void 0:C[0])!=null?k:va[0],($=(V=G.scale)==null?void 0:V[1])!=null?$:va[1],(w=(T=G.scale)==null?void 0:T[2])!=null?w:va[2]),c.setFromEuler(u),a.compose(_.position,c,m),d.children.forEach(Z=>{!b||(b==null?void 0:b.type)!=="model"||!(Z instanceof Nn)||(Z.setMatrixAt(v,a),Z.userData.entities[v]=b.id)}),_.mesh.userData.isSingleModel&&(_.mesh.matrix.copy(a),_.mesh.matrix.decompose(_.mesh.position,_.mesh.quaternion,_.mesh.scale)),v++}this.publish("model-loaded")})),d}populateEntityGroup(r){var c;let n,i,a,u;for(let m of r.values())u=this.state.geometry3DMap.get(m),u.components[0]instanceof kt&&(i=u.components[0].feature,a=u.components[1],i.geometry.type==="Polygon"?(n=ad(i,this.convertTo3DMapPosition,a),(c=i.properties)!=null&&c.textures&&i.properties.textures.length>0&&g4(n,i.properties.textures,this.state.naturalBearing,this.convertTo3DMapPosition),this.populateEntityMesh(u,n)):i.geometry.type==="MultiPolygon"?(n=ud(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="LineString"?(n=R4(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)):i.geometry.type==="MultiLineString"&&(n=WE(i,this.convertTo3DMapPosition,a),this.populateEntityMesh(u,n)));return r}update(){var r;for(let n of this.state.geometryGroupIdsToLoad.values()){let i=this.state.geometry3DMap.get(n);if(i instanceof Gn&&i.userData.dirty){if(i.userData.modelURL)i.userData.modelURL&&(this.populateModelGroup(i.userData.entities3D,i.userData.modelURL,i),i.userData.dirty=!1);else try{this.populateEntityGroup(i.userData.entities3D)}catch(c){Ee.warn(c)}let a,u={};for(let c of i.userData.entities3D.values()){a=this.state.geometry3DMap.get(c);let m=a==null?void 0:a.components[0];if((a==null?void 0:a.type)==="geometry"){let d=nB(a.components);u[d]===void 0&&(u[d]={style:a.components[1],entities:[]}),u[d].entities.push(a)}else m&&"mesh"in m&&m.mesh&&((r=m.mesh)==null?void 0:r.parent)!==i&&i.add(m.mesh)}for(let c in u){let m=f4(u[c].entities,u[c].style);i.add(m)}for(let c of i.userData.entities3D.values())if(a=this.state.geometry3DMap.get(c),a!=null&&a.entities2D.size>0)for(let m of a.entities2D.values())m&&(a.attach(m),this.publish("geometry-2d-added"));this.publish("geometry-group-added"),i.userData.dirty=!1}}return Promise.resolve()}};o(ag,"MeshCreationAndOptimizationSystem");var cd=ag;l();var ug=class ug{constructor(t,r){h(this,"state");h(this,"dirty",!0);h(this,"domTree");this.state=t,this.domTree=r}update(){if(this.dirty){let t;for(let r of Array.from(this.domTree.children))if(t=this.state.geometry2DMap.get(r.userData.entityId),t){let n=t.components[0];(!n.enabled||!n.visible||!this.state.geometry2DIdsInScene.has(r.userData.entityId))&&this.domTree.removeChild(r)}else this.domTree.removeChild(r);for(let r of this.state.geometry2DIdsInScene)if(t=this.state.geometry2DMap.get(r),t){let n=t.components[0];n instanceof di&&n.enabled&&n.markerContainer&&!this.domTree.contains(n.markerContainer)&&(n.markerContainer.userData={entityId:t.id},this.domTree.appendChild(n.markerContainer),n.updateDimensionsIfZeroWidthHeight())}this.dirty=!1}}};o(ug,"DOMVisibilitySystem");var ld=ug;l();var sg=class sg{constructor(t,r){h(this,"state");h(this,"project");this.state=t,this.project=r}update(){let t=0,r=0,n,i;for(let a of this.state.geometry2DsInScene){i=a.components[0];let u=a.attachedTo?this.state.geometry3DMap.get(a.attachedTo):void 0;if(u instanceof ot)if(this.state.geometry3DsInScene.has(u)){n=u.components[1],i=a.components[0],(n.dirty||a.components[0].attachedDirty)&&(t=n.height,r=n.altitude,a.setAltitude(t+r));let c=n.visible;i.visible!==c&&(i.visible=c)}else i.visible===!0&&(i.visible=!1);this.project(a.components[0].projection,a.position),a.components[0].attachedDirty=!1}}};o(sg,"TwoDProjectionSystem");var md=sg;l();l();l();var iB=o(function(){let t,r;return n=>{if((!r||!r)&&(t=document.createElement("canvas"),t.width=500*n,t.height=500*n,t.style.width="500px",t.style.height="500px",r=t.getContext("2d")),!r)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:r}}},"createMeasureCanvasContext")(),YE=o(({text:e,size:t,maxWidth:r,pixelRatio:n,maxLines:i=2,lineHeight:a=1.2,options:u={strokeText:!0}})=>{let c="bold ".concat(t*n,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),{measureCanvasContext:m}=iB(n);m.font=c;let d=[],f=e.split(" "),g=0,v=0,b=0;for(;v<f.length;){let x=f[v];if(g===i&&g>0){d[g-1]+="...";break}if(d[g]==null&&(d[g]=x,v++),f.length===1){d[g]=x;break}if(f[v]==null)break;let{width:D}=m.measureText(d[g]+" "+f[v]);D<=r*n?(d[g]+=" "+f[v],v++):g++}d.forEach(x=>{let{width:D}=m.measureText(x);b=Math.max(D,b)});let S=t*n*a,F=d.length*S;return{maxWidth:b,maxHeight:F,lines:d.length,draw:o((x,D,I)=>{d.length===1?(u.strokeText&&x.strokeText(d[0],D,I),x.fillText(d[0],D,I)):(u.strokeText&&(x.strokeText(d[0],D,I-S/2),x.strokeText(d[1],D,I+S/2)),x.fillText(d[0],D,I-S/2),x.fillText(d[1],D,I+S/2))},"draw")}},"shaveText");l();function QE(e){let t=new Image;return e&&(/<svg[\s\S]*>/i.test(e)?t.src="data:image/svg+xml;base64,".concat(btoa(e)):t.src=e),t}o(QE,"createImage");l();var oB=(()=>{let e;return{getDeviceType(){if(e)return e;let{userAgent:t,platform:r,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(t),a=r==="iPad"||r.indexOf("Mac")===0&&n>0&&!window.MSStream,u=/android/i.test(t);return e={isIpad:a,isMobile:u||i||a,isIOS:i,isAndroid:u,isSafari12:/Version\/12.+Safari/.test(t),isFirefox:/Firefox/.test(t),isWindows:/windows/i.test(t)},e},_reset(){e=void 0}}})(),e6=oB.getDeviceType,t6=(()=>{let e,t,r;function n(){if(t!==void 0)return t;e||(e=document.createElement("canvas"));let a=e.getContext("webgl")||e.getContext("experimental-webgl");if(!a)return t;try{let u=e6().isFirefox?null:a.getExtension("WEBGL_debug_renderer_info");return t=u?a.getParameter(u.UNMASKED_RENDERER_WEBGL):a.getParameter(a.RENDERER),t}catch(u){let c=new Error("Failed getting device info");throw c.name="FailedGettingDeviceInfo",c}}o(n,"getInfo");function i(){var u,c;if(!e6().isWindows)return!1;if(r!==void 0)return r;let a=(c=(u=aB())==null?void 0:u.toLowerCase())!=null?c:"";return r=a.includes("intel")&&(a.includes("uhd")||a.includes("iris")),r}return o(i,"shouldDisableOffscreenCanvas"),{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(a){e=a,t=void 0,r=void 0}}})(),aB=t6.getInfo,r6=t6.shouldDisableOffscreenCanvas;var lg=class lg extends ke{constructor(r,n,i){super();h(this,"dirty",!1);h(this,"state");h(this,"colliderContext");h(this,"colliderCanvas");h(this,"transformRequestFunc");h(this,"transformRequest",o(async r=>this.transformRequestFunc?await this.transformRequestFunc(r):{url:r},"transformRequest"));h(this,"pinCache",{});h(this,"imageCache",{});h(this,"imagePromiseCache",{});h(this,"imageDimensionsCache",{});h(this,"textCache",{});h(this,"update",o(r=>{let n=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let i,a,u,c,m,d;for(let f of this.state.geometry2DsInScene)if((f==null?void 0:f.components[0])instanceof mi&&!f.disposed){if(d=f.components[0],m=d.appearance.iconVisible,d.appearance.icon!=null&&m!=null){let v=typeof m=="boolean"?m:r>=m;v!==d.iconVisible&&(d.iconVisible=v,d.dirty=!0)}if((d.pinDirty||d.dirty||this.dirty)&&d.calculatePinSize(),d.offscreen||!d.visible)continue;if(a={active:d.appearance.pinColor,inactive:d.appearance.pinColorInactive},u={active:d.appearance.pinOutlineColor,inactive:d.appearance.pinOutlineColorInactive},c=Sp(d.pinSize),i="".concat(a.active,"-").concat(a.inactive,"-").concat(u.active,"-").concat(u.inactive,"-").concat(c,"-").concat(d.iconVisible),d.labelCacheId=i,(!this.pinCache[i]||this.dirty)&&(this.prepare(d,i,this.colliderContext),d.dirty=!0),(d.appearance.icon&&(!d.imageHash||d.pinDirty)||this.dirty)&&this.cacheImage(d),this.textCache[d.id]==null||d.textDirty||this.dirty){d.dirty=!0,this.textCache[d.id]={};let{textDrawFn:v,width:b,height:S}=this.processText(d.text,d.appearance.textSize,d.appearance.maxWidth,d.appearance.maxLines,d.appearance.lineHeight);["left","center","right"].forEach(F=>{this.textCache[d.id][F]=this.textToCanvas(v,d.appearance.textSize,F,b,S,d.appearance.textColor,d.appearance.textOutlineColor)}),d.dimensions={width:Math.ceil(b/n),height:Math.ceil(S/n)}}let g=1;if(d.appearance.iconScale)if(typeof d.appearance.iconScale=="number")g=d.appearance.iconScale;else{let{on:v,input:b,output:S,easing:F}=d.appearance.iconScale;v==="zoom-level"?g=Sp(Jy(r,b,S,F!=null?F:"linear")):Ee.warn("Unsupported interpolation property: ".concat(v))}d.recomputeCurrentStrategy(d.iconVisible?g:1),d.canShow&&(d.enabled||d.visibilityNeedsUpdate!==!1)&&this.draw(d,i,this.colliderContext),d.textDirty=!1,d.pinDirty=!1}this.dirty=!1},"update"));h(this,"processText",o((r,n,i,a,u)=>{let c=this.state.pixelRatio,{draw:m,maxWidth:d,maxHeight:f}=YE({text:r,size:n,pixelRatio:c,maxWidth:i,maxLines:a,lineHeight:u});return{textDrawFn:m,width:d+2.5*c*2,height:f+2.5*c*2}},"processText"));h(this,"textToCanvas",o((r,n,i,a,u,c,m)=>{let d=this.state.pixelRatio,f,g=a,v=u;window.OffscreenCanvas!=null&&!r6()?f=new OffscreenCanvas(g,v):(f=document.createElement("canvas"),f.width=g,f.height=v,f.style.width=g+"px",f.style.height=v+"px");let b=f.getContext("2d",{willReadFrequently:!0});if(!b)return;let S=2.5*d;b.textAlign=i,b.font="bold ".concat(n*d,"px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif"),b.textBaseline="middle",b.lineJoin="miter",b.miterLimit=2,b.strokeStyle="white",b.lineWidth=S,b.fillStyle=c,b.strokeStyle=m;let F=i==="left"?S/2:i==="center"?g/2:g-S/2;return r(b,F,(v+S/2)/2),f},"textToCanvas"));h(this,"cacheImage",o(r=>{if(!r.appearance.icon)return;let n=i4(r.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(i=>{this.transformRequest(r.appearance.icon).then(a=>{let u=QE(a.url);u.onload=()=>{this.imageCache[n]=u,this.publish("img:loaded"),i(u)}})})),r.imageHash!==n&&(r.imageHash=n,this.imagePromiseCache[n].then(()=>{r.dirty=!0}))},"cacheImage"));h(this,"createPinCanvas",o((r,n,i,a,u=1)=>{let c,m=this.state.pixelRatio,d=r.totalPinSize*2*m*u;window.OffscreenCanvas!=null?c=new OffscreenCanvas(d,d):(c=document.createElement("canvas"),c.width=d,c.height=d,c.style.width=d/m+"px",c.style.height=d/m+"px");let f=c.getContext("2d");return f.shadowColor="rgba(0,0,0,0.3)",f.shadowOffsetY=2*m,f.shadowBlur=5*m,f.beginPath(),f.arc(d/2,d/2,(n/2+2.5*m/2)*u,0,2*Math.PI),f.fillStyle=i,f.fill(),f.beginPath(),f.arc(d/2,d/2,n/2*u,0,2*Math.PI),f.shadowColor="transparent",f.fillStyle=a,f.fill(),c},"createPinCanvas"));h(this,"prepare",o((r,n,i)=>{let a=this.state.pixelRatio;i.lineWidth=4*a;let u=typeof r.appearance.iconScale=="number"?[r.appearance.iconScale]:r.appearance.iconScale==null?[]:r.appearance.iconScale.output,c=u.length>0?Math.max(...u):void 0,m=this.createPinCanvas(r,r.pinSize,r.appearance.pinOutlineColor,r.appearance.pinColor,c),d=this.createPinCanvas(r,3.5*a,r.appearance.pinOutlineColorInactive,r.appearance.pinColorInactive,c);this.pinCache[n]=[m,d]},"prepare"));this.state=r,this.colliderCanvas=n,this.colliderContext=n.getContext("2d"),this.transformRequestFunc=i}draw(r,n,i){var f;if(!r.canShow||!r.visible)return;i.save(),i.globalAlpha=r.currentOpacity;let a=this.state.pixelRatio,u=r.projection.x*a,c=r.projection.y*a,m=r.style.pinVisibility===1?this.pinCache[n][0]:this.pinCache[n][1],d=r.style.pinVisibility===1?r.scaledPinSize*a:r.totalPinSize*a;if(r.style.pinVisibility!==0&&i.drawImage(m,u-d,c-d,d*2,d*2),r.appearance.icon&&r.iconVisible&&r.imageHash&&r.appearance.iconSize&&this.imageCache[r.imageHash]&&r.style.pinVisibility===1){let g=this.imageCache[r.imageHash],v=(r.scaledPinSize-r.scaledIconPadding)*a,b=r.appearance.iconFit,S=v,F=v,E="".concat(r.imageHash,"_").concat(b);if(this.imageDimensionsCache[E])S=this.imageDimensionsCache[E].width,F=this.imageDimensionsCache[E].height;else{let x=g.width*a,D=g.height*a;if(b==="contain"){let I=Math.sqrt(x**2+D**2),C=v/I;S=x*C,F=D*C}if(b==="cover"){let I=v/x,C=v/D,k=Math.max(I,C);S=x*k,F=D*k}}i.save(),i.beginPath(),i.arc(u,c,v/2,0,2*Math.PI),i.closePath(),((f=r==null?void 0:r.appearance)==null?void 0:f.iconOverflow)!=="visible"&&i.clip(),i.drawImage(g,u-S/2,c-F/2,S,F),i.restore()}r.style.textLabelVisible&&r.style.textAlign!=null&&r.style.left!=null&&r.style.top!=null&&i.drawImage(this.textCache[r.id][r.style.textAlign],u+r.style.left*a,c+r.style.top*a),i.restore()}};o(lg,"TwoDDrawSystem");var dd=lg;l();function mB(e,t){let r=e.components[2],n=e.components[1];return r!=null&&r.hover?[n.hoverColor||t,n.hoverColor||t]:[n.color,n.topColor||n.color]}o(mB,"processColor");var mg=class mg{constructor(t,r){h(this,"state");h(this,"convertTo3DMapPosition");this.convertTo3DMapPosition=r,this.state=t}determineTextureVisiblity(t,r,n){let i=_i(t);((i==null?void 0:i.texture)!=null||(i==null?void 0:i.topTexture)!=null)&&(n!=null&&n.hover&&i.texturesVisible?i.hideTextures(t.instanceIndex):i.texturesVisible||i.showTextures(t.instanceIndex),r.texture==null&&i.removeSideTexture(t.instanceIndex),r.topTexture==null&&i.removeTopTexture(t.instanceIndex))}update(){var n,i,a,u,c,m,d,f,g,v,b,S,F,E,x,D,I,C,k,V,$;let t,r;for(let T of this.state.geometry3DsInScene)if((T.type==="geometry"||T.type==="custom-geometry")&&((n=T.components[1])!=null&&n.dirty||(i=T.components[2])!=null&&i.dirty)){let w=T.components[0],L=T.components[1];r=T.components[2];let _=mB(T,this.state.hoverColor);w.setColor(_[0],_[1]);let G=_i(w);if(L.visible!==w.visible&&(w.visible=L.visible,w instanceof kt&&w.textMesh)){let Q=this.state.geometry3DMap.get(w.textMesh.userData.entityId);(Q==null?void 0:Q.type)==="text3d"&&Q.components[0].polygonEntityId!=null&&(Q.components[0].visible=L.visible)}L.altitude!==w.altitude&&(w.altitude=L.altitude);let ie=L.opacity*ya(T);if(ie!==w.opacity&&(w.opacity=ie),L.renderOrder!==w.renderOrder&&(w.renderOrder=L.renderOrder),G&&L.side!==JE(G)&&XE(G,L.side),w instanceof kt&&L.shading!=null&&(((a=L.shading)==null?void 0:a.start)!==((u=_i(w))==null?void 0:u.getGradientShading().start)||((c=L.shading)==null?void 0:c.end)!==((m=_i(w))==null?void 0:m.getGradientShading().end)||((d=L.shading)==null?void 0:d.intensity)!==((f=_i(w))==null?void 0:f.getGradientShading().intensity))&&((x=_i(w))==null||x.setGradientShading((v=(g=L.shading)==null?void 0:g.start)!=null?v:0,(S=(b=L.shading)==null?void 0:b.end)!=null?S:0,(E=(F=L.shading)==null?void 0:F.intensity)!=null?E:0)),L.dirty=!1,w instanceof kt){let Q=T.components[6];Q instanceof Oo&&this.determineTextureVisiblity(w,Q,r)}T.components[2]&&(T.components[2].dirty=!1)}else if((T==null?void 0:T.type)==="model")T.components[1].dirty&&(sd(T),T.components[1].dirty=!1),T.components[0].positionDirty&&(qE(T,this.convertTo3DMapPosition),T.components[0].positionDirty=!1);else if((T==null?void 0:T.type)==="image"&&((D=T.components[1])!=null&&D.dirty)){t=T.components[0];let w=T.components[1];w.visible!==t.visible&&(t.visible=w.visible),w.dirty=!1}else if((T==null?void 0:T.type)==="text3d"&&((I=T.components[1])!=null&&I.dirty)&&T.components[0].polygonEntityId!=null){t=T.components[0];let w=T.components[1];w.visible!=null&&w.visible!==t.visible&&(t.visible=w.visible);let{textMesh:L}=t;if(L){Object.assign(L,w.getState());let _=(C=w.hoverColor)!=null?C:this.state.text3dHoverColor;L.color=w.hoverByPolygon?_:(k=w.color)!=null?k:ba.color,L.outlineColor=w.hoverByPolygon?_:(V=w.outlineColor)!=null?V:ba.outlineColor,L.strokeColor=w.hoverByPolygon?_:($=w.strokeColor)!=null?$:ba.strokeColor}w.dirty=!1}}};o(mg,"DrawSystem");var pd=mg;l();var dg=class dg extends ke{constructor(r){super();h(this,"state");h(this,"animating",new Map);h(this,"isAnimating",!1);h(this,"startTime",-1);h(this,"showDuration",300);h(this,"hideDuration",250);h(this,"update",o(()=>{var i;this.animating.clear();let r,n;for(let a of this.state.geometry2DIdsInScene)r=this.state.geometry2DMap.get(a),r&&(n=r.components[0],n instanceof mi&&(n.visibilityNeedsUpdate==="show"?(n.canShow=!0,this.animating.set(n,[n.currentOpacity,(i=n.appearance.opacity)!=null?i:1])):n.visibilityNeedsUpdate==="hide"&&this.animating.set(n,[n.currentOpacity,0])));this.startTime=performance.now(),this.publish("animate:2d")},"update"));h(this,"playAnimations");this.state=r,this.playAnimations=this._playAnimations}_playAnimations(){let r=performance.now();for(let[n,[i,a]]of this.animating.entries()){let u=a===1?this.showDuration:this.hideDuration,c=(r-this.startTime)/u;n.currentOpacity=Fo(c,0,1,i,a,a===0?Hy:Ky),r-this.startTime>=u&&(a===1?n.canShow=!0:a===0&&(n.canShow=!1),n.visibilityNeedsUpdate=!1,this.animating.delete(n))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};o(dg,"TwoDVisibilitySystem");var fd=dg;l();var pg=class pg extends ke{constructor(r,n,i,a,u,c,m){super();h(this,"state");h(this,"renderer");h(this,"mode");h(this,"scene");h(this,"cameraObject");h(this,"viewCamera");h(this,"systems");h(this,"needs2DRecompute",!1);h(this,"twoDdirty",!0);h(this,"threeDdirty",!0);h(this,"frameId",null);h(this,"twoDFrameId",null);h(this,"animationFrameId",null);h(this,"nextFrame",null);h(this,"updateEntitiesFrameId",null);h(this,"update",o((r=!1)=>{var n;if(((n=this.renderer)==null?void 0:n.renderer)==null)return Promise.resolve();if(r){this.renderer.startFrame();let i=this.commitRenderState();return this.paint(),i}else return this.frameId?Promise.resolve():new Promise((i,a)=>{this.frameId=requestAnimationFrame(()=>{var u,c;return((u=this.renderer)==null?void 0:u.renderer)==null?i():this.mode==="standalone"?(this.renderer.startFrame(),(c=this.commitRenderState())==null?void 0:c.then(()=>{this.paint(),i()}).catch(m=>{a(m)})):i()})})},"update"));h(this,"animate2D",o(()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})},"animate2D"));h(this,"drawEntities2D",o(()=>{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())})},"drawEntities2D"));h(this,"updateEntities2D",o(()=>{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()})},"updateEntities2D"));h(this,"commitRenderState",o(()=>{try{let r=[];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(),this.state.geometry2DsInScene.clear(),n4(this.state.geometryScene,this.state.geometry2DMap,this.state.geometry2DIdsInScene,this.state.geometry2DsInScene),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.geometry3DsInScene.clear(),this.state.geometryGroupIdsToLoad.clear(),r4(this.state.geometryScene,this.state.geometry3DMap,this.state.geometry3DIdsInScene,this.state.geometry3DsInScene,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&&r.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()),r.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 i=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,!i&&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(r)}catch(r){return Promise.reject(r)}},"commitRenderState"));this.renderer=r,this.state=n,this.mode=i,this.scene=a,this.cameraObject=u,this.viewCamera=c,this.systems=m,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 r;(r=this.renderer)!=null&&r.renderer&&(this.mode==="standalone"&&this.renderer.clear(),this.renderer.renderFullScene(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)}};o(pg,"RenderSystem");var hd=pg;l();var dB=ne.object({interactive:ne.boolean().optional(),id:ne.string().optional(),width:ne.union([ne.number(),ne.object({on:ne.literal("zoom-level").optional(),input:ne.array(ne.number()).nonempty(),output:ne.array(ne.number()).nonempty(),easing:ne.string().optional()})]).optional(),accentColor:ne.string().optional(),displayArrowsOnPath:ne.boolean().optional(),animateArrowsOnPath:ne.boolean().optional(),visibleThroughGeometry:ne.boolean().optional(),dashed:ne.boolean().optional()}),pB=ne.object({type:ne.enum(["Feature"]),geometry:yu,properties:ne.object({parentId:ne.any().optional()})});function n6(e,t){ne.object({features:ne.array(pB)}).parse(e),dB.parse(t)}o(n6,"validatePath");var Ws,fg=class fg{constructor(t,r){h(this,"type","path");h(this,"mesh",new Ki);h(this,"material");h(this,"geometry");h(this,"outline");h(this,"feature");h(this,"options");h(this,"width",{on:"zoom-level",input:[17,22],output:[.8,.4]});h(this,"breakpoint",0);h(this,"altitudeBreakpoints");h(this,"accentColor","blue");h(this,"completeFraction",1);h(this,"altitudeAdjustment",1);h(this,"displayArrowsOnPath",!1);h(this,"animateArrowsOnPath",!1);h(this,"visibleThroughGeometry",!1);h(this,"highlightStartFraction",0);h(this,"highlightEndFraction",0);h(this,"highlightCompleteFraction",1);h(this,"highlightWidthMultiplier",1.1);h(this,"highlightColor","red");h(this,"xrayOpacity",.25);h(this,"dashed",!1);h(this,"isVertical",!1);h(this,"dirty",!0);h(this,"materialDirty",!0);h(this,"position",new ae);R(this,Ws,0);var n,i,a,u,c,m,d;this.feature=t,this.options=r||{},this.width=(n=r==null?void 0:r.width)!=null?n:this.width,this.accentColor=(i=r==null?void 0:r.accentColor)!=null?i:this.accentColor,this.displayArrowsOnPath=(a=r==null?void 0:r.displayArrowsOnPath)!=null?a:this.displayArrowsOnPath,this.animateArrowsOnPath=(u=r==null?void 0:r.animateArrowsOnPath)!=null?u:this.animateArrowsOnPath,this.visibleThroughGeometry=(c=r==null?void 0:r.visibleThroughGeometry)!=null?c:this.visibleThroughGeometry,this.dashed=(m=r==null?void 0:r.dashed)!=null?m:this.dashed,this.xrayOpacity=(d=r==null?void 0:r.xrayOpacity)!=null?d:this.xrayOpacity}setColor(){}setOpacity(){}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return s(this,Ws)}set altitude(t){this.mesh&&(this.mesh.position.z=t,H(this,Ws,t))}set complete(t){this.material&&(this.material.uniforms.complete.value=t,this.material.needsUpdate=!0)}};Ws=new WeakMap,o(fg,"PathComponent");var fo=fg;l();var fB=300,hB=["running","paused"],Hs,Ks,hg=class hg{constructor(t){h(this,"state");R(this,Hs,new ae);R(this,Ks,new ae);this.state=t}update(t){let r;this.state.cameraObject.getWorldPosition(s(this,Ks));for(let n of this.state.geometry2DsInScene)if(n&&(r=n.components[0],r&&"containerEl"in r&&r.markerContainer!=null)){r.visibilityNeedsUpdate!==!1&&(r.visibilityNeedsUpdate==="show"?r.canShow=!0:r.canShow=!1),r.offscreen&&(r.animation&&(r.animation.cancel(),r.animation=null),r.markerContainer.style.opacity="0");let i=r.animation!=null&&(r.animation.pending===!0||hB.includes(r.animation.playState));if((r.canShow&&r.visible===!0||i)&&!r.offscreen)if(r.options.zIndex!=null)r.markerContainer.style.transform="translate3D(".concat(r.projection.x,"px, ").concat(r.projection.y,"px, ").concat(r.options.zIndex,"px)");else{n.object3d.getWorldPosition(s(this,Hs));let a=s(this,Ks).distanceTo(s(this,Hs));r.markerContainer.style.transform="translate3D(".concat(r.projection.x,"px, ").concat(r.projection.y,"px, ").concat(-a,"px)")}if(r.canShow===!0&&r.visible===!0&&!r.offscreen?r.markerContainer.style.pointerEvents=t?"none":r.pointerEvents:r.markerContainer.style.pointerEvents="none",r.currentStrategyIndex===-1&&r.visible&&r.visibilityNeedsUpdate==="show")continue;r.visibilityNeedsUpdate!==!1&&!r.offscreen&&(r.visibilityNeedsUpdate==="show"&&(r.markerContainer.style.opacity="0"),r.animation&&r.animation.cancel(),r.animation=r.markerContainer.animate([{opacity:r.canShow&&r.visible?"1":"0"}],{duration:fB,easing:"ease-in-out",fill:"forwards"}),r.visibilityNeedsUpdate=!1)}}};Hs=new WeakMap,Ks=new WeakMap,o(hg,"DOMDrawSystem");var gd=hg;l();var gg=class gg extends ke{constructor(r,n){super();h(this,"state");h(this,"dirty",!0);h(this,"domTree");h(this,"observers",new Map);h(this,"updateDimensions",o(r=>{r.forEach(n=>{var u;let a=(u=n.target.parentElement)==null?void 0:u.getAttribute("data-marker-id");if(a){let c=this.state.geometry2DMap.get(a),m=c==null?void 0:c.components[0];c&&m instanceof di&&(m.updateDimensions(n.contentRect.width,n.contentRect.height),m.collisionDirty=!0)}}),this.publish("dimensions-update")},"updateDimensions"));this.state=r,this.domTree=n}setupObserver(){var i;if(this.observers){for(let a of this.observers.values())a.disconnect();this.observers.clear()}let r,n;for(let a of this.domTree.children){let u=a.getAttribute("data-marker-id");if(u!=null&&(r=this.state.geometry2DMap.get(u),n=r.components[0],(i=n.options)!=null&&i.dynamicResize)){let c=new ResizeObserver(this.updateDimensions);c.observe(n.containerEl),this.observers.set(a.userData.entityId,c)}}}update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let r of this.observers.values())r.disconnect();this.observers.clear()}};o(gg,"DOMResizeSystem");var yd=gg;l();l();var i6="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}";l();var o6="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}";l();var a6=4.291666666666667,u6=15,s6=25,c6=43/60;l();var l6=["horizontal","icon"],gB=new Map([[l6[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>'],[l6[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>']]),yB=/<svg([^>]*)>/g;function m6(e,t,r,n){let i=gB.get(e);return i?i.replace(yB,'<svg$1 width="'.concat(r,'" height="').concat(n,'" xmlns="http://www.w3.org/2000/svg" style="fill: ').concat(t,';">')):""}o(m6,"getLogoIcon");l();var ho=class ho{constructor(){h(this,"loader");this.loader=new Lc}static getInstance(){return ho.instance||(ho.instance=new ho),ho.instance}getLoader(){return this.loader}load(t){return new Promise((r,n)=>{this.loader.load(t,r,void 0,n)})}};o(ho,"TextureLoaderSingleton"),h(ho,"instance");var yg=ho,go=yg.getInstance();var d6=!1,ct,Li,vu,Zt,Br,qo,Tn,oi,bg=class bg extends ke{constructor(r,n,i){super();R(this,ct,{padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:o(()=>{window!=null&&window.open("https://www.mappedin.com")},"onClick"),interactive:!0,visible:!0});R(this,Li);R(this,vu);R(this,Zt);R(this,Br);R(this,qo);R(this,Tn,0);R(this,oi,0);h(this,"dirty",!0);h(this,"getPositionAlignedCanvasCoordinates",o((r,n)=>({"top-left":{x:0,y:0},"top-right":{x:r,y:0},"bottom-left":{x:0,y:n},"bottom-right":{x:r,y:n},center:{x:r/2,y:n/2},top:{x:r/2,y:0},bottom:{x:r/2,y:n},left:{x:0,y:n/2},right:{x:r,y:n/2}})[s(this,ct).position],"getPositionAlignedCanvasCoordinates"));h(this,"getPositionAlignedPadding",o(()=>{var i,a,u,c;let r=s(this,ct).padding;if(typeof r=="number")return{"top-left":{x:r,y:r},"top-right":{x:-r,y:r},"bottom-left":{x:r,y:-r},"bottom-right":{x:-r,y:-r},center:{x:0,y:0},top:{x:0,y:r},bottom:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0}}[s(this,ct).position];let n={top:(i=r.top)!=null?i:0,right:(a=r.right)!=null?a:0,bottom:(u=r.bottom)!=null?u:0,left:(c=r.left)!=null?c:0};return{x:n.left-n.right,y:n.top-n.bottom}},"getPositionAlignedPadding"));i&&Object.entries(i).forEach(([a,u])=>{u!==void 0&&(s(this,ct)[a]=u)}),H(this,vu,r),H(this,Li,n)}get color(){return s(this,ct).color==="light"?"white":"#293136"}get iconName(){return s(this,ct).iconOnly?"icon":"horizontal"}get minWidth(){return s(this,ct).iconOnly?u6:75}get defaultWidth(){return s(this,ct).iconOnly?s6:150}get aspectRatio(){return s(this,ct).iconOnly?c6:a6}get options(){return U({},s(this,ct))}set options(r){var n,i;H(this,ct,{padding:r.padding||s(this,ct).padding,position:r.position||s(this,ct).position,iconOnly:r.iconOnly||s(this,ct).iconOnly,color:r.color||s(this,ct).color,scale:r.scale||s(this,ct).scale,onClick:s(this,ct).onClick,interactive:(n=r.interactive)!=null?n:s(this,ct).interactive,visible:(i=r.visible)!=null?i:s(this,ct).visible})}get icon(){return m6(this.iconName,this.color,s(this,Tn)*s(this,Li).pixelRatio,s(this,oi)*s(this,Li).pixelRatio)}setSize(r,n){s(this,Br)&&(s(this,Br).uniforms.uSize.value.x=r,s(this,Br).uniforms.uSize.value.y=n)}setXY(r,n){s(this,Br)&&(s(this,Br).uniforms.uSize.value.w=r,s(this,Br).uniforms.uSize.value.z=n)}get width(){return s(this,Tn)}get height(){return s(this,oi)}getPositionAlignedOffset(r,n){return{"top-left":{x:0,y:0},"top-right":{x:-r,y:0},"bottom-left":{x:0,y:-n},"bottom-right":{x:-r,y:-n},center:{x:-(r/2),y:-(n/2)},top:{x:-(r/2),y:0},bottom:{x:-(r/2),y:-n},left:{x:0,y:-(n/2)},right:{x:-r,y:-(n/2)}}[s(this,ct).position]}insertIntoQuadTree(r){s(this,qo)!=null&&typeof s(this,ct).onClick=="function"&&s(this,ct).interactive&&r.insert(s(this,qo))}resize(r,n){if(s(this,ct).visible!==!0)return;let i=this.getPositionAlignedCanvasCoordinates(r,n),a=this.getPositionAlignedPadding(),u=this.getPositionAlignedOffset(s(this,Tn),s(this,oi)),c=Math.min(r-s(this,Tn),Math.max(0,i.x+a.x+u.x)),m=Math.min(n-s(this,oi),Math.max(0,i.y+a.y+u.y));this.setSize(s(this,Tn)/r,s(this,oi)/n),this.setXY(c/r,m/n),H(this,qo,new we(c,m,s(this,Tn),s(this,oi),{entityId:"watermark"}))}update(){this.dirty&&(s(this,ct).visible===!0?(H(this,Tn,Math.min(s(this,Li).canvasWidth,Math.max(this.minWidth,this.defaultWidth*s(this,ct).scale))),H(this,oi,s(this,Tn)/this.aspectRatio),go.getLoader().load("data:image/svg+xml;base64,".concat(btoa(this.icon)),r=>{if(H(this,Br,new Vi({uniforms:{uTexture:{value:r},uSize:{value:new Ay(0,0,0,0)},uOpacity:{value:.7}},vertexShader:i6,fragmentShader:o6,depthWrite:!1,depthTest:!1,defines:{debug:d6},wireframe:d6,transparent:!0,visible:!0})),s(this,Zt))s(this,Zt).visible=!0,s(this,Zt).material=s(this,Br),s(this,Zt).material.needsUpdate=!0;else{let n=new En(2,2,1,1);H(this,Zt,new Pe(n,s(this,Br))),s(this,Zt).position.set(0,0,-1),s(this,Zt).frustumCulled=!1,s(this,Zt).renderOrder=999;let i=new Zi(1,1,1),a=new Pe(i,new dr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));a.frustumCulled=!1,a.layers.set(1),s(this,Zt).add(a),s(this,vu).add(s(this,Zt))}this.resize(s(this,Li).canvasWidth,s(this,Li).canvasHeight),this.publish("texture-loaded")})):s(this,Zt)&&(s(this,Zt).visible=!1),this.dirty=!1)}destroy(){s(this,Zt)&&(s(this,vu).remove(s(this,Zt)),Rt(s(this,Zt))),H(this,Zt,void 0),s(this,Br)&&s(this,Br).dispose(),H(this,Br,void 0),H(this,qo,void 0)}};ct=new WeakMap,Li=new WeakMap,vu=new WeakMap,Zt=new WeakMap,Br=new WeakMap,qo=new WeakMap,Tn=new WeakMap,oi=new WeakMap,o(bg,"WatermarkSystem");var bd=bg;l();var vd=100,xB=!1,vg=class vg extends ke{constructor(r,n){super();h(this,"currentTotalBoundingBox");h(this,"state");h(this,"cameraSystem");h(this,"debugMesh",null);h(this,"dirty",!0);h(this,"autoMinZoomLevel",!0);this.state=r,this.cameraSystem=n}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new er,this.state.geometryScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new ae(0,0,0),new ae(vd*2,vd*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.geometryScene),this.currentTotalBoundingBox.expandByScalar(vd)));let r=new er().setFromObject(this.state.geometryScene);this.currentTotalBoundingBox.union(r);let n=r.getSize(new ae),i=Math.max(n.x,n.y,n.z);for(let u of this.state.geometry2DMap.values())u.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(u.position),u.positionDirty=!1);let a=xd.copy(this.currentTotalBoundingBox).expandByScalar(Math.max(i,vd)).getBoundingSphere(EB).radius;if(this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new ae),min:xd.min,max:xd.max,radius:a},this.publish("update"),this.cameraSystem.dirty=!0,this.dirty=!1,xB&&this.state.geometryScene.parent instanceof Wi){this.debugMesh&&(this.state.geometryScene.parent.remove(this.debugMesh),this.debugMesh=null),this.debugMesh=new wo,this.debugMesh.add(new Pe(new _c(this.cameraSystem.panBounds.radius),new dr({color:16711680,transparent:!0,opacity:.2}))),this.debugMesh.position.copy(this.cameraSystem.panBounds.center),this.state.geometryScene.parent.add(this.debugMesh);let u=new ae;xd.getSize(u);let c=new Zi(u.x,u.y,u.z),m=new dr({color:65280,wireframe:!0,transparent:!0,opacity:.5}),d=new Pe(c,m);d.position.copy(this.currentTotalBoundingBox.getCenter(new ae)),this.debugMesh.add(d)}}}};o(vg,"PanBoundsSystem");var Ed=vg,xd=new er,EB=new Oy;l();var qs,Js,xg=class xg{constructor(t,r){h(this,"mesh");h(this,"type","custom-geometry");h(this,"dirty",!0);h(this,"feature");h(this,"builder");h(this,"outline");R(this,qs,1);h(this,"color",new Tt);R(this,Js,0);this.mesh=new Ki,this.feature=t,this.builder=r}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}set opacity(t){H(this,qs,t)}get opacity(){return s(this,qs)}setColor(t){this.color.set(t)}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return s(this,Js)}set altitude(t){this.mesh&&(this.mesh.position.z=t,H(this,Js,t))}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(t){this.mesh&&(this.mesh.renderOrder=t)}};qs=new WeakMap,Js=new WeakMap,o(xg,"CustomGeometryComponent");var xu=xg;l();var Eg=class Eg{constructor(t,r){h(this,"state");h(this,"convertTo3DMapPosition");this.state=t,this.convertTo3DMapPosition=r}update(){let t,r;for(let n of this.state.geometry3DsInScene)(n==null?void 0:n.type)==="custom-geometry"&&(t=n.components[0],r=n.components[1],t.dirty&&r.visible!==!1&&(t.position.copy(this.convertTo3DMapPosition(t.feature.geometry.coordinates[1],t.feature.geometry.coordinates[0],r.altitude)),t.builder.setup(t.mesh),t.mesh.traverse(i=>{i.userData=xe(U({},i.userData),{entityId:n.id,type:"custom-geometry"})}),t.dirty=!1),r.visible!==!1&&t.builder.update(t.mesh))}};o(Eg,"CustomGeometrySystem");var Cd=Eg;l();l();function p6(e){return e.children.some(t=>t.userData.isOutline)}o(p6,"hasOutline");function f6(e,t){var n;let r=e.userData.entities3D.values().next().value;return r?((n=t.geometry3DMap.get(r))==null?void 0:n.components[3])!==void 0:!1}o(f6,"needsOutline");function Id(e,t,r,n,i){let u=e.getAttribute("position").array,c=1/0,m=-1/0;for(let f=0;f<t.count;f++){let v=(t.start+f)*3,b=u[v+2];c=Math.min(c,b),m=Math.max(m,b)}let d=m-c;if(!i||i.thickness===0||d===0)for(let f=0;f<t.count;f++){let v=(t.start+f)*3,b=u[v+2];Math.abs(b-m)<1e-4?u[v+2]=Math.max(r+n,2e-4+n):u[v+2]=n}else{let f=i.thickness,g=c+f,v=c+f,b=m-f,S=m-f,F=n-f,E=n,x=n,D=n+r,I=n+r,C=n+r+f;for(let k=0;k<t.count;k++){let $=(t.start+k)*3,T=u[$+2],w;if(T<=g){let L=f>0?(T-c)/f:0;w=F+L*(E-F)}else if(T>=S){let L=f>0?(T-S)/f:0;w=I+L*(C-I)}else{let L=b-v,_=L>0?(T-v)/L:0;w=x+_*(D-x)}u[$+2]=w}}e.attributes.position.needsUpdate=!0}o(Id,"updateBufferGeometryHeight");l();function Cg(e){var d,f;let t=new Bc,r=(d=e.mesh)==null?void 0:d.geometry;if(!r||!((f=e.batchedProps)!=null&&f.range))return;let n=e.batchedProps.range,i=n.start,a=n.count,u=r.getAttribute("position");if(u){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=u.array[b*3],g[v*3+1]=u.array[b*3+1],g[v*3+2]=u.array[b*3+2]}t.setAttribute("position",new Dr(g,3))}let c=r.getAttribute("normal");if(c){let g=new Float32Array(a*3);for(let v=0;v<a;v++){let b=i+v;g[v*3]=c.array[b*3],g[v*3+1]=c.array[b*3+1],g[v*3+2]=c.array[b*3+2]}t.setAttribute("normal",new Dr(g,3))}let m=r.getAttribute("uv");if(m){let g=new Float32Array(a*2);for(let v=0;v<a;v++){let b=i+v;g[v*2]=m.array[b*2],g[v*2+1]=m.array[b*2+1]}t.setAttribute("uv",new Dr(g,2))}if(r.index){let g=r.index,v=new Uint32Array(a);for(let b=0;b<a;b++)v[b]=g.array[i+b];t.setIndex(new Dr(v,1))}return t}o(Cg,"extractBufferGeometryFromBatchedGeometry");function h6(e,t,r){let n=Cg(e);if(!n||!e.mesh)return;e.mesh.getMatrixAt(e.instanceIndex,r),e.mesh.deleteInstance(e.instanceIndex),e.mesh.optimize();let i=t.addGeometry(n);t.addInstance(i),t.setMatrixAt(i,r);let a=t.getGeometryIdAt(i),u=t.getGeometryRangeAt(a);return u&&e.batchedProps&&(e.batchedProps.range=u),n.dispose(),i}o(h6,"transferGeometryToNewBatchedMesh");l();l();var g6="// 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}";l();var y6="// 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 Ig=class Ig extends My{constructor(t){super(t),this.onBeforeCompile=r=>{r.vertexShader=g6,r.fragmentShader=y6}}};o(Ig,"OutlineLineMaterial");var Dd=Ig;l();var kn,Jo,yo,bo,Xs,Dg,Sg=class Sg{constructor(){R(this,Xs);R(this,kn,[]);R(this,Jo,!1);R(this,yo);R(this,bo)}get size(){return s(this,kn).length}add(t){s(this,kn).push(t),s(this,Jo)||dt(this,Xs,Dg).call(this)}onComplete(t){H(this,yo,t)}clearOnComplete(){H(this,yo,void 0)}clearAll(){H(this,kn,[]),H(this,Jo,!1),H(this,yo,void 0),s(this,bo)!==void 0&&(cancelIdleCallback(s(this,bo)),H(this,bo,void 0))}};kn=new WeakMap,Jo=new WeakMap,yo=new WeakMap,bo=new WeakMap,Xs=new WeakSet,Dg=o(function(){H(this,Jo,!0),H(this,bo,requestIdleCallback(t=>{let r=0;for(;s(this,kn).length>0&&t.timeRemaining()>2;){let n=s(this,kn).shift();n&&(n(),r++)}if(r===0&&s(this,kn).length>0&&t.timeRemaining()<2){let n=s(this,kn).shift();n&&n()}H(this,bo,void 0),s(this,kn).length>0?dt(this,Xs,Dg).call(this):(H(this,Jo,!1),s(this,yo)&&s(this,yo).call(this))},{timeout:3e3}))},"#processQueue"),o(Sg,"IdleQueue");var Xo=Sg;var DB=80,Yo,Eu,wd,Ad,Fd,wg=class wg extends ke{constructor(r){super();h(this,"rendererState");h(this,"outlineOpacitiesDirty",!0);h(this,"useIdleFramesOnly",!0);R(this,Yo,!0);R(this,Eu,-1/0);h(this,"idleBuildQueue",new Xo);h(this,"idleComputeBoundingSphereQueue",new Xo);R(this,wd,new Map);R(this,Ad,new Dd({vertexColors:!0,linewidth:1,transparent:!0,opacity:1,side:So}));R(this,Fd,o(()=>{this.publish("needs-render")},"#publishRender"));this.rendererState=r,this.idleBuildQueue.onComplete(s(this,Fd))}get geometries3DDirty(){return s(this,Yo)}set geometries3DDirty(r){H(this,Yo,r)}buildOutlines(r){var v;let n=[];for(let b of r.userData.entities3D.values()){let S=this.rendererState.geometry3DMap.get(b);if(S instanceof ot&&S.type==="geometry"&&S.components[3]&&S.components[3].dirty===!0&&S.components[0].material!=null){let F=S.components[0].geometry,E=!1;F||(F=Cg(S.components[0]),E=!0);let x=S.components[1];n.push([S.components[3],new ky(F,(v=x.bevel)!=null&&v.enabled?1:DB)]),E&&(F==null||F.dispose(),F=void 0)}}if(n.length===0)return;let i=Yr(n.map(b=>b[1]),!1);if(i==null)return;let a=i.getAttribute("position"),u=new Float32Array(a.count*4),c=new Dr(u,4);i.setAttribute("color",c);let m=new Uint8Array(a.count);m.fill(0);let d=new Dr(m,1,!1);i.setAttribute("visibility",d);let f=0;for(let b=0;b<n.length;b++){let[S,F]=n[b],E=F.getAttribute("position").count;S.edgeColors=c,S.edgeVisibility=d,S.geometry=i,S.ranges={count:E,start:f},f+=E,F.dispose()}let g=new Ru(i,s(this,Ad));g.userData.isOutline=!0,r.add(g)}update(r,n=!0){var a;if(this.geometries3DDirty){for(let u of this.rendererState.geometry3DsInScene)u.type==="geometry-group"&&f6(u,this.rendererState)&&!p6(u)&&u.userData.entities3D.size>0&&(this.useIdleFramesOnly?this.idleBuildQueue.add(()=>this.buildOutlines(u)):this.buildOutlines(u));H(this,Yo,!1),this.outlineOpacitiesDirty=!0}for(let u of this.rendererState.geometry3DsInScene)if(u.type==="geometry"&&u.components[3]&&u.components[3].dirty===!0&&u.components[0].material!=null&&u.parentObject3D instanceof Gn){let c=u.components[3].geometry;if(!c)continue;let m=u.components[3];if(!m)continue;let d=m.enabled&&u.components[1].visible;if(m.visible!==d&&(m.visible=d),!m.visible)continue;let f=m.edgeColors;if(!f||!m.ranges)continue;let g=new Tt(m.color);for(let F=0;F<m.ranges.count;F++){let E=m.ranges.start+F;f.setXYZ(E,g.r,g.g,g.b)}let v=u.components[1].height,b=u.components[1].altitude,S=(a=u.components[1])==null?void 0:a.bevel;Id(c,m.ranges,v,b,S),c.attributes.color.needsUpdate=!0,this.idleComputeBoundingSphereQueue.add(()=>c.computeBoundingSphere()),m.dirty=!1}let i=n?Fo(r,16,19,0,1):s(this,Eu);if((i!==s(this,Eu)||this.outlineOpacitiesDirty)&&this.rendererState.geometry3DsInScene.size>0){for(let u of this.rendererState.geometry3DsInScene)if(u.type==="geometry"&&u.components[0]instanceof kt){let c=u.components[3];if(c&&c.edgeColors&&c.geometry&&c.visible){let m=Math.min(i,u.components[1].opacity*ya(u));if(c.currentOpacity!==m){for(let d=0;d<c.ranges.count;d++){let f=c.ranges.start+d;c.edgeColors.setW(f,m)}c.geometry.attributes.color.needsUpdate=!0}}}}H(this,Eu,i),H(this,Yo,!1),this.outlineOpacitiesDirty=!1}destroy(){s(this,wd).clear(),this.idleBuildQueue.clearAll(),this.idleComputeBoundingSphereQueue.clearAll()}};Yo=new WeakMap,Eu=new WeakMap,wd=new WeakMap,Ad=new WeakMap,Fd=new WeakMap,o(wg,"OutlineInterpolationSystem");var Sd=wg;l();l();var Ag=class Ag extends Pe{constructor(){super(...arguments);h(this,"userData",{entityId:""})}};o(Ag,"EntityMesh");var Od=Ag,SB=ne.object({flipImageToFaceCamera:ne.boolean().optional(),url:ne.string()}),wB=ne.object({type:ne.enum(["Feature"]),properties:ne.object({width:ne.number(),height:ne.number(),rotation:ne.number().min(0).max(360).optional(),verticalOffset:ne.number().optional()}),geometry:yu});function b6(e,t,r){ne.union([ne.number(),ne.string()]).parse(e),wB.parse(t),SB.parse(r)}o(b6,"validateImage");var Fg=class Fg{constructor(t){h(this,"mesh",new Ki);h(this,"imageMesh");h(this,"outline");h(this,"type","image");h(this,"instanceIndex",-1);h(this,"geometry");h(this,"material");h(this,"feature");h(this,"position",new ae);this.feature=t}get visible(){var t,r;return(r=(t=this.mesh)==null?void 0:t.visible)!=null?r:!1}set visible(t){this.mesh&&(this.mesh.visible=t)}};o(Fg,"ImageComponent");var Pd=Fg;l();function Og(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)}}o(Og,"rotatePoint");function AB(e,t){return e.map(r=>Og(r,t))}o(AB,"rotatePoints");function FB(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}o(FB,"getBounds");function OB(e,t){let r=!1;for(let n=0,i=t.length-1;n<t.length;i=n++){let a=t[n].x,u=t[n].y,c=t[i].x,m=t[i].y;u>e.y!=m>e.y&&e.x<(c-a)*(e.y-u)/(m-u)+a&&(r=!r)}return r}o(OB,"pointInPolygon");function v6(e,t,r,n,i){for(let a=0;a<i;a++)for(let u=0;u<n;u++)if(e[r+a][t+u]!==1)return!1;return!0}o(v6,"isValidRectangle");function PB(e,t,r){let n=e.maxX-e.minX,i=e.maxY-e.minY,a,u,c=U({},e);return n/i>t?(u=i/r,a=u*t,c.minX+=(n-a*r)/2):(a=n/r,u=a/t,c.minY+=(i-u*r)/2),{dx:a,dy:u,gridBounds:c}}o(PB,"calculateGridDimensions");function BB(e,t,r,n,i){let a=Array(r).fill(0).map(()=>Array(r).fill(0));for(let u=0;u<r;u++)for(let c=0;c<r;c++){let m={x:t.minX+c*n,y:t.minY+u*i};OB(m,e)&&(a[u][c]=1)}return a}o(BB,"createAndFillGrid");function MB(e,t){let r=Array(t).fill(0).map(()=>Array(t).fill(0));for(let n=0;n<t;n++)for(let i=0;i<t;i++)if(e[n][i]===1){let a=0;for(let u=1;u<=Math.min(t-i,t-n)&&v6(e,i,n,u,u);u++)a=u;r[n][i]=a}return r}o(MB,"calculateRectSizes");function TB(e,t,r,n,i,a){let u=0,c=0,m=0;for(let d=0;d<n;d++)for(let f=0;f<n;f++)if(e[d][f]===1){let g=Math.pow(t[d][f],2),v=r.minX+f*i,b=r.minY+d*a;u+=g,c+=v*g,m+=b*g}return{x:c/u,y:m/u}}o(TB,"calculatePolygonCenter");function kB(e,t,r,n,i,a,u){let c=-1/0,m=null,d=e.length,f=Math.sqrt(Math.pow(t.maxX-t.minX,2)+Math.pow(t.maxY-t.minY,2));for(let g=0;g<d;g++)for(let v=0;v<d;v++)if(e[g][v]===1)for(let b=1;b<=d-v;b++){let S=b;if(!(S>d-g)&&v6(e,v,g,b,S)){let F=b*S,E=t.minX+(v+b/2)*r,x=t.minY+(g+S/2)*n,D={x:E,y:x},C=Math.sqrt(Math.pow(D.x-i.x,2)+Math.pow(D.y-i.y,2))/f,k=F*(1-a)-C*a*F;k>c&&(c=k,m={center:D,width:b*r*u,height:b*n*u})}}return m}o(kB,"findBestRectangle");function Pg(e,t,r,n={}){let{scaleFactor:i=.9,centerPriority:a=.5,resolution:u=100,minimumSizeRatio:c=.5}=n,m=Zy(r),d=e.width/e.height,f=AB(t,m),g=FB(f),{dx:v,dy:b,gridBounds:S}=PB(g,d,u),F=BB(f,S,u,v,b),E=MB(F,u),x=TB(F,E,S,u,v,b),D=kB(F,S,v,b,x,a,i);return!D||D.width<e.width*c||D.height<e.height*c?e:xe(U({},D),{center:Og(D.center,-m),rotation:r,polygonCenter:Og(x,-m)})}o(Pg,"findLargestInteriorRectangle");var Ys=Math.PI*2,_B=Math.PI/2,LB=Math.PI*1.5,RB=jc(_B,2),NB=jc(LB,2),UB=.01,x6=!1,Bg=class Bg extends ke{constructor(r,n,i,a=0,u=0,c={}){super();h(this,"rendererState");h(this,"convertTo3DMapPosition");h(this,"projectToScreen");h(this,"initialBearing",0);h(this,"naturalBearing",0);h(this,"imagePlacementOptions");h(this,"cameraFrustum",new Tc);h(this,"imageLoadingCache",new Map);h(this,"currentImageScreenBBoxes",[]);h(this,"viewProjectionMatrix",new zr);this.rendererState=r,this.convertTo3DMapPosition=n,this.projectToScreen=i,this.initialBearing=a,this.naturalBearing=u,this.imagePlacementOptions=c}createImageMesh(r,n,i,a=0,u,c){var S,F,E;let m={width:i.width,height:i.height,center:this.convertTo3DMapPosition(u),rotation:(S=i.rotation)!=null?S:0},d=(F=this.imagePlacementOptions.mode)!=null?F:"default",f=(()=>{switch(d){case"fit-nearest-90":let x=(this.initialBearing-this.naturalBearing+360)%180;return x>=45&&x<=135?Pg(m,c,m.rotation+90,this.imagePlacementOptions):m;case"fit-initial-bearing":return Pg(m,c,this.initialBearing,this.imagePlacementOptions);case"default":case"none":default:return m}})();if(x6&&f.polygonCenter){let x=new Pe(new _c(1),new Uu({color:65280}));x.position.set(f.polygonCenter.x,f.polygonCenter.y,a),this.rendererState.geometryScene.add(x)}let g=new Uu({transparent:!0,depthWrite:!1,side:li}),v=new En(f.width,f.height),b=new Od(v);if(b.visible=!1,b.renderOrder=kr.IMAGE_MESH,(E=this.getOrDownloadImage(n))==null||E.then(x=>{g.map=x,g.needsUpdate=!0,g.map.colorSpace=Dc,b.visible=!0,this.publish("image-loaded")}),b.userData.entityId=r,b.material=g,x6){let x=new Pe(new En(i.width,i.height),new Uu({color:"gray"}));b.add(x);let D=new Ny;b.add(D),D.scale.set(10,10,10)}return b.position.set(f.center.x,f.center.y,a+UB),b.rotation.z=(-Oe.degToRad(f.rotation)+Ys)%Ys,b}getOrDownloadImage(r){var n;if(this.imageLoadingCache.has(r))return(n=this.imageLoadingCache.get(r))==null?void 0:n.promise;{let i=new Promise(a=>{go.getLoader().load(r,u=>{let c=this.imageLoadingCache.get(r);c&&!c.loaded&&(c.loaded=!0),a(u)})});return this.imageLoadingCache.set(r,{loaded:!1,promise:i}),i}}flipIfNeeded(r,n){if(r.imageMesh==null)return;let i=-n,a=r.imageMesh.rotation.z,u=jc((a-i+Ys)%Ys,2);u>RB&&u<NB&&(r.imageMesh.rotation.z=(a+Math.PI)%Ys)}update(r){var a,u,c,m,d;this.currentImageScreenBBoxes=[],this.viewProjectionMatrix.identity().multiply(this.rendererState.cameraObject.projectionMatrix).multiply(this.rendererState.cameraObject.matrixWorldInverse),this.cameraFrustum.setFromProjectionMatrix(this.viewProjectionMatrix);let n,i;for(let f of this.rendererState.geometry3DsInScene)if(f.type==="image"){if(n=f.components[0],i=f.components[1],i.url&&n.imageMesh==null){let g=this.convertTo3DMapPosition(n.feature.geometry.coordinates),v={x:g.x,y:g.y};n.imageMesh=this.createImageMesh(f.id,i.url,n.feature.properties,n.feature.properties.verticalOffset,n.feature.geometry.coordinates,[v]),n.mesh.add(n.imageMesh),n.position.copy(n.imageMesh.position)}n.imageMesh&&(i.flipImageToFaceCamera&&this.flipIfNeeded(n,r),n.imageMesh.material instanceof Uu&&i.dirty&&n.imageMesh.material.opacity!==i.opacity&&(n.imageMesh.material.opacity=i.opacity))}else if((f==null?void 0:f.type)==="geometry"){if(n=f.components[0],i=f.components[1],i.showImage&&((a=n.feature.properties)!=null&&a.image)&&n.imageMesh==null&&n.visible&&n.mesh!=null&&n.mesh.parent!=null&&((u=n.feature.properties)==null?void 0:u.image.position)!=null&&n.feature.geometry.coordinates!=null&&n.feature.geometry.coordinates.length>0){let g=n.feature.geometry.coordinates[0].map(b=>{let S=this.convertTo3DMapPosition(b);return{x:S.x,y:S.y}}),v=this.createImageMesh(f.id,(c=n.feature.properties)==null?void 0:c.image.path,(m=n.feature.properties)==null?void 0:m.image,i.height,(d=n.feature.properties)==null?void 0:d.image.position,g);n.mesh.parent.add(v),n.imageMesh=v}if(n.imageMesh){if(!n.visible)n.imageMesh.visible=!1;else if(i.showImage&&!n.imageMesh.visible)if(i.url){let g=this.imageLoadingCache.get(i.url);g&&g.loaded&&(n.imageMesh.visible=!0)}else n.imageMesh.visible=!0;else!i.showImage&&n.imageMesh.visible&&(n.imageMesh.visible=!1);i.flipImageToFaceCamera&&this.flipIfNeeded(n,r),i.enableImageCollisions===!0&&this.updateImageScreenBBoxes(n)}}}updateImageScreenBBoxes(r){if(r.imageMesh==null)return;let n=r.imageMesh.geometry.boundingBox;if(n!=null){let i=new ae;if(r.imageMesh.getWorldPosition(i),!this.cameraFrustum.containsPoint(i))return;let a=new Se;this.projectToScreen(a,i);let u=[new ae(n.min.x,n.min.y,n.min.z),new ae(n.max.x,n.min.y,n.min.z),new ae(n.min.x,n.max.y,n.min.z),new ae(n.max.x,n.max.y,n.min.z),new ae(n.min.x,n.min.y,n.max.z),new ae(n.max.x,n.min.y,n.max.z),new ae(n.min.x,n.max.y,n.max.z),new ae(n.max.x,n.max.y,n.max.z)],c=[];for(let b of u){let S=b.clone().applyMatrix4(r.imageMesh.matrixWorld),F=new Se;this.projectToScreen(F,S),c.push(F)}let m=1/0,d=1/0,f=-1/0,g=-1/0;for(let b of c)m=Math.min(m,b.x),d=Math.min(d,b.y),f=Math.max(f,b.x),g=Math.max(g,b.y);let v=new we(a.x,a.y,f-m,g-d);this.currentImageScreenBBoxes.push(v)}}};o(Bg,"ImageSystem");var Bd=Bg;l();var jB=250,vo,Mg=class Mg extends ke{constructor(r,n){super();h(this,"cameraDirty",!0);h(this,"focusablesDirty",!0);h(this,"state");h(this,"camera");h(this,"debugEl",null);h(this,"raycasters",[]);h(this,"collisions",new Map);h(this,"focusableEntities",new Set);h(this,"debugRaycasters",!1);R(this,vo);h(this,"update",o((r=!1,n=Date.now())=>{this.focusablesDirty&&this.updateFocusableEntities(),!r&&(Date.now()-n>jB||(s(this,vo)&&cancelAnimationFrame(s(this,vo)),H(this,vo,requestAnimationFrame(()=>{this.updateRaf()}))))},"update"));this.state=r,this.camera=n,this.buildRaycasters()}resize(){this.buildRaycasters()}buildRaycasters(){this.debugEl&&this.debugEl.remove();let r=new Se(this.state.canvasWidth/2,this.state.canvasHeight/2),n=new Se(r.x/1.2,r.y/1.2),i=new Se(r.x+(r.x-n.x),n.y),a=new Se(n.x,r.y+(r.y-n.y)),u=new Se(i.x,a.y),c=new Se(r.x,r.y/1.5),m=new Se(r.x,r.y+(r.y-c.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=[r,c,m,n,i,a,u].map((d,f)=>{if(this.debugRaycasters){let F=document.createElement("div");F.style.position="absolute",F.style.top=d.y+"px",F.style.left=d.x+"px",F.style.width="10px",F.style.height="10px",F.style.backgroundColor="red",this.debugEl.append(F)}let g=d.x/this.state.canvasWidth*2-1,v=-(d.y/this.state.canvasHeight)*2+1,b=new Se(g,v),S=new Un;return S.setFromCamera(b,this.camera),[S,b,f===0?10:f<7?2:1]})}updateFocusableEntities(){this.focusableEntities.clear();let r,n,i;for(let a of this.state.geometry3DIdsInScene)if(i=this.state.geometry3DMap.get(a),i!=null){if(i.type==="group-container"&&i.components[1]!==void 0&&i.components[1]instanceof Zu){if(n=i.components[1],n.dirty===!0||n.focusMesh==null){n.focusMesh&&Rt(n.focusMesh);let u=new er;u.setFromObject(i);let c=u.max.x-u.min.x,m=u.max.y-u.min.y,d=u.max.z-u.min.z;if(!isFinite(c)||!isFinite(m)||!isFinite(d)||isNaN(c)||isNaN(m)||isNaN(d)||c<=0||m<=0||d<=0)continue;let f=new Zi(c,m,d),g={transparent:!0,opacity:this.debugRaycasters?1:0,visible:this.debugRaycasters};if(this.debugRaycasters){let S=["red","green","blue","yellow","purple","orange","pink","brown","gray","black"];g.color=S[Math.floor(Math.random()*S.length)]}let v=new dr(g),b=new Pe(f,v);b.position.set((u.min.x+u.max.x)/2,(u.min.y+u.max.y)/2,0),b.userData={entityId:i.userData.entityId},n.focusMesh=b,i.add(b),i.components[1].dirty=!1}this.focusableEntities.add(n.focusMesh)}else if(i.type==="geometry"&&i.components[4]&&i.components[4]instanceof Zu&&(r=i.components[0],n=i.components[4],r instanceof kt&&r.geometry!=null&&(n.dirty===!0||n.focusMesh==null))){if(n.focusMesh==null){let u=new Pe(r.geometry);u.userData={entityId:i.id},n.focusMesh=u}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,i]of this.raycasters)n.setFromCamera(i,this.camera);for(let[n,i,a]of this.raycasters)n.intersectObjects(Array.from(this.focusableEntities.values())).forEach(c=>{var m;if((c==null?void 0:c.object)!=null&&"isMesh"in c.object&&(c!=null&&c.object.isMesh)){let d=c.object.userData.entityId,f=(m=this.collisions.get(d))!=null?m:0;this.collisions.set(d,f+a)}});let r=Array.from(this.collisions,([n,i])=>({entityId:n,weight:i})).sort((n,i)=>i.weight-n.weight).map(({entityId:n})=>n);this.publish("geometry-in-focus",r),this.cameraDirty=!1}showRaycasters(){this.debugRaycasters=!0,this.buildRaycasters()}hideRaycasters(){this.debugRaycasters=!1,this.buildRaycasters()}destroy(){s(this,vo)&&cancelAnimationFrame(s(this,vo)),this.debugEl&&this.debugEl.remove(),this.collisions.clear(),this.focusableEntities.clear(),this.raycasters=[]}};vo=new WeakMap,o(Mg,"GeometryInFocusSystem");var Md=Mg;l();l();l();l();l();function zB(e){if(!e)throw new Error("geojson is required");var t=[];return Hi(e,function(r){$B(r,t)}),Ao(t)}o(zB,"lineSegment");function $B(e,t){var r=[],n=e.geometry;if(n!==null){switch(n.type){case"Polygon":r=Bo(n);break;case"LineString":r=[Bo(n)]}r.forEach(function(i){var a=GB(i,e.properties);a.forEach(function(u){u.id=t.length,t.push(u)})})}}o($B,"lineSegmentFeature");function GB(e,t){var r=[];return e.reduce(function(n,i){var a=Uc([n,i],t);return a.bbox=ZB(n,i),r.push(a),i}),r}o(GB,"createSegments");function ZB(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],u=r<i?r:i,c=n<a?n:a,m=r>i?r:i,d=n>a?n:a;return[u,c,m,d]}o(ZB,"bbox");var Tg=zB;var X6=xy(q6(),1);function GM(e,t){var r={},n=[];if(e.type==="LineString"&&(e=fp(e)),t.type==="LineString"&&(t=fp(t)),e.type==="Feature"&&t.type==="Feature"&&e.geometry!==null&&t.geometry!==null&&e.geometry.type==="LineString"&&t.geometry.type==="LineString"&&e.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=J6(e,t);return i&&n.push(i),Ao(n)}var a=(0,X6.default)();return a.load(Tg(t)),gp(Tg(e),function(u){gp(a.search(u),function(c){var m=J6(u,c);if(m){var d=Bo(m).join(",");r[d]||(r[d]=!0,n.push(m))}})}),Ao(n)}o(GM,"lineIntersect");function J6(e,t){var r=Bo(e),n=Bo(t);if(r.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 i=r[0][0],a=r[0][1],u=r[1][0],c=r[1][1],m=n[0][0],d=n[0][1],f=n[1][0],g=n[1][1],v=(g-d)*(u-i)-(f-m)*(c-a),b=(f-m)*(a-d)-(g-d)*(i-m),S=(u-i)*(a-d)-(c-a)*(i-m);if(v===0)return null;var F=b/v,E=S/v;if(F>=0&&F<=1&&E>=0&&E<=1){var x=i+F*(u-i),D=a+F*(c-a);return hp([x,D])}return null}o(J6,"intersects");var jd=GM;l();function tc(e,t){t===void 0&&(t={});var r=Ca(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return ZM(r,t);case"MultiPolygon":return VM(r,t);default:throw new Error("invalid poly")}}o(tc,"default");function ZM(e,t){t===void 0&&(t={});var r=Ca(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return Y6(n,i)}o(ZM,"polygonToLine");function VM(e,t){t===void 0&&(t={});var r=Ca(e),n=r.coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},a=[];return n.forEach(function(u){a.push(Y6(u,i))}),Ao(a)}o(VM,"multiPolygonToLine");function Y6(e,t){return e.length>1?jy(e,t):Uc(e[0],t)}o(Y6,"coordsToLine");function WM(e,t){var r=!0;return Hi(e,function(n){Hi(t,function(i){if(r===!1)return!1;r=HM(n.geometry,i.geometry)})}),r}o(WM,"booleanDisjoint");function HM(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return!XM(e.coordinates,t.coordinates);case"LineString":return!Q6(t,e);case"Polygon":return!Xi(e,t)}break;case"LineString":switch(t.type){case"Point":return!Q6(e,t);case"LineString":return!KM(e,t);case"Polygon":return!eC(t,e)}break;case"Polygon":switch(t.type){case"Point":return!Xi(t,e);case"LineString":return!eC(e,t);case"Polygon":return!qM(t,e)}}return!1}o(HM,"disjoint");function Q6(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(JM(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}o(Q6,"isPointOnLine");function KM(e,t){var r=jd(e,t);return r.features.length>0}o(KM,"isLineOnLine");function eC(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){var i=n[r];if(Xi(i,e))return!0}var a=jd(t,tc(e));return a.features.length>0}o(eC,"isLineInPoly");function qM(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){var i=n[r];if(Xi(i,t))return!0}for(var a=0,u=t.coordinates[0];a<u.length;a++){var c=u[a];if(Xi(c,e))return!0}var m=jd(tc(e),tc(t));return m.features.length>0}o(qM,"isPolyInPoly");function JM(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],a=t[0]-e[0],u=t[1]-e[1],c=n*u-i*a;return c!==0?!1:Math.abs(a)>=Math.abs(u)?a>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:u>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}o(JM,"isPointOnLineSegment");function XM(e,t){return e[0]===t[0]&&e[1]===t[1]}o(XM,"compareCoords");var tC=WM;function Jg(e,t){var r=!1;return Hi(e,function(n){Hi(t,function(i){if(r===!0)return!0;r=!tC(n.geometry,i.geometry)})}),r}o(Jg,"booleanIntersects");var YM=5e3,Xg="outdoor-system-debug-container",rC=!1,Ri,Mt,rc,Iu,Ni,ui,bn,Du,nc,$d,Gd,_n,Yg,Su,Qo,nC,Zd,ic,iC,oC,Qg=class Qg{constructor(t){R(this,_n);R(this,Ri,!0);R(this,Mt);h(this,"idleQueue",new Xo);R(this,rc,"");R(this,Iu,new Set);R(this,Ni,new Set);R(this,ui);R(this,bn,null);R(this,Du,!1);R(this,nc,o(t=>{if(!s(this,Mt))throw new Error("Map not initialized");let n=[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]]].map(m=>s(this,Mt).project(m)),i=Math.max(...n.map(m=>m.x)),a=Math.min(...n.map(m=>m.x)),u=Math.max(...n.map(m=>m.y)),c=Math.min(...n.map(m=>m.y));return[new dp.default(a,c),new dp.default(i,u)]},"#getScreenPoints"));R(this,$d,o(()=>{s(this,bn)&&(clearTimeout(s(this,bn)),H(this,bn,null),H(this,Ri,!1))},"#stopTrying"));R(this,Gd,o(()=>{s(this,bn)&&(clearTimeout(s(this,bn)),H(this,bn,null)),H(this,bn,setTimeout(()=>{s(this,$d).call(this)},YM))},"#startTrying"));R(this,Su,o(async()=>{if(rC&&s(this,ui)&&dt(this,_n,oC).call(this),!(!s(this,Mt)||!s(this,Du))&&s(this,Ri)&&!(!s(this,Ni)||s(this,Ni).size===0)&&(s(this,_n,nC)&&s(this,Zd).call(this),s(this,ui))){let t=new Set;this.idleQueue.onComplete(()=>{s(this,Qo).length>0&&(s(this,Ni).forEach(r=>{var n;(n=s(this,Mt))==null||n.setFilter(r,["all",...s(this,Qo)])}),H(this,Ri,!1)),H(this,Qo,[])});for(let r of s(this,ui)){let n=yp(r),i=s(this,nc).call(this,n),a=s(this,Mt).queryRenderedFeatures(i,{layers:Array.from(s(this,Ni))});for(let u of a)u.id==null||t.has(u.id)||this.idleQueue.add(()=>{if(u.geometry!=null&&"coordinates"in u.geometry){let c;if(u.geometry.type==="Polygon"?c=Nc(u.geometry.coordinates):u.geometry.type==="MultiPolygon"&&(c=zy(u.geometry.coordinates)),!c)return;Jg(r,c)&&u.id!=null&&(t.add(u.id),s(this,Qo).push(["!=",["id"],u.id]))}})}}},"#handleRender"));R(this,Qo,[]);R(this,Zd,o(()=>{this.idleQueue.clearAll()},"#cancelJobs"));R(this,ic,o(t=>{var r,n;if(s(this,Mt)&&t&&t.dataType==="style"&&t.type==="styledata"&&s(this,Iu).size>0){let i=(n=(r=t==null?void 0:t.style)==null?void 0:r.stylesheet)==null?void 0:n.id;(!i||i!==s(this,rc))&&(H(this,rc,i),dt(this,_n,Yg).call(this),H(this,Ri,!0))}},"#handleStyleChange"));t&&(H(this,Mt,t),s(this,Mt).on("styledata",s(this,ic)),s(this,Mt).on("render",s(this,Su)),H(this,Du,s(this,Mt).loaded()),s(this,Mt).on("load",()=>{H(this,Du,!0)})),rC&&dt(this,_n,iC).call(this)}hideLayersIntersectingPolygons(t,r){s(this,bn)&&clearTimeout(s(this,bn)),s(this,Gd).call(this),H(this,ui,t.reduce((n,i)=>{if(i.geometry.type==="Polygon"){let a=Nc(i.geometry.coordinates);n.push(a)}else i.geometry.type==="MultiPolygon"&&n.push(...i.geometry.coordinates.map(a=>Nc(a)));return n},[]));for(let n of r)s(this,Iu).add(n);H(this,Ri,!0),dt(this,_n,Yg).call(this),s(this,Su).call(this)}destroy(){s(this,Mt)&&(s(this,Mt).off("styledata",s(this,ic)),s(this,Mt).off("render",s(this,Su))),this.idleQueue.clearAll()}};Ri=new WeakMap,Mt=new WeakMap,rc=new WeakMap,Iu=new WeakMap,Ni=new WeakMap,ui=new WeakMap,bn=new WeakMap,Du=new WeakMap,nc=new WeakMap,$d=new WeakMap,Gd=new WeakMap,_n=new WeakSet,Yg=o(function(){if(H(this,Ni,new Set),s(this,Mt))for(let t of s(this,Iu))s(this,Mt).getLayer(t)&&s(this,Ni).add(t)},"#filterStylesInMap"),Su=new WeakMap,Qo=new WeakMap,nC=o(function(){return this.idleQueue.size!==0},"#running"),Zd=new WeakMap,ic=new WeakMap,iC=o(function(){if(!document.getElementById(Xg)&&s(this,Mt)){let t=document.createElement("div");t.id=Xg,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.bottom="0",t.style.right="0",t.style.pointerEvents="none",t.style.zIndex="1000",s(this,Mt).getContainer().appendChild(t)}},"#addDebugContainer"),oC=o(function(){let t=document.getElementById(Xg);if(!t||!s(this,ui)||!s(this,Mt))return;let r=t.querySelectorAll('[id^="polygon-box-"]');for(let n=0;n<r.length;n++)r[n].remove();for(let n=0;n<s(this,ui).length;n++){let i=s(this,ui)[n],a=yp(i),u=s(this,nc).call(this,a),c=document.createElement("div");c.id="polygon-box-".concat(n),c.style.position="absolute",t.appendChild(c);let m=[Math.min(u[0].x,u[1].x),Math.min(u[0].y,u[1].y)],d=[Math.max(u[0].x,u[1].x),Math.max(u[0].y,u[1].y)];c.style.top=m[1]+"px",c.style.left=m[0]+"px",c.style.width=d[0]-m[0]+"px",c.style.height=d[1]-m[1]+"px",c.style.border="2px solid ".concat(s(this,Ri)?"red":"blue")}},"#updateDebugBBoxes"),o(Qg,"OutdoorLayers");var zd=Qg;l();l();l();l();var Vd="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";l();var ey="#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";l();var aC="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 uC="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 eT=new Lc;function sC(e,t,r){var vt,Ir;let{breakpoint:n,width:i,accentColor:a,completeFraction:u,isVertical:c,visibleThroughGeometry:m,dashed:d,highlightCompleteFraction:f,highlightStartFraction:g,highlightEndFraction:v,highlightColor:b,highlightWidthMultiplier:S,xrayOpacity:F}=t,{color:E}=r,x=!0,D=0,I=1/0,C=t.displayArrowsOnPath,k=!0,V=C,$=typeof i=="object"?Number(i.output[n])/2:i/2,T=typeof i=="object"?Number((vt=i.output[n+1])!=null?vt:i.output[n])/2:i/2,w=((Ir=r.altitude)!=null?Ir:0)+tT,L=0;e[0].z+=w;for(let fe=1;fe<e.length;++fe){e[fe].z+=w;let me=e[fe].x-e[fe-1].x,ht=e[fe].z-e[fe-1].z;if(c)L+=Math.sqrt(me*me+ht*ht);else{let zi=e[fe].y-e[fe-1].y;L+=Math.sqrt(me*me+zi*zi+ht*ht)}}if(!c){let fe=e[0],me=e[e.length-1];e.push(me.clone().setZ(me.z-.01)),e.unshift(fe.clone().setZ(fe.z-.01))}let _=new wy;V&&(_=eT.load(uC),_.colorSpace=Dc);let G=new Tt(E),ie=new Tt(a),Q={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new Se(1,1)},cameraParameters:{type:"v2",value:new Se(D,0)},complete:{type:"f",value:x?0:1},color:{type:"c",value:G},pathLength:{type:"f",value:L},nearRadius:{type:"f",value:$},farRadius:{type:"f",value:T},nearZoom:{type:"f",value:D},farZoom:{type:"f",value:I},pulseColor:{type:"c",value:ie},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:c},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:_},displayArrowsOnPath:{type:"b",value:C},showPulse:{type:"b",value:k},opacityMultiplier:{type:"f",value:1},dashed:{type:"b",value:d},highlightCompleteFraction:{type:"f",value:f},highlightStartFraction:{type:"f",value:g},highlightEndFraction:{type:"f",value:v},highlightColor:{type:"c",value:new Tt(b)},highlightWidthMultiplier:{type:"f",value:S}},le=new Ty(e);le.curveType="catmullrom",le.tension=0;let Z=30,Y=8,ee=Z*e.length,q=new _y(le,ee,$,Y,!1),ce=new Float32Array(q.attributes.position.count);for(let fe=e.length;fe<ce.length;fe++)ce[fe]=fe;q.setAttribute("vertexIndex",new Dr(ce,1));let Ie=new Float32Array(q.attributes.position.count),Te=new Dr(Ie,1);for(let fe=0;fe<=ee;fe++)for(let me=0;me<=Y;++me)Te.setX(fe*(Y+1)+me,fe/ee);q.setAttribute("pathDistance",Te);let We=new Float32Array(q.attributes.normal.count*3),He=new Dr(We,3);for(let fe=0;fe<ee;fe++){let me=q.tangents[fe];for(let ht=0;ht<=Y;++ht)He.setXYZ(fe*(Y+1)+ht,me.x,me.y,me.z)}q.setAttribute("pathTangent",He);let Fe=new Float32Array(q.attributes.normal.count*3),it=new Dr(Fe,3);for(let fe=0;fe<ee;fe++){let me=q.tangents[fe];var jt,qt,O;c?(jt=me.x*me.y,qt=-1+me.y*me.y,O=me.z*me.y):(jt=-me.x*me.z,qt=-me.y*me.z,O=1-me.z*me.z);let ht=Math.sqrt(jt*jt+qt*qt+O*O);ht===0&&(ht=1);let zi=jt/ht,Tu=qt/ht,xc=O/ht;for(let ku=0;ku<=Y;++ku)it.setXYZ(fe*(Y+1)+ku,zi,Tu,xc)}q.setAttribute("pathNormal",it);let J=new Vi({uniforms:Q,vertexShader:Vd,fragmentShader:ey});J.transparent=!0,J.alphaTest=.5,Q.resolution.value.x=1,Q.resolution.value.y=1,Q.vertexes.value=ce.length,Q.arrowTexture.value.wrapS=Lu,Q.arrowTexture.value.wrapT=Lu,Q.arrowTexture.value.anisotropy=16;let P=new Pe(q,J);P.name="path";let oe=P.clone();oe.name="xray";let X=xe(U({},Q),{opacityMultiplier:{type:"f",value:F},pathIsVertical:{type:"b",value:c}});X.complete.value=1,oe.material=new Vi({uniforms:X,vertexShader:Vd,fragmentShader:ey}),oe.material.transparent=!0,oe.material.alphaTest=.5,oe.material.depthWrite=!1,oe.material.depthTest=!1,X.resolution.value.x=1,X.resolution.value.y=1,X.vertexes.value=ce.length,X.arrowTexture.value.wrapS=Lu,X.arrowTexture.value.wrapT=Lu,X.arrowTexture.value.anisotropy=16,X.complete.value=u,P.userData=oe.userData=t.mesh.userData;let te=t.mesh;if(!m){let fe=new Vi({uniforms:Q,vertexShader:Vd,fragmentShader:aC}),me=new Pe(q,fe);me.name="stencil",me.material.colorWrite=!1,me.material.stencilWrite=!0,me.material.stencilRef=1,me.material.stencilFunc=Oc,me.material.stencilZPass=Gi,me.material.stencilZFail=Gi,me.material.stencilFail=Gi,me.material.depthWrite=!1,me.material.depthTest=!1,me.userData=t.mesh.userData,te.add(me),te.add(oe),oe.renderOrder=kr.XRAY_PATH,P.renderOrder=kr.STENCIL_PATH}if(te.add(P),c){let fe=new er().setFromObject(P),me=new ae;fe.getCenter(me),te.children.forEach(ht=>{ht.geometry.center(),ht.position.copy(me)})}m&&(P.material.stencilWrite=!0,P.material.stencilRef=1,P.material.stencilFunc=Fc,P.material.stencilZPass=Sc,P.material.stencilZFail=Sc,P.material.stencilFail=Sc,P.material.needsUpdate=!0,P.layers.disableAll(),P.layers.enable(kr.ALWAYS_ON_TOP_PATHS)),q.computeBoundingBox();let De=new ae;return q.boundingBox.getCenter(De),{mesh:te,material:J,center:De}}o(sC,"buildPath");var tT=.15;var rT=.5,ty=class ty extends ke{constructor(r,n,i,a){super();h(this,"rendererState");h(this,"verticalDistanceDirty",!0);h(this,"convertTo3DMapPosition");h(this,"getParentContainer");h(this,"convertZoomLevelToAltitude");this.rendererState=r,this.convertTo3DMapPosition=n,this.getParentContainer=i,this.convertZoomLevelToAltitude=a}update(r,n,i){let a=!1;for(let u of this.rendererState.geometry3DsInScene)if(u&&u.type==="path"&&u.components[0].type==="path"){let c=u.components[0],m=u.components[1],d=c.isVertical&&this.verticalDistanceDirty;if(!(c instanceof fo))continue;let f=[];if(c.dirty||m.dirty||d){if(c.mesh.parent!=null)for(let g=c.mesh.children.length-1;g>=0;g--)Rt(c.mesh.children[0]);if(c.feature.features.length===2&&c.feature.features[0].properties.parentId&&c.feature.features[1].properties.parentId){let g=c.feature.features[0],v=c.feature.features[c.feature.features.length-1],b,S,F=g.geometry.coordinates[2]||0,E=v.geometry.coordinates[2]||0;g.properties.parentId&&(b=this.getParentContainer(g.properties.parentId,!0),b!=null&&b.altitude!=null&&(F+=b.altitude,c.isVertical=!0)),v.properties.parentId&&(S=this.getParentContainer(v.properties.parentId,!0),S!=null&&S.altitude!=null&&(E+=S.altitude,c.isVertical=!0));let x=this.convertTo3DMapPosition(g.geometry.coordinates[1],g.geometry.coordinates[0],F),D=this.convertTo3DMapPosition(v.geometry.coordinates[1],v.geometry.coordinates[0],E);Math.abs(x.z-D.z)>rT&&b!=null&&b.visible&&S!=null&&S.visible&&(f=[x,D])}else{let g=c.feature.features;for(let v=0;v<g.length;v++)if(v===0||!u4(g[v].geometry.coordinates,g[v-1].geometry.coordinates)){let b=this.convertTo3DMapPosition(g[v].geometry.coordinates[1],g[v].geometry.coordinates[0],g[v].geometry.coordinates[2]||0);f.push(b)}}if(f.length>1){let{mesh:g,material:v,center:b}=sC(f,c,{color:m.color,altitude:m.altitude,isVertical:c.isVertical});c.mesh=g,c.material=v,c.position=b}c.dirty&&typeof c.width=="object"&&c.width.on==="zoom-level"&&(c.altitudeBreakpoints=c.width.input.map(g=>this.convertZoomLevelToAltitude(g))),c.dirty=!1}m.dirty&&(c.mesh.children.forEach(g=>{g.name!=="stencil"&&(g.material.uniforms.color.value.set(m.color),g.material.visible=m.visible,g.material.needsUpdate=!0)}),c.mesh.position.z=m.altitude,m.dirty=!1),c.material&&(c.mesh.children.forEach(g=>{var b,S,F,E,x,D,I;let v=g.material.uniforms;if(g.name==="stencil"){c.materialDirty&&cC(c,g.material);return}if(c.materialDirty&&g.name==="xray"&&v.opacityMultiplier&&(v.opacityMultiplier.value=c.xrayOpacity),typeof c.width=="object"&&c.width.on==="zoom-level"){c.altitudeBreakpoints&&c.altitudeBreakpoints.length>2&&Ee.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 C=qy(i,(S=(b=c.altitudeBreakpoints)==null?void 0:b.slice(0,2))!=null?S:[r,n]);c.breakpoint=C,v.nearZoom.value=(E=(F=c.altitudeBreakpoints)==null?void 0:F[C])!=null?E:r,v.farZoom.value=(D=(x=c.altitudeBreakpoints)==null?void 0:x[C+1])!=null?D:n,v.nearRadius.value=Number(c.width.output[C])/2,v.farRadius.value=Number((I=c.width.output[C+1])!=null?I:c.width.output[C])/2}v.cameraParameters.value.x=i,c.materialDirty&&(v.displayArrowsOnPath.value=c.displayArrowsOnPath,v.pulseColor.value.set(c.accentColor),v.complete.value=c.completeFraction,cC(c,g.material),typeof c.width=="number"&&(v.nearZoom.value=r,v.farZoom.value=n,v.nearRadius.value=Number(c.width)/2,v.farRadius.value=Number(c.width)/2))}),c.displayArrowsOnPath&&c.animateArrowsOnPath&&(c.mesh.children.forEach(g=>{g.name!=="stencil"&&(g.material.uniforms.arrowAnimationTimer.value=performance.now()/3e3,g.material.needsUpdate=!0)}),a=!0),c.materialDirty=!1)}this.verticalDistanceDirty=!1,a&&this.publish("animate:path")}};o(ty,"PathSystem");var oc=ty;function cC(e,t){let r=t.uniforms;r.highlightCompleteFraction.value=e.highlightCompleteFraction,r.highlightStartFraction.value=e.highlightStartFraction,r.highlightEndFraction.value=e.highlightEndFraction,r.highlightWidthMultiplier.value=e.highlightWidthMultiplier,r.highlightColor.value.set(e.highlightColor)}o(cC,"updateHighlightPathUniforms");l();var Lt,wu,Ui,Hd,ry=class ry{constructor(t){h(this,"rendererState");h(this,"dirty",!1);R(this,Lt);R(this,wu);R(this,Ui);R(this,Hd,new zr);this.rendererState=t}updateOne(t){if(t instanceof ot&&t.components[0]instanceof kt&&t.components[1]instanceof $n&&t.parentObject3D instanceof Gn&&(H(this,Lt,t.components[0]),H(this,Ui,t.components[1]),!s(this,Lt).detached&&s(this,Lt).shouldDetach&&s(this,Lt).mesh!=null&&s(this,Lt).material!=null&&s(this,Lt).batchedProps!=null)){H(this,wu,t.parentObject3D),s(this,Lt).visible=!1;let r=new Tt(s(this,Ui).color),n=s(this,Ui).opacity*ya(t),i=new p4({color:r,side:li,opacity:n!=null?n:1,transparent:n!==void 0?n<1:!1},1,s(this,Lt).material.repeatYFactor),a=new U4(1,s(this,Lt).batchedProps.positionCount,0,i),u=h6(s(this,Lt),a,s(this,Hd));if(u==null)return;a.userData={entities:{0:t.id},detached:!0},s(this,Lt).instanceIndex=u,s(this,Lt).material.setColor(s(this,Lt).instanceIndex,r,s(this,Ui).topColor?new Tt(s(this,Ui).topColor):r),s(this,Lt).mesh=a,s(this,Lt).material=i,s(this,wu).add(a),s(this,Lt).shouldDetach=!1,s(this,Lt).detached=!0}}update(){if(!this.dirty)return;let t;for(let r of this.rendererState.geometry3DIdsInScene)t=this.rendererState.geometry3DMap.get(r),this.updateOne(t);this.dirty=!1,this.cleanup()}cleanup(){H(this,Lt,void 0),H(this,wu,void 0),H(this,Ui,void 0)}};Lt=new WeakMap,wu=new WeakMap,Ui=new WeakMap,Hd=new WeakMap,o(ry,"MeshDetachmentSystem");var Wd=ry;l();l();function lC(e,t,r){var n;if((n=e.batchedProps)!=null&&n.range&&e.mesh){let i=t||1e-4,a=i/Math.max(r,1e-4);return Id(e.mesh.geometry,e.batchedProps.range,i,0),e.material&&(e.material.repeatYFactor=a),e.currentHeight=i,!0}return!1}o(lC,"updateHeight");function mC(e,t,r,n,i,a){return e.mesh&&e.instanceIndex!==-1?(e.mesh.getMatrixAt(e.instanceIndex,r),r.decompose(n,i,a),n.z=t,r.compose(n,i,a),e.mesh.setMatrixAt(e.instanceIndex,r),e.altitude=t,!0):!1}o(mC,"updateAltitude");var Ln,si,qd,Jd,Xd,Yd,ny=class ny{constructor(t){h(this,"rendererState");h(this,"dirty",!1);R(this,Ln);R(this,si);R(this,qd,new zr);R(this,Jd,new ae);R(this,Xd,new Pc);R(this,Yd,new ae);this.rendererState=t}updateOne(t){var r;if(t instanceof ot&&t.type==="geometry"&&((r=t.components[1])!=null&&r.dirty)&&(H(this,Ln,t.components[0]),H(this,si,t.components[1]),t.type==="geometry")){let n=!1;s(this,si).height!==s(this,Ln).currentHeight&&(n=lC(s(this,Ln),s(this,si).height,s(this,si).initialHeight)),s(this,si).altitude!==s(this,Ln).altitude&&(n=mC(s(this,Ln),s(this,si).altitude,s(this,qd),s(this,Jd),s(this,Xd),s(this,Yd))),n&&s(this,Ln).mesh!=null&&s(this,Ln).mesh.computeBoundingSphere()}}update(){for(let t of this.rendererState.geometry3DsInScene)this.updateOne(t);this.cleanup()}cleanup(){H(this,Ln,void 0),H(this,si,void 0)}};Ln=new WeakMap,si=new WeakMap,qd=new WeakMap,Jd=new WeakMap,Xd=new WeakMap,Yd=new WeakMap,o(ny,"MeshModificationSystem");var Kd=ny;l();var nT={showPolygonLabelTextAreaMesh:!1,showEnvMap:!1,showCollisionBoxes:!1},iy=class iy{constructor(t){h(this,"state",nT);h(this,"core");this.core=t}update(t){let r={};for(let[n,i]of Object.entries(t))n in this.state&&this.state[n]!==t[n]&&(this.state[n]=i,r[n]=i);this.handleUpdate(r)}handleUpdate(t){t.showPolygonLabelTextAreaMesh!=null&&(t.showPolygonLabelTextAreaMesh?this.core.getSystems().text3DSystem.showTextAreaMesh():this.core.getSystems().text3DSystem.hideTextAreaMesh()),t.showEnvMap!=null&&(t.showEnvMap?this.core.setEnvironment("basic"):this.core.setEnvironment(!1)),t.showCollisionBoxes!=null&&(t.showCollisionBoxes?(this.core.getSystems().collisionSystem.showCollisionBoxes(),this.core.render()):this.core.getSystems().collisionSystem.hideCollisionBoxes())}};o(iy,"Debug");var Qd=iy;l();var ac=9,iT=!1,dC=.1;function oT(e,t,r){for(let n=0;n<t;n++){let i=(r&16711680)>>16,a=(r&65280)>>8,u=r&255;e[n*3]=i/255,e[n*3+1]=a/255,e[n*3+2]=u/255}}o(oT,"fillArrayWithColor");var oy=class oy{constructor(t,r,n){h(this,"state");h(this,"renderer");h(this,"renderService");h(this,"pickingTexture");h(this,"pickingMaterial");h(this,"pixelBuffer");h(this,"width",0);h(this,"height",0);h(this,"scale",1/2);h(this,"color",1);h(this,"convertTo3DMapPosition");h(this,"destroyed",!1);h(this,"enabled",!1);h(this,"backgroundId",16777215);h(this,"resize",o(()=>{let t=this.state.pixelRatio;this.width=Math.floor(this.renderer.domElement.width/t*this.scale),this.height=Math.floor(this.renderer.domElement.height/t*this.scale),this.pixelBuffer=new Uint8Array(4*this.width*this.height),this.pickingTexture=new Fy(this.width,this.height,{format:Dy,type:Iy,internalFormat:"RGBA"})},"resize"));h(this,"shouldShowByXY",o((t,r,n)=>{if(this.pixelBuffer==null)return!1;let i=t+(this.height-r-1)*this.width,a=this.pixelBuffer[i*4],u=this.pixelBuffer[i*4+1],c=this.pixelBuffer[i*4+2],m=a<<16|u<<8|c;return m===n||m===this.backgroundId},"shouldShowByXY"));h(this,"activeOccluders",new Set);h(this,"update",o(()=>{if(!this.enabled||this.destroyed||(this.activeOccluders.clear(),this.activeOccluders.add(this.backgroundId),!this.pickingTexture||!this.pixelBuffer))return;let t,r;for(let i of this.state.geometry3DsInScene)if((i==null?void 0:i.type)==="group-container"&&i.userData.occluderFeature!=null&&i.userData.occluderId!=null&&(this.activeOccluders.add(i.userData.occluderId),i.userData.occluderDirty)){if(t=i.userData.occluderFeature,t.geometry.type==="Polygon"&&t.geometry.coordinates.length>0){let a=ad(t,this.convertTo3DMapPosition,{color:"white",height:dC});r=this.createOccluderMesh(a,i.userData.occluderId),i.add(r)}else if(t.geometry.type==="MultiPolygon"){let a=ud(t,this.convertTo3DMapPosition,{color:"white",height:dC});r=this.createOccluderMesh(a,i.userData.occluderId),i==null||i.add(r)}i.userData.occluderDirty=!1}this.renderer.setRenderTarget(this.pickingTexture);let n=new Tt(this.backgroundId);this.renderer.setClearColor(n),this.renderer.clear(),this.state.cameraObject.layers.disableAll(),this.state.cameraObject.layers.enable(ac),this.renderService.renderScene(this.state.geometryScene.parent,this.state.cameraObject),this.renderer.setRenderTarget(null),this.state.cameraObject.layers.disable(ac),iT?this.renderService.enabledLayers.add(ac):this.renderService.enabledLayers.delete(ac),this.renderer.readRenderTargetPixelsAsync(this.pickingTexture,0,0,this.width,this.height,this.pixelBuffer).then(()=>{if(!this.destroyed)for(let i of this.state.geometry2DsInScene){let a=i==null?void 0:i.components[2];if(i&&(a==null?void 0:a.id)!=null&&this.activeOccluders.has(a.id)&&(a!=null&&a.enabled)){let u=i.components[0].projection,c=Math.floor(u.x*this.scale),m=Math.floor(u.y*this.scale),d=this.shouldShowByXY(c,m,a.id);i.components[0].isOccluded=!d}else i&&a&&!a.enabled&&(i.components[0].isOccluded=!1)}}).catch(i=>{this.destroyed||Ee.error(i)})},"update"));if(this.state=t,this.convertTo3DMapPosition=r,(n==null?void 0:n.renderer)==null)throw new Error("No Renderer");this.renderService=n,this.renderer=n.renderer,this.resize(),this.pickingMaterial=new Vi({glslVersion:Sy,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(t,r){let n=t.attributes.position,i=new Float32Array(n.count*3);oT(i,n.count,r),t.setAttribute("color",new Dr(i,3))}createOccluderMesh(t,r){let n=new Pe(t,this.pickingMaterial);return n.layers.set(ac),this.applyId(n.geometry,r),n.userData.occluderId=r,n}reserveOccluderId(){return this.color++,this.color}enable(){this.enabled=!0}disable(){this.enabled=!1}destroy(){var t;this.destroyed=!0,(t=this.pickingTexture)==null||t.dispose(),this.pickingMaterial.dispose(),this.pickingTexture=void 0,this.pixelBuffer=void 0}};o(oy,"Occlusion2DSystem");var ep=oy;l();var ay=class ay{constructor(t){this.state=t;h(this,"dirty",!0)}update(){var t;if(this.dirty){for(let r of this.state.geometry3DIdsInScene){let n=this.state.geometry3DMap.get(r);if(n instanceof ot&&n.type==="geometry"&&((t=n.components[0])==null?void 0:t.geometry)!=null){let i=n.components[0];i.geometry&&(i.geometry.dispose(),i.geometry=void 0)}}this.dirty=!1}}};o(ay,"GeometryDisposalSystem");var tp=ay;l();var uy=class uy extends ke{constructor(r){super();h(this,"dirty",!0);h(this,"state");h(this,"texturePromiseCache",new Map);this.state=r}async loadTexture(r){if(this.texturePromiseCache.has(r))return this.texturePromiseCache.get(r);let n=new Promise((i,a)=>{go.getLoader().load(r,i,void 0,a)});return this.texturePromiseCache.set(r,n),n}update(){for(let r of this.state.geometry3DsInScene){if(!(r instanceof ot))continue;let n=r.components[6];if(!(n instanceof Oo))continue;let i=r.components[0];if(!(i instanceof kt)||!n.dirty)continue;let a=_i(i);a!=null&&(n.texture!=null&&(n.texture.path===""?(a.texture=null,a.hideTextures(i.instanceIndex),n.dirty=!1):this.loadTexture(n.texture.path).then(u=>{u&&(n.textureInstance=u,a.texture=u,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),n.topTexture!=null&&(n.topTexture.path===""?(a.topTexture=null,a.hideTextures(i.instanceIndex),n.dirty=!1):this.loadTexture(n.topTexture.path).then(u=>{u&&(n.topTextureInstance=u,a.topTexture=u,a.blendTexture=!0,a.showTextures(i.instanceIndex)),this.publish("texture-added")})),n.dirty=!1)}}destroy(){this.texturePromiseCache.forEach(async r=>{(await r).dispose()}),this.texturePromiseCache.clear()}};o(uy,"TextureSystem");var rp=uy;l();var sy=class sy{constructor(t){h(this,"currentOrder",kr.ALWAYS_ON_TOP_MODELS);h(this,"assignedOrders",new WeakMap);h(this,"state");this.state=t}assignOrder(t){return this.assignedOrders.has(t)?this.assignedOrders.get(t):(this.currentOrder+=1,this.assignedOrders.set(t,this.currentOrder),this.currentOrder)}releaseOrder(t){return this.assignedOrders.delete(t),kr.GEOMETRY}getHighestOrder(){return this.currentOrder}getOrder(t){return this.assignedOrders.get(t)}update(){var n;let t,r;for(let i of this.state.geometry3DsInScene)if(i&&i.type==="model"&&(n=i.components[1])!=null&&n.dirty)if(t=i.components[1],r=i.components[0],t.visibleThroughGeometry===!0){let a=this.assignOrder(r);r.renderOrder!==a&&(r.renderOrder=a)}else r.renderOrder>kr.GEOMETRY&&(r.renderOrder=this.releaseOrder(r))}};o(sy,"RenderOrderSystem");var np=sy;l();var pC=1e4,cy=class cy{constructor(t){h(this,"rendererState");h(this,"dirty",!1);this.rendererState=t}update(){var n;let t,r;for(let i of this.rendererState.geometry3DsInScene)if(r=i.components[0],t=i.components[7],i.type==="model"&&t!=null&&(t.dirty&&r.mesh!=null&&(t==null?void 0:t.verticalOffset)!==1/0&&(t.plane==null&&(t.plane=new By(new ae(0,0,-1),t.verticalOffset),this.process(r,t)),t.plane.constant!==t.verticalOffset&&(t.plane.constant=t.verticalOffset),t.topColor!=null&&((n=t.holeFillMesh)==null?void 0:n.material)instanceof Nu&&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,u=t.holeFillMesh;a.coplanarPoint(u.position),u.lookAt(u.position.x-a.normal.x,u.position.y-a.normal.y,u.position.z-a.normal.z)}}process(t,r){var v;if(t.mesh==null)return;let n=t.mesh.parent,i=[];t.mesh.traverse(b=>{if(b instanceof Pe){let S=b.geometry.clone();b.updateWorldMatrix(!0,!1),S.applyMatrix4(b.matrixWorld),i.push(S),S.computeVertexNormals(),b.material.clippingPlanes=[r.plane],b.material.transparent=!1}});let a=Yr(i),u=new Mc,c=new Mc,m=this.createHoleFillGeometry(a,r.plane,1);m.name="hole-fill-group";let d=new Nu({color:(v=r.topColor)!=null?v:"#E67B5B",clippingPlanes:[],stencilWrite:!0,stencilFunc:Fc,stencilFail:Gi,stencilZFail:Gi,stencilZPass:Gi}),f=new En(pC,pC),g=new Pe(f,d);g.name="hole-fill-mesh",r.holeFillMesh=g,g.renderOrder=1.1,c.add(m),c.add(t.mesh),u.add(c),u.add(g),n==null||n.add(u),t.mesh=u}createHoleFillGeometry(t,r,n=0){let i=new Mc,a=new dr;a.depthWrite=!1,a.depthTest=!1,a.colorWrite=!1,a.stencilWrite=!0,a.stencilFunc=Oc;let u=a.clone();u.side=_u,u.clippingPlanes=[r],u.stencilFail=wc,u.stencilZFail=wc,u.stencilZPass=wc;let c=new Pe(t,u);c.renderOrder=n,i.add(c);let m=a.clone();m.side=So,m.clippingPlanes=[r],m.stencilFail=Ac,m.stencilZFail=Ac,m.stencilZPass=Ac;let d=new Pe(t,m);return d.renderOrder=n,i.add(d),i}};o(cy,"ClippingPlaneSystem");var ip=cy;l();var ly=class ly{constructor(){h(this,"plugins",new Set)}registerPlugin(t){this.plugins.add(t)}unregisterPlugin(t){this.plugins.delete(t)}update(t){for(let r of this.plugins)r.update(t)}};o(ly,"PluginSystem");var op=ly;l();var my=class my{constructor(t){h(this,"type","occlusion2d");h(this,"enabled",!0);h(this,"id");this.id=t}};o(my,"Occlusion2DComponent");var ap=my;var fC=new Un;var{DEFAULT_PITCH:RE,DEFAULT_BEARING:NE,DEFAULT_ZOOM_LEVEL:UE,DEFAULT_MIN_ZOOM_LEVEL:aT,DEFAULT_MAX_ZOOM_LEVEL:uT}=yn,sT=Oe.radToDeg(.6435011087932844),xt,Et,ea,uc,Au,Co,ta,Fu,mr,py,M,vn,ra,Xe,Rn,At,xn,Ht,B,sc,Kt,lt,hC,gC,yC,ji,cc,lc,mc,dc,Ou,up,pc,Pu,fc,na,fy,ia,hc,gc,Mr,Tr,hy,sp,cp,Bu,yc,gy=class gy extends ke{constructor(r,n={}){var v,b,S,F,E,x,D,I,C,k,V,$,T,w,L,_;super();R(this,mr);h(this,"options");h(this,"container");h(this,"Debug");R(this,xt);R(this,Et);R(this,ea);R(this,uc);R(this,Au);R(this,Co);R(this,ta);R(this,Fu);h(this,"rendererDomElement");R(this,M,{geometry3DMap:new Map,geometry2DMap:new Map,geometry2DIdsInScene:new Set,geometry3DIdsInScene:new Set,geometryGroupIdsToLoad:new Set,geometry3DsInScene:new Set,geometry2DsInScene:new Set,geometryScene:new tr("__scene"),hoverColor:"#f6efff",text3dHoverColor:"white",insetsPadding:$c,shouldMeasureCanvas:!0,pixelRatio:this.resolutionScale,canvasWidth:0,canvasHeight:0,internalTweenGroup:new zm,externalTweenGroup:new zm,cameraObject:new pp,naturalBearing:0,containerOffset:[0,0],useStandaloneCamera:!1,directionalLight:new Rc(16777215,.3*Math.PI),ambientLight:new Ly(16777215,.741*Math.PI),renderer:void 0,threeJSScene:new Wi});R(this,vn,{});R(this,ra,new AbortController);h(this,"camera");R(this,Xe);R(this,Rn);R(this,At);R(this,xn);R(this,Ht);R(this,B,{});R(this,sc,window.matchMedia("screen and (min-resolution: 2dppx)"));h(this,"map");R(this,Kt,o(()=>{var r;this.aborted||!((r=s(this,B))!=null&&r.renderSystem)||(s(this,B).renderSystem.twoDdirty=!0)},"#invalidate2DEntities"));R(this,lt,o(()=>{var r;this.aborted||!((r=s(this,B))!=null&&r.renderSystem)||(s(this,B).renderSystem.threeDdirty=!0)},"#invalidate3DEntities"));R(this,ji,"standalone");R(this,cc,o(()=>{s(this,B).geometryDisposalSystem.dirty=!0,this.render()},"#setGeometryDisposalDirty"));R(this,lc,o(r=>Math.trunc(r*10)/10,"#round10"));R(this,mc,o(()=>{dt(this,mr,py).call(this,$u()),s(this,B).twoDDrawSystem.dirty=!0,s(this,Ou).call(this,void 0,void 0,!0)},"#handlePixelRatioChange"));R(this,dc,o(()=>{s(this,Ou).call(this)},"#handleWindowResizeWithEvent"));R(this,Ou,o((r,n,i=!1)=>{let a=r!=null?r:this.rendererDomElement.clientWidth,u=n!=null?n:this.rendererDomElement.clientHeight;if((a===0||u===0)&&!i)return;s(this,M).canvasWidth=a,s(this,M).canvasHeight=u,dt(this,mr,py).call(this,$u()),s(this,na).call(this),dt(this,mr,yC).call(this),s(this,B).cameraSystem.resize(this.canvasWidth,this.canvasHeight),s(this,B).cameraSystem.dirty=!0,this.map!=null&&(this.map.setMinZoom(this.camera.minZoomLevel),this.map.setMaxZoom(this.camera.maxZoomLevel)),s(this,B).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),s(this,B).htmlControlsSystem.resize(this.canvasWidth),s(this,B).geometryInFocusSystem.resize(),s(this,B).occlusion2DSystem.resize();let{top:c,left:m}=this.container.getBoundingClientRect();s(this,M).containerOffset=[c,m],this.publish("resize"),this.render()},"#handleWindowResize"));R(this,up,o(()=>{this.renderSync()},"#renderFull"));R(this,pc,new ae);R(this,Pu,o((r,n)=>{let i=this.mode==="standalone"?s(this,Et):this.viewCamera;if(s(this,Et).position.z+this.camera.elevation>n.z){s(this,pc).copy(n);let a=s(this,pc).project(i),u=(a.x+1)/2*this.canvasWidth-0/2,c=(-a.y+1)/2*this.canvasHeight-0/2,m=s(this,lc).call(this,u),d=s(this,lc).call(this,c);r.x=m,r.y=d}else r.x=-1e3,r.y=-1e3},"#project"));R(this,fc,o((r,n)=>{s(this,Ht).setBufferSize(r,n),s(this,Et).aspect=r/n,s(this,Et).updateProjectionMatrix(),s(this,Et).updateMatrixWorld(!0),s(this,Au).x=r,s(this,Au).y=n},"#setBufferSize"));R(this,na,o(()=>{var u;let r=s(this,M).canvasWidth=this.rendererDomElement.clientWidth,n=s(this,M).canvasHeight=this.rendererDomElement.clientHeight,i=Math.floor(r*this.resolutionScale),a=Math.floor(n*this.resolutionScale);s(this,fc).call(this,i,a),(u=this.map)==null||u.resize(),s(this,M).shouldMeasureCanvas=!1},"#measureCanvas"));h(this,"getParentContainer",o((r,n=!0)=>{if(!r)return n?s(this,M).geometryScene:void 0;if(typeof r=="string"||typeof r=="number"){let i=s(this,M).geometry3DMap.get(r);return i instanceof tr?i:(Ee.warn("Parent (".concat(typeof r=="object"?r.id:r,") is not a valid container, adding to scene")),n?s(this,M).geometryScene:void 0)}else if(r.type==="group-container"){let i=s(this,M).geometry3DMap.get(r.id);if(i instanceof tr)return i}return n?s(this,M).geometryScene:void 0},"getParentContainer"));h(this,"showCollisionBoxes",o(()=>{s(this,B).collisionSystem.showCollisionBoxes(),this.render()},"showCollisionBoxes"));h(this,"hideCollisionBoxes",o(()=>{s(this,B).collisionSystem.hideCollisionBoxes(),this.render()},"hideCollisionBoxes"));h(this,"projectScreenXYToCoordinate",o((r,n,i=!1)=>{var g,v;let a=this.container.getBoundingClientRect(),u=(r-a.left)/s(this,M).canvasWidth*2-1,c=-((n-a.top)/s(this,M).canvasHeight)*2+1,m=new Se(u,c),d,f;if(i)fC.setFromCamera(m,s(this,Et)),d=(g=fC.intersectObject(s(this,Co),!1)[0])==null?void 0:g.point;else{let b=s(this,B).interactionSystem.getThreeDIntersectsFromXY(m);d=(v=b==null?void 0:b[0])==null?void 0:v.point,f=s(this,B).interactionSystem.getGroupContainerIntersectsFromXY(m)}if(d)return{coordinate:this.convert3DMapPositionToCoordinate(d),groupContainers:f}},"projectScreenXYToCoordinate"));h(this,"projectCoordinateToScreenXY",o(r=>{let n=this.convertTo3DMapPosition(r[1],r[0],r[2]||0),i=new Se;return s(this,Pu).call(this,i,n),{x:i.x,y:i.y}},"projectCoordinateToScreenXY"));h(this,"convert3DMapPositionToCoordinate",o(r=>{var a,u,c,m;let{lat:n,lon:i}=Gc((u=(a=s(this,M).center)==null?void 0:a[1])!=null?u:0,(m=(c=s(this,M).center)==null?void 0:c[0])!=null?m:0,r.x,r.y);return[i,n,r.z]},"convert3DMapPositionToCoordinate"));h(this,"setBackgroundColor",o((r,n)=>{s(this,Ht).setBackgroundColor(r,n)},"setBackgroundColor"));h(this,"getMetersPerPixel",o(()=>s(this,B).cameraSystem.getCurrentMetersPerPixel(),"getMetersPerPixel"));h(this,"hideOutdoorLayersIntersectingPolygons",o((r,n)=>{s(this,B).outdoorLayersSystem.hideLayersIntersectingPolygons(r,n),this.render()},"hideOutdoorLayersIntersectingPolygons"));R(this,ia,new Tc);R(this,hc,new zr);R(this,gc,o(r=>{var n;Ee.error("Render failed: ",r,(n=r.stack)!=null?n:"No stack trace available"),this.publish("render-error",{error:r})},"#onRenderError"));h(this,"render",o(()=>{var r;if(!(((r=s(this,B))==null?void 0:r.renderSystem)==null||this.aborted))if(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay"))this.map.triggerRepaint();else return s(this,B).renderSystem.update().catch(s(this,gc))},"render"));h(this,"renderSync",o(()=>this.aborted?Promise.resolve():s(this,B).renderSystem.update(!0).catch(s(this,gc)),"renderSync"));R(this,Mr,da(()=>{this.publish("user-interaction-start",void 0)},0,!0));R(this,Tr,da(()=>{this.publish("user-interaction-end",void 0),this.render()},0,!0));h(this,"on",o((r,n)=>{this.aborted||(super.on(r,n),["outdoor-view-loaded","outdoor-style-loaded"].includes(r)&&this.mode==="standalone"&&y.env.NODE_ENV!=="test"&&(Ee.warn('"'.concat(r,'" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.')),this.publish(r)))},"on"));h(this,"off",o((r,n)=>{super.off(r,n)},"off"));h(this,"getCursor",o(()=>s(this,B).interactionSystem.getCursor(),"getCursor"));R(this,sp,o(()=>{if(s(this,M).geometryScene.removeEventListener("childadded",s(this,lt)),s(this,M).geometryScene.removeEventListener("childadded",s(this,Kt)),s(this,M).geometryScene.removeEventListener("childremoved",s(this,lt)),s(this,M).geometryScene.removeEventListener("childremoved",s(this,Kt)),window.removeEventListener("resize",s(this,dc),!1),s(this,sc).removeEventListener("change",s(this,mc)),this.map){for(let r in s(this,vn))for(let n of s(this,vn)[r])this.map.off(r,n);H(this,vn,{})}this._subscribers={}},"#cleanupEventListeners"));R(this,cp,o(()=>{try{s(this,ji)!=="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,xn)&&this.container.contains(s(this,xn))&&this.container.removeChild(s(this,xn)),s(this,Xe)&&this.container.contains(s(this,Xe))&&this.container.removeChild(s(this,Xe)))}catch(r){Ee.warn("Error during DOM cleanup, some elements may not have been removed:",r)}},"#cleanupDOMElements"));h(this,"destroy",o(()=>{var r,n;s(this,B)&&(s(this,B).textureSystem.destroy(),this.aborted||s(this,ra).abort(),s(this,sp).call(this),(r=globalThis.MappedinDebug)!=null&&r.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,B).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.unregisterInteractionChecker(s(this,B).cameraSystem.isCameraMoving)),this.remove("__scene"),s(this,B).renderSystem.destroy(),s(this,B).cameraSystem.dispose(),s(this,B).exporterSystem.destroy(),s(this,B).outdoorLayersSystem.destroy(),s(this,B).borderSystem.destroy(),s(this,ta)&&s(this,ta).disconnect(),s(this,Ht).destroy(),(n=s(this,xt))==null||n.traverse(i=>{Rt(i),"dispose"in i&&typeof i.dispose=="function"&&i.dispose()}),H(this,xt,void 0),s(this,B).htmlControlsSystem.destroy(),s(this,B).collisionSystem.destroy(),s(this,B).interactionSystem.destroy(),s(this,B).domMutationSystem.destroy(),s(this,B).geometryInFocusSystem.destroy(),s(this,B).occlusion2DSystem.destroy(),H(this,B,void 0),s(this,cp).call(this),H(this,Ht,void 0))},"destroy"));R(this,Bu,new ae);R(this,yc,new ae);if(H(this,ra,new AbortController),s(this,M).useStandaloneCamera=(v=n.useStandaloneCamera)!=null?v:!1,s(this,M).naturalBearing=(b=n.naturalBearing)!=null?b:0,this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),!r.clientWidth||!r.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&&(H(this,ji,n.mode),this.map=n.map),s(this,M).geometryScene.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),s(this,M).geometryScene.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),s(this,M).geometry3DMap.set(s(this,M).geometryScene.userData.entityId,s(this,M).geometryScene),n.center&&(s(this,M).center=n.center?[...n.center]:[0,0]),this.options=n,this.container=r,dt(this,mr,hC).call(this),dt(this,mr,gC).call(this),s(this,B).htmlControlsSystem=new jm(this.container,{outdoorEnabled:!!this.map}),s(this,ji)!=="outdoors-overlay"&&s(this,B).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),y.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),H(this,Ht,new Yc({antialias:typeof n.antialias=="boolean"?n.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(S=n.gl)==null?void 0:S.canvas:void 0,onWebGLContextCreationError:n.onWebGLContextCreationError,onWebGLContextLost:n.onWebGLContextLost,onWebGLContextRestored:o(G=>{var ie;(ie=n.onWebGLContextRestored)==null||ie.call(n,G),s(this,Kt).call(this),s(this,lt).call(this),this.render()},"onWebGLContextRestored"),onWebGLRendererError:n.onWebGLRendererError,backgroundColor:n.backgroundColor||"#ffffff",backgroundAlpha:(F=n.backgroundAlpha)!=null?F:1})),s(this,M).renderer=s(this,Ht).renderer,H(this,xt,s(this,M).threeJSScene),s(this,xt).matrixWorldAutoUpdate=!1,s(this,ji)!=="standalone"&&s(this,xt).add(s4()),s(this,xt).add(s(this,M).geometryScene);let i=window.__THREE_DEVTOOLS__;y.env.NODE_ENV==="dev"&&typeof i<"u"&&(i.dispatchEvent(new CustomEvent("observe",{detail:s(this,xt)})),i.dispatchEvent(new CustomEvent("observe",{detail:s(this,Ht)}))),H(this,Et,new pp(sT,this.aspect,50,1e5)),s(this,M).cameraObject=s(this,Et),H(this,uc,new Py),s(this,Et).renderOrder=999;let a=new wo;a.add(s(this,Et)),H(this,Fu,new wo),s(this,Fu).add(a),s(this,xt).add(s(this,Fu)),s(this,Et).updateProjectionMatrix(),s(this,Et).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:o(()=>0,"getNorth"),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,Ht).domElement(),H(this,Au,new Se);let u=new En(1e6,1e6),c=new dr({color:0,visible:!1});H(this,Co,new Pe(u,c)),s(this,Co).name="worldPlane",s(this,xt).add(s(this,Co)),(E=n.gl)!=null&&E.canvas||r.appendChild(this.rendererDomElement),window.addEventListener("resize",s(this,dc),!1),s(this,sc).addEventListener("change",s(this,mc)),typeof ResizeObserver=="function"&&((x=y.env)==null?void 0:x.NODE_ENV)!=="test"&&(H(this,ta,new ResizeObserver(pa(G=>{s(this,Ou).call(this,G[0].contentRect.width,G[0].contentRect.height)},50))),(D=s(this,ta))==null||D.observe(r)),r.classList.add("mappedin-map"),this.rendererDomElement.style.width=(I=globalThis.MappedinDebug)!=null&&I.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(C=globalThis.MappedinDebug)!=null&&C.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,M).canvasWidth=this.rendererDomElement.clientWidth,s(this,M).canvasHeight=this.rendererDomElement.clientHeight,this.rendererDomElement.style.touchAction="manipulation";let m=this.canvasWidth,d=this.canvasHeight;s(this,B).watermarkSystem=new bd(s(this,Et),s(this,M),n==null?void 0:n.watermark),s(this,B).watermarkSystem.on("texture-loaded",this.render),s(this,M).shouldMeasureCanvas=!0,s(this,M).pixelRatio=this.resolutionScale,s(this,fc).call(this,Math.floor(m*this.resolutionScale),Math.floor(d*this.resolutionScale)),s(this,M).directionalLight.position.set(-150,-150,350),s(this,xt).add(s(this,M).directionalLight),s(this,xt).add(s(this,M).ambientLight),s(this,B).cameraSystem=new hu(s(this,Et),s(this,xt),s(this,Ht).renderer,s(this,M),{mode:this.mode,canvasHeight:d,canvasWidth:m}),(k=globalThis.MappedinDebug)!=null&&k.__idleCallbackInteractionState&&(globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,B).cameraSystem.isUserInteracting),globalThis.MappedinDebug.__idleCallbackInteractionState.registerInteractionChecker(s(this,B).cameraSystem.isCameraMoving)),s(this,B).cameraSystem.on("user-dolly-start",s(this,Mr)),s(this,B).cameraSystem.on("user-pan-start",s(this,Mr)),s(this,B).cameraSystem.on("user-rotate-start",s(this,Mr)),s(this,B).cameraSystem.on("user-zoom-start",s(this,Mr)),s(this,B).cameraSystem.on("user-tilt-start",s(this,Mr)),s(this,B).cameraSystem.on("user-pedestal-start",s(this,Mr)),s(this,B).cameraSystem.on("user-dolly-end",s(this,Tr)),s(this,B).cameraSystem.on("user-pan-end",s(this,Tr)),s(this,B).cameraSystem.on("user-rotate-end",s(this,Tr)),s(this,B).cameraSystem.on("user-zoom-end",s(this,Tr)),s(this,B).cameraSystem.on("user-tilt-end",s(this,Tr)),s(this,B).cameraSystem.on("user-pedestal-end",s(this,Tr)),s(this,B).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),s(this,B).geometryInFocusSystem&&(s(this,B).geometryInFocusSystem.cameraDirty=!0),this.render()}),this.onAbort(()=>{s(this,B).cameraSystem.off("user-dolly-start",s(this,Mr)),s(this,B).cameraSystem.off("user-pan-start",s(this,Mr)),s(this,B).cameraSystem.off("user-rotate-start",s(this,Mr)),s(this,B).cameraSystem.off("user-zoom-start",s(this,Mr)),s(this,B).cameraSystem.off("user-tilt-start",s(this,Mr)),s(this,B).cameraSystem.off("user-pedestal-start",s(this,Mr)),s(this,B).cameraSystem.off("user-dolly-end",s(this,Tr)),s(this,B).cameraSystem.off("user-pan-end",s(this,Tr)),s(this,B).cameraSystem.off("user-rotate-end",s(this,Tr)),s(this,B).cameraSystem.off("user-zoom-end",s(this,Tr)),s(this,B).cameraSystem.off("user-tilt-end",s(this,Tr)),s(this,B).cameraSystem.off("user-pedestal-end",s(this,Tr)),s(this,B).renderSystem.off("measure-canvas",s(this,na)),s(this,B).cameraSystem.off("change",this.render),s(this,B).outlineInterpolationSystem.off("needs-render",this.render)}),s(this,B).pathSystem=new oc(s(this,M),this.convertTo3DMapPosition,this.getParentContainer,s(this,B).cameraSystem.convertZoomLevelToAltitude),s(this,B).pathSystem.on("animate:path",this.render),this.onAbort(()=>{s(this,B).pathSystem.off("animate:path",this.render)}),s(this,B).panBoundsSystem=new Ed(s(this,M),s(this,B).cameraSystem);let f=o(()=>{let{panBounds:G,fov:ie,convertAltitudeToZoomLevel:Q}=s(this,B).cameraSystem;if(s(this,B).panBoundsSystem.autoMinZoomLevel){if(G.radius<=0)return;let le=Math.min(s(this,M).canvasWidth/s(this,M).canvasHeight,1),Z=ie*Math.PI/180*le,Y=Math.tan(Z/2),{radius:ee,center:q}=s(this,B).cameraSystem.panBounds,ce=ee/Y,Ie=this.getThreeCamera().getWorldPosition(new ae),Te=q.distanceTo(Ie),We=Math.abs(Ie.z-q.z),He=ce*We/Te,Fe=Q(He);a4(Fe,this.camera.minZoomLevel)&&this.camera.setMinZoomLevel(Fe)}this.publish("pan-bounds-change",s(this,B).cameraSystem.panBounds)},"handlePanBoundsUpdate");s(this,B).panBoundsSystem.on("update",f),this.onAbort(()=>{s(this,B).panBoundsSystem.off("update",f)}),this.camera=new Xm(this,s(this,B),s(this,M)),this.camera.setZoomLevel((V=n.zoomLevel)!=null?V:UE),this.camera.setBearing(($=n.bearing)!=null?$:NE),this.camera.setPitch((T=n.pitch)!=null?T:RE),this.camera.setMaxZoomLevel(uT),this.camera.setMinZoomLevel(aT),s(this,B).domVisiblitySystem=new ld(s(this,M),s(this,xn)),s(this,B).domMutationSystem=new yd(s(this,M),s(this,xn)),s(this,B).domMutationSystem.on("dimensions-update",()=>{s(this,B).collisionSystem.collidersDirty=!0,this.render()}),s(this,B).domDrawSystem=new gd(s(this,M)),s(this,B).collisionSystem=new Ym(s(this,Rn),s(this,M),((w=n.useCollisionWorker)!=null?w:!0)&&((L=n.useWorkers)!=null?L:!0)),s(this,B).twoDDrawSystem=new dd(s(this,M),s(this,At),n.transformImageRequest),s(this,B).twoDDrawSystem.on("img:loaded",this.render),s(this,B).interactionSystem=new Ls(this.rendererDomElement,s(this,M),s(this,Et),s(this,Co),s(this,B).cameraSystem.isUserInteracting),s(this,B).interactionSystem.on("doubletap-with-onefinger",G=>{var ie;s(this,B).cameraSystem.enableZoom&&this.camera.animateTo({center:(ie=this.projectScreenXYToCoordinate(G.clientX,G.clientY))==null?void 0:ie.coordinate,zoomLevel:this.camera.zoomLevel+1,duration:Ep,easing:"ease-out"})}),s(this,B).interactionSystem.on("singletap-with-twofinger",()=>{s(this,B).cameraSystem.enableZoom&&this.camera.animateTo({zoomLevel:this.camera.zoomLevel-1,duration:Ep,easing:"ease-out"})}),s(this,B).interactionSystem.on("hover",this.render),s(this,B).interactionSystem.on("click",G=>{var Y,ee,q,ce,Ie,Te,We,He,Fe;if(G.entity2D.some(it=>it.id==="watermark")&&typeof s(this,B).watermarkSystem.options.onClick=="function"&&s(this,B).watermarkSystem.options.interactive){s(this,B).watermarkSystem.options.onClick();return}let Q=G.entity3D?[(Y=G.entity3D)==null?void 0:Y.id]:[];(ce=(q=(ee=G.entity3D)==null?void 0:ee.parentObject3D)==null?void 0:q.userData)!=null&&ce.entityId&&Q.push((We=(Te=(Ie=G.entity3D)==null?void 0:Ie.parentObject3D)==null?void 0:Te.userData)==null?void 0:We.entityId);let le=[],Z=[];for(let it of G.entity2D)it.components[0]instanceof di?le.push(it.id):it.components[0]instanceof mi&&Z.push(it.id);this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(G.position),geometry:Q,paths:((He=G.entity3D)==null?void 0:He.components[0])instanceof fo?[G.entity3D.id]:[],markers:le,models:((Fe=G.entity3D)==null?void 0:Fe.components[0])instanceof po?[G.entity3D.id]:[],labels:Z,containers:Array.isArray(G.groupContainers)?G.groupContainers.map(it=>it.userData.entityId):[],pointerEvent:G.pointerEvent})}),s(this,B).interactionSystem.on("hover",G=>{var le,Z,Y;if(!G.position)return;let ie=[],Q=[];for(let ee of G.entity2D)ee.components[0]instanceof di?ie.push(ee.id):ee.components[0]instanceof mi&&Q.push(ee.id);this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(G.position),geometry:G.entity3D?[(le=G.entity3D)==null?void 0:le.id]:[],paths:((Z=G.entity3D)==null?void 0:Z.components[0])instanceof fo?[G.entity3D.id]:[],markers:ie,models:((Y=G.entity3D)==null?void 0:Y.components[0])instanceof po?[G.entity3D.id]:[],labels:Q,containers:Array.isArray(G.groupContainers)?G.groupContainers.map(ee=>ee.userData.entityId):[]})}),s(this,B).geometryInFocusSystem=new Md(s(this,M),s(this,Et));let g=o(G=>{this.publish("geometry-in-focus",G)},"handleGeometryInFocus");s(this,B).geometryInFocusSystem.on("geometry-in-focus",g),this.onAbort(()=>{s(this,B).geometryInFocusSystem.off("geometry-in-focus",g)}),s(this,B).twoDVisiblitySystem=new fd(s(this,M)),s(this,B).drawSystem=new pd(s(this,M),this.convertTo3DMapPosition),s(this,B).twoDProjectionSystem=new md(s(this,M),s(this,Pu)),s(this,B).exporterSystem=new Rs(s(this,M)),s(this,B).meshOptimizationSystem=new cd(s(this,M),this.convertTo3DMapPosition),s(this,B).meshOptimizationSystem.on("model-loaded",this.render),s(this,B).meshOptimizationSystem.on("geometry-2d-added",this.render),s(this,B).meshOptimizationSystem.on("geometry-group-added",s(this,cc)),this.onAbort(()=>{s(this,B).meshOptimizationSystem.off("model-loaded",this.render),s(this,B).meshOptimizationSystem.off("geometry-2d-added",this.render),s(this,B).meshOptimizationSystem.off("geometry-group-added",s(this,cc))}),s(this,B).meshDetachmentSystem=new Wd(s(this,M)),s(this,B).meshModificationSystem=new Kd(s(this,M)),s(this,B).geometryDisposalSystem=new tp(s(this,M)),s(this,B).textureSystem=new rp(s(this,M)),s(this,B).textureSystem.on("texture-added",this.render),this.onAbort(()=>{s(this,B).textureSystem.off("texture-added",this.render)}),s(this,B).borderSystem=new N4(s(this,M),this.convertTo3DMapPosition),s(this,B).clippingPlaneSystem=new ip(s(this,M)),s(this,B).renderOrderSystem=new np(s(this,M)),s(this,B).pluginSystem=new op,s(this,B).customGeometrySystem=new Cd(s(this,M),this.convertTo3DMapPosition),s(this,B).outlineInterpolationSystem=new Sd(s(this,M)),s(this,B).outlineInterpolationSystem.on("needs-render",this.render),s(this,B).renderSystem=new hd(s(this,Ht),s(this,M),this.mode,s(this,xt),s(this,Et),this.viewCamera,s(this,B)),s(this,B).imageSystem=new Bd(s(this,M),this.convertTo3DMapPosition,s(this,Pu),n.bearing,n.naturalBearing,n.imagePlacementOptions),s(this,B).text3DSystem=new l4(s(this,M),this.convertTo3DMapPosition,(_=n.useWorkers)!=null?_:!0),s(this,B).text3DSystem.on("render",this.render),s(this,B).imageSystem.on("image-loaded",this.render),s(this,B).renderSystem.on("pre-render",()=>this.publish("pre-render")),s(this,B).renderSystem.on("post-render",()=>this.publish("post-render")),s(this,B).renderSystem.on("measure-canvas",s(this,na)),this.onAbort(()=>{s(this,B).renderSystem.off("pre-render",()=>this.publish("pre-render")),s(this,B).renderSystem.off("post-render",()=>this.publish("post-render")),s(this,B).renderSystem.off("measure-canvas",s(this,na))}),s(this,B).outdoorLayersSystem=new zd(this.map),s(this,B).occlusion2DSystem=new ep(s(this,M),this.convertTo3DMapPosition,s(this,Ht)),n.occlusionEnabled&&s(this,B).occlusion2DSystem.enable(),this.Debug=new Qd(this),n.environment!==!1&&H(this,ea,dt(this,mr,hy).call(this)),s(this,up).call(this)}get viewCamera(){return s(this,uc)}get canvasWidth(){return s(this,M).canvasWidth}get canvasHeight(){return s(this,M).canvasHeight}get resolutionScale(){var r,n;return(n=(r=this.map)==null?void 0:r._getClampedPixelRatio(this.canvasWidth,this.canvasHeight))!=null?n:$u()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return s(this,ji)}addGroupContainer(r,n,i){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let a=new tr(r);a.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),a.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),(n==null?void 0:n.visible)!==void 0&&(a.visible=n.visible),(n==null?void 0:n.altitude)!==void 0&&a.setAltitude(n.altitude),(n==null?void 0:n.interactive)!==void 0&&$r(a,n.interactive,s(this,M)),(n==null?void 0:n.focusable)!==void 0&&Jc(a,n.focusable),(n==null?void 0:n.preloadGeometry)!==void 0&&(a.userData.preloadGeometry=n.preloadGeometry),s(this,M).geometry3DMap.set(r,a);let u=this.getParentContainer(i);u instanceof tr&&u.addEntity(a),s(this,lt).call(this),this.render()}else Ee.error("Group container with ID '".concat(r,"' already exists. The group container cannot be added."));return{id:r,type:"group-container"}}addCustomGeometry(r,n,i,a,u){if(s(this,M).geometry3DMap.has(r))Ee.error("Custom geometry with ID '".concat(r,"' already exists. The custom geometry cannot be added."));else{let c=new xu(n,i),m=new ot(c,new $n(a));(a==null?void 0:a.interactive)!==void 0&&$r(m,a.interactive,s(this,M)),m.id=r,c.mesh.userData={entityId:r,type:"custom-geometry"},s(this,M).geometry3DMap.set(m.id,m);let d=this.getParentContainer(u);u&&d instanceof tr?d.addEntity(m):s(this,M).geometryScene.addEntity(m),s(this,lt).call(this),this.render()}return{id:r,type:"custom-geometry"}}registerPlugin(r){s(this,B).pluginSystem.registerPlugin(r)}unregisterPlugin(r){s(this,B).pluginSystem.unregisterPlugin(r)}addGeometryGroup(r,n,i,a){var u,c,d;if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let f=new Gn(r);f.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),f.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),f.userData.dirty=!0,s(this,M).geometry3DMap.set(r,f);let g=typeof i=="function"?i(n.features[0]):i;for(let b of n.features){if(b.geometry==null||!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(b.geometry.type))continue;let S=(b==null?void 0:b.id)||((u=b==null?void 0:b.properties)==null?void 0:u.id)||fa(),F={color:Xc};if(typeof i=="function")F=(c=i(b))!=null?c:{color:Xc};else{let m=i||{color:Xc},{visible:x}=m;F=Do(m,["visible"])}let E=s(this,B).meshOptimizationSystem.createEntityFromFeature(S,b,U({outline:!0},F));s(this,M).geometry3DMap.set(S,E),f.userData.entities3D.add(S),s(this,B).textureSystem.dirty=!0}f.setVisible((d=g==null?void 0:g.visible)!=null?d:!0);let v=this.getParentContainer(a);v instanceof tr&&v.addEntity(f),s(this,lt).call(this),this.render()}else Ee.error("Geometry group with ID '".concat(r,"' already exists. The geometry group cannot be added."));return s(this,B).outlineInterpolationSystem.geometries3DDirty=!0,{id:r,type:"geometry-group"}}addOccluder(r,n){let i=this.getParentContainer(n),a=s(this,B).occlusion2DSystem.reserveOccluderId();return i==null||i.addOccluderFeature(r,a),a}addImage(r,n,i,a){try{b6(r,n,i)}catch(u){Ee.error(u);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new Pd(n),c=new ot(u,new $n(i));c.id=r||fa(),u.mesh.userData={entityId:c.id,type:"path"},s(this,M).geometry3DMap.set(c.id,c);let m=this.getParentContainer(a);m instanceof tr&&m.addEntity(c),s(this,lt).call(this),this.render()}else Ee.error("Image with ID '".concat(r,"' already exists. The image cannot be added."));return{id:r,type:"image"}}addModelGroup(r,n,i,{parent:a,onComplete:u}={}){var c,m;try{KE(r,n,i)}catch(d){Ee.error(d);return}if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let d=new Gn(r);d.addEventListener("childadded",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),d.addEventListener("childremoved",()=>{s(this,lt).call(this),s(this,Kt).call(this)}),s(this,M).geometry3DMap.set(r,d),d.userData.dirty=!0,d.userData.modelURL=i.url;for(let g of n.features){let v=g.id||g.properties.id||fa(),b=s(this,B).meshOptimizationSystem.createModelFromFeature(v,g,U({},i));(g.properties.interactive!==void 0||i.interactive!=null)&&$r(b,(c=g.properties.interactive)!=null?c:i.interactive,s(this,M)),i.clippingPlaneZOffset!=null&&(b.components[7]=new y4,b.components[7].verticalOffset=i.clippingPlaneZOffset),b.parentId=d.userData.entityId,s(this,M).geometry3DMap.set(v,b),d.userData.entities3D.add(v)}let f=this.getParentContainer(a);f instanceof tr&&f.addEntity(d),s(this,lt).call(this),(m=this.render())==null||m.then(u)}else Ee.error("Model group with ID '".concat(r,"' already exists. The model group cannot be added."));return{id:r,type:"geometry-group"}}addMarker2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{Yy(r,n,i||{})}catch(m){Ee.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,mr,fy).call(this,r,new di(n,i),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&i.interactive!=="pointer-events-auto"&&$r(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&Kc(m,i.enabled),(i==null?void 0:i.occlude)!=null&&Op(m,i.occlude);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof ot&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),this.render()}else Ee.error("Marker2D with ID '".concat(u,"' already exists. The marker cannot be added."));return{id:u,type:"marker"}}addText3D(r,n,i,a){if(!s(this,M).geometry3DMap.has(r)&&!s(this,M).geometry2DMap.has(r)){let u=new Hc(xe(U({},n),{properties:xe(U({},n.properties),{id:r,content:n.properties.text})})),c=new ot(u,new Gu(i==null?void 0:i.appearance));c.id=r,u.mesh.userData.entityId=r.toString(),u.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(r,c);let m=this.getParentContainer(a);m instanceof tr&&m.addEntity(c),s(this,lt).call(this),this.render()}else Ee.error("Text3D with ID '".concat(r,"' already exists. The text3d cannot be added."));return{id:r,type:"text3d"}}labelText3D(r,n,i={}){var d,f;try{if(!n||!r)throw new Error("content and meshGeometryId are required");m4.parse(i)}catch(g){Ee.error(g);return}let a=s(this,M).geometry3DMap.get(r);if((a==null?void 0:a.type)!=="geometry"){Ee.error(".labelText3D failed: target incorrect");return}let u=a==null?void 0:a.components[0];if(!u.feature.properties.textArea)return;if(u.textEntityId){let g=s(this,M).geometry3DMap.get(u.textEntityId);if((g==null?void 0:g.type)!=="text3d"){Ee.error(".labelText3D failed: existing text3d not found");return}return{id:g.id,type:g.type}}let c=new Hc({type:"Feature",geometry:{coordinates:(d=u.feature.properties.textArea)==null?void 0:d.position,type:"Point"},properties:{textArea:u.feature.properties.textArea,content:n,id:fa()}});c.polygonEntityId=r;let m=new ot(c,new Gu(i==null?void 0:i.appearance));return u.textEntityId=m.id.toString(),c.mesh.userData.entityId=m.id.toString(),c.mesh.userData.type="text3d",s(this,M).geometry3DMap.set(m.id.toString(),m),i.parentId&&((f=this.getParentContainer(i.parentId))==null||f.addEntity(m)),this.render(),{id:m.id,type:"text3d"}}addLabel2D(r,n,i,a){var c;let u=i==null?void 0:i.id;try{Xy(r,n,i||{})}catch(m){Ee.error(m);return}if(u===void 0||!s(this,M).geometry2DMap.has(u)&&!s(this,M).geometry3DMap.has(u)){let m=dt(this,mr,fy).call(this,r,new mi(n,i||{},s(this,M)),i==null?void 0:i.occluderId,i==null?void 0:i.verticalOffset);m.id=u||String(m.id),u=m.id,(i==null?void 0:i.interactive)!=null&&$r(m,i==null?void 0:i.interactive,s(this,M)),(i==null?void 0:i.enabled)!=null&&Kc(m,i.enabled),(i==null?void 0:i.occlude)!=null&&Op(m,i.occlude);let d=typeof(i==null?void 0:i.attachTo)=="string"||typeof(i==null?void 0:i.attachTo)=="number"?s(this,M).geometry3DMap.get(i.attachTo):void 0;d instanceof ot&&d.attach(m),(c=this.getParentContainer(a))==null||c.addEntity(m),s(this,Kt).call(this),this.render()}else Ee.error("Label2D with ID '".concat(u,"' already exists. The label cannot be added."));return{id:u,type:"label"}}addPath(r,n={},i){var m,d;try{n6(r,n||{})}catch(f){Ee.error(f);return}let a=new fo(r,M4(n)),u=new ot(a,new $n({color:(m=n==null?void 0:n.color)!=null?m:"#ff834c",altitude:(d=n==null?void 0:n.verticalOffset)!=null?d:.1}));u.id=(n==null?void 0:n.id)||fa(),a.mesh.userData={entityId:u.id,type:"path"},s(this,M).geometry3DMap.set(u.id,u),(n==null?void 0:n.interactive)!=null&&$r(u,n==null?void 0:n.interactive,s(this,M));let c=this.getParentContainer(i);return c instanceof tr&&c.addEntity(u),s(this,lt).call(this),this.render(),{id:u.id,type:"path"}}updateWatermark(r){s(this,B).watermarkSystem.options=r,s(this,B).watermarkSystem.dirty=!0,s(this,B).collisionSystem.collidersDirty=!0,this.render()}remove(r){var i,a;let n;if(typeof r=="string"||typeof r=="number"?(n=s(this,M).geometry2DMap.get(r),n==null&&(n=s(this,M).geometry3DMap.get(r))):typeof r.id=="string"||typeof r.id=="number"?(n=s(this,M).geometry2DMap.get(r.id),n==null&&(n=s(this,M).geometry3DMap.get(r.id))):n=r,n!=null){if(n.type==="custom-geometry")s(this,M).geometry3DMap.delete(n.id),n.object3d&&Rt(n.object3d);else if(n.type==="group-container"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let c of n.childrenIds.values())this.remove(c),n.userData.entities2D.delete(c);let u=n.components[1];u&&u.focusMesh&&Rt(u.focusMesh),Rt(n)}else if(n.type==="geometry-group"){s(this,M).geometry3DMap.delete(n.userData.entityId);for(let u of n.userData.entities3D.values())this.remove(u),n.userData.entities3D.delete(u);Rt(n)}else if(n.type==="geometry"||n.type==="model"||n.type==="path"){let u=n.components[0],c=n.components[4];if(n.entities2D.size>0){for(let d of n.entities2D.values())this.remove(d);n.removeAllEntities()}let m=(a=(i=n.parentObject3D)==null?void 0:i.userData.entityId)!=null?a:n.parentId;if(m){let d=s(this,M).geometry3DMap.get(m);d instanceof Gn&&d.userData.entities3D.delete(n.id)}if(n.object3d&&Rt(n.object3d),n.type==="geometry"){let d=n.components[3];d&&(d.enabled=!1,d.dirty=!0)}c&&"focusMesh"in c&&c.focusMesh!=null&&Rt(c.focusMesh),"textMesh"in u&&u.textMesh!=null&&this.remove(u.textMesh.userData.entityId),s(this,M).geometry3DMap.delete(n.id)}else if(n.type==="marker"||n.type==="label"){let u=n.attachedTo;if(u){let c=s(this,M).geometry3DMap.get(u);c instanceof ot&&c.detach(n)}n.object3d&&Rt(n.object3d),n.type==="label"&&delete s(this,B).twoDDrawSystem.textCache[n.id],s(this,M).geometry2DMap.delete(n.id)}else if(n.type==="image")n.object3d&&Rt(n.object3d),s(this,M).geometry3DMap.delete(n.id);else if(n.type==="text3d"){Rt(n.object3d);let{batchedText:u,textMesh:c,polygonEntityId:m}=n.components[0];if(c&&(u&&u.removeText(c),Rt(c)),m){s(this,B).text3DSystem.remove(m);let d=s(this,M).geometry3DMap.get(m);(d==null?void 0:d.type)==="geometry"&&(d.components[0].textMesh=void 0,d.components[0].textEntityId=void 0)}s(this,M).geometry3DMap.delete(n.id)}s(this,lt).call(this),s(this,Kt).call(this),this.render()}}getScene(){return this.getState("__scene")}getThreeScene(){return s(this,xt)}getThreeCamera(){return s(this,Et)}async setEnvironment(r){if(s(this,xt))if(r==="basic"){s(this,ea)||H(this,ea,dt(this,mr,hy).call(this));let n=await s(this,ea);s(this,xt).environment=n}else s(this,xt).environment=null}getEnvironment(){var r;return(r=s(this,xt))!=null&&r.environment?"basic":!1}getCurrentSceneGLTF(r){return s(this,B).exporterSystem.getCurrentSceneGLTF(r)}getBoundingArea(r){(s(this,B).renderSystem.threeDdirty||s(this,B).renderSystem.twoDdirty)&&this.renderSync();let n=new er;if(r==null)n.setFromObject(s(this,M).geometryScene);else{let i=ga(s(this,M),r);if((i==null?void 0:i.type)==="geometry"&&(i==null?void 0:i.object3d)!=null){let a=i.components[0],u=a instanceof kt?a.geometry:void 0;a.mesh instanceof kc&&u?(u.computeBoundingBox(),u.boundingBox&&n.union(u.boundingBox)):n.setFromObject(i.object3d)}else((i==null?void 0:i.type)==="geometry-group"||(i==null?void 0:i.type)==="group-container")&&(i==null?void 0:i.userData.entityId)!=null&&n.setFromObject(i)}if(zc(n))return Qy(n).map(this.convert3DMapPositionToCoordinate)}hasState(r){return ga(s(this,M),r)!=null}getState(r){var i,a,u,c,m,d,f,g,v,b,S,F,E,x,D,I,C,k,V,$,T;if(r==null)return{type:"map-view",hoverColor:s(this,M).hoverColor,text3dHoverColor:s(this,M).text3dHoverColor};let n=ga(s(this,M),r);if((n==null?void 0:n.type)==="custom-geometry"){let w=n.components[0],L=n.components[1];return{id:n.id,type:"custom-geometry",visible:L.visible,altitude:L.altitude,parent:(i=n.parentObject3D)==null?void 0:i.userData.entityId,position:this.convert3DMapPositionToCoordinate(w.position)}}else if((n==null?void 0:n.type)==="geometry-group"){let w=Array.from(n.userData.entities3D.values()),L=w==null?void 0:w[0],_=L?this.getState(L):{};return{id:n.userData.entityId,type:"geometry-group",visible:n.visible,altitude:_==null?void 0:_.altitude,initialColor:_==null?void 0:_.initialColor,color:_==null?void 0:_.color,side:(a=_==null?void 0:_.side)!=null?a:"double",opacity:_==null?void 0:_.opacity,height:_==null?void 0:_.height,texture:_==null?void 0:_.texture,topColor:_==null?void 0:_.topColor,topTexture:_==null?void 0:_.topTexture,interactive:Array.from(n.userData.entities3D.values()).map(G=>s(this,M).geometry3DMap.get(G)).every(G=>G&&G.components[2]!=null),children:w,bevel:_==null?void 0:_.bevel}}else{if((n==null?void 0:n.type)==="group-container")return{id:n.userData.entityId,type:"group-container",visible:n.visible,altitude:(u=n.getWorldPosition(cT).z)!=null?u:0,opacity:n.opacity,interactive:!!n.components[0],children:Array.from(n.childrenIds.values()).map(w=>this.getState(w)).filter(Boolean)};if((n==null?void 0:n.type)==="label"){let w=n.components[0],L=n.object3d.parent,_=L==null?void 0:L.userData.entityId;return{id:n.id,type:"label",text:w.text||"",parent:{id:_,type:L==null?void 0:L.type},position:this.convert3DMapPositionToCoordinate(n.position),enabled:w.enabled,visible:w.visible,initialRank:ju(w.initialRank),options:{rank:ju(w.rank),appearance:w.appearance,interactive:n.components[1]!=null,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,occlude:(m=(c=n.components[2])==null?void 0:c.enabled)!=null?m:!1}}}else if((n==null?void 0:n.type)==="marker"){let w=n.components[0],L=n.object3d.parent,_=L==null?void 0:L.userData.entityId;return{id:n.id,type:"marker",enabled:w.enabled,visible:w.visible,placement:w.options.placement,dynamicResize:w.options.dynamicResize,parent:{id:_,type:L==null?void 0:L.type},position:this.convert3DMapPositionToCoordinate(n.position),element:w.containerEl,initialRank:ju(w.initialRank),contentHTML:w.contentHtml,options:{rank:ju(w.rank),interactive:n.components[1]!=null||!1,verticalOffset:n.verticalOffset,attachTo:n.attachedTo,lowPriorityPin:w.options.lowPriorityPin,occlude:(f=(d=n.components[2])==null?void 0:d.enabled)!=null?f:!1}}}else if((n==null?void 0:n.type)==="geometry"){let{color:w,hoverColor:L,initialColor:_,initialTopColor:G,topColor:ie,altitude:Q}=n.components[1],le=n.components[0],Z=n.components[4],Y=n.components[1],ee=n.components[6],q=n.components[2],ce=n.components[3],Ie=n.parentObject3D;return{id:n.id,type:"geometry",opacity:Y.opacity,initialColor:_,color:w,focusable:Z!=null&&Z.focusMesh!=null,initialTopColor:G,topColor:ie,side:Y.side,hoverColor:L,hovered:!!(q!=null&&q.hover),height:Y.height,visible:Y.visible,outline:ce==null?void 0:ce.enabled,showImage:Y.showImage,texture:(g=ee==null?void 0:ee.texture)==null?void 0:g.path,topTexture:(v=ee==null?void 0:ee.topTexture)==null?void 0:v.path,flipImageToFaceCamera:Y.flipImageToFaceCamera,enableImageCollisions:Y.enableImageCollisions,parent:{id:Ie==null?void 0:Ie.userData.entityId,type:Ie==null?void 0:Ie.type},altitude:Q,bevel:Y.bevel,position:this.convert3DMapPositionToCoordinate(le.position),interactive:n.components[2]!=null,borderVisible:Y.borderVisible,borderColor:Y.borderColor,borderWidth:Y.borderWidth}}else if((n==null?void 0:n.type)==="model"){let w=n.components[0],L=n.components[1],_=n.components[2];return{id:n.id,type:"model",position:w.mesh?this.convert3DMapPositionToCoordinate((b=w.mesh)==null?void 0:b.getWorldPosition(new ae)):this.convert3DMapPositionToCoordinate(w.position),interactive:_!=null,material:L.material,parent:(S=n.parentObject3D)!=null&&S.parent?{id:n.parentObject3D.parent.userData.entityId,type:n.parentObject3D.parent.type}:void 0,visible:L.visible,verticalOffset:L.verticalOffset,color:L.color,opacity:L.opacity,rotation:(F=L.rotation)!=null?F:xa,scale:(E=L.scale)!=null?E:va}}else if((n==null?void 0:n.type)==="path"){let w=n.components[0],L=n.components[2],_=n.components[1];return{id:n.id,type:"path",position:this.convert3DMapPositionToCoordinate(w.position),visible:_.visible,interactive:L!=null,completeFraction:w.completeFraction,color:_.color,accentColor:w.accentColor,width:w.width,animateArrowsOnPath:w.animateArrowsOnPath,displayArrowsOnPath:w.displayArrowsOnPath,verticalOffset:_.altitude,highlightCompleteFraction:w.highlightCompleteFraction,highlightStartFraction:w.highlightStartFraction,highlightEndFraction:w.highlightEndFraction,highlightColor:w.highlightColor,highlightWidthMultiplier:w.highlightWidthMultiplier,xrayOpacity:w.xrayOpacity}}else if((n==null?void 0:n.type)==="image"){let w=n.components[0];return{id:n.id,type:"image",position:this.convert3DMapPositionToCoordinate(w.position),visible:n.components[1].visible,verticalOffset:(x=w.feature.properties.verticalOffset)!=null?x:0,opacity:n.components[1].opacity,flipImageToFaceCamera:n.components[1].flipImageToFaceCamera,width:(D=w.feature.properties.width)!=null?D:0,height:(I=w.feature.properties.height)!=null?I:0,rotation:(C=w.feature.properties.rotation)!=null?C:0}}else if((n==null?void 0:n.type)==="text3d"&&n.components[0]instanceof Hc&&"textArea"in n.components[0].feature.properties){T4(n);let w=n.components[0],L=n.components[1],{textMesh:_}=w,G=(k=w.mesh)==null?void 0:k.parent;G instanceof tr&&((V=G.children.find(le=>le.type==="batchedtext"))==null||V.getWorldPosition(s(this,yc))),s(this,Bu).set(0,0,0);let ie=_?_.getWorldPosition(s(this,Bu)):s(this,Bu);return Object.assign({},ba,L.getState(),{id:n.id,type:"text3d",position:this.convert3DMapPositionToCoordinate(ie.add(s(this,yc))),visible:($=w.visible)!=null?$:!1,content:(T=w.feature.properties.content)!=null?T:""})}else return}}setState(r,n){var a,u;if(typeof r=="object"&&n==null){"hoverColor"in r&&(Wy(r.hoverColor)?s(this,M).hoverColor=(a=r.hoverColor)!=null?a:s(this,M).hoverColor:Ee.warn('Failed to update global hover color. Invalid color "'.concat(r.hoverColor,'".'))),"text3dHoverColor"in r&&(s(this,M).text3dHoverColor=(u=r.text3dHoverColor)!=null?u:s(this,M).text3dHoverColor);return}let i=ga(s(this,M),r);if(i!=null){if(i.type==="custom-geometry"){let c=s(this,M).geometry3DMap.get(i.id);if(c instanceof ot&&c.components[0]instanceof xu){let m=n;qi(i,s(this,M),m.visible),Ea(i,s(this,M),m.altitude),Ap(i,m.position,this.convertTo3DMapPosition),Fp(i,this.getParentContainer(m.parent,!1)),$r(i,m.interactive,s(this,M))&&s(this,lt).call(this)}}else if(i.type==="path"){let c=n;$r(i,c.interactive,s(this,M))&&s(this,lt).call(this),Ea(i,s(this,M),c.verticalOffset),B4(i,s(this,M),c)}else if(i.type==="model"){let c=n;$r(i,c.interactive,s(this,M))&&s(this,lt).call(this),qi(i,s(this,M),c.visible),_4(i,c),L4(i,c)}else if(i.type==="group-container"){let c=n;qi(i,s(this,M),c.visible)&&(s(this,B).pathSystem.verticalDistanceDirty=!0,s(this,B).geometryInFocusSystem.focusablesDirty=!0),Ea(i,s(this,M),c.altitude)&&(s(this,B).pathSystem.verticalDistanceDirty=!0),$r(i,c.interactive,s(this,M))&&s(this,lt).call(this),qc(i,s(this,M),c.opacity)&&(s(this,B).outlineInterpolationSystem.outlineOpacitiesDirty=!0),c.preloadGeometry&&i.userData.preloadGeometry!==!0&&(i.userData.preloadGeometry=!0,s(this,B).outlineInterpolationSystem.geometries3DDirty=!0),Jc(i,c.focusable)&&(s(this,B).geometryInFocusSystem.focusablesDirty=!0)}else if(i.type==="geometry-group"){let c=n;qi(i,s(this,M),c.visible),b4(i,s(this,M),c),Mp(i,s(this,M),c.outline),c.height!=null&&wp(i,s(this,M),c.height),Ea(i,s(this,M),c.altitude),Bp(i,s(this,M),c)&&(s(this,B).textureSystem.dirty=!0),Bp(i,s(this,M),c),v4(i,s(this,M),c.shading),qc(i,s(this,M),c.opacity)&&(s(this,B).outlineInterpolationSystem.outlineOpacitiesDirty=!0),$r(i,c.interactive,s(this,M))&&(s(this,lt).call(this),s(this,Kt).call(this)),Tp(i,s(this,M),c.side)}else if(i.type==="geometry"){if(i.components[0]instanceof kt){let c=n;qi(i,s(this,M),c.visible),Mp(i,s(this,M),c.outline),x4(i,c),Jc(i,c.focusable)&&(s(this,B).geometryInFocusSystem.focusablesDirty=!0),O4(i,c.renderOrder)&&(s(this,B).meshDetachmentSystem.dirty=!0),F4(i,c.opacity)&&(s(this,B).meshDetachmentSystem.dirty=!0,s(this,B).interactionSystem.dirty3D=!0,s(this,B).outlineInterpolationSystem.outlineOpacitiesDirty=!0),Pp(i,c.flipImageToFaceCamera),w4(i,c.enableImageCollisions),Ea(i,s(this,M),c.altitude),c.height!=null&&wp(i,s(this,M),c.height),A4(i,c)&&(s(this,B).meshDetachmentSystem.dirty=!0,s(this,B).textureSystem.dirty=!0),E4(i,c),D4(i,c.hoverColor),$r(i,c.interactive,s(this,M)),S4(i,c.hovered),Tp(i,s(this,M),c.side),P4(i,c)}s(this,lt).call(this)}else if(i.type==="label"||i.type==="marker"){let c=n;I4(i,c,s(this,M)),C4(i,c,s(this,M))&&(s(this,Kt).call(this),s(this,B).domMutationSystem.dirty=!0),Ap(i,c.position,this.convertTo3DMapPosition),Fp(i,this.getParentContainer(c.parent,!1))&&(s(this,Kt).call(this),s(this,B).panBoundsSystem.dirty=!0),Kc(i,c.enabled),qi(i,s(this,M),c.visible)}else if(i.type==="image"){let c=n;qi(i,s(this,M),c.visible),qc(i,s(this,M),c.opacity),Pp(i,c.flipImageToFaceCamera)}else if(i.type==="text3d"){let c=n;k4(i,s(this,M),c)}this.render()}}convertTo3DMapPosition(r,n,i=0,a){var m,d,f,g,v;if(Array.isArray(r))return this.convertTo3DMapPosition(r[1],r[0],(m=r[2])!=null?m:i,typeof n=="function"?n:void 0);if(typeof n!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:u,y:c}=Zc((f=(d=s(this,M).center)==null?void 0:d[1])!=null?f:0,(v=(g=s(this,M).center)==null?void 0:g[0])!=null?v:0,r,n);return a?(a.set(u,c,i),a):new ae(u,c,i)}get backgroundColor(){return typeof s(this,Ht).backgroundColor=="string"?s(this,Ht).backgroundColor:"#".concat(s(this,Ht).backgroundColor.getHexString())}get backgroundAlpha(){return s(this,Ht).backgroundAlpha}getThreeRenderer(){return s(this,Ht)}getCenter(r){let n=Array.isArray(r)?r:this.getBoundingArea(r);return n?o4(n):void 0}isInView(r){let n=ga(s(this,M),r);if(s(this,hc).identity().multiply(s(this,Et).projectionMatrix).multiply(s(this,Et).matrixWorldInverse),s(this,ia).setFromProjectionMatrix(s(this,hc)),n instanceof xp)return s(this,ia).containsPoint(n.position);if(n instanceof ot){let i=n==null?void 0:n.components[0];if(i instanceof xu||i instanceof po)return s(this,ia).containsPoint(this.convertTo3DMapPosition(i.feature.geometry.coordinates));if(i instanceof kt){let a=new er(this.convertTo3DMapPosition(i.featureBbox[1],i.featureBbox[0],0),this.convertTo3DMapPosition(i.featureBbox[3],i.featureBbox[2],0));return s(this,ia).intersectsBox(a)}}return!1}queryGeometry2DInView(r){let{screenOffsets:n,fullyContains:i}=r!=null?r:{},[a,u,c,m]=c4(this.container,n),d=new we(a,u,c,m);return s(this,B).collisionSystem.visibleCollidersQTree.queryRect(d).filter(b=>i?d.contains(b):d.intersects(b)).map(b=>s(this,M).geometry2DMap.get(b.userData.entityId)).filter(b=>b!=null).filter(b=>b.components[0]instanceof mi||b.components[0]instanceof di).map(b=>b.id.toString())}onMapLibreEvent(r,n){if(!this.map){Ee.warn('Tried to add event listener "'.concat(r,'" but MapLibre map is not initialized.'));return}this.map.on(r,n),s(this,vn)[r]=s(this,vn)[r]||[],s(this,vn)[r].push(n)}offMapLibreEvent(r,n){!this.map||!Array.isArray(s(this,vn)[r])||(this.map.off(r,n),s(this,vn)[r]=s(this,vn)[r].filter(i=>i!==n))}get aborted(){return s(this,ra).signal.aborted}onAbort(r){s(this,ra).signal.addEventListener("abort",r,{once:!0})}getSystems(){return s(this,B)}getInternalState(){return s(this,M)}getInternalTweenGroup(){return s(this,M).internalTweenGroup}getExternalTweenGroup(){return s(this,M).externalTweenGroup}computeMinZOffsetBetweenContainers(r,n,i){if(!r||!n)return-1;vp(r,"group-container"),vp(n,"group-container"),r.updateMatrixWorld(!0),n.updateMatrixWorld(!0);let a=Vc(r,this.getThreeCamera()),u=n.clone(!0);t4(u,!0),u.updateMatrixWorld();let c=Vc(u,this.getThreeCamera());if(!zc(a)||!zc(c))return-1;let m=0,d;i&&this.container.querySelectorAll(".debug-box").forEach(g=>g.remove());do{if(m>1e4)return-1;if(m+=20,u.setAltitude(m),c.makeEmpty(),Vc(u,s(this,Et),c),d=a.intersectsBox(c),i){let f=Dp(a,"blue",this.container),g=Dp(c,d?"red":"green",this.container);f.classList.add("debug-box"),g.classList.add("debug-box")}}while(d);return m}};xt=new WeakMap,Et=new WeakMap,ea=new WeakMap,uc=new WeakMap,Au=new WeakMap,Co=new WeakMap,ta=new WeakMap,Fu=new WeakMap,mr=new WeakSet,py=o(function(r){var n;s(this,ji)!=="outdoors-overlay"&&((n=this.map)==null||n.setPixelRatio(r)),s(this,M).pixelRatio=this.resolutionScale},"#setResolutionScale"),M=new WeakMap,vn=new WeakMap,ra=new WeakMap,Xe=new WeakMap,Rn=new WeakMap,At=new WeakMap,xn=new WeakMap,Ht=new WeakMap,B=new WeakMap,sc=new WeakMap,Kt=new WeakMap,lt=new WeakMap,hC=o(function(){H(this,Xe,document.createElement("div")),s(this,Xe).classList.add("mappedin__smart-collision-engine__container"),H(this,Rn,document.createElement("canvas")),s(this,Rn).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(s(this,Xe)),H(this,At,document.createElement("canvas")),s(this,At).classList.add("mappedin__smart-collision-engine__container"),s(this,At).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,At).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Xe).clientWidth+"px",s(this,At).style.height=s(this,Xe).clientHeight+"px",s(this,Xe).appendChild(s(this,Rn)),s(this,Xe).appendChild(s(this,At)),s(this,Rn).width=s(this,Xe).clientWidth,s(this,Rn).height=s(this,Xe).clientHeight,s(this,At).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,At).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Xe).clientWidth+"px",s(this,At).style.height=s(this,Xe).clientHeight+"px"},"#renderEntity2DContainer"),gC=o(function(){H(this,xn,document.createElement("div")),s(this,xn).classList.add("mappedin-2d-entities"),Object.assign(s(this,xn).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","transform-style":"preserve-3d"}),this.container.appendChild(s(this,xn))},"#renderEntityDOMContainer"),yC=o(function(){s(this,At).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,At).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Xe).clientWidth+"px",s(this,At).style.height=s(this,Xe).clientHeight+"px",s(this,Rn).width=s(this,Xe).clientWidth,s(this,Rn).height=s(this,Xe).clientHeight,s(this,At).width=s(this,Xe).clientWidth*this.resolutionScale,s(this,At).height=s(this,Xe).clientHeight*this.resolutionScale,s(this,At).style.width=s(this,Xe).clientWidth+"px",s(this,At).style.height=s(this,Xe).clientHeight+"px",s(this,B).collisionSystem.collidersDirty=!0},"#resizeCollisionCanvas"),ji=new WeakMap,cc=new WeakMap,lc=new WeakMap,mc=new WeakMap,dc=new WeakMap,Ou=new WeakMap,up=new WeakMap,pc=new WeakMap,Pu=new WeakMap,fc=new WeakMap,na=new WeakMap,fy=o(function(r,n,i,a){let u=new xp(n,this.convertTo3DMapPosition(r[1],r[0],r[2]||0),a);return u.components[2]=new ap(i!=null?i:s(this,B).occlusion2DSystem.backgroundId),s(this,M).geometry2DMap.set(u.id,u),u},"#createEntity2D"),ia=new WeakMap,hc=new WeakMap,gc=new WeakMap,Mr=new WeakMap,Tr=new WeakMap,hy=o(async function(){return go.load(j4).then(r=>{var n;return s(this,xt)&&((n=s(this,xt).environment)==null||n.dispose(),r.mapping=Cy,s(this,xt).environment=r,this.render()),r})},"#loadEnvMap"),sp=new WeakMap,cp=new WeakMap,Bu=new WeakMap,yc=new WeakMap,o(gy,"Core");var dy=gy,cT=new ae,Jh=dy;var yy=class yy extends ke{constructor(r){super();h(this,"gl");h(this,"el",document.createElement("div"));h(this,"core");h(this,"origin");h(this,"map");h(this,"layer");h(this,"handleStyleChange",o(()=>{!this.map||!this.layer||this.map.getLayer(this.layer.id)||(this.map.addLayer(this.layer),this.core.camera.setMinZoomLevel(this.map.getMinZoom()),this.core.camera.setMaxZoomLevel(this.map.getMaxZoom()),this.core.camera.setMinPitch(this.map.getMinPitch()),this.core.camera.setMaxPitch(this.map.getMaxPitch()))},"handleStyleChange"));h(this,"handleMove",o(()=>{if(!this.map)return;let[r,n]=this.map.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(r,n),this.core.getSystems().cameraSystem.setZoomLevel(this.map.getZoom()),this.core.getSystems().cameraSystem.setRotation(Oe.degToRad(this.map.getBearing())),this.core.getSystems().cameraSystem.setTilt(Oe.degToRad(this.map.getPitch()))},"handleMove"));h(this,"handleError",o(r=>{Ee.warn(r)},"handleError"));this.origin=r}onAdd(r){this.origin=this.origin||r.getCenter().toArray(),this.gl=r.painter.context.gl,this.core=new Jh(r._container,{center:this.origin,zoomLevel:r.getZoom(),pitch:r.getPitch(),bearing:r.getBearing(),gl:this.gl,map:r,mode:"outdoors-overlay"}),this.map=r,this.core.camera.setMinZoomLevel(r.getMinZoom()),this.core.camera.setMaxZoomLevel(r.getMaxZoom()),this.core.camera.setMinPitch(r.getMinPitch()),this.core.camera.setMaxPitch(r.getMaxPitch()),this.map.on("error",this.handleError);let n=mp.fromLngLat(this.origin,0);return this.layer=Cp(n,this.core.viewCamera,()=>{this.core.renderSync()}),this.map.on("styledata",this.handleStyleChange),this.map.on("move",this.handleMove),this.handleStyleChange(),this.el}onRemove(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("move",this.handleMove),this.map.off("error",this.handleError),this.layer&&this.map.removeLayer(this.layer.id)),this.layer=void 0,this.map=void 0,this.core&&this.core.destroy(),this.core=void 0}};o(yy,"MapLibreOverlay");var lp=yy;l();var bC=$y("",{prefix:"[MapLibreOverlay]"});l();var vC=o((e,{id:t}={})=>{let r=Array.isArray(e)?e:[e];if(!r.every(a=>typeof a=="string"))return;let n=r.join(""),i=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(i=a)}i==null&&(i=document.createElement("style")),t&&t!==""&&(i.id=t),i.textContent=n,document.head.appendChild(i)},"injectCSS");var xC=".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 EC=".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 CC=".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 IC=".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 hT=[xC,EC,CC,IC],S3e=o((e,t)=>{bc.instance!=null&&bC.warn("Only a single map venue is supported at this time.");let r=new bc([e.mapCenter.longitude,e.mapCenter.latitude],e,t);return bc.instance=r,r},"createMapLibreOverlay"),gT=3,yT={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:gT}},oa,aa,Mu,Io,ua,vc=class vc{constructor(t,r,n){R(this,oa);R(this,aa);R(this,Mu);R(this,Io);R(this,ua);h(this,"on",o((t,r)=>{s(this,oa).on(t,r)},"on"));h(this,"off",o((t,r)=>{s(this,oa).off(t,r)},"off"));H(this,oa,new ke),H(this,ua,new lp(t)),H(this,aa,r),H(this,Mu,n)}onAdd(t){var i,a,u;let r=s(this,ua).onAdd(t),n=xe(U(U({},yT),(i=s(this,Mu))!=null?i:{}),{outdoorView:U({token:s(this,aa).outdoorViewToken},(a=s(this,Mu))==null?void 0:a.outdoorView)});return H(this,Io,new fT(s(this,ua).core)),((u=n.injectStyles)==null||u)&&vC(hT,{id:"mappedin__styles"}),s(this,Io).addMap(s(this,aa),n).then(()=>{s(this,oa).publish("loaded",{mapView:s(this,Io),mapData:s(this,aa)})}),r}onRemove(){s(this,Io)&&s(this,Io).clear(),vc.instance=null,s(this,ua).onRemove()}};oa=new WeakMap,aa=new WeakMap,Mu=new WeakMap,Io=new WeakMap,ua=new WeakMap,o(vc,"MappedinMapLibreOverlay"),h(vc,"instance");var bc=vc;export{yT as DEFAULT_MAP_OPTIONS,gT as FLOOR_GAP,bc as MappedinMapLibreOverlay,S3e as createMapLibreOverlay};
|