@mappedin/mappedin-js 6.0.1-beta.3 → 6.0.1-beta.31
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/README.md +6 -6
- package/THIRD_PARTY_LICENSES.txt +420 -5
- package/lib/esm/GLTFExporter-XQMSPUH3.js +1 -0
- package/lib/esm/GLTFLoader-X2MDKJUT.js +1 -0
- package/lib/esm/browser-OJTYUPQX.js +1 -0
- package/lib/esm/chunk-2W6HOSKW.js +1 -0
- package/lib/esm/chunk-BL4SI3SC.js +1 -0
- package/lib/esm/chunk-D3IQOXID.js +1 -0
- package/lib/esm/chunk-H2E2454S.js +1 -0
- package/lib/esm/chunk-LCL7XTV4.js +1 -0
- package/lib/esm/chunk-NP6PYE7C.js +1 -0
- package/lib/esm/chunk-QN3BHHTQ.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +9453 -3894
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-D2RCHDOY.css +1 -0
- package/lib/esm/inspector-PYUFVJT3.js +1 -0
- package/lib/esm/internal-55777EMI.css +1 -0
- package/lib/esm/internal-VCLKPDWG.js +1 -0
- package/lib/esm/outdoor-context-v4-JBWJ3GVY.js +1 -0
- package/lib/esm/roboto-regular-YXLENGLP.js +1 -0
- package/lib/esm/text3d-EHF4IPDU.js +1 -0
- package/lib/esm/text3d-Q7FFP3YS.css +1 -0
- package/lib/index.css +1 -1
- package/package.json +9 -10
- package/lib/esm/GLTFExporter-DJTLMZRS.js +0 -18
- package/lib/esm/GLTFLoader-EMLQBTUW.js +0 -1
- package/lib/esm/browser-VJJYXKCR.js +0 -1
- package/lib/esm/chunk-5TYPWFBI.js +0 -1
- package/lib/esm/chunk-5VLYPNGJ.js +0 -950
- package/lib/esm/chunk-AIZ6PN4T.js +0 -577
- package/lib/esm/chunk-BCE6HB4T.js +0 -1
- package/lib/esm/chunk-YPHGW2KF.js +0 -3799
- package/lib/esm/inspector-GIOP4ZXY.js +0 -425
- package/lib/esm/inspector-XYNFPRUR.css +0 -1
- package/lib/esm/outdoor-context-v4-DXPG5QBY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as fr,i as cn,j as dn}from"./chunk-QN3BHHTQ.js";import{a as fn}from"./chunk-LCL7XTV4.js";import{C as Nt,Ca as ln,J as z,M as gt,O as ye,P as ae,R as en,U as tn,Ya as un,c as qr,d as Kr,e as Xr,ea as rn,g as mt,ja as nn,ka as on,ma as jt,p as Jr,q as Qr,ua as an,xa as sn,y as dr}from"./chunk-2W6HOSKW.js";import{a as d,b as x}from"./chunk-NP6PYE7C.js";import{b as Fi,d as Vi,e as l,f as E,g as V,h as P}from"./chunk-H2E2454S.js";var ai=Fi((Mt,ot)=>{d();var Ko=200,Bn="__lodash_hash_undefined__",Xo=800,Jo=16,zn=9007199254740991,Fn="[object Arguments]",Qo="[object Array]",ea="[object AsyncFunction]",ta="[object Boolean]",ra="[object Date]",na="[object Error]",Vn="[object Function]",ia="[object GeneratorFunction]",oa="[object Map]",aa="[object Number]",sa="[object Null]",Un="[object Object]",la="[object Proxy]",ua="[object RegExp]",ca="[object Set]",da="[object String]",fa="[object Undefined]",pa="[object WeakMap]",ha="[object ArrayBuffer]",ma="[object DataView]",ga="[object Float32Array]",ya="[object Float64Array]",ba="[object Int8Array]",va="[object Int16Array]",xa="[object Int32Array]",_a="[object Uint8Array]",Ta="[object Uint8ClampedArray]",Sa="[object Uint16Array]",Ma="[object Uint32Array]",ka=/[\\^$.*+?()[\]{}|]/g,wa=/^\[object .+?Constructor\]$/,Da=/^(?:0|[1-9]\d*)$/,O={};O[ga]=O[ya]=O[ba]=O[va]=O[xa]=O[_a]=O[Ta]=O[Sa]=O[Ma]=!0;O[Fn]=O[Qo]=O[ha]=O[ta]=O[ma]=O[ra]=O[na]=O[Vn]=O[oa]=O[aa]=O[Un]=O[ua]=O[ca]=O[da]=O[pa]=!1;var Hn=typeof global=="object"&&global&&global.Object===Object&&global,Ca=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Hn||Ca||Function("return this")(),Zn=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,kt=Zn&&typeof ot=="object"&&ot&&!ot.nodeType&&ot,$n=kt&&kt.exports===Zn,xr=$n&&Hn.process,In=function(){try{var t=kt&&kt.require&&kt.require("util").types;return t||xr&&xr.binding&&xr.binding("util")}catch{}}(),On=In&&In.isTypedArray;function Wn(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Ea(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ia(t){return function(e){return t(e)}}function Oa(t,e){return t==null?void 0:t[e]}function Aa(t,e){return function(r){return t(e(r))}}var Pa=Array.prototype,Ra=Function.prototype,qt=Object.prototype,_r=Dt["__core-js_shared__"],Kt=Ra.toString,fe=qt.hasOwnProperty,An=function(){var t=/[^.]+$/.exec(_r&&_r.keys&&_r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Yn=qt.toString,La=Kt.call(Object),Ga=RegExp("^"+Kt.call(fe).replace(ka,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=$n?Dt.Buffer:void 0,Pn=Dt.Symbol,Rn=Dt.Uint8Array,Ln=Wt?Wt.allocUnsafe:void 0,qn=Aa(Object.getPrototypeOf,Object),Gn=Object.create,Na=qt.propertyIsEnumerable,ja=Pa.splice,Ze=Pn?Pn.toStringTag:void 0,Yt=function(){try{var t=Cr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ba=Wt?Wt.isBuffer:void 0,Nn=Math.max,za=Date.now,Kn=Cr(Dt,"Map"),wt=Cr(Object,"create"),Fa=function(){function t(){}return function(e){if(!de(e))return{};if(Gn)return Gn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function $e(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Va(){this.__data__=wt?wt(null):{},this.size=0}function Ua(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ha(t){var e=this.__data__;if(wt){var r=e[t];return r===Bn?void 0:r}return fe.call(e,t)?e[t]:void 0}function Za(t){var e=this.__data__;return wt?e[t]!==void 0:fe.call(e,t)}function $a(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=wt&&e===void 0?Bn:e,this}$e.prototype.clear=Va;$e.prototype.delete=Ua;$e.prototype.get=Ha;$e.prototype.has=Za;$e.prototype.set=$a;function pe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wa(){this.__data__=[],this.size=0}function Ya(t){var e=this.__data__,r=Xt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ja.call(e,r,1),--this.size,!0}function qa(t){var e=this.__data__,r=Xt(e,t);return r<0?void 0:e[r][1]}function Ka(t){return Xt(this.__data__,t)>-1}function Xa(t,e){var r=this.__data__,n=Xt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}pe.prototype.clear=Wa;pe.prototype.delete=Ya;pe.prototype.get=qa;pe.prototype.has=Ka;pe.prototype.set=Xa;function at(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ja(){this.size=0,this.__data__={hash:new $e,map:new(Kn||pe),string:new $e}}function Qa(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e}function es(t){return Qt(this,t).get(t)}function ts(t){return Qt(this,t).has(t)}function rs(t,e){var r=Qt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}at.prototype.clear=Ja;at.prototype.delete=Qa;at.prototype.get=es;at.prototype.has=ts;at.prototype.set=rs;function st(t){var e=this.__data__=new pe(t);this.size=e.size}function ns(){this.__data__=new pe,this.size=0}function is(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function os(t){return this.__data__.get(t)}function as(t){return this.__data__.has(t)}function ss(t,e){var r=this.__data__;if(r instanceof pe){var n=r.__data__;if(!Kn||n.length<Ko-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new at(n)}return r.set(t,e),this.size=r.size,this}st.prototype.clear=ns;st.prototype.delete=is;st.prototype.get=os;st.prototype.has=as;st.prototype.set=ss;function ls(t,e){var r=kr(t),n=!r&&Mr(t),i=!r&&!n&&ti(t),o=!r&&!n&&!i&&ni(t),a=r||n||i||o,s=a?Ea(t.length,String):[],u=s.length;for(var c in t)(e||fe.call(t,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Qn(c,u)))&&s.push(c);return s}function Tr(t,e,r){(r!==void 0&&!er(t[e],r)||r===void 0&&!(e in t))&&wr(t,e,r)}function us(t,e,r){var n=t[e];(!(fe.call(t,e)&&er(n,r))||r===void 0&&!(e in t))&&wr(t,e,r)}function Xt(t,e){for(var r=t.length;r--;)if(er(t[r][0],e))return r;return-1}function wr(t,e,r){e=="__proto__"&&Yt?Yt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var cs=Ts();function Jt(t){return t==null?t===void 0?fa:sa:Ze&&Ze in Object(t)?Ss(t):Es(t)}function jn(t){return Ct(t)&&Jt(t)==Fn}function ds(t){if(!de(t)||Ds(t))return!1;var e=Ir(t)?Ga:wa;return e.test(Ps(t))}function fs(t){return Ct(t)&&ri(t.length)&&!!O[Jt(t)]}function ps(t){if(!de(t))return Cs(t);var e=ei(t),r=[];for(var n in t)n=="constructor"&&(e||!fe.call(t,n))||r.push(n);return r}function Dr(t,e,r,n,i){t!==e&&cs(e,function(o,a){if(i||(i=new st),de(o))hs(t,e,a,r,Dr,n,i);else{var s=n?n(Sr(t,a),o,a+"",t,e,i):void 0;s===void 0&&(s=o),Tr(t,a,s)}},ii)}function hs(t,e,r,n,i,o,a){var s=Sr(t,r),u=Sr(e,r),c=a.get(u);if(c){Tr(t,r,c);return}var f=o?o(s,u,r+"",t,e,a):void 0,m=f===void 0;if(m){var w=kr(u),D=!w&&ti(u),I=!w&&!D&&ni(u);f=u,w||D||I?kr(s)?f=s:Rs(s)?f=vs(s):D?(m=!1,f=gs(u,!0)):I?(m=!1,f=bs(u,!0)):f=[]:Ls(u)||Mr(u)?(f=s,Mr(s)?f=Gs(s):(!de(s)||Ir(s))&&(f=Ms(u))):m=!1}m&&(a.set(u,f),i(f,u,n,o,a),a.delete(u)),Tr(t,r,f)}function Xn(t,e){return Os(Is(t,e,oi),t+"")}var ms=Yt?function(t,e){return Yt(t,"toString",{configurable:!0,enumerable:!1,value:Bs(e),writable:!0})}:oi;function gs(t,e){if(e)return t.slice();var r=t.length,n=Ln?Ln(r):new t.constructor(r);return t.copy(n),n}function ys(t){var e=new t.constructor(t.byteLength);return new Rn(e).set(new Rn(t)),e}function bs(t,e){var r=e?ys(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function vs(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function xs(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=n?n(r[s],t[s],s,r,t):void 0;u===void 0&&(u=t[s]),i?wr(r,s,u):us(r,s,u)}return r}function _s(t){return Xn(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&ks(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e})}function Ts(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(r(o[u],u,o)===!1)break}return e}}function Jn(t,e,r,n,i,o){return de(t)&&de(e)&&(o.set(e,t),Dr(t,e,void 0,Jn,o),o.delete(e)),t}function Qt(t,e){var r=t.__data__;return ws(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Cr(t,e){var r=Oa(t,e);return ds(r)?r:void 0}function Ss(t){var e=fe.call(t,Ze),r=t[Ze];try{t[Ze]=void 0;var n=!0}catch{}var i=Yn.call(t);return n&&(e?t[Ze]=r:delete t[Ze]),i}function Ms(t){return typeof t.constructor=="function"&&!ei(t)?Fa(qn(t)):{}}function Qn(t,e){var r=typeof t;return e=e==null?zn:e,!!e&&(r=="number"||r!="symbol"&&Da.test(t))&&t>-1&&t%1==0&&t<e}function ks(t,e,r){if(!de(r))return!1;var n=typeof e;return(n=="number"?Er(r)&&Qn(e,r.length):n=="string"&&e in r)?er(r[e],t):!1}function ws(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ds(t){return!!An&&An in t}function ei(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||qt;return t===r}function Cs(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function Es(t){return Yn.call(t)}function Is(t,e,r){return e=Nn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Nn(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),Wn(t,this,s)}}function Sr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Os=As(ms);function As(t){var e=0,r=0;return function(){var n=za(),i=Jo-(n-r);if(r=n,i>0){if(++e>=Xo)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ps(t){if(t!=null){try{return Kt.call(t)}catch{}try{return t+""}catch{}}return""}function er(t,e){return t===e||t!==t&&e!==e}var Mr=jn(function(){return arguments}())?jn:function(t){return Ct(t)&&fe.call(t,"callee")&&!Na.call(t,"callee")},kr=Array.isArray;function Er(t){return t!=null&&ri(t.length)&&!Ir(t)}function Rs(t){return Ct(t)&&Er(t)}var ti=Ba||zs;function Ir(t){if(!de(t))return!1;var e=Jt(t);return e==Vn||e==ia||e==ea||e==la}function ri(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=zn}function de(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ct(t){return t!=null&&typeof t=="object"}function Ls(t){if(!Ct(t)||Jt(t)!=Un)return!1;var e=qn(t);if(e===null)return!0;var r=fe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Kt.call(r)==La}var ni=On?Ia(On):fs;function Gs(t){return xs(t,ii(t))}var Ns=Xn(function(t){return t.push(void 0,Jn),Wn(js,void 0,t)});function ii(t){return Er(t)?ls(t,!0):ps(t)}var js=_s(function(t,e,r,n){Dr(t,e,r,n)});function Bs(t){return function(){return t}}function oi(t){return t}function zs(){return!1}ot.exports=Ns});d();var Bt="[MappedinJS]",Ui=(i=>(i[i.LOG=0]="LOG",i[i.WARN=1]="WARN",i[i.ERROR=2]="ERROR",i[i.SILENT=3]="SILENT",i))(Ui||{});function Ql(t){0<=t&&t<=3&&(pn.logState=t)}var pn={logState:x.env.NODE_ENV==="test"?3:0,log(...t){this.logState<=0&&console.log(Bt,...t)},warn(...t){this.logState<=1&&console.warn(Bt,...t)},error(...t){this.logState<=2&&console.error(Bt,...t)},assert(...t){console.assert(...t)},time(t){console.time(t)},timeEnd(t){console.timeEnd(t)},throw(t,e){throw new Error("".concat(Bt," ").concat(t),e)}},se=pn;d();d();var De=class extends Error{};De.prototype.name="InvalidTokenError";function Hi(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Zi(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Hi(e)}catch{return atob(e)}}function hn(t,e){if(typeof t!="string")throw new De("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new De("Invalid token specified: missing part #".concat(r+1));let i;try{i=Zi(n)}catch(o){throw new De("Invalid token specified: invalid base64 for part #".concat(r+1," (").concat(o.message,")"))}try{return JSON.parse(i)}catch(o){throw new De("Invalid token specified: invalid json for part #".concat(r+1," (").concat(o.message,")"))}}d();var Ce=63710088e-1;function lu(t){var r,n;let e=hn(t);if(e.sub==null)throw new Error("Access token is missing sub claim.");return{sub:e.sub,aud:typeof e.aud=="string"?[e.aud]:(r=e.aud)!=null?r:[],capabilities:(n=e.capabilities)!=null?n:{}}}function be(t){return t*(Math.PI/180)}function $i(t){return t*(180/Math.PI)}function mn(t,e){return(t%e+e)%e}function uu([t,e],[r,n]){let i=be(n-e),o=be(r-t),a=be(e),s=be(n),u=Math.sin(i/2)*Math.sin(i/2)+Math.sin(o/2)*Math.sin(o/2)*Math.cos(a)*Math.cos(s),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return Ce*c}function cu([t,e],[r,n]){let i=be(e),o=be(t),a=be(n),u=be(r)-o,c=Math.sin(u)*Math.cos(a),f=Math.cos(i)*Math.sin(a)-Math.sin(i)*Math.cos(a)*Math.cos(u);return $i((Math.atan2(c,f)+Math.PI*2)%(Math.PI*2))}function du(t,e){let r=mn(t,Math.PI*2),n=mn(e,Math.PI*2),i=n-r,o=n+(i>Math.PI?-Math.PI*2:i<-Math.PI?Math.PI*2:0);return{start:r,end:o}}d();function hu(t,e,r=!1){let n=null,i=0;return function(...o){i++,i===1&&r===!0&&t(...o);let a=()=>{(!r||i>1)&&t(...o),n=null,i=0};clearTimeout(n),n=setTimeout(a,e)}}d();d();d();var yt=class{constructor(){l(this,"_subscribers",{})}publish(e,r){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(r)})}on(e,r){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(r)}off(e,r){if(!this._subscribers||this._subscribers[e]==null)return;let n=this._subscribers[e].indexOf(r);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};d();d();var pr=[0,4,6,8,10],N=()=>{let t=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<t.length;n++)n>0&&!(n&3)&&(e=Math.random()*4294967296),t[n]=e>>>((n&3)<<3)&255;let r=t.map(n=>n.toString(16).padStart(2,"0"));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],pr.map((n,i)=>r.slice(n,i===pr.length-1?void 0:pr[i+1]).join("")).join("-")};var gn="mi-session-data",yn="mi-local-data",Ee,q,K,zt=class zt{constructor(){V(this,q,void 0);V(this,K,void 0);try{let e=sessionStorage.getItem(gn);e?P(this,q,JSON.parse(e)):P(this,q,{id:N()})}catch{P(this,q,{id:N()})}try{let e=localStorage.getItem(yn);e?P(this,K,JSON.parse(e)):P(this,K,{deviceId:N()})}catch{P(this,K,{deviceId:N()})}E(this,q).id||(E(this,q).id=N()),E(this,K).deviceId||(E(this,K).deviceId=N())}static getInstance(){return E(this,Ee)||P(this,Ee,new zt),E(this,Ee)}static ___clearInstance(){P(this,Ee,void 0)}saveSessionData(e,r){E(this,q)[e]=r;try{return sessionStorage.setItem(gn,JSON.stringify(E(this,q))),!0}catch{return!1}}loadSessionData(e){let r=E(this,q)[e];if(r!=null)return r}saveLocalData(e,r){E(this,K)[e]=r;try{return localStorage.setItem(yn,JSON.stringify(E(this,K))),!0}catch{return!1}}loadLocalData(e){let r=E(this,K)[e];if(r!=null)return r}};Ee=new WeakMap,q=new WeakMap,K=new WeakMap,V(zt,Ee,void 0);var hr=zt;d();var k;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?"'".concat(a,"'"):a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(k||(k={}));var gr;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(gr||(gr={}));var y=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ve=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}},p=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Wi=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),U=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};U.create=t=>new U(t);var Qe=(t,e)=>{let r;switch(t.code){case p.invalid_type:t.received===y.undefined?r="Required":r="Expected ".concat(t.expected,", received ").concat(t.received);break;case p.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(t.expected,k.jsonStringifyReplacer));break;case p.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(k.joinValues(t.keys,", "));break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(k.joinValues(t.options));break;case p.invalid_enum_value:r="Invalid enum value. Expected ".concat(k.joinValues(t.options),", received '").concat(t.received,"'");break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r='Invalid input: must include "'.concat(t.validation.includes,'"'),typeof t.validation.position=="number"&&(r="".concat(r," at one or more positions greater than or equal to ").concat(t.validation.position))):"startsWith"in t.validation?r='Invalid input: must start with "'.concat(t.validation.startsWith,'"'):"endsWith"in t.validation?r='Invalid input: must end with "'.concat(t.validation.endsWith,'"'):k.assertNever(t.validation):t.validation!=="regex"?r="Invalid ".concat(t.validation):r="Invalid";break;case p.too_small:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"more than"," ").concat(t.minimum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"over"," ").concat(t.minimum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(t.minimum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(t.minimum))):r="Invalid input";break;case p.too_big:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"less than"," ").concat(t.maximum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"under"," ").concat(t.maximum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="bigint"?r="BigInt must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(t.maximum))):r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r="Number must be a multiple of ".concat(t.multipleOf);break;case p.not_finite:r="Number must be finite";break;default:r=e.defaultError,k.assertNever(t)}return{message:r}},xn=Qe;function Yi(t){xn=t}function Ft(){return xn}var Vt=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)s=c(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}},qi=[];function g(t,e){let r=Ft(),n=Vt({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Qe?void 0:Qe].filter(i=>!!i)});t.common.issues.push(n)}var R=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return T;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return T;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},T=Object.freeze({status:"aborted"}),Je=t=>({status:"dirty",value:t}),j=t=>({status:"valid",value:t}),yr=t=>t.status==="aborted",br=t=>t.status==="dirty",xt=t=>t.status==="valid",_t=t=>typeof Promise<"u"&&t instanceof Promise;function Ut(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function _n(t,e,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 e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var v;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(v||(v={}));var bt,vt,Y=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},bn=(t,e)=>{if(xt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new U(t.common.issues);return this._error=r,this._error}}};function S(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{var u,c;let{message:f}=t;return a.code==="invalid_enum_value"?{message:f!=null?f:s.defaultError}:typeof s.data>"u"?{message:(u=f!=null?f:n)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=f!=null?f:r)!==null&&c!==void 0?c:s.defaultError}},description:i}}var M=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ve(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new R,ctx:{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(_t(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},o=this._parseSync({data:e,path:i.path,parent:i});return bn(i,o)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(_t(i)?i:Promise.resolve(i));return bn(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:p.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new H({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return W.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ce.create(this,this._def)}promise(){return Te.create(this,this._def)}or(e){return Ge.create([this,e],this._def)}and(e){return Ne.create(this,e,this._def)}transform(e){return new H({...S(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ve({...S(this._def),innerType:this,defaultValue:r,typeName:_.ZodDefault})}brand(){return new Tt({typeName:_.ZodBranded,type:this,...S(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ue({...S(this._def),innerType:this,catchValue:r,typeName:_.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return St.create(this,e)}readonly(){return He.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ki=/^c[^\s-]{8,}$/i,Xi=/^[0-9a-z]+$/,Ji=/^[0-9A-HJKMNP-TV-Z]{26}$/,Qi=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eo=/^[a-z0-9_-]{21}$/i,to=/^[-+]?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)?)??$/,ro=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,no="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",mr,io=/^(?:(?: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])$/,oo=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ao=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tn="((\\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])))",so=new RegExp("^".concat(Tn,"$"));function Sn(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e="".concat(e,"\\.\\d{").concat(t.precision,"}"):t.precision==null&&(e="".concat(e,"(\\.\\d+)?")),e}function lo(t){return new RegExp("^".concat(Sn(t),"$"))}function Mn(t){let e="".concat(Tn,"T").concat(Sn(t)),r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(r.join("|"),")"),new RegExp("^".concat(e,"$"))}function uo(t,e){return!!((e==="v4"||!e)&&io.test(t)||(e==="v6"||!e)&&oo.test(t))}var xe=class t extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.string,received:o.parsedType}),T}let n=new R,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?g(i,{code:p.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&g(i,{code:p.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")ro.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"email",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")mr||(mr=new RegExp(no,"u")),mr.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"emoji",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Qi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"uuid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")eo.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"nanoid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Ki.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"cuid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Xi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"cuid2",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Ji.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"ulid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),g(i,{validation:"url",code:p.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"regex",code:p.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Mn(o).test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?so.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?lo(o).test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?to.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"duration",code:p.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?uo(e.data,o.version)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"ip",code:p.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?ao.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"base64",code:p.invalid_string,message:o.message}),n.dirty()):k.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:p.invalid_string,...v.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...v.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...v.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...v.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...v.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...v.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...v.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...v.errToObj(r)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};xe.create=t=>{var e;return new xe({checks:[],typeName:_.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...S(t)})};function co(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Ie=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.number,received:o.parsedType}),T}let n,i=new R;for(let o of this._def.checks)o.kind==="int"?k.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?co(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_finite,message:o.message}),i.dirty()):k.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ie.create=t=>new Ie({checks:[],typeName:_.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...S(t)});var Oe=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==y.bigint){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.bigint,received:o.parsedType}),T}let n,i=new R;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):k.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Oe.create=t=>{var e;return new Oe({checks:[],typeName:_.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...S(t)})};var Ae=class extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.boolean,received:n.parsedType}),T}return j(e.data)}};Ae.create=t=>new Ae({typeName:_.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...S(t)});var Pe=class t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.date,received:o.parsedType}),T}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_date}),T}let n=new R,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):k.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Pe.create=t=>new Pe({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_.ZodDate,...S(t)});var et=class extends M{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.symbol,received:n.parsedType}),T}return j(e.data)}};et.create=t=>new et({typeName:_.ZodSymbol,...S(t)});var Re=class extends M{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.undefined,received:n.parsedType}),T}return j(e.data)}};Re.create=t=>new Re({typeName:_.ZodUndefined,...S(t)});var Le=class extends M{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.null,received:n.parsedType}),T}return j(e.data)}};Le.create=t=>new Le({typeName:_.ZodNull,...S(t)});var _e=class extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}};_e.create=t=>new _e({typeName:_.ZodAny,...S(t)});var ue=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}};ue.create=t=>new ue({typeName:_.ZodUnknown,...S(t)});var X=class extends M{_parse(e){let r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_type,expected:y.never,received:r.parsedType}),T}};X.create=t=>new X({typeName:_.ZodNever,...S(t)});var tt=class extends M{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.void,received:n.parsedType}),T}return j(e.data)}};tt.create=t=>new tt({typeName:_.ZodVoid,...S(t)});var ce=class t extends M{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==y.array)return g(r,{code:p.invalid_type,expected:y.array,received:r.parsedType}),T;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(g(r,{code:a?p.too_big:p.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(g(r,{code:p.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(g(r,{code:p.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new Y(r,a,r.path,s)))).then(a=>R.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Y(r,a,r.path,s)));return R.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:v.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:v.toString(r)}})}nonempty(e){return this.min(1,e)}};ce.create=(t,e)=>new ce({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...S(e)});function Xe(t){if(t instanceof F){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=W.create(Xe(n))}return new F({...t._def,shape:()=>e})}else return t instanceof ce?new ce({...t._def,type:Xe(t.element)}):t instanceof W?W.create(Xe(t.unwrap())):t instanceof re?re.create(Xe(t.unwrap())):t instanceof te?te.create(t.items.map(e=>Xe(e))):t}var F=class t extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=k.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==y.object){let c=this._getOrReturnCtx(e);return g(c,{code:p.invalid_type,expected:y.object,received:c.parsedType}),T}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof X&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||s.push(c);let u=[];for(let c of a){let f=o[c],m=i.data[c];u.push({key:{status:"valid",value:c},value:f._parse(new Y(i,m,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof X){let c=this._def.unknownKeys;if(c==="passthrough")for(let f of s)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(c==="strict")s.length>0&&(g(i,{code:p.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let f of s){let m=i.data[f];u.push({key:{status:"valid",value:f},value:c._parse(new Y(i,m,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let f of u){let m=await f.key,w=await f.value;c.push({key:m,value:w,alwaysSet:f.alwaysSet})}return c}).then(c=>R.mergeObjectSync(n,c)):R.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=v.errToObj(e).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return k.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return k.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Xe(this)}partial(e){let r={};return k.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return k.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof W;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return kn(k.objectKeys(this.shape))}};F.create=(t,e)=>new F({shape:()=>t,unknownKeys:"strip",catchall:X.create(),typeName:_.ZodObject,...S(e)});F.strictCreate=(t,e)=>new F({shape:()=>t,unknownKeys:"strict",catchall:X.create(),typeName:_.ZodObject,...S(e)});F.lazycreate=(t,e)=>new F({shape:t,unknownKeys:"strip",catchall:X.create(),typeName:_.ZodObject,...S(e)});var Ge=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new U(s.ctx.common.issues));return g(r,{code:p.invalid_union,unionErrors:a}),T}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},f=u._parseSync({data:r.data,path:r.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(u=>new U(u));return g(r,{code:p.invalid_union,unionErrors:s}),T}}get options(){return this._def.options}};Ge.create=(t,e)=>new Ge({options:t,typeName:_.ZodUnion,...S(e)});var le=t=>t instanceof je?le(t.schema):t instanceof H?le(t.innerType()):t instanceof Be?[t.value]:t instanceof ze?t.options:t instanceof Fe?k.objectValues(t.enum):t instanceof Ve?le(t._def.innerType):t instanceof Re?[void 0]:t instanceof Le?[null]:t instanceof W?[void 0,...le(t.unwrap())]:t instanceof re?[null,...le(t.unwrap())]:t instanceof Tt||t instanceof He?le(t.unwrap()):t instanceof Ue?le(t._def.innerType):[],Ht=class t extends M{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return g(r,{code:p.invalid_type,expected:y.object,received:r.parsedType}),T;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),T)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=le(o.shape[e]);if(!a.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let s of a){if(i.has(s))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(s)));i.set(s,o)}}return new t({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...S(n)})}};function vr(t,e){let r=ve(t),n=ve(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let i=k.objectKeys(e),o=k.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let u=vr(t[s],e[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],u=vr(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Ne=class extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(yr(o)||yr(a))return T;let s=vr(o.value,a.value);return s.valid?((br(o)||br(a))&&r.dirty(),{status:r.value,value:s.data}):(g(n,{code:p.invalid_intersection_types}),T)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ne.create=(t,e,r)=>new Ne({left:t,right:e,typeName:_.ZodIntersection,...S(r)});var te=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return g(n,{code:p.invalid_type,expected:y.array,received:n.parsedType}),T;if(n.data.length<this._def.items.length)return g(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let u=this._def.items[s]||this._def.rest;return u?u._parse(new Y(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>R.mergeArray(r,a)):R.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};te.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new te({items:t,typeName:_.ZodTuple,rest:null,...S(e)})};var Zt=class t extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return g(n,{code:p.invalid_type,expected:y.object,received:n.parsedType}),T;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Y(n,s,n.path,s)),value:a._parse(new Y(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?R.mergeObjectAsync(r,i):R.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:_.ZodRecord,...S(n)}):new t({keyType:xe.create(),valueType:e,typeName:_.ZodRecord,...S(r)})}},rt=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return g(n,{code:p.invalid_type,expected:y.map,received:n.parsedType}),T;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],c)=>({key:i._parse(new Y(n,s,n.path,[c,"key"])),value:o._parse(new Y(n,u,n.path,[c,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,f=await u.value;if(c.status==="aborted"||f.status==="aborted")return T;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),s.set(c.value,f.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let u of a){let c=u.key,f=u.value;if(c.status==="aborted"||f.status==="aborted")return T;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),s.set(c.value,f.value)}return{status:r.value,value:s}}}};rt.create=(t,e,r)=>new rt({valueType:e,keyType:t,typeName:_.ZodMap,...S(r)});var nt=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return g(n,{code:p.invalid_type,expected:y.set,received:n.parsedType}),T;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(g(n,{code:p.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(g(n,{code:p.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(u){let c=new Set;for(let f of u){if(f.status==="aborted")return T;f.status==="dirty"&&r.dirty(),c.add(f.value)}return{status:r.value,value:c}}let s=[...n.data.values()].map((u,c)=>o._parse(new Y(n,u,n.path,c)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:v.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};nt.create=(t,e)=>new nt({valueType:t,minSize:null,maxSize:null,typeName:_.ZodSet,...S(e)});var $t=class t extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return g(r,{code:p.invalid_type,expected:y.function,received:r.parsedType}),T;function n(s,u){return Vt({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ft(),Qe].filter(c=>!!c),issueData:{code:p.invalid_arguments,argumentsError:u}})}function i(s,u){return Vt({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ft(),Qe].filter(c=>!!c),issueData:{code:p.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Te){let s=this;return j(async function(...u){let c=new U([]),f=await s._def.args.parseAsync(u,o).catch(D=>{throw c.addIssue(n(u,D)),c}),m=await Reflect.apply(a,this,f);return await s._def.returns._def.type.parseAsync(m,o).catch(D=>{throw c.addIssue(i(m,D)),c})})}else{let s=this;return j(function(...u){let c=s._def.args.safeParse(u,o);if(!c.success)throw new U([n(u,c.error)]);let f=Reflect.apply(a,this,c.data),m=s._def.returns.safeParse(f,o);if(!m.success)throw new U([i(f,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:te.create(e).rest(ue.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||te.create([]).rest(ue.create()),returns:r||ue.create(),typeName:_.ZodFunction,...S(n)})}},je=class extends M{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};je.create=(t,e)=>new je({getter:t,typeName:_.ZodLazy,...S(e)});var Be=class extends M{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return g(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),T}return{status:"valid",value:e.data}}get value(){return this._def.value}};Be.create=(t,e)=>new Be({value:t,typeName:_.ZodLiteral,...S(e)});function kn(t,e){return new ze({values:t,typeName:_.ZodEnum,...S(e)})}var ze=class t extends M{constructor(){super(...arguments),bt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{expected:k.joinValues(n),received:r.parsedType,code:p.invalid_type}),T}if(Ut(this,bt,"f")||_n(this,bt,new Set(this._def.values),"f"),!Ut(this,bt,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{received:r.data,code:p.invalid_enum_value,options:n}),T}return j(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};bt=new WeakMap;ze.create=kn;var Fe=class extends M{constructor(){super(...arguments),vt.set(this,void 0)}_parse(e){let r=k.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let i=k.objectValues(r);return g(n,{expected:k.joinValues(i),received:n.parsedType,code:p.invalid_type}),T}if(Ut(this,vt,"f")||_n(this,vt,new Set(k.getValidEnumValues(this._def.values)),"f"),!Ut(this,vt,"f").has(e.data)){let i=k.objectValues(r);return g(n,{received:n.data,code:p.invalid_enum_value,options:i}),T}return j(e.data)}get enum(){return this._def.values}};vt=new WeakMap;Fe.create=(t,e)=>new Fe({values:t,typeName:_.ZodNativeEnum,...S(e)});var Te=class extends M{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return g(r,{code:p.invalid_type,expected:y.promise,received:r.parsedType}),T;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return j(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Te.create=(t,e)=>new Te({type:t,typeName:_.ZodPromise,...S(e)});var H=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{g(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return T;let u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?T:u.status==="dirty"||r.value==="dirty"?Je(u.value):u});{if(r.value==="aborted")return T;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?T:s.status==="dirty"||r.value==="dirty"?Je(s.value):s}}if(i.type==="refinement"){let a=s=>{let u=i.refinement(s,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?T:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?T:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xt(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>xt(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);k.assertNever(i)}};H.create=(t,e,r)=>new H({schema:t,typeName:_.ZodEffects,effect:e,...S(r)});H.createWithPreprocess=(t,e,r)=>new H({schema:e,effect:{type:"preprocess",transform:t},typeName:_.ZodEffects,...S(r)});var W=class extends M{_parse(e){return this._getType(e)===y.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};W.create=(t,e)=>new W({innerType:t,typeName:_.ZodOptional,...S(e)});var re=class extends M{_parse(e){return this._getType(e)===y.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};re.create=(t,e)=>new re({innerType:t,typeName:_.ZodNullable,...S(e)});var Ve=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ve.create=(t,e)=>new Ve({innerType:t,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...S(e)});var Ue=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _t(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ue.create=(t,e)=>new Ue({innerType:t,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...S(e)});var it=class extends M{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.nan,received:n.parsedType}),T}return{status:"valid",value:e.data}}};it.create=t=>new it({typeName:_.ZodNaN,...S(t)});var fo=Symbol("zod_brand"),Tt=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},St=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?T:o.status==="dirty"?(r.dirty(),Je(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?T:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:_.ZodPipeline})}},He=class extends M{_parse(e){let r=this._def.innerType._parse(e),n=i=>(xt(i)&&(i.value=Object.freeze(i.value)),i);return _t(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};He.create=(t,e)=>new He({innerType:t,typeName:_.ZodReadonly,...S(e)});function wn(t,e={},r){return t?_e.create().superRefine((n,i)=>{var o,a;if(!t(n)){let s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(a=(o=s.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):_e.create()}var po={object:F.lazycreate},_;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_||(_={}));var ho=(t,e={message:"Input not instance of ".concat(t.name)})=>wn(r=>r instanceof t,e),Dn=xe.create,Cn=Ie.create,mo=it.create,go=Oe.create,En=Ae.create,yo=Pe.create,bo=et.create,vo=Re.create,xo=Le.create,_o=_e.create,To=ue.create,So=X.create,Mo=tt.create,ko=ce.create,wo=F.create,Do=F.strictCreate,Co=Ge.create,Eo=Ht.create,Io=Ne.create,Oo=te.create,Ao=Zt.create,Po=rt.create,Ro=nt.create,Lo=$t.create,Go=je.create,No=Be.create,jo=ze.create,Bo=Fe.create,zo=Te.create,vn=H.create,Fo=W.create,Vo=re.create,Uo=H.createWithPreprocess,Ho=St.create,Zo=()=>Dn().optional(),$o=()=>Cn().optional(),Wo=()=>En().optional(),Yo={string:t=>xe.create({...t,coerce:!0}),number:t=>Ie.create({...t,coerce:!0}),boolean:t=>Ae.create({...t,coerce:!0}),bigint:t=>Oe.create({...t,coerce:!0}),date:t=>Pe.create({...t,coerce:!0})},qo=T,h=Object.freeze({__proto__:null,defaultErrorMap:Qe,setErrorMap:Yi,getErrorMap:Ft,makeIssue:Vt,EMPTY_PATH:qi,addIssueToContext:g,ParseStatus:R,INVALID:T,DIRTY:Je,OK:j,isAborted:yr,isDirty:br,isValid:xt,isAsync:_t,get util(){return k},get objectUtil(){return gr},ZodParsedType:y,getParsedType:ve,ZodType:M,datetimeRegex:Mn,ZodString:xe,ZodNumber:Ie,ZodBigInt:Oe,ZodBoolean:Ae,ZodDate:Pe,ZodSymbol:et,ZodUndefined:Re,ZodNull:Le,ZodAny:_e,ZodUnknown:ue,ZodNever:X,ZodVoid:tt,ZodArray:ce,ZodObject:F,ZodUnion:Ge,ZodDiscriminatedUnion:Ht,ZodIntersection:Ne,ZodTuple:te,ZodRecord:Zt,ZodMap:rt,ZodSet:nt,ZodFunction:$t,ZodLazy:je,ZodLiteral:Be,ZodEnum:ze,ZodNativeEnum:Fe,ZodPromise:Te,ZodEffects:H,ZodTransformer:H,ZodOptional:W,ZodNullable:re,ZodDefault:Ve,ZodCatch:Ue,ZodNaN:it,BRAND:fo,ZodBranded:Tt,ZodPipeline:St,ZodReadonly:He,custom:wn,Schema:M,ZodSchema:M,late:po,get ZodFirstPartyTypeKind(){return _},coerce:Yo,any:_o,array:ko,bigint:go,boolean:En,date:yo,discriminatedUnion:Eo,effect:vn,enum:jo,function:Lo,instanceof:ho,intersection:Io,lazy:Go,literal:No,map:Po,nan:mo,nativeEnum:Bo,never:So,null:xo,nullable:Vo,number:Cn,object:wo,oboolean:Wo,onumber:$o,optional:Fo,ostring:Zo,pipeline:Ho,preprocess:Uo,promise:zo,record:Ao,set:Ro,strictObject:Do,string:Dn,symbol:bo,transformer:vn,tuple:Oo,undefined:vo,union:Co,unknown:To,void:Mo,NEVER:qo,ZodIssueCode:p,quotelessJson:Wi,ZodError:U});d();function tr(t){return(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}d();d();var We=class extends ye{},he=class{constructor(e,r){l(this,"id");l(this,"positionDirty",!0);l(this,"object3d",new We);l(this,"components");l(this,"disposed",!1);l(this,"worldPosition",new z);this.id=e.id||N(),this.components=[e],this.object3d=new We,this.object3d.position.copy(r),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}setAltitude(e){this.object3d.position.z=e}};d();d();d();d();d();d();d();var B=63710088e-1,li={centimeters:B*100,centimetres:B*100,degrees:B/111325,feet:B*3.28084,inches:B*39.37,kilometers:B/1e3,kilometres:B/1e3,meters:B,metres:B,miles:B/1609.344,millimeters:B*1e3,millimetres:B*1e3,nauticalmiles:B/1852,radians:1,yards:B*1.0936},$u={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/B,yards:1.0936133};function Ye(t,e,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=e||{},n.geometry=t,n}function Fs(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!si(t[0])||!si(t[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:t};return Ye(n,e,r)}function Wu(t,e,r){r===void 0&&(r={});for(var n=0,i=t;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:t};return Ye(s,e,r)}function ui(t,e,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:t};return Ye(n,e,r)}function Yu(t,e){e===void 0&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function qu(t,e,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:t};return Ye(n,e,r)}function Ku(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t*r}function Xu(t,e){e===void 0&&(e="kilometers");var r=li[e];if(!r)throw new Error(e+" units is invalid");return t/r}function Ju(t){var e=t%(2*Math.PI);return e*180/Math.PI}function Qu(t){var e=t%360;return e*Math.PI/180}function si(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function rr(t,e,r){if(t!==null)for(var n,i,o,a,s,u,c,f=0,m=0,w,D=t.type,I=D==="FeatureCollection",C=D==="Feature",L=I?t.features.length:1,G=0;G<L;G++){c=I?t.features[G].geometry:C?t.geometry:t,w=c?c.type==="GeometryCollection":!1,s=w?c.geometries.length:1;for(var ee=0;ee<s;ee++){var $=0,we=0;if(a=w?c.geometries[ee]:c,a!==null){u=a.coordinates;var ge=a.type;switch(f=r&&(ge==="Polygon"||ge==="MultiPolygon")?1:0,ge){case null:break;case"Point":if(e(u,m,G,$,we)===!1)return!1;m++,$++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(e(u[n],m,G,$,we)===!1)return!1;m++,ge==="MultiPoint"&&$++}ge==="LineString"&&$++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-f;i++){if(e(u[n][i],m,G,$,we)===!1)return!1;m++}ge==="MultiLineString"&&$++,ge==="Polygon"&&we++}ge==="Polygon"&&$++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(we=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-f;o++){if(e(u[n][i][o],m,G,$,we)===!1)return!1;m++}we++}$++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(rr(a.geometries[n],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ic(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length&&e(t.features[r],r)!==!1;r++);}function Vs(t,e){var r,n,i,o,a,s,u,c,f,m,w=0,D=t.type==="FeatureCollection",I=t.type==="Feature",C=D?t.features.length:1;for(r=0;r<C;r++){for(s=D?t.features[r].geometry:I?t.geometry:t,c=D?t.features[r].properties:I?t.properties:{},f=D?t.features[r].bbox:I?t.bbox:void 0,m=D?t.features[r].id:I?t.id:void 0,u=s?s.type==="GeometryCollection":!1,a=u?s.geometries.length:1,i=0;i<a;i++){if(o=u?s.geometries[i]:s,o===null){if(e(null,w,c,f,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,w,c,f,m)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],w,c,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}w++}}function Us(t,e){Vs(t,function(r,n,i,o,a){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(Ye(r,i,{bbox:o,id:a}),n,0)===!1?!1:void 0}var u;switch(s){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var c=0;c<r.coordinates.length;c++){var f=r.coordinates[c],m={type:u,coordinates:f};if(e(Ye(m,i),n,c)===!1)return!1}})}function Hs(t,e){Us(t,function(r,n,i){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var s,u=0,c=0,f=0;if(rr(r,function(m,w,D,I,C){if(s===void 0||n>u||I>c||C>f){s=m,u=n,c=I,f=C,o=0;return}var L=ui([s,m],r.properties);if(e(L,n,i,C,o)===!1)return!1;o++,s=m})===!1)return!1}}})}function oc(t,e,r){var n=r,i=!1;return Hs(t,function(o,a,s,u,c){i===!1&&r===void 0?n=o:n=e(n,o,a,s,u,c),i=!0}),n}function Or(t){var e=[1/0,1/0,-1/0,-1/0];return rr(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}Or.default=Or;var ci=Or;function di(t){return ci(t)}d();var Ar="#ffffff";var Pr=class{constructor(e={}){l(this,"initialColor",Ar);l(this,"color",Ar);l(this,"initialTopColor");l(this,"topColor");l(this,"topTexture");l(this,"texture");l(this,"hoverColor");l(this,"dirty",!0);l(this,"visible",!0);l(this,"opacity",1);l(this,"width",.1);l(this,"height",.1);l(this,"initialHeight",.1);l(this,"altitude",0);l(this,"join","round");l(this,"cap","round");l(this,"outline",!0);l(this,"showImage",!0);l(this,"flipImageToFaceCamera",!0);l(this,"url");l(this,"side","double");l(this,"renderOrder",0);this.color=(e==null?void 0:e.color)!==void 0?e.color:this.color,this.initialColor=this.color,this.width=(e==null?void 0:e.width)!==void 0?e.width:this.width,this.opacity=(e==null?void 0:e.opacity)!==void 0?e.opacity:this.opacity,this.visible=(e==null?void 0:e.visible)!==void 0?e.visible:this.visible,this.height=(e==null?void 0:e.height)!==void 0?e.height:this.height,this.initialHeight=this.height,this.altitude=(e==null?void 0:e.altitude)!==void 0?e.altitude:this.altitude,this.join=(e==null?void 0:e.join)!==void 0?e.join:this.join,this.cap=(e==null?void 0:e.cap)!==void 0?e.cap:this.cap,this.topColor=e==null?void 0:e.topColor,this.initialTopColor=this.topColor,this.texture=e==null?void 0:e.texture,this.topTexture=e==null?void 0:e.topTexture,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline,this.showImage=(e==null?void 0:e.showImage)!==void 0?e.showImage:this.showImage,this.flipImageToFaceCamera=(e==null?void 0:e.flipImageToFaceCamera)!==void 0?e.flipImageToFaceCamera:this.flipImageToFaceCamera,this.url=e==null?void 0:e.url,this.side=(e==null?void 0:e.side)!==void 0?e.side:this.side,this.renderOrder=(e==null?void 0:e.renderOrder)!==void 0?e.renderOrder:this.renderOrder}};var Se=class extends nn{constructor(){super(...arguments);l(this,"type","entityBatchedMesh");l(this,"userData",{entities:{}})}},Et,It,qe,ne=class{constructor(e){l(this,"mesh");l(this,"focusMesh");l(this,"outline");l(this,"imageMesh");l(this,"textMesh");l(this,"textEntityId");l(this,"type","geometry");l(this,"dirty",!0);l(this,"detached",!1);l(this,"instanceIndex",-1);l(this,"geometry");l(this,"material");l(this,"feature");l(this,"currentHeight",.1);l(this,"focusable",!1);l(this,"color",new ae);l(this,"topColor",new ae);l(this,"position",new z);V(this,Et,0);V(this,It,1);V(this,qe,void 0);l(this,"texturesVisible",!1);this.feature=e}get visible(){return this.mesh&&this.instanceIndex!==-1?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(e){this.mesh&&this.instanceIndex!==-1&&this.mesh.setVisibleAt(this.instanceIndex,e)}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(e){this.mesh&&(this.mesh.renderOrder=e)}setColor(e,r){this.color.set(e),this.topColor.set(r),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}getColor(){var e;return(e=this.material)==null?void 0:e.getColor(this.instanceIndex)}get altitude(){return E(this,Et)}set altitude(e){this.mesh&&(this.mesh.position.z=e,P(this,Et,e))}get opacity(){return E(this,It)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let r=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of r)n.opacity=e,n.needsUpdate=!0}P(this,It,e)}get texture(){var e,r;return(r=(e=this.material)==null?void 0:e.texture)==null?void 0:r.image.src}set texture(e){this.material&&(this.material.texture=e)}get textureInstance(){var e;return(e=this.material)==null?void 0:e.texture}set topTexture(e){this.material&&(this.material.topTexture=e)}get topTexture(){var e,r;return(r=(e=this.material)==null?void 0:e.topTexture)==null?void 0:r.image.src}get topTextureInstance(){var e;return(e=this.material)==null?void 0:e.topTexture}get featureBbox(){return E(this,qe)?E(this,qe):(P(this,qe,di(this.feature)),E(this,qe))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}removeSideTexture(){this.material&&this.material.removeSideTexture(this.instanceIndex)}removeTopTexture(){this.material&&this.material.removeTopTexture(this.instanceIndex)}};Et=new WeakMap,It=new WeakMap,qe=new WeakMap;d();var fi="#ffffff",Me,nr=class{constructor(e={}){l(this,"color",fi);l(this,"initialColor",fi);l(this,"topColor");l(this,"initialTopColor");l(this,"opacity",1);l(this,"height");V(this,Me,void 0);l(this,"outline",!0);l(this,"texture");l(this,"topTexture");l(this,"dirty",!0);var r,n;this.color=(r=e==null?void 0:e.color)!=null?r:this.color,this.initialColor=this.color,this.topColor=e==null?void 0:e.topColor,this.initialTopColor=this.topColor,this.opacity=(n=e==null?void 0:e.opacity)!=null?n:this.opacity,this.height=e==null?void 0:e.height,this.shading=e==null?void 0:e.shading,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline}get shading(){return E(this,Me)}set shading(e){var r;if(!e){P(this,Me,void 0);return}P(this,Me,(r=E(this,Me))!=null?r:{start:0,end:0,intensity:0}),Object.assign(E(this,Me),e)}};Me=new WeakMap;d();d();function lt(t){var r;let e=(r=t.parent)==null?void 0:r.children.find(n=>n.userData.outlineOfEntityId===t.userData.entityId);return e instanceof jt?e:void 0}d();d();d();d();var ut=class{constructor(){l(this,"hover",!1);l(this,"dirty",!1)}};d();d();var pi=["","","low","medium","high","always-visible"];function hi(t){return Math.min(5,Math.max(2,t))}function ct(t){if(typeof t=="number")return hi(t);let e=pi.indexOf(t);return e===-1?3:e}function Rc(t){let e=hi(t);return pi[e]}var ir=4,Rr=h.object({rank:h.union([h.enum(["low","medium","high","always-visible"]),h.number()]).optional(),interactive:h.union([h.boolean(),h.literal("pointer-events-auto")]).optional(),id:h.string().optional(),anchor:h.union([h.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]),h.array(h.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]))]).optional(),dynamicResize:h.boolean().optional(),zIndex:h.number().optional()});function Vc(t,e,r){h.array(h.number()).refine(n=>n.length===2||n.length===3,{message:"Array length must be either 2 or 3"}).parse(t),h.string().parse(e),Rr.parse(r)}var dt=class dt{constructor(e,r={}){l(this,"id");l(this,"type","marker");l(this,"rank",0);l(this,"initialRank",0);l(this,"activeAnchor","center");l(this,"pointerEvents","none");l(this,"options",{rank:"low",interactive:!1,id:"",anchor:"center",dynamicResize:!1,zIndex:void 0});l(this,"projection",new Nt);l(this,"enabled",!0);l(this,"canShow",!1);l(this,"visible",!0);l(this,"offscreen",!1);l(this,"strategyIndex",-1);l(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});l(this,"dimensions",{width:0,height:0});l(this,"containerEl");l(this,"contentEl",null);l(this,"contentHtml","");l(this,"style",{top:"0px",left:"0px"});l(this,"dirty",!1);l(this,"collisionDirty",!0);l(this,"visibilityNeedsUpdate","show");l(this,"animation",null);l(this,"currentStrategyIndex",-1);l(this,"onStrategySelected",(e,r=!1)=>{if(this.currentStrategyIndex===e||r)return;this.currentStrategyIndex=e,this.activeAnchor=this.strategies[e].name,this.containerEl.getAttribute("data-anchor")!==this.activeAnchor&&this.containerEl.setAttribute("data-anchor",this.activeAnchor);let{width:n,height:i}=this.dimensions,o=-i/2+"px",a=-n/2+"px";switch(this.style.top=o,this.style.left=a,this.activeAnchor){case"top":{this.style.top=-i+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-n+"px";break}case"right":{this.style.left="0px";break}case"top-left":{this.style.top=-i+"px",this.style.left=-n+"px";break}case"top-right":{this.style.top=-i+"px",this.style.left="0px";break}case"bottom-left":{this.style.top="0px",this.style.left=-n+"px";break}case"bottom-right":{this.style.top="0px",this.style.left="0px";break}default:this.style.top=o,this.style.left=a}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left});l(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],lockedToStrategyIndex:-1,shouldCollideWithScreenEdges:!1});if(this.id=(r==null?void 0:r.id)||N(),this.options={...this.options,...r},typeof r.rank=="string")this.rank=ct(r.rank);else if(r.rank!=null&&r.rank>0)this.rank=r.rank;else{let i=Math.trunc(x.env.NODE_ENV==="test"?dt.testId:dt.testId*10)/10;dt.testId+=.001,this.rank=i}typeof r.interactive=="string"&&(this.pointerEvents=r.interactive==="pointer-events-auto"?"auto":"none"),this.contentHtml=e,this.initialRank=this.rank;let n=document.createElement("div");n.style.opacity="0",n.innerHTML='<div class="mappedin-marker">'.concat(this.contentHtml,"</div>"),this.containerEl=n.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(e,r){if(e!=null&&r!=null)this.dimensions={width:e,height:r};else{let{width:n,height:i}=this.containerEl.getBoundingClientRect();this.dimensions={width:n,height:i}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"}),this.currentStrategyIndex=-1}get strategies(){let{width:e,height:r}=this.dimensions;return(Array.isArray(this.options.anchor)?this.options.anchor:[this.options.anchor]).map(i=>({name:i,getBoundingBox:()=>{let o=r/2,a=r/2,s=e/2,u=e/2;switch(i){case"top":{o=r,a=0;break}case"bottom":{o=0,a=r;break}case"left":{s=e,u=0;break}case"right":{s=0,u=e;break}case"top-left":{o=r,s=e,a=0,u=0;break}case"top-right":{o=r,u=e,a=0,s=0;break}case"bottom-left":{a=r,s=e,o=0,u=0;break}case"bottom-right":{a=r,u=e,o=0,s=0;break}}return[o+ir,a+ir,s+ir,u+ir]}}))}toPackedMessage(e=!1){return this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.packedMessage.shouldCollideWithScreenEdges=!0,this.visible&&e&&this.currentStrategyIndex!==-1?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((r,n)=>[...r.getBoundingBox(),n]),this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};l(dt,"testId",0);var mi=dt;d();var ke=class t extends ye{constructor(r){super();l(this,"childrenIds",new Set);l(this,"children",[]);l(this,"type","group-container");l(this,"userData",{entityId:"",entities2D:new Set,dirty:!0});l(this,"components",[]);this.userData.entityId=r}addEntity(r){r instanceof t?(this.childrenIds.add(r.userData.entityId),this.add(r)):r instanceof he?(this.childrenIds.add(r.id),this.add(r.object3d),this.userData.entities2D.add(r.id)):r instanceof oe?(this.childrenIds.add(r.userData.entityId),this.add(r)):r instanceof ie&&r.object3d&&(this.childrenIds.add(r.id),this.add(r.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(r){r instanceof t?(this.childrenIds.delete(r.userData.entityId),this.remove(r)):r instanceof he?(this.childrenIds.delete(r.id),this.userData.entities2D.delete(r.id),this.remove(r.object3d)):r instanceof oe?(this.childrenIds.delete(r.userData.entityId),this.remove(r)):r instanceof ie&&r.object3d&&(this.childrenIds.delete(r.id),this.add(r.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(r){this.visible=r,this.dispatchEvent({type:"childremoved",child:this})}setAltitude(r){this.position.z=r,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};d();d();function or(t){"@babel/helpers - typeof";return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(t)}var $s=/^\s+/,Ws=/\s+$/;function b(t,e){if(t=t||"",e=e||{},t instanceof b)return t;if(!(this instanceof b))return new b(t,e);var r=Ys(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,i,o,a,s;return r=e.r/255,n=e.g/255,i=e.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(e){return this._a=Ti(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=yi(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=yi(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+i+"%)":"hsva("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=gi(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=gi(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+i+"%)":"hsla("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return bi(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Js(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(A(this._r,255)*100)+"%",g:Math.round(A(this._g,255)*100)+"%",b:Math.round(A(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(A(this._r,255)*100)+"%, "+Math.round(A(this._g,255)*100)+"%, "+Math.round(A(this._b,255)*100)+"%)":"rgba("+Math.round(A(this._r,255)*100)+"%, "+Math.round(A(this._g,255)*100)+"%, "+Math.round(A(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:cl[bi(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+vi(this._r,this._g,this._b,this._a),n=r,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+vi(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,o=!r&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return b(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(rl,arguments)},brighten:function(){return this._applyModification(nl,arguments)},darken:function(){return this._applyModification(il,arguments)},desaturate:function(){return this._applyModification(Qs,arguments)},saturate:function(){return this._applyModification(el,arguments)},greyscale:function(){return this._applyModification(tl,arguments)},spin:function(){return this._applyModification(ol,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(ll,arguments)},complement:function(){return this._applyCombination(al,arguments)},monochromatic:function(){return this._applyCombination(ul,arguments)},splitcomplement:function(){return this._applyCombination(sl,arguments)},triad:function(){return this._applyCombination(xi,[3])},tetrad:function(){return this._applyCombination(xi,[4])}};b.fromRatio=function(t,e){if(or(t)=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=Ot(t[n]));t=r}return b(t,e)};function Ys(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=hl(t)),or(t)=="object"&&(me(t.r)&&me(t.g)&&me(t.b)?(e=qs(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):me(t.h)&&me(t.s)&&me(t.v)?(n=Ot(t.s),i=Ot(t.v),e=Xs(t.h,n,i),a=!0,s="hsv"):me(t.h)&&me(t.s)&&me(t.l)&&(n=Ot(t.s),o=Ot(t.l),e=Ks(t.h,n,o),a=!0,s="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=Ti(r),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function qs(t,e,r){return{r:A(t,255)*255,g:A(e,255)*255,b:A(r,255)*255}}function gi(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o,a,s=(n+i)/2;if(n==i)o=a=0;else{var u=n-i;switch(a=s>.5?u/(2-n-i):u/(n+i),n){case t:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-t)/u+2;break;case r:o=(t-e)/u+4;break}o/=6}return{h:o,s:a,l:s}}function Ks(t,e,r){var n,i,o;t=A(t,360),e=A(e,100),r=A(r,100);function a(c,f,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?c+(f-c)*6*m:m<1/2?f:m<2/3?c+(f-c)*(2/3-m)*6:c}if(e===0)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;n=a(u,s,t+1/3),i=a(u,s,t),o=a(u,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function yi(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o,a,s=n,u=n-i;if(a=n===0?0:u/n,n==i)o=0;else{switch(n){case t:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-t)/u+2;break;case r:o=(t-e)/u+4;break}o/=6}return{h:o,s:a,v:s}}function Xs(t,e,r){t=A(t,360)*6,e=A(e,100),r=A(r,100);var n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),u=n%6,c=[r,a,o,o,s,r][u],f=[s,r,r,a,o,o][u],m=[o,o,s,r,r,a][u];return{r:c*255,g:f*255,b:m*255}}function bi(t,e,r,n){var i=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Js(t,e,r,n,i){var o=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16)),Q(Si(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function vi(t,e,r,n){var i=[Q(Si(n)),Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16))];return i.join("")}b.equals=function(t,e){return!t||!e?!1:b(t).toRgbString()==b(e).toRgbString()};b.random=function(){return b.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Qs(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.s-=e/100,r.s=ar(r.s),b(r)}function el(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.s+=e/100,r.s=ar(r.s),b(r)}function tl(t){return b(t).desaturate(100)}function rl(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.l+=e/100,r.l=ar(r.l),b(r)}function nl(t,e){e=e===0?0:e||10;var r=b(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),b(r)}function il(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.l-=e/100,r.l=ar(r.l),b(r)}function ol(t,e){var r=b(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,b(r)}function al(t){var e=b(t).toHsl();return e.h=(e.h+180)%360,b(e)}function xi(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=b(t).toHsl(),n=[b(t)],i=360/e,o=1;o<e;o++)n.push(b({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function sl(t){var e=b(t).toHsl(),r=e.h;return[b(t),b({h:(r+72)%360,s:e.s,l:e.l}),b({h:(r+216)%360,s:e.s,l:e.l})]}function ll(t,e,r){e=e||6,r=r||30;var n=b(t).toHsl(),i=360/r,o=[b(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(b(n));return o}function ul(t,e){e=e||6;for(var r=b(t).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(b({h:n,s:i,v:o})),o=(o+s)%1;return a}b.mix=function(t,e,r){r=r===0?0:r||50;var n=b(t).toRgb(),i=b(e).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return b(a)};b.readability=function(t,e){var r=b(t),n=b(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};b.isReadable=function(t,e,r){var n=b.readability(t,e),i,o;switch(o=!1,i=ml(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};b.mostReadable=function(t,e,r){var n=null,i=0,o,a,s,u;r=r||{},a=r.includeFallbackColors,s=r.level,u=r.size;for(var c=0;c<e.length;c++)o=b.readability(t,e[c]),o>i&&(i=o,n=b(e[c]));return b.isReadable(t,n,{level:s,size:u})||!a?n:(r.includeFallbackColors=!1,b.mostReadable(t,["#fff","#000"],r))};var Lr=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},cl=b.hexNames=dl(Lr);function dl(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function Ti(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,e){fl(t)&&(t="100%");var r=pl(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function ar(t){return Math.min(1,Math.max(0,t))}function Z(t){return parseInt(t,16)}function fl(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function pl(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Q(t){return t.length==1?"0"+t:""+t}function Ot(t){return t<=1&&(t=t*100+"%"),t}function Si(t){return Math.round(parseFloat(t)*255).toString(16)}function _i(t){return Z(t)/255}var J=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function me(t){return!!J.CSS_UNIT.exec(t)}function hl(t){t=t.replace($s,"").replace(Ws,"").toLowerCase();var e=!1;if(Lr[t])t=Lr[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=J.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=J.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=J.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=J.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=J.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=J.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=J.hex8.exec(t))?{r:Z(r[1]),g:Z(r[2]),b:Z(r[3]),a:_i(r[4]),format:e?"name":"hex8"}:(r=J.hex6.exec(t))?{r:Z(r[1]),g:Z(r[2]),b:Z(r[3]),format:e?"name":"hex"}:(r=J.hex4.exec(t))?{r:Z(r[1]+""+r[1]),g:Z(r[2]+""+r[2]),b:Z(r[3]+""+r[3]),a:_i(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=J.hex3.exec(t))?{r:Z(r[1]+""+r[1]),g:Z(r[2]+""+r[2]),b:Z(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function ml(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var Gr=Vi(ai());var jr=h.object({rank:h.union([h.enum(["low","medium","high","always-visible"]),h.number()]).optional(),interactive:h.boolean().optional(),appearance:h.object({margin:h.number().min(6).optional(),text:h.object({numLines:h.number().optional(),lineHeight:h.number().optional(),size:h.number().optional(),maxWidth:h.number().optional(),foregroundColor:h.string().optional(),backgroundColor:h.string().optional()}).optional(),marker:h.object({size:h.number().optional(),foregroundColor:h.object({active:h.string().optional(),inactive:h.string().optional()}).optional(),backgroundColor:h.object({active:h.string().optional(),inactive:h.string().optional()}).optional()}).optional()}).optional()});function ad(t,e,r){h.array(h.number()).length(2).parse(t),h.string().parse(e),jr.parse(r||{})}var ft={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},gl={lightOnDark:{...ft,text:{...ft.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...ft.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...ft,text:{...ft.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...ft.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},yl="LOW_PRIORITY",Mi=4,bl=6,vl=20,xl=2.5,_l=2,Tl="cover",ki=.5,wi=6.5,Di={heightAbovePolygon:0,appearance:gl.darkOnLight};var pt=class pt{constructor(e,r,n){l(this,"lines",0);l(this,"id");l(this,"rank");l(this,"type","label");l(this,"initialRank");l(this,"contextConfigured",!1);l(this,"fillText");l(this,"newStyle",{});l(this,"opacity",0);l(this,"visibilityNeedsUpdate",!1);l(this,"text");l(this,"style",{top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"});l(this,"projection",new Nt);l(this,"_cache",{});l(this,"appearance");l(this,"options");l(this,"visible",!0);l(this,"enabled",!0);l(this,"offscreen",!1);l(this,"canShow",!1);l(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});l(this,"dimensions",{width:0,height:0});l(this,"currentStrategyIndex",-1);l(this,"totalMarkerSize",0);l(this,"dirty",!0);l(this,"collisionDirty",!0);l(this,"lastTextAlign");l(this,"imageHash");l(this,"markerSize",0);l(this,"iconVisible",!1);l(this,"zoomProportion",0);l(this,"dp");l(this,"animate",!0);l(this,"onStrategySelected",e=>{if(this.currentStrategyIndex===e)return;let r=this.strategies[e];r&&r.onStrategySelected(this),this.currentStrategyIndex=e;let n=this.style;this.style=this.newStyle,this.newStyle=n});l(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],shouldCollideWithScreenEdges:!1,lockedToStrategyIndex:-1});var o,a;if(this.id=(o=r.id)!=null?o:N(),this.options=(0,Gr.default)({},r,Di),this.text=e,this.dp=(s=1)=>s*n.pixelRatio,typeof r.rank=="string")this.rank=ct(r.rank),this.initialRank=this.rank;else if(r.rank!=null&&r.rank>0)this.rank=r.rank,this.initialRank=r.rank;else{let s=Math.trunc(x.env.NODE_ENV==="test"?pt.testId:pt.testId*10)/10;pt.testId+=.001,this.rank=s,this.initialRank=s}let i=(0,Gr.default)({},this.options.appearance,Di.appearance);this.appearance={margin:i.margin,text:{lineHeight:i.text.lineHeight,numLines:i.text.numLines,size:i.text.size,maxWidth:i.text.maxWidth,foregroundColor:i.text.foregroundColor,backgroundColor:i.text.backgroundColor},marker:{foregroundColor:{active:i.marker.foregroundColor.active,inactive:i.marker.foregroundColor.inactive||b(i.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:i.marker.backgroundColor.active,inactive:i.marker.backgroundColor.inactive||b(i.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:i.marker.icon,iconSize:i.marker.iconSize||vl,iconPadding:(a=i.marker.iconPadding)!=null?a:_l,iconFit:i.marker.iconFit||Tl,iconVisibilityThreshold:i.marker.iconVisibilityThreshold==null?ki:i.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}setEntity(){}calculateMarkerSize(){let{iconVisibilityThreshold:e=ki}=this.appearance.marker,r=this.dp();this.zoomProportion<=e&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(wi)),this.totalMarkerSize=Math.ceil((this.markerSize+xl)/r)}get lowPriorityStrategyIndex(){return this.text===""?-1:3}get strategies(){let{width:e,height:r}=this.dimensions,{margin:n}=this.appearance;this.calculateMarkerSize();let i=Math.max(bl,n),o=this.iconVisible?i/2:0,a=this.iconVisible?this.totalMarkerSize:wi*2,s=[{name:"RIGHT",getBoundingBox:()=>{let u=Math.max(this.totalMarkerSize,r);return[u/2+i,u/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+e+i]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=this.totalMarkerSize/2+Mi,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let u=Math.max(this.totalMarkerSize,r);return[u/2+i,u/2+i,this.totalMarkerSize/2+e+i,this.totalMarkerSize/2+i]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=-e-this.totalMarkerSize/2-Mi,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let u=this.dp();return[r+this.totalMarkerSize/2/u+i,this.totalMarkerSize/2+i,e/2+i,e/2+i]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-r-this.totalMarkerSize/2,this.newStyle.left=-e/2}},{name:yl,getBoundingBox:()=>[a/2+o,a/2+o,a/2+o,a/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:s}updatePosition(){}disable(){this.visible=!1}toPackedMessage(e=!1){return this.visible&&e&&this.currentStrategyIndex!=null&&this.currentStrategyIndex!==-1&&this.currentStrategyIndex!==this.lowPriorityStrategyIndex?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((r,n)=>[...r.getBoundingBox(),n]),this.packedMessage.shouldCollideWithScreenEdges=!1,this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};l(pt,"testId",0);var Nr=pt,sd=Nr;d();d();var Ci=class extends yt{constructor(r,n){super();l(this,"rendererState");l(this,"convertTo3DMapPosition");l(this,"textSet",new Set);l(this,"batchedTextMap",new Map);l(this,"debugTextAreaMesh",new Map);this.rendererState=r,this.convertTo3DMapPosition=n}remove(r){this.textSet.delete(r)}update(r){var s,u,c;let n,i,o,a=[];for(let f of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(f),(n==null?void 0:n.type)==="text3d"){i=n.components[0],o=n.components[1];let m=(s=i.mesh)==null?void 0:s.parent;if(!m||!(m instanceof ke)||!(i instanceof lr))continue;if((u=i.feature.properties)!=null&&u.textArea&&i.mesh!=null&&i.polygonEntityId!=null&&i.textMesh==null&&i.mesh.parent!=null&&((c=i.feature.properties)==null?void 0:c.textArea.position)!=null){if(this.textSet.has(i.polygonEntityId))continue;this.textSet.add(i.polygonEntityId),this.batchedTextMap.has(m)||this.batchedTextMap.set(m,Fr().then(({BatchedText:I})=>{let C=new I;return C.type="batchedtext",m.add(C),C}));let D=this.batchedTextMap.get(m);if(!D)throw new Error("batched text required");a.push(Sl({entityId:f,textComponent:i,styleComponent:o,convertTo3DMapPosition:this.convertTo3DMapPosition,batchedMeshPromise:D,rendererState:this.rendererState}).then(()=>{this.publish("render")}))}let w=this.batchedTextMap.get(m);i.textMesh&&w&&Promise.all([w,Promise.resolve({meshComponent:i,styleComponent:o})]).then(([D,{meshComponent:I,styleComponent:C}])=>{let{textMesh:L}=I;if(D&&L){let G=Vr(D,L);I.visible&&!G?D.add(L):!I.visible&&G&&D.remove(L)}C.flipToFaceCamera&&this.flipIfNeeded(I,r)})}return Promise.all(a)}flipIfNeeded(r,n){let i=r.textMesh;if(!i)return!1;let o=i.rotation.z,a=tr(o+n);a>Math.PI/2&&a<3*Math.PI/2&&(i.rotation.z=tr(o+Math.PI))}showTextAreaMesh(){let r,n;for(let i of this.rendererState.geometry3DIdsInScene)if(r=this.rendererState.geometry3DMap.get(i),(r==null?void 0:r.type)==="text3d"){n=r.components[0];let o=n.feature.properties.textArea;if(!o)continue;let a=new sn(o.maxWidth,o.maxHeight),s=new tn(a,new en({color:"pink"})),{textMesh:u}=n;if(!u)continue;let c=this.convertTo3DMapPosition(o.position,At);s.position.copy(c),s.position.z=u.position.z-.1,s.rotation.z=u.rotation.z,Br.identity(),Br.makeRotationAxis(new z(0,0,1),u.userData.rotationZ),At.set(o.maxWidth/2,0,0),At.applyMatrix4(Br),s.position.x-=At.x,s.position.y-=At.y,this.rendererState.entityScene.add(s),this.debugTextAreaMesh.set(i,s)}this.publish("render")}hideTextAreaMesh(){this.debugTextAreaMesh.forEach(r=>{this.rendererState.entityScene.remove(r)}),this.debugTextAreaMesh.clear(),this.publish("render")}},Br=new gt,At=new z,zr;async function yd(t){let{preloadFont:e}=await Fr();return e(t)}function Fr(){return zr||(zr=import("./text3d-EHF4IPDU.js").then(t=>t)),zr}async function Sl({entityId:t,textComponent:e,styleComponent:r,convertTo3DMapPosition:n,batchedMeshPromise:i,rendererState:o}){return Promise.all([Fr(),Promise.resolve({entityId:t,meshComponent:e,styleComponent:r})]).then(([{createTroikaText:a},s])=>a(s.entityId,s.meshComponent,s.styleComponent,n)).catch(a=>{se.warn("Trouble creating text: ",a)}).then(a=>{if(a!=null&&a.text){if(e.polygonEntityId){let s=o.geometry3DMap.get(e.polygonEntityId);if((s==null?void 0:s.type)==="geometry"){let u=s.components[0],c=s.components[1];u.textMesh=a.text,u.mesh!=null&&(a.text.position.z=c.altitude+c.height+Ml)}}return Promise.all([Promise.resolve(a.text),i])}}).then(a=>{if(!a)return;let[s,u]=a;u.add(s),e.batchedText||(e.batchedText=u)})}function Vr(t,e){return t._members.has(e)}var Ml=.5;var kl=h.object({visible:h.boolean(),color:h.string(),flipToFaceCamera:h.boolean(),font:h.string().optional(),fontSize:h.number(),margin:h.union([h.number(),h.tuple([h.number(),h.number(),h.number(),h.number()])]),outlineColor:h.string(),outlineOpacity:h.number(),outlineBlur:h.union([h.number(),h.string()]),outlineWidth:h.number(),outlineOffsetX:h.number(),outlineOffsetY:h.number(),strokeWidth:h.number(),maxWidth:h.number().optional(),maxHeight:h.number().optional(),strokeOpacity:h.number(),strokeColor:h.string(),fillOpacity:h.number(),hoverColor:h.string().optional(),id:h.union([h.string(),h.number()]),type:h.literal("text3d"),position:h.tuple([h.number(),h.number(),h.number()]),content:h.string()}),Ei=kl.partial().omit({id:!0,type:!0}).strict(),Ii=Ei.omit({margin:!0,position:!0,maxWidth:!0,maxHeight:!0,content:!0}).strict(),Md=h.object({appearance:Ei.optional(),parentId:h.string().optional()}).strict(),lr=class{constructor(e){l(this,"mesh",new Ke);l(this,"textMesh");l(this,"type","text3d");l(this,"feature");l(this,"parent");l(this,"batchedText");l(this,"polygonEntityId");this.feature=e}get visible(){return this.batchedText&&this.textMesh?Vr(this.batchedText,this.textMesh):this.textMesh?this.textMesh.visible:!1}set visible(e){this.batchedText&&this.textMesh?e?this.batchedText.addText(this.textMesh):this.batchedText.removeText(this.textMesh):this.textMesh&&(this.textMesh.visible=e),this.mesh.visible=e}};function Pt(t,e,r){if(e!==void 0){if(t.type==="model"||t.type==="path"||t.type==="marker"||t.type==="label"||t.type==="geometry"||t.type==="group-container")return e===!0?(t instanceof he&&t.components[1]===void 0?(t.components[1]=new ut,t.components[1].dirty=!0):t instanceof ie&&t.components[2]===void 0?(t.components[2]=new ut,t.components[2].dirty=!0):t instanceof ke&&t.components[1]===void 0&&(t.components[1]=new ut,t.components[1].dirty=!0),!0):(t instanceof he?t.components[1]=void 0:t instanceof ie?t.components[2]=void 0:t instanceof ke&&(t.components[1]=void 0),!0);if(t.type==="geometry-group"){let n;for(let i of t.userData.entities3D.values())n=r.geometry3DMap.get(i),Pt(n,e,r);return!0}}return!1}function zd(t,e,r){if(!(!(r!=null&&r.color)&&!("topColor"in r))){if(r!==void 0&&t.type==="geometry-group"&&t.components[0]!=null){let n,i,o=t.components[0];for(let a of t.userData.entities3D.values())n=e.geometry3DMap.get(a),n&&(i=n.components[1],i.color===o.color&&(i.initialColor=r.color||o.color,i.color=r.color||o.color,i.dirty=!0),i.topColor===o.topColor&&(i.topColor=r.topColor||o.topColor,i.dirty=!0));return r.color!==void 0&&(o.color=r.color,o.dirty=!0),"topColor"in r&&(o.topColor=r.topColor,o.dirty=!0),!0}return!1}}function Fd(t,e){if(e!==void 0&&t.type==="geometry-group"&&t.components[0]!=null){let r=t.components[0];return r.shading=r.shading||{},r.shading&&(e.start!==r.shading.start||e.end!==r.shading.end||e.intensity!==r.shading.intensity)&&(Object.assign(r.shading,e),t.userData.shadingDirty=!0),!0}return!1}function Vd(t,e){e!==void 0&&t.type==="geometry"&&(e.showImage!==void 0&&(t.components[1].showImage=e.showImage),e.flipImageToFaceCamera!==void 0&&(t.components[1].flipImageToFaceCamera=e.flipImageToFaceCamera))}function Ud(t,e,r){var n;if(r!==void 0){if(t.type==="geometry"){let i=t.components[1];if(i.height!==r)return i.height=r,i.dirty=!0,((n=t.parentObject3D)==null?void 0:n.type)==="geometry-group"&&(t.parentObject3D.userData.outlineDirty=!0),!0}else if(t.type==="geometry-group"){let i=t.components[0];for(let o of t.userData.entities3D.values()){let a=e.geometry3DMap.get(o),s;((a==null?void 0:a.type)==="geometry"||(a==null?void 0:a.type)==="model")&&(s=a.components[1],s.height===i.height&&(a.components[1].height=r,a.components[1].dirty=!0))}return t.components[0].height=r,t.userData.outlineDirty=!0,!0}}return!1}function Dl(t,e){e!==void 0&&(t.type==="path"||t.type==="geometry")&&(e.initialColor!==void 0&&(t.components[1].initialColor=e.initialColor),e.color!==void 0&&(t.components[1].color=e.color),"topColor"in e&&(t.components[1].topColor=e.topColor),t.components[1].dirty=!0)}function Hd(t,e,r){e!==void 0&&(t.type==="label"||t.type==="marker"?(t.object3d.position.copy(r(e[1],e[0],e[2]||0)),t.positionDirty=!0):t.type==="custom-geometry"&&t.components[0].position.copy(r(e[1],e[0],e[2]||0)))}function Zd(t,e){var r;return e!==void 0&&(t.type==="marker"||t.type==="label"||t.type==="custom-geometry")&&t.parentObject3D!==e&&t.parentObject3D instanceof ke?((r=t.parentObject3D)==null||r.removeEntity(t),e.addEntity(t),!0):!1}function $d(t,e){e!==void 0&&(t.type==="marker"||t.type==="label")&&t.components[0].enabled!==e&&(t.components[0].enabled=e)}function Wd(t,e,r){if(e!==void 0&&t.type==="marker"){let n=t.components[0];if(e.contentHTML!==void 0)return n.containerEl.innerHTML=e.contentHTML,!0;if(e.anchor!==void 0&&(n.options.anchor=e.anchor,n.collisionDirty=!0),e.dynamicResize!==void 0)return n.options.dynamicResize=e.dynamicResize,!0;if(e.options!=null){try{Rr.parse(e.options||{})}catch(i){return se.error(i),!1}return e.options.interactive==="pointer-events-auto"?(n.pointerEvents="auto",Pt(t,!1,r)):(n.pointerEvents="none",Pt(t,e.options.interactive,r)),Oi(t,e.options.rank),!0}}return!1}function Oi(t,e){return e!==void 0&&(t.type==="marker"||t.type==="label")?(t.components[0].rank=ct(e),!0):!1}function Yd(t,e,r){var n,i,o,a,s;if(e!==void 0&&t.type==="label"){let u=t.components[0];e.text!==void 0&&(u.text=e.text,u.dirty=!0);try{jr.parse(e.options||{})}catch(c){se.error(c);return}((n=e.options)==null?void 0:n.appearance)!==void 0&&Object.keys((i=e.options)==null?void 0:i.appearance).length>0&&(Hr(u.appearance,((o=e.options)==null?void 0:o.appearance)||{}),u.dirty=!0),Pt(t,(a=e.options)==null?void 0:a.interactive,r),Oi(t,(s=e.options)==null?void 0:s.rank)}}function qd(t,e){e!==void 0&&t.type==="geometry"&&(t.components[1].hoverColor=e,t.components[1].dirty=!0)}function Kd(t,e){if(e!==void 0){let r=t.components[2];if(t.type==="geometry"&&r!=null)return r.hover=e,r.dirty=!0,!0}return!1}function Xd(t,e){e!==void 0&&t.type==="image"&&(t.components[1].flipImageToFaceCamera=e)}function Ai(t,e){if(e!==void 0){if(t.type==="model"||t.type==="path"||t.type==="geometry"||t.type==="custom-geometry"||t.type==="image"||t.type==="text3d"){t.components[1].visible=e,t.components[1].dirty=!0;let r=t.parentObject3D;r instanceof oe&&(r.userData.outlineDirty=!0)}else t.type==="group-container"||t.type==="geometry-group"?t.setVisible(e):t.type==="label"&&(t.components[0].visible=e);return!0}return!1}function Jd(t,e,r){if(r!==void 0&&t.type==="geometry-group"){let n=t.components[0];for(let i of t.userData.entities3D.values()){let o=e.geometry3DMap.get(i),a;((o==null?void 0:o.type)==="geometry"||(o==null?void 0:o.type)==="model")&&(a=o.components[1],(!a.opacity||a.opacity===n.opacity)&&(a.opacity=r,a.dirty=!0))}return t.setOpacity(r),n.opacity=r,!0}return!1}function Qd(t,e){if(e!==void 0&&t.type==="geometry-group"){let r=t.components[0];(e==null?void 0:e.texture)!=null&&r.texture!==(e==null?void 0:e.texture)&&(r.texture=e.texture,r.dirty=!0),(e==null?void 0:e.topTexture)!=null&&r.topTexture!==(e==null?void 0:e.topTexture)&&(r.topTexture=e.topTexture,r.dirty=!0)}}function ef(t,e){if(t.type==="geometry"){let r=!1,n=t.components[1];if((e==null?void 0:e.texture)!=null&&n.texture!==(e==null?void 0:e.texture)&&(n.texture=e.texture,r=!0),(e==null?void 0:e.topTexture)!=null&&n.topTexture!==(e==null?void 0:e.topTexture)&&(n.topTexture=e.topTexture,r=!0),r&&t.components[0]instanceof ne){let i=t.components[0];return i.detached===!1&&(i.detached=!0,i.dirty=!0),!0}}return!1}function tf(t,e){if(e!==void 0&&t.type==="geometry"){let r=t.components[1];if(r.opacity!==e){r.opacity=e;let n=t.components[0];n.detached===!1&&(n.detached=!0,n.dirty=!0),e===0?r.visible=!1:r.visible=!0,r.dirty=!0;let i=t.parentObject3D;return(i==null?void 0:i.type)==="geometry-group"&&(i.userData.outlineDirty=!0,i.userData.shadingDirty=!0),!0}}return!1}function rf(t,e){if(e!==void 0){if(t.type==="path"||t.type==="geometry"||t.type==="custom-geometry")t.components[1].altitude=e,t.components[1].dirty=!0;else if(t.type==="group-container"&&t.altitude!==e)return t.setAltitude(e),!0}return!1}function nf(t,e){if(e!==void 0){if(t.type==="geometry-group"&&t.components[0]!=null)t.components[0].outline=e,t.userData.outlineDirty=!0;else if(t.type==="geometry"){t.components[1].outline=e,t.components[1].dirty=!0;let r=t.parentObject3D;r instanceof oe&&(r.userData.outlineDirty=!0)}return!0}return!1}function of(t,e){return e!==void 0&&t.type==="geometry"&&t.components[0]&&t.components[0]instanceof ne?(t.components[0].focusable=e,!0):!1}function af(t,e){if(e!==void 0&&t.type==="geometry"){let r=t.components[1];if(r.renderOrder!==e){r.renderOrder=e;let n=t.components[0];return n.detached===!1&&(n.detached=!0,n.dirty=!0),n.imageMesh&&(n.imageMesh.renderOrder=e+1),r.dirty=!0,!0}}return!1}function sf(t,e){let{visible:r,color:n}=e;if(t.type!=="path")return;let i=t.components[0];r!=null&&Ai(t,r),n!=null&&Dl(t,{color:n}),Object.assign(i,Cl(e)),Ur(e)||(i.materialDirty=!0,(e.nearRadius!=null||e.farRadius!=null)&&(i.dirty=!0))}function Cl(t){return Rt(t,El)}var El=["animateArrowsOnPath","displayArrowsOnPath","nearRadius","farRadius","accentColor","completeFraction"];function lf(t){if(!(t instanceof ie&&t.type==="text3d"))throw new Error("expect target is TextGeometry3D")}var Il=["visible","color","strokeWidth","outlineOffsetX","outlineOffsetY","outlineWidth","outlineBlur","outlineOpacity","outlineColor","strokeWidth","strokeColor","strokeOpacity","maxWidth","maxHeight","font","hoverColor","fillOpacity","fontSize","flipToFaceCamera"];function uf(t,e){Ai(t,e.visible);let r=t.components[1],n=Rt(e,Il);"margin"in e&&se.warn("update to margin is not supported atm"),"content"in e&&se.warn("content update is not supported atm");try{Ii.parse(n)}catch(i){se.error(i);return}Object.keys(n).length>0&&(Object.assign(r,n),r.dirty=!0)}var Ol=["material","opacity","verticalOffset"];function cf(t,e){let r=Rt(e,Ol),n=t.components[1];Object.keys(r).length>0&&(r.material&&(n.material=r.material),r.opacity!=null&&(n.opacity=r.opacity),r.verticalOffset!=null&&(n.verticalOffset=r.verticalOffset),n.dirty=!0)}d();d();d();d();var ur=class extends rn{constructor(r){let n=r,i=3,o=i*4;super(new Float32Array(r*o),i,r,Qr,Jr);l(this,"_width");l(this,"_height");l(this,"_propertiesLength");this._width=o,this._height=n,this._propertiesLength=i}setColor(r,n,i){let o=this.image.data,a=r*this._width;o[a]=n.r,o[a+1]=n.g,o[a+2]=n.b,o[a+3]=0,o[a+4]=i.r,o[a+5]=i.g,o[a+6]=i.b,o[a+7]=0,this.needsUpdate=!0}getColor(r){let n=this.image.data,i=r*this._width,o=new ae(n[i],n[i+1],n[i+2]),a=new ae(n[i+4],n[i+5],n[i+6]);return{color:o,topColor:a}}setTexture(r,n,i){let o=this.image.data,a=r*this._width;o[a+8]=n?1:0,o[a+9]=i?1:0,o[a+10]=0,o[a+11]=0,this.needsUpdate=!0}};var Pi="#define LAMBERT\nvarying vec3 vViewPosition;\nvarying vec4 vPosition;\nvarying vec2 vUv;\nvarying vec4 finalPosition;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\nvarying float vBatchId;\n\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n\n vViewPosition = - mvPosition.xyz;\n\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n \n vBatchId = getIndirectIndex(gl_DrawID);\n vViewPosition = - mvPosition.xyz;\n worldNormal = normal;\n vUv = uv;\n vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n}";var Ri="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nuniform float uGradientEnd;\nuniform float uGradientIntensity;\nuniform float uMinSideAlpha;\nuniform float uMaxSideAlpha;\nuniform float uGradientStart;\nuniform highp sampler2D uPropertiesTexture;\nuniform highp sampler2D uTopTexture;\nuniform highp sampler2D uTexture;\nuniform float uRepeatYFactor;\nvarying float vBatchId;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\n\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n #include <clipping_planes_fragment>\n\n // get the normalized world normal of vertex fragment\n vec3 surfaceNormal = normalize(worldNormal);\n\n // get angle relative to Z up\n float angle = degrees(acos(abs(dot(surfaceNormal, vec3(0.0, 0.0, 1.0)))));\n\n int idx = int(vBatchId) * 1;\n vec3 diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(0, idx), 0).rgb);\n bool shouldShowTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).r == 1.0;\n\n if(shouldShowTexture) {\n diffuse = texture2D(uTexture, vec2(vUv.x, vUv.y * uRepeatYFactor)).rgb;\n }\n\n // if this is a fragment facing upwards, use topColor\n if(angle == 0.0) {\n bool shouldShowTopTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).g == 1.0;\n\n if(shouldShowTopTexture) {\n diffuse = texture2D(uTopTexture, vUv).rgb;\n } else {\n diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(1, idx), 0).rgb);\n }\n }\n\n vec4 diffuseColor = vec4(diffuse, opacity);\n\n // only for vertical surfaces\n if(angle > 89.0 && angle < 91.0) {\n\n // get the percentage of the z position from the ground, up\n float percentFromZeroZ = max((abs(vWorldPosition.z) - uGradientStart) / uGradientEnd, 0.0);\n\n // gradient based on percentage\n float alpha = smoothstep(uMinSideAlpha, uMaxSideAlpha, percentFromZeroZ);\n\n // mix the shadow color with the diffuse color based on the alpha and opacity\n diffuseColor = vec4(mix(diffuseColor.rgb, diffuseColor.rgb * (1.0 - uGradientIntensity), 1.0 - alpha), opacity);\n }\n\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n\n // accumulation\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n\n // modulation\n #include <aomap_fragment>\n\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n\n}";var Ll=-.05,Gl=1,Lt=class extends ln{constructor(r,n,i=1){super(r);l(this,"propertiesTexture");l(this,"uniforms",{uGradientIntensity:{value:0},uGradientEnd:{value:0},uGradientStart:{value:0},uTopTexture:{value:null},uTexture:{value:null},uRepeatYFactor:{value:1}});l(this,"showTextures",r=>{let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(r,n,i),this.needsUpdate=!0)});this.propertiesTexture=new ur(n),this.uniforms.uRepeatYFactor.value=i,this.onBeforeCompile=o=>{let a=this.uniforms.uGradientIntensity,s=this.uniforms.uGradientEnd,u=this.uniforms.uGradientStart,c=this.uniforms.uTopTexture,f=this.uniforms.uTexture,m=this.uniforms.uRepeatYFactor;this.uniforms=o.uniforms,o.vertexShader=Pi,o.fragmentShader=Ri,Object.assign(this.uniforms,{uGradientIntensity:a,uGradientEnd:s,uGradientStart:u,uMinSideAlpha:{value:Ll},uMaxSideAlpha:{value:Gl},uPropertiesTexture:{value:this.propertiesTexture},uTopTexture:c,uTexture:f,uRepeatYFactor:m})}}get repeatYFactor(){return this.uniforms.uRepeatYFactor.value}set repeatYFactor(r){r!==this.uniforms.uRepeatYFactor.value&&(this.uniforms.uRepeatYFactor.value=r,this.needsUpdate=!0)}get texture(){return this.uniforms.uTexture.value}set texture(r){r.wrapS=mt,r.wrapT=mt,r.colorSpace=dr,this.uniforms.uTexture.value=r}get topTexture(){return this.uniforms.uTopTexture.value}set topTexture(r){r.wrapS=mt,r.wrapT=mt,r.colorSpace=dr,this.uniforms.uTopTexture.value=r}setGradientShading(r,n,i){this.uniforms.uGradientStart.value=r,this.uniforms.uGradientEnd.value=n,this.uniforms.uGradientIntensity.value=i}setColor(r,n,i){this.propertiesTexture.setColor(r,n,i)}getColor(r){return this.propertiesTexture.getColor(r)}hideTextures(r){let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(r,!1,!1),this.needsUpdate=!0)}removeSideTexture(r){if(this.texture){this.texture.dispose(),this.uniforms.uTexture.value=null;let n=!!this.uniforms.uTopTexture.value;this.propertiesTexture.setTexture(r,!1,n),this.needsUpdate=!0}}removeTopTexture(r){if(this.topTexture){this.topTexture.dispose(),this.uniforms.uTopTexture.value=null;let n=!!this.uniforms.uTexture.value;this.propertiesTexture.setTexture(r,n,!1),this.needsUpdate=!0}}dispose(){super.dispose(),this.propertiesTexture.dispose()}};d();var Li="mappedin";var jl=80;function Hf(t,e){var s,u,c;let r=0;for(let f of t)r+=((u=(s=f.components[0])==null?void 0:s.geometry)==null?void 0:u.attributes.position.count)||0;let n=new ae(e.color),i;i=new Lt({color:n,side:e.side==="back"?Kr:e.side==="front"?qr:Xr,opacity:(c=e.opacity)!=null?c:1,transparent:e.opacity!==void 0?e.opacity<1:!1},t.length);let o=new Se(t.length,r,0,i),a;for(let f of t)a=f.components[0],!(!(a instanceof ne)||!a.geometry)&&(a.mesh=o,a.material=i,a.instanceIndex=o.addGeometry(a.geometry),o.addInstance(a.instanceIndex),o.userData.entities[a.instanceIndex]=f.id,i instanceof Lt&&i.setColor(a.instanceIndex,n,e.topColor?new ae(e.topColor):n));return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}function Zr(t,e){e.polygonOffset=!0,e.polygonOffsetFactor=1,e.polygonOffsetUnits=1;let r=new an(t,jl),n=Bl(e.color.getHexString()),i=new on({linewidth:1,color:n,transparent:!0}),o=new jt(r,i);return o.layers.set(1),o}function Bl(t){return b(t).darken(30).toRgbString()}d();function Gi(t){t&&(t.map&&(t.map.dispose(),t.map=void 0),t.dispose())}function cr(t){for(let e=t.children.length-1;e>=0;e--)cr(t.children[e]);"geometry"in t&&t.geometry&&t.geometry.dispose(),t.parent&&t.parent.remove(t),"material"in t&&Array.isArray(t.material)?t.material.forEach(function(e){Gi(e)}):"material"in t&&typeof t.material<"u"&&Gi(t.material)}var Gt,ht,$r=class{constructor(e){l(this,"rendererState");l(this,"dirty",!0);V(this,Gt,!0);V(this,ht,0);this.rendererState=e}get geometries3DDirty(){return E(this,Gt)}set geometries3DDirty(e){P(this,Gt,e)}update(e,r=!1){var o,a;let n;if(this.geometries3DDirty){let s;for(let u of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(u),n&&n.type==="geometry-group"&&n.userData.modelURL===void 0&&n.userData.dirty===!1&&n.userData.outlineDirty===!0){let c=n.children[0];n.userData.outlineDirty=!1;let f=lt(n);if(f&&cr(f),!n.components[0].outline||!n.visible)continue;if(n.children.length>0){let m;if(c instanceof Se){let I=[],C,L,G,ee;for(let $ of n.userData.entities3D)ee=this.rendererState.geometry3DMap.get($),(ee==null?void 0:ee.type)==="geometry"&&(L=ee.components[0],G=ee.components[1],L instanceof ne&&G.visible&&G.opacity>0&&G.outline&&!L.detached&&(C=L==null?void 0:L.geometry,C&&I.push(C)));I.length>0&&(m=fn(I))}else m=c.geometry;m&&(s=Zr(m,c.material),s.position.z=n.altitude,s.userData.outlineOfEntityId=n.userData.entityId);let w,D;for(let I of n.userData.entities3D.values()){let C=this.rendererState.geometry3DMap.get(I);(C==null?void 0:C.type)==="geometry"&&(w=C.components[0],D=C.components[1],s&&(C==null?void 0:C.type)==="geometry"&&!w.detached?(C.components[0].outline=s,(o=n.parent)==null||o.add(s)):(C==null?void 0:C.type)==="geometry"&&w.geometry!=null&&w.material!=null&&w.detached&&(w.outline&&cr(w.outline),D&&D.opacity>0&&D.visible&&D.outline&&(w.outline=Zr(w.geometry,w.material),(a=n.parent)==null||a.add(w.outline))))}}this.dirty=!0}this.geometries3DDirty=!1}let i=r?Ni(e,16,19,0,1):E(this,ht);if((i!==E(this,ht)||this.dirty)&&this.rendererState.geometry3DIdsInScene.size>0){let s;for(let u of this.rendererState.geometry3DIdsInScene)if(s=this.rendererState.geometry3DMap.get(u),(s==null?void 0:s.type)==="geometry-group"&&s.components[0]!=null&&s.components[0].outline&&s.visible){let c=lt(s);if(c&&c.visible){let f=Array.isArray(c.material)?c.material:[c.material];for(let m of f)m.opacity=Math.min(i,s.components[0].opacity)}}else if((s==null?void 0:s.type)==="geometry"&&s.components[0]instanceof ne&&s.components[0].detached){let c=s.components[0].outline;if(c){let f=Array.isArray(c.material)?c.material:[c.material];for(let m of f)m.opacity=Math.min(i,s.components[1].opacity)}}}P(this,ht,i),this.dirty=!1}};Gt=new WeakMap,ht=new WeakMap;var oe=class extends ye{constructor(r,n=new nr){super();l(this,"visible",!0);l(this,"type","geometry-group");l(this,"components");l(this,"userData",{entityId:"",entities3D:new Set,opacity:1,dirty:!0,outlineDirty:!0,shadingDirty:!0});this.components=[n],this.userData.entityId=r}setVisible(r){this.visible=r;let n=lt(this);n&&(n.visible=r),this.dispatchEvent({type:"childremoved",child:this})}getOpacity(){return this.userData.opacity}setOpacity(r){this.userData.opacity=r}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let r;for(let i of this.children)if(!i.userData.detached){r=i;break}return r instanceof Se?Object.values(r.userData.entities)[0]:void 0}setAltitude(r){this.position.z=r,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};var Ke=class extends ye{constructor(){super(...arguments);l(this,"type","geometry");l(this,"userData",{entityId:"",type:"geometry"})}},ie=class{constructor(e,r){l(this,"id",N());l(this,"components");l(this,"entities2D",new Map);this.components=[e,r]}get object3d(){return this.components[0].mesh}get parentObject3D(){var e;return(e=this.components[0].mesh)==null?void 0:e.parent}get type(){return this.components[0].type}addEntity(e){this.parentObject3D instanceof oe?(this.parentObject3D.add(e.object3d),e.object3d.userData.parentEntityId=this.id):this.entities2D.set(e.id,e)}removeEntity(e){var r;(r=e.parentObject3D)==null||r.remove(e.object3d),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.removeEntity(e)}};d();function Vl(t){let e=t.min,r=t.max,n=new z(e.x,e.y,e.z),i=new z(r.x,e.y,e.z),o=new z(e.x,r.y,e.z),a=new z(r.x,r.y,e.z);return[n,i,o,a]}d();function Ul(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}d();function Hl(t,e,r=!1){let n=null,i=0;return function(...o){i++,i===1&&r===!0&&t(...o);let a=()=>{(!r||i>1)&&t(...o),n=null,i=0};clearTimeout(n),n=setTimeout(a,e)}}d();var Zl=(()=>{let t;return{getDeviceType(){if(t)return t;let{userAgent:e,platform:r,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(e),o=r==="iPad"||r.indexOf("Mac")===0&&n>0&&!window.MSStream,a=/android/i.test(e);return t={isIpad:o,isMobile:a||i||o,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},t},_reset(){t=void 0}}})(),ji=Zl.getDeviceType,Bi=(()=>{let t,e,r;function n(){if(e!==void 0)return e;t||(t=document.createElement("canvas"));let o=t.getContext("webgl")||t.getContext("experimental-webgl");if(!o)return e;try{let a=ji().isFirefox?null:o.getExtension("WEBGL_debug_renderer_info");return e=a?o.getParameter(a.UNMASKED_RENDERER_WEBGL):o.getParameter(o.RENDERER),e}catch{let s=new Error("Failed getting device info");throw s.name="FailedGettingDeviceInfo",s}}function i(){var a,s;if(!ji().isWindows)return!1;if(r!==void 0)return r;let o=(s=(a=$l())==null?void 0:a.toLowerCase())!=null?s:"";return r=o.includes("intel")&&(o.includes("uhd")||o.includes("iris")),r}return{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(o){t=o,e=void 0,r=void 0}}})(),$l=Bi.getInfo,Wl=Bi.shouldDisableOffscreenCanvas;d();function Rt(t,e){let r={};for(let n=0;n<e.length;n++){let i=e[n];i in t&&(r[i]=t[i])}return r}function Ur(t){return Object.keys(t).length===0}d();var Yl=t=>e=>{if(!e.includes("mappedin")){let r={};for(let n in t){let i=t[n];e.includes("mappedin")||(t[n]=i)}return{url:e,headers:r}}return{url:e,headers:t}};function Hp(t,e,r,n){let i=t*(Math.PI/180),o=n/Ce,a=t+o*180/Math.PI,s=r/Ce/Math.cos(i),u=e+s*180/Math.PI;return{lat:a,lon:u}}function Zp(t,e,r,n){let i=r*(Math.PI/180),o=n*(Math.PI/180),a=t*(Math.PI/180),s=e*(Math.PI/180),u=i-a,c=o-s,f=Ce*c*Math.cos(a),m=Ce*u;return{x:f,y:m}}var ql=(t,e)=>{var r;if(t.children&&t.visible)for(let n of t.children){if(n.visible&&n.type)if("entities3D"in n.userData&&((r=n.userData)!=null&&r.entities3D)&&n.type==="geometry-group"){e.add(n.userData.entityId);for(let i of n.userData.entities3D.values())e.add(i)}else(n.type==="group-container"||n.type==="custom-geometry"||n instanceof Ke)&&e.add(n.userData.entityId);ql(n,e)}return e},Kl=(t,e)=>{var r;if(t.children&&t.visible&&!((r=t.userData)!=null&&r.hidden))for(let n of t.children)n.visible&&n instanceof We&&e.add(n.userData.entityId),Kl(n,e);return e};function Hr(t,e){for(let r in e){if(e[r]==null){t[r]=void 0;continue}typeof e[r]=="object"?Hr(t[r],e[r]):t[r]=e[r]}return t}function $p(t,e,r,n){let i={translateX:t.x,translateY:t.y,translateZ:t.z,scale:t.meterInMercatorCoordinateUnits()},o=new gt,a=new z(i.scale,-i.scale,i.scale),s=new gt().makeTranslation(i.translateX,i.translateY,i.translateZ).scale(a),u=r.elevation;return{id:Li,type:"custom",renderingMode:"3d",render:(c,f)=>{if(o.fromArray(f),u!==r.elevation){let m=dn.fromLngLat(t.toLngLat(),r.elevation);s.makeTranslation(i.translateX,i.translateY,-m.z).scale(a)}e.projectionMatrix=o.multiply(s),u=r.elevation,n()}}}function Xl(t){return fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}async function Wp(t){let e=await Xl(t),{access_token:r}=await e.json();return{"x-mappedin-tiles-key":r}}function Yp(t,e=0){let r=3735928559^e,n=1103547991^e;for(let i=0,o;i<t.length;i++)o=t.charCodeAt(i),r=Math.imul(r^o,2654435761),n=Math.imul(n^o,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}var Jl=t=>t;var qp=t=>1-Math.cos(t*Math.PI/2);function Ni(t,e,r,n,i,o=Jl){t=Math.max(e,Math.min(t,r));let a=(t-Math.min(e,r))/Math.abs(r-e),s=o(a);return n+s*(i-n)}function Kp(t,e,r){let n=t*(Math.PI/180)/2,i=e/2;return r*Math.tan(n)/i}function Xp(t,e){let r;return typeof e=="string"||typeof e=="number"?(r=t.geometry2DMap.get(e),r==null&&(r=t.geometry3DMap.get(e))):typeof(e==null?void 0:e.id)=="string"||typeof(e==null?void 0:e.id)=="number"?(r=t.geometry2DMap.get(e.id),r==null&&(r=t.geometry3DMap.get(e.id))):r=e,r}function Jp(t){return new cn(new fr(t[0][0],t[0][1]),new fr(t[1][0],t[1][1])).getCenter().toArray()}function Qp(t){return Number.isFinite(t.min.x)&&Number.isFinite(t.min.y)&&Number.isFinite(t.max.x)&&Number.isFinite(t.max.y)&&(t instanceof un||Number.isFinite(t.min.z)&&Number.isFinite(t.max.z))}d();var Wr=class{constructor(e){l(this,"visible");l(this,"altitude");l(this,"color");l(this,"dirty",!0);l(this,"maxWidth");l(this,"maxHeight");l(this,"hoverByPolygon");l(this,"flipToFaceCamera",zi.flipToFaceCamera);l(this,"font");l(this,"fillOpacity");l(this,"fontSize");l(this,"margin");l(this,"outlineWidth");l(this,"outlineBlur");l(this,"outlineOffsetX");l(this,"strokeColor");l(this,"strokeOpacity");l(this,"strokeWidth");l(this,"hoverColor");l(this,"outlineOffsetY");l(this,"outlineColor");l(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let r={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(r[n]=this[n]);return r}},zi=Object.freeze({visible:!0,color:"black",flipToFaceCamera:!0,fillOpacity:1,font:void 0,fontSize:2,margin:[.2,1,.2,1.5],outlineColor:"black",outlineOpacity:1,outlineWidth:0,outlineOffsetX:0,outlineOffsetY:0,outlineBlur:0,strokeOpacity:1,strokeWidth:0,maxWidth:void 0,maxHeight:void 0,strokeColor:"black",hoverColor:void 0});d();d();var Yr=class{constructor(e){l(this,"dirty",!0);l(this,"visible",!0);l(this,"opacity",1);l(this,"verticalOffset",0);l(this,"material");e&&Object.assign(this,e)}};export{Ui as a,Ql as b,se as c,Ce as d,lu as e,uu as f,cu as g,du as h,hu as i,yt as j,N as k,hr as l,Ye as m,Fs as n,Wu as o,ui as p,Yu as q,qu as r,Ku as s,Xu as t,Ju as u,Qu as v,ic as w,Us as x,oc as y,ci as z,h as A,ai as B,Ar as C,Pr as D,Se as E,ne as F,nr as G,lt as H,Rc as I,Vc as J,mi as K,he as L,Ke as M,ie as N,Li as O,Vl as P,Ul as Q,Hl as R,Wl as S,Rt as T,Yl as U,tr as V,Hp as W,Zp as X,ql as Y,Kl as Z,$p as _,Wp as $,Yp as aa,Jl as ba,qp as ca,Ni as da,Kp as ea,Xp as fa,Jp as ga,Qp as ha,b as ia,ad as ja,sd as ka,Wr as la,zi as ma,Yr as na,Ci as oa,yd as pa,Md as qa,lr as ra,Pt as sa,zd as ta,Fd as ua,Vd as va,Ud as wa,Dl as xa,Hd as ya,Zd as za,$d as Aa,Wd as Ba,Yd as Ca,qd as Da,Kd as Ea,Xd as Fa,Ai as Ga,Jd as Ha,Qd as Ia,ef as Ja,tf as Ka,rf as La,nf as Ma,of as Na,af as Oa,sf as Pa,Cl as Qa,lf as Ra,Il as Sa,uf as Ta,cf as Ua,Lt as Va,Hf as Wa,Bl as Xa,cr as Ya,$r as Za,oe as _a,ke as $a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var o=(b,a)=>()=>(b&&(a=b(b=0)),a);var p=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),q=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},n=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of j(a))!l.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=i(a,e))||d.enumerable});return b};var r=(b,a,c)=>(c=b!=null?h(k(b)):{},n(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var s=(b,a,c)=>(m(b,typeof a!="symbol"?a+"":a,c),c),g=(b,a,c)=>{if(!a.has(b))throw TypeError("Cannot "+c)};var t=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),u=(b,a,c)=>{if(a.has(b))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(b):a.set(b,c)},v=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c);var w=(b,a,c)=>(g(b,a,"access private method"),c);export{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as x,T as y,t as A,u as w,v as g}from"./chunk-2W6HOSKW.js";import{a as b}from"./chunk-NP6PYE7C.js";b();function M(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=B(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=B(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}function B(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new x(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}function R(o,l){if(l===A)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===g||l===w){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===g)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}export{M as a,R as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-H2E2454S.js";var e,c=a(()=>{e={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.31"}}});export{c as a,e as b};
|