@mappedin/maplibre-overlay 6.0.1-beta.54
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/LICENSE.txt +104 -0
- package/README.md +101 -0
- package/lib/esm/GLTFExporter-CVG4TSMU.js +1 -0
- package/lib/esm/GLTFLoader-N7FATKQH.js +1 -0
- package/lib/esm/chunk-3N4I2ZNL.js +1 -0
- package/lib/esm/chunk-CU2O7JF6.js +1 -0
- package/lib/esm/chunk-DMDOMXWY.js +1 -0
- package/lib/esm/chunk-DZU6L3QB.js +1 -0
- package/lib/esm/chunk-MSQIQNNK.js +1 -0
- package/lib/esm/chunk-MY2QYVOC.js +1 -0
- package/lib/esm/index.css +1 -0
- package/lib/esm/index.d.ts +208 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/outdoor-context-v5-H6GAWAMZ.js +1 -0
- package/lib/esm/roboto-regular-JDPVYXT5.js +1 -0
- package/lib/esm/text3d-FS4EQ4SH.js +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as Dt,j as Ir}from"./chunk-MY2QYVOC.js";import{$ as Pt,I as Ge,Q as C,R as Ct,T as It,V as Q,W as ze,Y as Pr,aa as Or,cb as at,qa as Ar}from"./chunk-MSQIQNNK.js";import{a as f,b as _}from"./chunk-DZU6L3QB.js";import{a as u,b,c as a,g as ln,i as d,j as G,k as Y,l as X}from"./chunk-CU2O7JF6.js";f();var At=class At{constructor(){d(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(t)})}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||this._subscribers[e]==null)return;let n=this._subscribers[e].indexOf(t);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};a(At,"PubSub");var Ot=At;f();f();var Nt="[MappedinJS]";function dn(r="",{prefix:e=Nt}={}){let t="".concat(e).concat(r?"-".concat(r):""),n=a((i,s)=>{if(typeof window<"u"&&window.rnDebug){let o=s.map(c=>c instanceof Error&&c.stack?"".concat(c.message,"\n").concat(c.stack):c);window.rnDebug("".concat(r," ").concat(i,": ").concat(o.join(" ")))}},"rnDebug");return{logState:_.env.NODE_ENV==="test"?3:0,log(...i){this.logState<=0&&(console.log(t,...i),n("log",i))},warn(...i){this.logState<=1&&(console.warn(t,...i),n("warn",i))},error(...i){this.logState<=2&&(console.error(t,...i),n("error",i))},assert(...i){console.assert(...i)},time(i){console.time(i)},timeEnd(i){console.timeEnd(i)},setLevel(i){0<=i&&i<=3&&(this.logState=i)}}}a(dn,"createLogger");var fn=dn();var le=fn;f();function pn(r,e){return"".concat(e," ").concat(r)}a(pn,"formatMessage");var Lt=class Lt extends Error{constructor(e,t=Nt){super(pn(e,t)),this.name="MappedinError"}};a(Lt,"MappedinError");var ot=Lt;f();f();var jt=class jt extends Error{};a(jt,"InvalidTokenError");var Rt=jt;Rt.prototype.name="InvalidTokenError";f();var de=63710088e-1;function ct(r){return r*(Math.PI/180)}a(ct,"toRadians");function vs(r,e){let t=Math.pow(10,e);return Math.sign(r)*Math.round(Math.abs(r)*t)/t}a(vs,"round");function Nr(r,e){return(r%e+e)%e}a(Nr,"euclideanModulo");function bs([r,e],[t,n]){let i=ct(n-e),s=ct(t-r),o=ct(e),c=ct(n),l=Math.sin(i/2)*Math.sin(i/2)+Math.sin(s/2)*Math.sin(s/2)*Math.cos(o)*Math.cos(c),m=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return de*m}a(bs,"haversineDistance");function _s(r,e){let t=Nr(r,Math.PI*2),n=Nr(e,Math.PI*2),i=n-t,s=n+(i>Math.PI?-Math.PI*2:i<-Math.PI?Math.PI*2:0);return{start:t,end:s}}a(_s,"shortestTweenRotation");function mn(r){return r instanceof at?Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y):Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y)&&Number.isFinite(r.min.z)&&Number.isFinite(r.max.z)}a(mn,"isFiniteBox");function Ts(r,e,t,n){return(r<e||r>t)&&le.warn(n),Math.min(t,Math.max(e,r))}a(Ts,"clampWithWarning");function ws(r,e){if(r==null||e==null)return r===e;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}a(ws,"arraysEqual");f();f();var ut=class ut extends Error{constructor(t){super(t);d(this,"name","AssertionError");Error.captureStackTrace&&Error.captureStackTrace(this,ut)}};a(ut,"AssertionError");var Vt=ut;function Lr(r,e){if(r==null){let t;if(e!=null&&e.customMessage)t=e.customMessage;else{let s=e!=null&&e.valueName?"'".concat(e.valueName,"'"):"value";t="Expected ".concat(s," to be defined, but received ").concat(r)}let n=(e==null?void 0:e.errorClass)||Vt,i=new n(t);throw(e==null?void 0:e.captureStackTrace)!==!1&&Error.captureStackTrace&&Error.captureStackTrace(i,Lr),i}}a(Lr,"assertExists");function Is(r,e,t){if(Lr(r),(r==null?void 0:r.type)!==e){let n="Expected type ".concat(e," but got ").concat(r==null?void 0:r.type);throw new Error(t!=null?t:n)}}a(Is,"assertType");f();var Ft=[0,4,6,8,10],Ue=a(()=>{let r=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<r.length;n++)n>0&&(n&3)===0&&(e=Math.random()*4294967296),r[n]=e>>>((n&3)<<3)&255;let t=r.map(n=>n.toString(16).padStart(2,"0"));return t[6]="4"+t[6][1],t[8]=["8","9","a","b"].includes(t[7][0])?t[7]:"a"+t[7][1],Ft.map((n,i)=>t.slice(n,i===Ft.length-1?void 0:Ft[i+1]).join("")).join("-")},"randomId");f();f();var hn=new Set(Object.keys(ze.NAMES));var yn=a(r=>hn.has(r.toLowerCase()),"isX11Color"),gn=a(r=>{if(!r.startsWith("#"))return!1;let e=r.slice(1);if(e.length!==3&&e.length!==6)return!1;for(let t=0;t<e.length;t++)if(!(e[t]>="0"&&e[t]<="9"||e[t]>="A"&&e[t]<="F"||e[t]>="a"&&e[t]<="f"))return!1;return!0},"isHexColor"),xn=a(r=>{if(!r.startsWith("rgb(")&&!r.startsWith("rgba("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let i=0;i<n.length;i++){let s=n[i].trim();if(i<3)if(s.endsWith("%")){let o=parseFloat(s.slice(0,-1));if(isNaN(o)||o<0||o>100)return!1}else{let o=parseInt(s,10);if(isNaN(o)||o<0||o>255)return!1}else{let o=parseFloat(s);if(isNaN(o)||o<0||o>1)return!1}}return!0},"isRgbColor"),vn=a(r=>{if(!r.startsWith("hsl(")&&!r.startsWith("hsla("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let i=0;i<n.length;i++){let s=n[i].trim();if(i===0){let o=parseFloat(s);if(isNaN(o))return!1}else if(i<3){if(!s.endsWith("%"))return!1;let o=parseFloat(s.slice(0,-1));if(isNaN(o)||o<0||o>100)return!1}else{let o=parseFloat(s);if(isNaN(o)||o<0||o>1)return!1}}return!0},"isHslColor"),lt=a(r=>r==null||typeof r!="string"?!1:!!(gn(r)||xn(r)||vn(r)||yn(r)),"isColor");f();f();f();var Qe={};ln(Qe,{BRAND:()=>Wn,DIRTY:()=>fe,EMPTY_PATH:()=>wn,INVALID:()=>v,NEVER:()=>Ci,OK:()=>D,ParseStatus:()=>M,Schema:()=>k,ZodAny:()=>re,ZodArray:()=>H,ZodBigInt:()=>he,ZodBoolean:()=>ye,ZodBranded:()=>Ye,ZodCatch:()=>Me,ZodDate:()=>ge,ZodDefault:()=>Se,ZodDiscriminatedUnion:()=>ht,ZodEffects:()=>V,ZodEnum:()=>ke,ZodError:()=>P,ZodFirstPartyTypeKind:()=>T,ZodFunction:()=>gt,ZodIntersection:()=>_e,ZodIssueCode:()=>p,ZodLazy:()=>Te,ZodLiteral:()=>we,ZodMap:()=>je,ZodNaN:()=>Fe,ZodNativeEnum:()=>Ee,ZodNever:()=>F,ZodNull:()=>ve,ZodNullable:()=>W,ZodNumber:()=>me,ZodObject:()=>O,ZodOptional:()=>R,ZodParsedType:()=>y,ZodPipeline:()=>Xe,ZodPromise:()=>ne,ZodReadonly:()=>De,ZodRecord:()=>yt,ZodSchema:()=>k,ZodSet:()=>Ve,ZodString:()=>te,ZodSymbol:()=>Le,ZodTransformer:()=>V,ZodTuple:()=>U,ZodType:()=>k,ZodUndefined:()=>xe,ZodUnion:()=>be,ZodUnknown:()=>q,ZodVoid:()=>Re,addIssueToContext:()=>h,any:()=>ei,array:()=>ii,bigint:()=>Hn,boolean:()=>Zr,coerce:()=>Di,custom:()=>zr,date:()=>Jn,datetimeRegex:()=>Br,defaultErrorMap:()=>Z,discriminatedUnion:()=>ci,effect:()=>bi,enum:()=>gi,function:()=>mi,getErrorMap:()=>Ie,getParsedType:()=>z,instanceof:()=>Kn,intersection:()=>ui,isAborted:()=>pt,isAsync:()=>Pe,isDirty:()=>mt,isValid:()=>ee,late:()=>Zn,lazy:()=>hi,literal:()=>yi,makeIssue:()=>We,map:()=>fi,nan:()=>qn,nativeEnum:()=>xi,never:()=>ri,null:()=>Qn,nullable:()=>Ti,number:()=>Wr,object:()=>si,objectUtil:()=>$t,oboolean:()=>Mi,onumber:()=>Si,optional:()=>_i,ostring:()=>Ei,pipeline:()=>ki,preprocess:()=>wi,promise:()=>vi,quotelessJson:()=>bn,record:()=>di,set:()=>pi,setErrorMap:()=>Tn,strictObject:()=>ai,string:()=>Ur,symbol:()=>Yn,transformer:()=>bi,tuple:()=>li,undefined:()=>Xn,union:()=>oi,unknown:()=>ti,util:()=>E,void:()=>ni});f();f();f();f();f();var E;(function(r){r.assertEqual=i=>{};function e(i){}a(e,"assertIs"),r.assertIs=e;function t(i){throw new Error}a(t,"assertNever"),r.assertNever=t,r.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},r.getValidEnumValues=i=>{let s=r.objectKeys(i).filter(c=>typeof i[i[c]]!="number"),o={};for(let c of s)o[c]=i[c];return r.objectValues(o)},r.objectValues=i=>r.objectKeys(i).map(function(s){return i[s]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},r.find=(i,s)=>{for(let o of i)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?"'".concat(o,"'"):o).join(s)}a(n,"joinValues"),r.joinValues=n,r.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(E||(E={}));var $t;(function(r){r.mergeShapes=(e,t)=>u(u({},e),t)})($t||($t={}));var y=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),z=a(r=>{switch(typeof r){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(r)?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(r)?y.array:r===null?y.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?y.promise:typeof Map<"u"&&r instanceof Map?y.map:typeof Set<"u"&&r instanceof Set?y.set:typeof Date<"u"&&r instanceof Date?y.date:y.object;default:return y.unknown}},"getParsedType");var p=E.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"]),bn=a(r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),dt=class dt extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(s){return s.message},n={_errors:[]},i=a(s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let c=n,l=0;for(;l<o.path.length;){let m=o.path[l];l===o.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(t(o))):c[m]=c[m]||{_errors:[]},c=c[m],l++}}},"processError");return i(this),n}static assert(e){if(!(e instanceof dt))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},n=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};a(dt,"ZodError");var P=dt;P.create=r=>new P(r);var _n=a((r,e)=>{let t;switch(r.code){case p.invalid_type:r.received===y.undefined?t="Required":t="Expected ".concat(r.expected,", received ").concat(r.received);break;case p.invalid_literal:t="Invalid literal value, expected ".concat(JSON.stringify(r.expected,E.jsonStringifyReplacer));break;case p.unrecognized_keys:t="Unrecognized key(s) in object: ".concat(E.joinValues(r.keys,", "));break;case p.invalid_union:t="Invalid input";break;case p.invalid_union_discriminator:t="Invalid discriminator value. Expected ".concat(E.joinValues(r.options));break;case p.invalid_enum_value:t="Invalid enum value. Expected ".concat(E.joinValues(r.options),", received '").concat(r.received,"'");break;case p.invalid_arguments:t="Invalid function arguments";break;case p.invalid_return_type:t="Invalid function return type";break;case p.invalid_date:t="Invalid date";break;case p.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t='Invalid input: must include "'.concat(r.validation.includes,'"'),typeof r.validation.position=="number"&&(t="".concat(t," at one or more positions greater than or equal to ").concat(r.validation.position))):"startsWith"in r.validation?t='Invalid input: must start with "'.concat(r.validation.startsWith,'"'):"endsWith"in r.validation?t='Invalid input: must end with "'.concat(r.validation.endsWith,'"'):E.assertNever(r.validation):r.validation!=="regex"?t="Invalid ".concat(r.validation):t="Invalid";break;case p.too_small:r.type==="array"?t="Array must contain ".concat(r.exact?"exactly":r.inclusive?"at least":"more than"," ").concat(r.minimum," element(s)"):r.type==="string"?t="String must contain ".concat(r.exact?"exactly":r.inclusive?"at least":"over"," ").concat(r.minimum," character(s)"):r.type==="number"?t="Number must be ".concat(r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than ").concat(r.minimum):r.type==="date"?t="Date must be ".concat(r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(r.minimum))):t="Invalid input";break;case p.too_big:r.type==="array"?t="Array must contain ".concat(r.exact?"exactly":r.inclusive?"at most":"less than"," ").concat(r.maximum," element(s)"):r.type==="string"?t="String must contain ".concat(r.exact?"exactly":r.inclusive?"at most":"under"," ").concat(r.maximum," character(s)"):r.type==="number"?t="Number must be ".concat(r.exact?"exactly":r.inclusive?"less than or equal to":"less than"," ").concat(r.maximum):r.type==="bigint"?t="BigInt must be ".concat(r.exact?"exactly":r.inclusive?"less than or equal to":"less than"," ").concat(r.maximum):r.type==="date"?t="Date must be ".concat(r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(r.maximum))):t="Invalid input";break;case p.custom:t="Invalid input";break;case p.invalid_intersection_types:t="Intersection results could not be merged";break;case p.not_multiple_of:t="Number must be a multiple of ".concat(r.multipleOf);break;case p.not_finite:t="Number must be finite";break;default:t=e.defaultError,E.assertNever(r)}return{message:t}},"errorMap"),Z=_n;var Rr=Z;function Tn(r){Rr=r}a(Tn,"setErrorMap");function Ie(){return Rr}a(Ie,"getErrorMap");f();var We=a(r=>{let{data:e,path:t,errorMaps:n,issueData:i}=r,s=[...t,...i.path||[]],o=b(u({},i),{path:s});if(i.message!==void 0)return b(u({},i),{path:s,message:i.message});let c="",l=n.filter(m=>!!m).slice().reverse();for(let m of l)c=m(o,{data:e,defaultError:c}).message;return b(u({},i),{path:s,message:c})},"makeIssue"),wn=[];function h(r,e){let t=Ie(),n=We({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Z?void 0:Z].filter(i=>!!i)});r.common.issues.push(n)}a(h,"addIssueToContext");var ft=class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let i of t){if(i.status==="aborted")return v;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let i of t){let s=await i.key,o=await i.value;n.push({key:s,value:o})}return ft.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let i of t){let{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return v;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}};a(ft,"ParseStatus");var M=ft,v=Object.freeze({status:"aborted"}),fe=a(r=>({status:"dirty",value:r}),"DIRTY"),D=a(r=>({status:"valid",value:r}),"OK"),pt=a(r=>r.status==="aborted","isAborted"),mt=a(r=>r.status==="dirty","isDirty"),ee=a(r=>r.status==="valid","isValid"),Pe=a(r=>typeof Promise<"u"&&r instanceof Promise,"isAsync");f();f();f();var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));var zt=class zt{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};a(zt,"ParseInputLazyPath");var j=zt,jr=a((r,e)=>{if(ee(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new P(r.common.issues);return this._error=t,this._error}}},"handleResult");function w(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||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((o,c)=>{var m,x;let{message:l}=r;return o.code==="invalid_enum_value"?{message:l!=null?l:c.defaultError}:typeof c.data>"u"?{message:(m=l!=null?l:n)!=null?m:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(x=l!=null?l:t)!=null?x:c.defaultError}},"customMap"),description:i}}a(w,"processCreateParams");var Ut=class Ut{get description(){return this._def.description}_getType(e){return z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new M,ctx:{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Pe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var s;let n={common:{issues:[],async:(s=t==null?void 0:t.async)!=null?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},i=this._parseSync({data:e,path:n.path,parent:n});return jr(n,i)}"~validate"(e){var n,i;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return ee(s)?{value:s.value}:{issues:t.common.issues}}catch(s){(i=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>ee(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(Pe(i)?i:Promise.resolve(i));return jr(n,s)}refine(e,t){let n=a(i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t,"getIssueProperties");return this._refinement((i,s)=>{let o=e(i),c=a(()=>s.addIssue(u({code:p.custom},n(i))),"setError");return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new V({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}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),this["~standard"]={version:1,vendor:"zod",validate:a(t=>this["~validate"](t),"validate")}}optional(){return R.create(this,this._def)}nullable(){return W.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return H.create(this)}promise(){return ne.create(this,this._def)}or(e){return be.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new V(b(u({},w(this._def)),{schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){let t=typeof e=="function"?e:()=>e;return new Se(b(u({},w(this._def)),{innerType:this,defaultValue:t,typeName:T.ZodDefault}))}brand(){return new Ye(u({typeName:T.ZodBranded,type:this},w(this._def)))}catch(e){let t=typeof e=="function"?e:()=>e;return new Me(b(u({},w(this._def)),{innerType:this,catchValue:t,typeName:T.ZodCatch}))}describe(e){let t=this.constructor;return new t(b(u({},this._def),{description:e}))}pipe(e){return Xe.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};a(Ut,"ZodType");var k=Ut,kn=/^c[^\s-]{8,}$/i,En=/^[0-9a-z]+$/,Sn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Mn=/^[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,Dn=/^[a-z0-9_-]{21}$/i,Cn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,In=/^[-+]?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)?)??$/,Pn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,On="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Bt,An=/^(?:(?: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])$/,Nn=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Ln=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Rn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fr="((\\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])))",Fn=new RegExp("^".concat(Fr,"$"));function $r(r){let e="[0-5]\\d";r.precision?e="".concat(e,"\\.\\d{").concat(r.precision,"}"):r.precision==null&&(e="".concat(e,"(\\.\\d+)?"));let t=r.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(e,")").concat(t)}a($r,"timeRegexSource");function $n(r){return new RegExp("^".concat($r(r),"$"))}a($n,"timeRegex");function Br(r){let e="".concat(Fr,"T").concat($r(r)),t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(t.join("|"),")"),new RegExp("^".concat(e,"$"))}a(Br,"datetimeRegex");function Bn(r,e){return!!((e==="v4"||!e)&&An.test(r)||(e==="v6"||!e)&&Ln.test(r))}a(Bn,"isValidIP");function Gn(r,e){if(!Cn.test(r))return!1;try{let[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch(t){return!1}}a(Gn,"isValidJWT");function zn(r,e){return!!((e==="v4"||!e)&&Nn.test(r)||(e==="v6"||!e)&&Rn.test(r))}a(zn,"isValidCidr");var pe=class pe extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let s=this._getOrReturnCtx(e);return h(s,{code:p.invalid_type,expected:y.string,received:s.parsedType}),v}let n=new M,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),h(i,{code:p.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),h(i,{code:p.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,c=e.data.length<s.value;(o||c)&&(i=this._getOrReturnCtx(e,i),o?h(i,{code:p.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&h(i,{code:p.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Pn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"email",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Bt||(Bt=new RegExp(On,"u")),Bt.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"emoji",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Mn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"uuid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Dn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"nanoid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")kn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"cuid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")En.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"cuid2",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Sn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"ulid",code:p.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch(o){i=this._getOrReturnCtx(e,i),h(i,{validation:"url",code:p.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"regex",code:p.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Br(s).test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Fn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?$n(s).test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{code:p.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?In.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"duration",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Bn(e.data,s.version)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"ip",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Gn(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"jwt",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?zn(e.data,s.version)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"cidr",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?jn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"base64",code:p.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Vn.test(e.data)||(i=this._getOrReturnCtx(e,i),h(i,{validation:"base64url",code:p.invalid_string,message:s.message}),n.dirty()):E.assertNever(s);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(i=>e.test(i),u({validation:t,code:p.invalid_string},g.errToObj(n)))}_addCheck(e){return new pe(b(u({},this._def),{checks:[...this._def.checks,e]}))}email(e){return this._addCheck(u({kind:"email"},g.errToObj(e)))}url(e){return this._addCheck(u({kind:"url"},g.errToObj(e)))}emoji(e){return this._addCheck(u({kind:"emoji"},g.errToObj(e)))}uuid(e){return this._addCheck(u({kind:"uuid"},g.errToObj(e)))}nanoid(e){return this._addCheck(u({kind:"nanoid"},g.errToObj(e)))}cuid(e){return this._addCheck(u({kind:"cuid"},g.errToObj(e)))}cuid2(e){return this._addCheck(u({kind:"cuid2"},g.errToObj(e)))}ulid(e){return this._addCheck(u({kind:"ulid"},g.errToObj(e)))}base64(e){return this._addCheck(u({kind:"base64"},g.errToObj(e)))}base64url(e){return this._addCheck(u({kind:"base64url"},g.errToObj(e)))}jwt(e){return this._addCheck(u({kind:"jwt"},g.errToObj(e)))}ip(e){return this._addCheck(u({kind:"ip"},g.errToObj(e)))}cidr(e){return this._addCheck(u({kind:"cidr"},g.errToObj(e)))}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(u({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(n=e==null?void 0:e.local)!=null?n:!1},g.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(u({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision},g.errToObj(e==null?void 0:e.message)))}duration(e){return this._addCheck(u({kind:"duration"},g.errToObj(e)))}regex(e,t){return this._addCheck(u({kind:"regex",regex:e},g.errToObj(t)))}includes(e,t){return this._addCheck(u({kind:"includes",value:e,position:t==null?void 0:t.position},g.errToObj(t==null?void 0:t.message)))}startsWith(e,t){return this._addCheck(u({kind:"startsWith",value:e},g.errToObj(t)))}endsWith(e,t){return this._addCheck(u({kind:"endsWith",value:e},g.errToObj(t)))}min(e,t){return this._addCheck(u({kind:"min",value:e},g.errToObj(t)))}max(e,t){return this._addCheck(u({kind:"max",value:e},g.errToObj(t)))}length(e,t){return this._addCheck(u({kind:"length",value:e},g.errToObj(t)))}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new pe(b(u({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new pe(b(u({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new pe(b(u({},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 isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};a(pe,"ZodString");var te=pe;te.create=r=>{var e;return new te(u({checks:[],typeName:T.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1},w(r)))};function Un(r,e){let t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,s=Number.parseInt(r.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return s%o/10**i}a(Un,"floatSafeRemainder");var Ze=class Ze extends k{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 s=this._getOrReturnCtx(e);return h(s,{code:p.invalid_type,expected:y.number,received:s.parsedType}),v}let n,i=new M;for(let s of this._def.checks)s.kind==="int"?E.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:p.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Un(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:p.not_finite,message:s.message}),i.dirty()):E.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,n,i){return new Ze(b(u({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:g.toString(i)}]}))}_addCheck(e){return new Ze(b(u({},this._def),{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&E.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}};a(Ze,"ZodNumber");var me=Ze;me.create=r=>new me(u({checks:[],typeName:T.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1},w(r)));var Ke=class Ke extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(s){return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let n,i=new M;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),h(n,{code:p.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):E.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return h(t,{code:p.invalid_type,expected:y.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,n,i){return new Ke(b(u({},this._def),{checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:g.toString(i)}]}))}_addCheck(e){return new Ke(b(u({},this._def),{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};a(Ke,"ZodBigInt");var he=Ke;he.create=r=>{var e;return new he(u({checks:[],typeName:T.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1},w(r)))};var Wt=class Wt extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.boolean,received:n.parsedType}),v}return D(e.data)}};a(Wt,"ZodBoolean");var ye=Wt;ye.create=r=>new ye(u({typeName:T.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1},w(r)));var xt=class xt extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let s=this._getOrReturnCtx(e);return h(s,{code:p.invalid_type,expected:y.date,received:s.parsedType}),v}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return h(s,{code:p.invalid_date}),v}let n=new M,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),h(i,{code:p.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),h(i,{code:p.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):E.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new xt(b(u({},this._def),{checks:[...this._def.checks,e]}))}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};a(xt,"ZodDate");var ge=xt;ge.create=r=>new ge(u({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:T.ZodDate},w(r)));var Zt=class Zt extends k{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.symbol,received:n.parsedType}),v}return D(e.data)}};a(Zt,"ZodSymbol");var Le=Zt;Le.create=r=>new Le(u({typeName:T.ZodSymbol},w(r)));var Kt=class Kt extends k{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.undefined,received:n.parsedType}),v}return D(e.data)}};a(Kt,"ZodUndefined");var xe=Kt;xe.create=r=>new xe(u({typeName:T.ZodUndefined},w(r)));var qt=class qt extends k{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.null,received:n.parsedType}),v}return D(e.data)}};a(qt,"ZodNull");var ve=qt;ve.create=r=>new ve(u({typeName:T.ZodNull},w(r)));var Ht=class Ht extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return D(e.data)}};a(Ht,"ZodAny");var re=Ht;re.create=r=>new re(u({typeName:T.ZodAny},w(r)));var Jt=class Jt extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return D(e.data)}};a(Jt,"ZodUnknown");var q=Jt;q.create=r=>new q(u({typeName:T.ZodUnknown},w(r)));var Yt=class Yt extends k{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:p.invalid_type,expected:y.never,received:t.parsedType}),v}};a(Yt,"ZodNever");var F=Yt;F.create=r=>new F(u({typeName:T.ZodNever},w(r)));var Xt=class Xt extends k{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.void,received:n.parsedType}),v}return D(e.data)}};a(Xt,"ZodVoid");var Re=Xt;Re.create=r=>new Re(u({typeName:T.ZodVoid},w(r)));var Ae=class Ae extends k{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==y.array)return h(t,{code:p.invalid_type,expected:y.array,received:t.parsedType}),v;if(i.exactLength!==null){let o=t.data.length>i.exactLength.value,c=t.data.length<i.exactLength.value;(o||c)&&(h(t,{code:o?p.too_big:p.too_small,minimum:c?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(h(t,{code:p.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(h(t,{code:p.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,c)=>i.type._parseAsync(new j(t,o,t.path,c)))).then(o=>M.mergeArray(n,o));let s=[...t.data].map((o,c)=>i.type._parseSync(new j(t,o,t.path,c)));return M.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new Ae(b(u({},this._def),{minLength:{value:e,message:g.toString(t)}}))}max(e,t){return new Ae(b(u({},this._def),{maxLength:{value:e,message:g.toString(t)}}))}length(e,t){return new Ae(b(u({},this._def),{exactLength:{value:e,message:g.toString(t)}}))}nonempty(e){return this.min(1,e)}};a(Ae,"ZodArray");var H=Ae;H.create=(r,e)=>new H(u({type:r,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray},w(e)));function Oe(r){if(r instanceof O){let e={};for(let t in r.shape){let n=r.shape[t];e[t]=R.create(Oe(n))}return new O(b(u({},r._def),{shape:a(()=>e,"shape")}))}else return r instanceof H?new H(b(u({},r._def),{type:Oe(r.element)})):r instanceof R?R.create(Oe(r.unwrap())):r instanceof W?W.create(Oe(r.unwrap())):r instanceof U?U.create(r.items.map(e=>Oe(e))):r}a(Oe,"deepPartialify");var N=class N extends k{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(),t=E.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){let m=this._getOrReturnCtx(e);return h(m,{code:p.invalid_type,expected:y.object,received:m.parsedType}),v}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof F&&this._def.unknownKeys==="strip"))for(let m in i.data)o.includes(m)||c.push(m);let l=[];for(let m of o){let x=s[m],S=i.data[m];l.push({key:{status:"valid",value:m},value:x._parse(new j(i,S,i.path,m)),alwaysSet:m in i.data})}if(this._def.catchall instanceof F){let m=this._def.unknownKeys;if(m==="passthrough")for(let x of c)l.push({key:{status:"valid",value:x},value:{status:"valid",value:i.data[x]}});else if(m==="strict")c.length>0&&(h(i,{code:p.unrecognized_keys,keys:c}),n.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let m=this._def.catchall;for(let x of c){let S=i.data[x];l.push({key:{status:"valid",value:x},value:m._parse(new j(i,S,i.path,x)),alwaysSet:x in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let m=[];for(let x of l){let S=await x.key,A=await x.value;m.push({key:S,value:A,alwaysSet:x.alwaysSet})}return m}).then(m=>M.mergeObjectSync(n,m)):M.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new N(u(b(u({},this._def),{unknownKeys:"strict"}),e!==void 0?{errorMap:a((t,n)=>{var s,o,c,l;let i=(c=(o=(s=this._def).errorMap)==null?void 0:o.call(s,t,n).message)!=null?c:n.defaultError;return t.code==="unrecognized_keys"?{message:(l=g.errToObj(e).message)!=null?l:i}:{message:i}},"errorMap")}:{}))}strip(){return new N(b(u({},this._def),{unknownKeys:"strip"}))}passthrough(){return new N(b(u({},this._def),{unknownKeys:"passthrough"}))}extend(e){return new N(b(u({},this._def),{shape:a(()=>u(u({},this._def.shape()),e),"shape")}))}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:a(()=>u(u({},this._def.shape()),e._def.shape()),"shape"),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new N(b(u({},this._def),{catchall:e}))}pick(e){let t={};for(let n of E.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new N(b(u({},this._def),{shape:a(()=>t,"shape")}))}omit(e){let t={};for(let n of E.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new N(b(u({},this._def),{shape:a(()=>t,"shape")}))}deepPartial(){return Oe(this)}partial(e){let t={};for(let n of E.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new N(b(u({},this._def),{shape:a(()=>t,"shape")}))}required(e){let t={};for(let n of E.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof R;)s=s._def.innerType;t[n]=s}return new N(b(u({},this._def),{shape:a(()=>t,"shape")}))}keyof(){return Gr(E.objectKeys(this.shape))}};a(N,"ZodObject");var O=N;O.create=(r,e)=>new O(u({shape:a(()=>r,"shape"),unknownKeys:"strip",catchall:F.create(),typeName:T.ZodObject},w(e)));O.strictCreate=(r,e)=>new O(u({shape:a(()=>r,"shape"),unknownKeys:"strict",catchall:F.create(),typeName:T.ZodObject},w(e)));O.lazycreate=(r,e)=>new O(u({shape:r,unknownKeys:"strip",catchall:F.create(),typeName:T.ZodObject},w(e)));var Qt=class Qt extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function i(s){for(let c of s)if(c.result.status==="valid")return c.result;for(let c of s)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;let o=s.map(c=>new P(c.ctx.common.issues));return h(t,{code:p.invalid_union,unionErrors:o}),v}if(a(i,"handleResults"),t.common.async)return Promise.all(n.map(async s=>{let o=b(u({},t),{common:b(u({},t.common),{issues:[]}),parent:null});return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(i);{let s,o=[];for(let l of n){let m=b(u({},t),{common:b(u({},t.common),{issues:[]}),parent:null}),x=l._parseSync({data:t.data,path:t.path,parent:m});if(x.status==="valid")return x;x.status==="dirty"&&!s&&(s={result:x,ctx:m}),m.common.issues.length&&o.push(m.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let c=o.map(l=>new P(l));return h(t,{code:p.invalid_union,unionErrors:c}),v}}get options(){return this._def.options}};a(Qt,"ZodUnion");var be=Qt;be.create=(r,e)=>new be(u({options:r,typeName:T.ZodUnion},w(e)));var K=a(r=>r instanceof Te?K(r.schema):r instanceof V?K(r.innerType()):r instanceof we?[r.value]:r instanceof ke?r.options:r instanceof Ee?E.objectValues(r.enum):r instanceof Se?K(r._def.innerType):r instanceof xe?[void 0]:r instanceof ve?[null]:r instanceof R?[void 0,...K(r.unwrap())]:r instanceof W?[null,...K(r.unwrap())]:r instanceof Ye||r instanceof De?K(r.unwrap()):r instanceof Me?K(r._def.innerType):[],"getDiscriminator"),vt=class vt extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.object)return h(t,{code:p.invalid_type,expected:y.object,received:t.parsedType}),v;let n=this.discriminator,i=t.data[n],s=this.optionsMap.get(i);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),v)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let i=new Map;for(let s of t){let o=K(s.shape[e]);if(!o.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let c of o){if(i.has(c))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(c)));i.set(c,s)}}return new vt(u({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i},w(n)))}};a(vt,"ZodDiscriminatedUnion");var ht=vt;function Gt(r,e){let t=z(r),n=z(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&n===y.object){let i=E.objectKeys(e),s=E.objectKeys(r).filter(c=>i.indexOf(c)!==-1),o=u(u({},r),e);for(let c of s){let l=Gt(r[c],e[c]);if(!l.valid)return{valid:!1};o[c]=l.data}return{valid:!0,data:o}}else if(t===y.array&&n===y.array){if(r.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<r.length;s++){let o=r[s],c=e[s],l=Gt(o,c);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return t===y.date&&n===y.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}a(Gt,"mergeValues");var er=class er extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=a((s,o)=>{if(pt(s)||pt(o))return v;let c=Gt(s.value,o.value);return c.valid?((mt(s)||mt(o))&&t.dirty(),{status:t.value,value:c.data}):(h(n,{code:p.invalid_intersection_types}),v)},"handleParsed");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(([s,o])=>i(s,o)):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}))}};a(er,"ZodIntersection");var _e=er;_e.create=(r,e,t)=>new _e(u({left:r,right:e,typeName:T.ZodIntersection},w(t)));var bt=class bt extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return h(n,{code:p.invalid_type,expected:y.array,received:n.parsedType}),v;if(n.data.length<this._def.items.length)return h(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...n.data].map((o,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new j(n,o,n.path,c)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>M.mergeArray(t,o)):M.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new bt(b(u({},this._def),{rest:e}))}};a(bt,"ZodTuple");var U=bt;U.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new U(u({items:r,typeName:T.ZodTuple,rest:null},w(e)))};var qe=class qe extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return h(n,{code:p.invalid_type,expected:y.object,received:n.parsedType}),v;let i=[],s=this._def.keyType,o=this._def.valueType;for(let c in n.data)i.push({key:s._parse(new j(n,c,n.path,c)),value:o._parse(new j(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?M.mergeObjectAsync(t,i):M.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof k?new qe(u({keyType:e,valueType:t,typeName:T.ZodRecord},w(n))):new qe(u({keyType:te.create(),valueType:e,typeName:T.ZodRecord},w(t)))}};a(qe,"ZodRecord");var yt=qe,tr=class tr extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return h(n,{code:p.invalid_type,expected:y.map,received:n.parsedType}),v;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([c,l],m)=>({key:i._parse(new j(n,c,n.path,[m,"key"])),value:s._parse(new j(n,l,n.path,[m,"value"]))}));if(n.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of o){let m=await l.key,x=await l.value;if(m.status==="aborted"||x.status==="aborted")return v;(m.status==="dirty"||x.status==="dirty")&&t.dirty(),c.set(m.value,x.value)}return{status:t.value,value:c}})}else{let c=new Map;for(let l of o){let m=l.key,x=l.value;if(m.status==="aborted"||x.status==="aborted")return v;(m.status==="dirty"||x.status==="dirty")&&t.dirty(),c.set(m.value,x.value)}return{status:t.value,value:c}}}};a(tr,"ZodMap");var je=tr;je.create=(r,e,t)=>new je(u({valueType:e,keyType:r,typeName:T.ZodMap},w(t)));var He=class He extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return h(n,{code:p.invalid_type,expected:y.set,received:n.parsedType}),v;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(h(n,{code:p.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(h(n,{code:p.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let s=this._def.valueType;function o(l){let m=new Set;for(let x of l){if(x.status==="aborted")return v;x.status==="dirty"&&t.dirty(),m.add(x.value)}return{status:t.value,value:m}}a(o,"finalizeSet");let c=[...n.data.values()].map((l,m)=>s._parse(new j(n,l,n.path,m)));return n.common.async?Promise.all(c).then(l=>o(l)):o(c)}min(e,t){return new He(b(u({},this._def),{minSize:{value:e,message:g.toString(t)}}))}max(e,t){return new He(b(u({},this._def),{maxSize:{value:e,message:g.toString(t)}}))}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};a(He,"ZodSet");var Ve=He;Ve.create=(r,e)=>new Ve(u({valueType:r,minSize:null,maxSize:null,typeName:T.ZodSet},w(e)));var Ne=class Ne extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return h(t,{code:p.invalid_type,expected:y.function,received:t.parsedType}),v;function n(c,l){return We({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ie(),Z].filter(m=>!!m),issueData:{code:p.invalid_arguments,argumentsError:l}})}a(n,"makeArgsIssue");function i(c,l){return We({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ie(),Z].filter(m=>!!m),issueData:{code:p.invalid_return_type,returnTypeError:l}})}a(i,"makeReturnsIssue");let s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof ne){let c=this;return D(async function(...l){let m=new P([]),x=await c._def.args.parseAsync(l,s).catch(L=>{throw m.addIssue(n(l,L)),m}),S=await Reflect.apply(o,this,x);return await c._def.returns._def.type.parseAsync(S,s).catch(L=>{throw m.addIssue(i(S,L)),m})})}else{let c=this;return D(function(...l){let m=c._def.args.safeParse(l,s);if(!m.success)throw new P([n(l,m.error)]);let x=Reflect.apply(o,this,m.data),S=c._def.returns.safeParse(x,s);if(!S.success)throw new P([i(x,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ne(b(u({},this._def),{args:U.create(e).rest(q.create())}))}returns(e){return new Ne(b(u({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ne(u({args:e||U.create([]).rest(q.create()),returns:t||q.create(),typeName:T.ZodFunction},w(n)))}};a(Ne,"ZodFunction");var gt=Ne,rr=class rr extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};a(rr,"ZodLazy");var Te=rr;Te.create=(r,e)=>new Te(u({getter:r,typeName:T.ZodLazy},w(e)));var nr=class nr extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:p.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}};a(nr,"ZodLiteral");var we=nr;we.create=(r,e)=>new we(u({value:r,typeName:T.ZodLiteral},w(e)));function Gr(r,e){return new ke(u({values:r,typeName:T.ZodEnum},w(e)))}a(Gr,"createZodEnum");var Je=class Je extends k{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{expected:E.joinValues(n),received:t.parsedType,code:p.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:p.invalid_enum_value,options:n}),v}return D(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Je.create(e,u(u({},this._def),t))}exclude(e,t=this._def){return Je.create(this.options.filter(n=>!e.includes(n)),u(u({},this._def),t))}};a(Je,"ZodEnum");var ke=Je;ke.create=Gr;var ir=class ir extends k{_parse(e){let t=E.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let i=E.objectValues(t);return h(n,{expected:E.joinValues(i),received:n.parsedType,code:p.invalid_type}),v}if(this._cache||(this._cache=new Set(E.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=E.objectValues(t);return h(n,{received:n.data,code:p.invalid_enum_value,options:i}),v}return D(e.data)}get enum(){return this._def.values}};a(ir,"ZodNativeEnum");var Ee=ir;Ee.create=(r,e)=>new Ee(u({values:r,typeName:T.ZodNativeEnum},w(e)));var sr=class sr extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return h(t,{code:p.invalid_type,expected:y.promise,received:t.parsedType}),v;let n=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return D(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}};a(sr,"ZodPromise");var ne=sr;ne.create=(r,e)=>new ne(u({type:r,typeName:T.ZodPromise},w(e)));var ar=class ar extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a(o=>{h(n,o),o.fatal?t.abort():t.dirty()},"addIssue"),get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async c=>{if(t.value==="aborted")return v;let l=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return l.status==="aborted"?v:l.status==="dirty"?fe(l.value):t.value==="dirty"?fe(l.value):l});{if(t.value==="aborted")return v;let c=this._def.schema._parseSync({data:o,path:n.path,parent:n});return c.status==="aborted"?v:c.status==="dirty"?fe(c.value):t.value==="dirty"?fe(c.value):c}}if(i.type==="refinement"){let o=a(c=>{let l=i.refinement(c,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c},"executeRefinement");if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?v:(c.status==="dirty"&&t.dirty(),o(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?v:(c.status==="dirty"&&t.dirty(),o(c.value).then(()=>({status:t.value,value:c.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ee(o))return v;let c=i.transform(o.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ee(o)?Promise.resolve(i.transform(o.value,s)).then(c=>({status:t.value,value:c})):v);E.assertNever(i)}};a(ar,"ZodEffects");var V=ar;V.create=(r,e,t)=>new V(u({schema:r,typeName:T.ZodEffects,effect:e},w(t)));V.createWithPreprocess=(r,e,t)=>new V(u({schema:e,effect:{type:"preprocess",transform:r},typeName:T.ZodEffects},w(t)));var or=class or extends k{_parse(e){return this._getType(e)===y.undefined?D(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};a(or,"ZodOptional");var R=or;R.create=(r,e)=>new R(u({innerType:r,typeName:T.ZodOptional},w(e)));var cr=class cr extends k{_parse(e){return this._getType(e)===y.null?D(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};a(cr,"ZodNullable");var W=cr;W.create=(r,e)=>new W(u({innerType:r,typeName:T.ZodNullable},w(e)));var ur=class ur extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};a(ur,"ZodDefault");var Se=ur;Se.create=(r,e)=>new Se(u({innerType:r,typeName:T.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default},w(e)));var lr=class lr extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=b(u({},t),{common:b(u({},t.common),{issues:[]})}),i=this._def.innerType._parse({data:n.data,path:n.path,parent:u({},n)});return Pe(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new P(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new P(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};a(lr,"ZodCatch");var Me=lr;Me.create=(r,e)=>new Me(u({innerType:r,typeName:T.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch},w(e)));var dr=class dr extends k{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return h(n,{code:p.invalid_type,expected:y.nan,received:n.parsedType}),v}return{status:"valid",value:e.data}}};a(dr,"ZodNaN");var Fe=dr;Fe.create=r=>new Fe(u({typeName:T.ZodNaN},w(r)));var Wn=Symbol("zod_brand"),fr=class fr extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}};a(fr,"ZodBranded");var Ye=fr,_t=class _t extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return a(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?v:s.status==="dirty"?(t.dirty(),fe(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new _t({in:e,out:t,typeName:T.ZodPipeline})}};a(_t,"ZodPipeline");var Xe=_t,pr=class pr extends k{_parse(e){let t=this._def.innerType._parse(e),n=a(i=>(ee(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return Pe(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}};a(pr,"ZodReadonly");var De=pr;De.create=(r,e)=>new De(u({innerType:r,typeName:T.ZodReadonly},w(e)));function Vr(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}a(Vr,"cleanParams");function zr(r,e={},t){return r?re.create().superRefine((n,i)=>{var o,c;let s=r(n);if(s instanceof Promise)return s.then(l=>{var m,x;if(!l){let S=Vr(e,n),A=(x=(m=S.fatal)!=null?m:t)!=null?x:!0;i.addIssue(b(u({code:"custom"},S),{fatal:A}))}});if(!s){let l=Vr(e,n),m=(c=(o=l.fatal)!=null?o:t)!=null?c:!0;i.addIssue(b(u({code:"custom"},l),{fatal:m}))}}):re.create()}a(zr,"custom");var Zn={object:O.lazycreate},T;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(T||(T={}));var Kn=a((r,e={message:"Input not instance of ".concat(r.name)})=>zr(t=>t instanceof r,e),"instanceOfType"),Ur=te.create,Wr=me.create,qn=Fe.create,Hn=he.create,Zr=ye.create,Jn=ge.create,Yn=Le.create,Xn=xe.create,Qn=ve.create,ei=re.create,ti=q.create,ri=F.create,ni=Re.create,ii=H.create,si=O.create,ai=O.strictCreate,oi=be.create,ci=ht.create,ui=_e.create,li=U.create,di=yt.create,fi=je.create,pi=Ve.create,mi=gt.create,hi=Te.create,yi=we.create,gi=ke.create,xi=Ee.create,vi=ne.create,bi=V.create,_i=R.create,Ti=W.create,wi=V.createWithPreprocess,ki=Xe.create,Ei=a(()=>Ur().optional(),"ostring"),Si=a(()=>Wr().optional(),"onumber"),Mi=a(()=>Zr().optional(),"oboolean"),Di={string:a(r=>te.create(b(u({},r),{coerce:!0})),"string"),number:a(r=>me.create(b(u({},r),{coerce:!0})),"number"),boolean:a(r=>ye.create(b(u({},r),{coerce:!0})),"boolean"),bigint:a(r=>he.create(b(u({},r),{coerce:!0})),"bigint"),date:a(r=>ge.create(b(u({},r),{coerce:!0})),"date")};var Ci=v;var Kr=Qe;var Na=Kr;var $a=Qe.enum(["ease-in","ease-out","ease-in-out","linear"]),qr=a(r=>r,"linearEase"),Ii=a(r=>r*r,"quadEaseIn"),Pi=a(r=>1-Math.cos(r*Math.PI/2),"easeIn"),Oi=a(r=>1-(1-r)*(1-r),"quadEaseOut"),Hr={linear:qr,"ease-in":Ii,"ease-out":Oi,"ease-in-out":Pi};function Ba(r,e,t,n,i,s=qr){if(e===t)return i;r=Math.max(e,Math.min(r,t));let o=(r-Math.min(e,t))/Math.abs(t-e),c=typeof s=="function"?s(o):Hr[s](o);return n+c*(i-n)}a(Ba,"interpolate");function Ai(r,e){let t=0;if(e.length<2)return t;let i=e[0]<e[1]?(s,o)=>s>o:(s,o)=>s<o;for(;t<e.length-1&&i(r,e[t+1]);)t++;return t>e.length-2?Math.max(0,e.length-2):t}a(Ai,"getInterpolationBreakpoint");function Ga(r,e,t,n="ease-in"){if(e.length!==t.length)throw new ot("Input and output ranges must have the same number of values.");r=Math.max(e[0],Math.min(r,e[e.length-1]));let i=Ai(r,e),s=(r-e[i])/(e[i+1]-e[i]),o=typeof n=="function"?n(s):Hr[n](s);return t[i]+o*(t[i+1]-t[i])}a(Ga,"interpolateMulti");f();f();function Ni(r){return(r%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}a(Ni,"normalizeAngle");f();f();f();f();f();f();f();f();var I=63710088e-1,po={centimeters:I*100,centimetres:I*100,degrees:I/111325,feet:I*3.28084,inches:I*39.37,kilometers:I/1e3,kilometres:I/1e3,meters:I,metres:I,miles:I/1609.344,millimeters:I*1e3,millimetres:I*1e3,nauticalmiles:I/1852,radians:1,yards:I*1.0936},mo={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/I,yards:1.0936133};function ie(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}a(ie,"feature");function Li(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Jr(r[0])||!Jr(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return ie(n,e,t)}a(Li,"point");function ho(r,e,t){t===void 0&&(t={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var c={type:"Polygon",coordinates:r};return ie(c,e,t)}a(ho,"polygon");function Ri(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return ie(n,e,t)}a(Ri,"lineString");function yo(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}a(yo,"featureCollection");function go(r,e,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:r};return ie(n,e,t)}a(go,"multiLineString");function xo(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return ie(n,e,t)}a(xo,"multiPolygon");function Jr(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}a(Jr,"isNumber");function mr(r,e,t){if(r!==null)for(var n,i,s,o,c,l,m,x=0,S=0,A,L=r.type,oe=L==="FeatureCollection",St=L==="Feature",un=oe?r.features.length:1,ce=0;ce<un;ce++){m=oe?r.features[ce].geometry:St?r.geometry:r,A=m?m.type==="GeometryCollection":!1,c=A?m.geometries.length:1;for(var Mt=0;Mt<c;Mt++){var B=0,ue=0;if(o=A?m.geometries[Mt]:m,o!==null){l=o.coordinates;var J=o.type;switch(x=t&&(J==="Polygon"||J==="MultiPolygon")?1:0,J){case null:break;case"Point":if(e(l,S,ce,B,ue)===!1)return!1;S++,B++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(e(l[n],S,ce,B,ue)===!1)return!1;S++,J==="MultiPoint"&&B++}J==="LineString"&&B++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-x;i++){if(e(l[n][i],S,ce,B,ue)===!1)return!1;S++}J==="MultiLineString"&&B++,J==="Polygon"&&ue++}J==="Polygon"&&B++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(ue=0,i=0;i<l[n].length;i++){for(s=0;s<l[n][i].length-x;s++){if(e(l[n][i][s],S,ce,B,ue)===!1)return!1;S++}ue++}B++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(mr(o.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}a(mr,"coordEach");function ko(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}a(ko,"featureEach");function ji(r,e){var t,n,i,s,o,c,l,m,x,S,A=0,L=r.type==="FeatureCollection",oe=r.type==="Feature",St=L?r.features.length:1;for(t=0;t<St;t++){for(c=L?r.features[t].geometry:oe?r.geometry:r,m=L?r.features[t].properties:oe?r.properties:{},x=L?r.features[t].bbox:oe?r.bbox:void 0,S=L?r.features[t].id:oe?r.id:void 0,l=c?c.type==="GeometryCollection":!1,o=l?c.geometries.length:1,i=0;i<o;i++){if(s=l?c.geometries[i]:c,s===null){if(e(null,A,m,x,S)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,A,m,x,S)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(e(s.geometries[n],A,m,x,S)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}A++}}a(ji,"geomEach");function Eo(r,e){ji(r,function(t,n,i,s,o){var c=t===null?null:t.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return e(ie(t,i,{bbox:s,id:o}),n,0)===!1?!1:void 0}var l;switch(c){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var m=0;m<t.coordinates.length;m++){var x=t.coordinates[m],S={type:l,coordinates:x};if(e(ie(S,i),n,m)===!1)return!1}})}a(Eo,"flattenEach");function hr(r){var e=[1/0,1/0,-1/0,-1/0];return mr(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}a(hr,"bbox");hr.default=hr;var Yr=hr;function Xr(r){return Yr(r)}a(Xr,"getBoundingBoxFromFeature");f();var yr="#ffffff",Vi=.1,Tt=.1,et,tt,rt,xr=class xr{constructor(e={}){d(this,"initialColor",yr);Y(this,et,yr);d(this,"initialTopColor");Y(this,tt);d(this,"topTexture");d(this,"texture");Y(this,rt);d(this,"dirty",!0);d(this,"visible",!0);d(this,"opacity",1);d(this,"width",Vi);d(this,"height",Tt);d(this,"initialHeight",Tt);d(this,"altitude",0);d(this,"join","round");d(this,"cap","round");d(this,"showImage",!0);d(this,"flipImageToFaceCamera",!0);d(this,"url");d(this,"side","double");d(this,"renderOrder",0);d(this,"shading");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.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,this.shading=e==null?void 0:e.shading}set color(e){lt(e)?X(this,et,e):le.warn('Failed to update color. Invalid color "'.concat(e,'".'))}get color(){return G(this,et)}set topColor(e){e===void 0||lt(e)?X(this,tt,e):le.warn('Failed to update top color. Invalid color "'.concat(e,'".'))}get topColor(){return G(this,tt)}set hoverColor(e){lt(e)?X(this,rt,e):le.warn('Failed to update hover color. Invalid color "'.concat(e,'".'))}get hoverColor(){return G(this,rt)}};et=new WeakMap,tt=new WeakMap,rt=new WeakMap,a(xr,"StyleComponent");var gr=xr;var vr=class vr extends Ar{constructor(){super(...arguments);d(this,"type","entityBatchedMesh");d(this,"userData",{entities:{}})}};a(vr,"EntityBatchedMesh");var wt=vr,nt,Ce,br=class br{constructor(e){d(this,"mesh");d(this,"imageMesh");d(this,"textMesh");d(this,"textEntityId");d(this,"type","geometry");d(this,"dirty",!0);d(this,"detached",!1);d(this,"instanceIndex",-1);d(this,"geometry");d(this,"batchedProps");d(this,"material");d(this,"feature");d(this,"currentHeight",Tt);d(this,"color",new ze);d(this,"topColor",new ze);d(this,"position",new C);d(this,"altitude",0);Y(this,nt,1);Y(this,Ce);d(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,t){this.color.set(e),this.topColor.set(t),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 opacity(){return G(this,nt)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let t=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of t)n.opacity=e,n.needsUpdate=!0}X(this,nt,e)}get texture(){var e,t;return(t=(e=this.material)==null?void 0:e.texture)==null?void 0:t.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,t;return(t=(e=this.material)==null?void 0:e.topTexture)==null?void 0:t.image.src}get topTextureInstance(){var e;return(e=this.material)==null?void 0:e.topTexture}set blendTexture(e){this.material&&(this.material.blendTexture=e)}get featureBbox(){return G(this,Ce)?G(this,Ce):(X(this,Ce,Xr(this.feature)),G(this,Ce))}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)}};nt=new WeakMap,Ce=new WeakMap,a(br,"MeshComponent");var Qr=br;var _r=class _r extends Q{constructor(t){super();d(this,"visible",!0);d(this,"type","geometry-group");d(this,"components",[]);d(this,"userData",{entityId:"",entities3D:new Set,dirty:!0,shadingDirty:!0});this.userData.entityId=t}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let t;for(let i of this.children)if(!i.userData.detached){t=i;break}return t instanceof wt?Object.values(t.userData.entities)[0]:void 0}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}))}get altitude(){return this.position.z}};a(_r,"GeometryGroupObject3D");var $=_r;f();var Tr=class Tr extends Q{};a(Tr,"Geometry2DObject3D");var se=Tr,wr=class wr{constructor(e,t,n=0){d(this,"id");d(this,"verticalOffset");d(this,"occluderId");d(this,"object3d",new se);d(this,"components");d(this,"disposed",!1);d(this,"worldPosition",new C);this.id=e.id||Ue(),this.components=[e],this.verticalOffset=n,this.object3d=new se,this.object3d.position.set(t.x,t.y,t.z+n),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type,this.positionDirty=!0}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get attachedTo(){return this.object3d.userData.attachedEntityId}get position(){return this.positionDirty&&(this.object3d.matrixAutoUpdate=!0,this.object3d.getWorldPosition(this.worldPosition),this.positionDirty=!1,this.object3d.matrixAutoUpdate=!1),this.worldPosition}get positionDirty(){return this.object3d.userData.worldPositionDirty}set positionDirty(e){this.object3d.userData.worldPositionDirty=e}updatePosition(e){this.object3d.position.copy(e),this.positionDirty=!0}setAltitude(e){this.object3d.position.z=e,this.positionDirty=!0}};a(wr,"Geometry2D");var it=wr;f();var kr=class kr extends Q{constructor(){super(...arguments);d(this,"type","geometry");d(this,"userData",{entityId:"",type:"geometry"})}raycast(t,n){this.userData.type==="model"&&this.children[0]&&t.intersectObject(this.children[0],!0).forEach(i=>{n.push(i)})}};a(kr,"Geometry3DObject3D");var kt=kr,Er=class Er{constructor(e,t){d(this,"id",Ue());d(this,"components");d(this,"entities2D",new Map);this.components=[e,t]}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}attach(e){this.parentObject3D instanceof $?e.object3d.userData.attachedEntityId=this.id:this.entities2D.set(e.id,e)}detach(e){this.parentObject3D instanceof $&&(e.object3d.userData.parentEntityId=void 0),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.detach(e)}};a(Er,"Geometry3D");var st=Er;var $e=class $e extends Q{constructor(t){super();d(this,"childrenIds",new Set);d(this,"children",[]);d(this,"type","group-container");d(this,"userData",{entityId:"",entities2D:new Set,dirty:!0,occluderDirty:!1,opacity:1,computedOpacity:1,preloadGeometry:!1});d(this,"components",[]);this.userData.entityId=t}addOccluderFeature(t,n){this.userData.occluderFeature=t,this.userData.occluderId=n,this.userData.occluderDirty=!0}addEntity(t){t instanceof $e?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof it?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id),t.positionDirty=!0):t instanceof $?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof st&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof $e?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof it?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof $?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof st&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}),this.set2DGeometryChildrenPositionDirty())}set2DGeometryChildrenPositionDirty(){this.children.forEach(t=>{t instanceof se?t.userData.worldPositionDirty=!0:t instanceof $e&&t.set2DGeometryChildrenPositionDirty()})}get altitude(){return this.position.z}setOpacity(t){this.userData.opacity=t}get opacity(){return this.userData.opacity}};a($e,"GroupContainerObject3D");var Be=$e;f();var gc={top:0,bottom:0,left:0,right:0,type:"pixel"},en="mappedin";var xc={ALWAYS_ON_TOP:10},vc=250;f();function Fi(r){let e=r.min,t=r.max,n=new C(e.x,e.y,e.z),i=new C(t.x,e.y,e.z),s=new C(e.x,t.y,e.z),o=new C(t.x,t.y,e.z);return[n,i,s,o]}a(Fi,"getCornersOfBoundingBox");f();function tn(r,e){let t;return typeof e=="string"||typeof e=="number"?(t=r.geometry2DMap.get(e),t==null&&(t=r.geometry3DMap.get(e))):typeof(e==null?void 0:e.id)=="string"||typeof(e==null?void 0:e.id)=="number"?(t=r.geometry2DMap.get(e.id),t==null&&(t=r.geometry3DMap.get(e.id))):t=e,t}a(tn,"getGeometryByGeometryId");function Mc(r,e,t=[],n=new Ct,i){(r.getSystems().renderSystem.threeDdirty||r.getSystems().renderSystem.twoDdirty)&&r.renderSync();let s=tn(r.getInternalState(),e);return rn(s,t,n,i),t}a(Mc,"getVerticesOfEntity");var Et=new C;function rn(r,e=[],t=new Ct,n){if(r.visible){if(r.isMesh||r.isLine||r.isPoints){let i=r.geometry;if(i.isBufferGeometry){let s=i.attributes.position;for(let o=0;o<s.count;o++)Et.fromBufferAttribute(s,o),n!==void 0&&(Et.z=n),e.push(Et.clone()),t.expandByPoint(Et)}}for(let i of r.children)rn(i,e,t,n)}}a(rn,"traverse");f();function $i(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}a($i,"getPixelRatio");f();function Bi(r,e,t=!1){let n=null,i=0;return function(...s){i++,i===1&&t===!0&&r(...s);let o=a(()=>{(!t||i>1)&&r(...s),n=null,i=0},"later");clearTimeout(n),n=setTimeout(o,e)}}a(Bi,"debounce");f();var Gi=(()=>{let r;return{getDeviceType(){if(r)return r;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(e),s=t==="iPad"||t.indexOf("Mac")===0&&n>0&&!window.MSStream,o=/android/i.test(e);return r={isIpad:s,isMobile:o||i||s,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},r},_reset(){r=void 0}}})(),nn=Gi.getDeviceType,sn=(()=>{let r,e,t;function n(){if(e!==void 0)return e;r||(r=document.createElement("canvas"));let s=r.getContext("webgl")||r.getContext("experimental-webgl");if(!s)return e;try{let o=nn().isFirefox?null:s.getExtension("WEBGL_debug_renderer_info");return e=o?s.getParameter(o.UNMASKED_RENDERER_WEBGL):s.getParameter(s.RENDERER),e}catch(o){let c=new Error("Failed getting device info");throw c.name="FailedGettingDeviceInfo",c}}a(n,"getInfo");function i(){var o,c;if(!nn().isWindows)return!1;if(t!==void 0)return t;let s=(c=(o=zi())==null?void 0:o.toLowerCase())!=null?c:"";return t=s.includes("intel")&&(s.includes("uhd")||s.includes("iris")),t}return a(i,"shouldDisableOffscreenCanvas"),{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(s){r=s,e=void 0,t=void 0}}})(),zi=sn.getInfo,Ui=sn.shouldDisableOffscreenCanvas;f();function Wi(r,e){let t={};for(let n=0;n<e.length;n++){let i=e[n];i in r&&(t[i]=r[i])}return t}a(Wi,"pick");function Zi(r){return Object.keys(r).length===0}a(Zi,"isEmpty");f();function ru(r,e,t,n){let i=r*(Math.PI/180),s=n/de,o=r+s*180/Math.PI,c=t/de/Math.cos(i),l=e+c*180/Math.PI;return{lat:o,lon:l}}a(ru,"cartesianToGeographic");function nu(r,e,t,n){let i=t*(Math.PI/180),s=n*(Math.PI/180),o=r*(Math.PI/180),c=e*(Math.PI/180),l=i-o,m=s-c,x=de*m*Math.cos(o),S=de*l;return{x,y:S}}a(nu,"geographicToCartesian");var Ki=a((r,e,t)=>{var n;if(r.children&&(r.visible||r instanceof Be&&r.userData.preloadGeometry))for(let i of r.children){if(i.visible&&i.type)if("entities3D"in i.userData&&((n=i.userData)!=null&&n.entities3D)&&i instanceof $){e.add(i.userData.entityId),i.userData.dirty&&t.add(i.userData.entityId);for(let s of i.userData.entities3D.values())e.add(s)}else(i.type==="group-container"||i.type==="custom-geometry"||i instanceof kt)&&e.add(i.userData.entityId);Ki(i,e,t)}return e},"populateGeometry3DIdsInScene"),qi=a((r,e)=>{var t;if(r.children&&r.visible&&!((t=r.userData)!=null&&t.hidden))for(let n of r.children)n.visible&&n instanceof se&&e.add(n.userData.entityId),qi(n,e);return e},"populateGeometry2DIdsInScene");function Hi(r,e){for(let t in e){if(e[t]==null){r[t]=void 0;continue}typeof e[t]=="object"?Hi(r[t],e[t]):r[t]=e[t]}return r}a(Hi,"mergeObjects");function iu(r,e,t){let n={translateX:r.x,translateY:r.y,translateZ:r.z,scale:r.meterInMercatorCoordinateUnits()},i=new It,s=new C(n.scale,-n.scale,n.scale),o=new It().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(s);return{id:en,type:"custom",renderingMode:"3d",render:a((c,l)=>{i.fromArray(l.defaultProjectionData.mainMatrix),e.projectionMatrix=i.multiply(o),t()},"render")}}a(iu,"createCustomLayer");function su(r,e=0){let t=3735928559^e,n=1103547991^e;for(let i=0,s;i<r.length;i++)s=r.charCodeAt(i),t=Math.imul(t^s,2654435761),n=Math.imul(n^s,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}a(su,"cyrb53");function au(r,e,t){let n=r*(Math.PI/180)/2,i=e/2;return t*Math.tan(n)/i}a(au,"getProjectionScaleFactor");function ou(r){return new Ir(new Dt(r[0][0],r[0][1]),new Dt(r[1][0],r[1][1])).getCenter().toArray()}a(ou,"getBoundingBoxCenter");function cu(r,e){return r<e||e<=12}a(cu,"shouldExpandZoomLevel");function uu(r){let e=1;return r.type==="geometry-group"&&r.parent!=null&&r.parent instanceof Be?e=r.parent.userData.computedOpacity:(r.type==="geometry"||r.type==="custom-geometry"||r.type==="model")&&r.parentObject3D!=null&&r.parentObject3D instanceof $&&r.parentObject3D.parent!=null&&r.parentObject3D.parent instanceof Be&&(e=r.parentObject3D.parent.userData.computedOpacity),e}a(uu,"getGroupContainerOpacity");function lu(r,e,t=1e-10){if(r.length!==e.length)return!1;let n=Math.abs(r[0]-e[0])<t,i=Math.abs(r[1]-e[1])<t;if(r.length===3&&e.length===3){let s=Math.abs(r[2]-e[2])<t;return n&&i&&s}return n&&i}a(lu,"coordinatesEqual");var Ji="maplibre-frustum-culling-hack";function du(){let r=new Or(.01,.01,.01),e=new Pr({opacity:0,depthWrite:!1,transparent:!0}),t=new Pt(r,e);return t.position.copy(new C(0,50,0)),t.frustumCulled=!1,t.name=Ji,t}a(du,"maplibreFrustrumCullHack");var ae=new C,an=new Ge;function fu(r,e,t=new at){return r.traverse(n=>{if(n instanceof Pt){let s=n.geometry.attributes.position;if(e.position.distanceTo(n.position)<e.near)return;for(let c=0;c<s.count;c++)ae.fromBufferAttribute(s,c),ae.applyMatrix4(n.matrixWorld),ae.applyMatrix4(e.matrixWorldInverse),ae.applyMatrix4(e.projectionMatrix),ae.z<1&&ae.z>0&&(an.set(ae.x,ae.y),t.expandByPoint(an))}}),t}a(fu,"projectToBox2D");function on(r,e){let t=e.clientWidth,n=e.clientHeight;return new Ge((r.x+1)*t/2,(1-r.y)*n/2)}a(on,"ndcToScreen");function pu(r,e,t){let n=document.createElement("div");n.style.position="absolute",n.style.border="2px solid ".concat(e),n.style.pointerEvents="none";let i=on(new Ge(r.min.x,r.min.y),t),s=on(new Ge(r.max.x,r.max.y),t);n.style.left="".concat(i.x,"px"),n.style.top="".concat(s.y,"px");let o=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);return n.style.width="".concat(o,"px"),n.style.height="".concat(c,"px"),t.appendChild(n),n}a(pu,"drawProjectedBox");f();var Mr=class Mr{constructor(e){d(this,"visible");d(this,"altitude");d(this,"color");d(this,"dirty",!0);d(this,"maxWidth");d(this,"maxHeight");d(this,"hoverByPolygon");d(this,"flipToFaceCamera",cn.flipToFaceCamera);d(this,"font");d(this,"fillOpacity");d(this,"fontSize");d(this,"margin");d(this,"outlineWidth");d(this,"outlineBlur");d(this,"outlineOffsetX");d(this,"strokeColor");d(this,"strokeOpacity");d(this,"strokeWidth");d(this,"hoverColor");d(this,"outlineOffsetY");d(this,"outlineColor");d(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let t={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(t[n]=this[n]);return t}};a(Mr,"Text3DStyleComponent");var Sr=Mr,cn=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});f();f();var Cr=class Cr{constructor(e){d(this,"dirty",!0);d(this,"visible",!0);d(this,"opacity",1);d(this,"verticalOffset",0);d(this,"interactive",!1);d(this,"color");d(this,"material");d(this,"rotation");d(this,"scale");e&&Object.assign(this,e)}};a(Cr,"ModelStyleComponnet");var Dr=Cr;f();var Yi=[1,1,1],Xi=[0,0,0];export{ie as a,Li as b,ho as c,Ri as d,yo as e,go as f,xo as g,ko as h,Eo as i,dn as j,le as k,de as l,ct as m,vs as n,bs as o,_s as p,mn as q,Ts as r,ws as s,Is as t,Ue as u,Ot as v,lt as w,Qe as x,Na as y,$a as z,qr as A,Pi as B,Ba as C,Ai as D,Ga as E,yr as F,gr as G,wt as H,Qr as I,$ as J,se as K,it as L,kt as M,st as N,Be as O,gc as P,xc as Q,vc as R,Fi as S,tn as T,Mc as U,$i as V,Bi as W,Ui as X,Wi as Y,Zi as Z,Ni as _,ru as $,nu as aa,Ki as ba,qi as ca,Hi as da,iu as ea,su as fa,au as ga,ou as ha,cu as ia,uu as ja,lu as ka,du as la,fu as ma,pu as na,Sr as oa,cn as pa,Dr as qa,Yi as ra,Xi as sa};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.create;var f=Object.defineProperty,n=Object.defineProperties,o=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var l=a=>{throw TypeError(a)};var h=(a,b,c)=>b in a?f(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,t=(a,b)=>{for(var c in b||(b={}))i.call(b,c)&&h(a,c,b[c]);if(g)for(var c of g(b))k.call(b,c)&&h(a,c,b[c]);return a},u=(a,b)=>n(a,p(b)),v=(a,b)=>f(a,"name",{value:b,configurable:!0});var w=(a,b)=>{var c={};for(var d in a)i.call(a,d)&&b.indexOf(d)<0&&(c[d]=a[d]);if(a!=null&&g)for(var d of g(a))b.indexOf(d)<0&&k.call(a,d)&&(c[d]=a[d]);return c};var x=(a,b)=>()=>(a&&(b=a(a=0)),b);var y=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),z=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0})},s=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of q(b))!i.call(a,e)&&e!==c&&f(a,e,{get:()=>b[e],enumerable:!(d=o(b,e))||d.enumerable});return a};var A=(a,b,c)=>(c=a!=null?m(r(a)):{},s(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));var B=(a,b,c)=>h(a,typeof b!="symbol"?b+"":b,c),j=(a,b,c)=>b.has(a)||l("Cannot "+c);var C=(a,b,c)=>(j(a,b,"read from private field"),c?c.call(a):b.get(a)),D=(a,b,c)=>b.has(a)?l("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),E=(a,b,c,d)=>(j(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c),F=(a,b,c)=>(j(a,b,"access private method"),c);export{t as a,u as b,v as c,w as d,x as e,y as f,z as g,A as h,B as i,C as j,D as k,E as l,F as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as y,_ as B,u as w,v as x,w as b}from"./chunk-MSQIQNNK.js";import{a as A}from"./chunk-DZU6L3QB.js";import{c as g}from"./chunk-CU2O7JF6.js";A();function R(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 B,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=T(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=T(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}g(R,"mergeGeometries");function T(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 y(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}g(T,"mergeAttributes");function X(o,l){if(l===w)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===b||l===x){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===b)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}g(X,"toTrianglesDrawMode");export{R as a,X as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e}from"./chunk-CU2O7JF6.js";var p,a=e(()=>{p={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.54"}}});export{a,p as b};
|