@synnaxlabs/drift 0.42.3 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -56
- package/dist/electron.cjs +1 -1
- package/dist/electron.js +9 -10
- package/dist/index.cjs +1 -1
- package/dist/index.js +219 -161
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{selectors-B00IQPYW.js → selectors-CzAkOydY.js} +1 -1
- package/dist/selectors-DrXQNVVN.cjs +1 -0
- package/dist/src/external.d.ts +3 -3
- package/dist/src/external.d.ts.map +1 -1
- package/dist/src/{noop/index.d.ts → noop.d.ts} +13 -9
- package/dist/src/noop.d.ts.map +1 -0
- package/dist/src/runtime.d.ts.map +1 -1
- package/dist/src/sync.d.ts.map +1 -1
- package/dist/src/window.d.ts +6 -6
- package/dist/src/window.d.ts.map +1 -1
- package/dist/state-BGByXBtX.cjs +61 -0
- package/dist/state-C1PObbun.js +13735 -0
- package/dist/tauri.cjs +1 -1
- package/dist/tauri.js +33 -34
- package/package.json +15 -19
- package/dist/noop.cjs +0 -1
- package/dist/noop.js +0 -68
- package/dist/selectors-CGCIf0Ac.cjs +0 -1
- package/dist/src/noop/index.d.ts.map +0 -1
- package/dist/state-BX_5GHgM.js +0 -406
- package/dist/state-xseZCh_u.cjs +0 -1
- package/dist/window-Bj8OM9F9.cjs +0 -41
- package/dist/window-DwJfMpbK.js +0 -8620
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";const $d=require("@reduxjs/toolkit"),ft=(e=!1,...t)=>{e&&console.log(...t)},ta=(e=!1,...t)=>{e&&console.group(...t)},Ln=e=>{e&&console.groupEnd()},bd=e=>{const t=e.replace(/_[a-z]/g,r=>r[1].toUpperCase());return t.length>1&&t[0]===t[0].toUpperCase()&&t[1]===t[1].toUpperCase()||t.length===0?t:t[0].toLowerCase()+t.slice(1)},na=e=>{const t=(r,i=Mn)=>{if(typeof r=="string")return e(r);if(Array.isArray(r))return r.map(a=>t(a,i));if(!An(r))return r;i=Id(i);const n={},o=r;return"toJSON"in o&&typeof o.toJSON=="function"?t(o.toJSON(),i):(Object.keys(o).forEach(a=>{let s=o[a];const u=e(a);i.recursive&&(An(s)?fo(s,i.keepTypesOnRecursion)||(s=t(s,i)):i.recursiveInArray&&lo(s)&&(s=[...s].map(c=>{let d=c;return An(c)?fo(d,i.keepTypesOnRecursion)||(d=t(c,i)):lo(c)&&(d=t({key:c},i).key),d}))),n[u]=s}),n)};return t},ra=na(bd),_d=e=>e.replace(/([a-z0-9])([A-Z])/g,(t,r,i)=>`${r}_${i.toLowerCase()}`),wd=na(_d),Mn={recursive:!0,recursiveInArray:!0,keepTypesOnRecursion:[Number,String,Uint8Array]},Id=(e=Mn)=>(e.recursive==null?e=Mn:e.recursiveInArray??(e.recursiveInArray=!1),e),lo=e=>e!=null&&Array.isArray(e),An=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),fo=(e,t)=>(t||[]).some(r=>e instanceof r),qt=e=>e!=null&&typeof e=="object"&&!Array.isArray(e);var kd=Object.defineProperty,Od=(e,t,r)=>t in e?kd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wt=(e,t,r)=>Od(e,typeof t!="symbol"?t+"":t,r);let Sd=class{constructor(){wt(this,"contentType","application/json"),wt(this,"decoder"),wt(this,"encoder"),this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(t){return this.encoder.encode(this.encodeString(t))}decode(t,r){return this.decodeString(this.decoder.decode(t),r)}decodeString(t,r){const i=JSON.parse(t),n=ra(i);return r!=null?r.parse(n):n}encodeString(t){const r=wd(t);return JSON.stringify(r,(i,n)=>ArrayBuffer.isView(n)?Array.from(n):typeof n=="bigint"?n.toString():n)}},zd=class{constructor(){wt(this,"contentType","text/csv")}encode(t){const r=this.encodeString(t);return new TextEncoder().encode(r)}decode(t,r){const i=new TextDecoder().decode(t);return this.decodeString(i,r)}encodeString(t){if(!Array.isArray(t)||t.length===0||!qt(t[0]))throw new Error("Payload must be an array of objects");const r=Object.keys(t[0]),i=[r.join(",")];return t.forEach(n=>{const o=r.map(a=>JSON.stringify(n[a]??""));i.push(o.join(","))}),i.join(`
|
|
2
|
+
`)}decodeString(t,r){const[i,...n]=t.trim().split(`
|
|
3
|
+
`).map(s=>s.trim());if(i.length===0)return r!=null?r.parse({}):{};const o=i.split(",").map(s=>s.trim()),a={};return o.forEach(s=>{a[s]=[]}),n.forEach(s=>{const u=s.split(",").map(c=>c.trim());o.forEach((c,d)=>{const f=this.parseValue(u[d]);f!=null&&a[c].push(f)})}),r!=null?r.parse(a):a}parseValue(t){if(t==null||t.length===0)return null;const r=Number(t);return isNaN(r)?t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t:r}},xd=class{constructor(){wt(this,"contentType","text/plain")}encode(t){if(typeof t!="string")throw new Error("TextCodec.encode payload must be a string");return new TextEncoder().encode(t)}decode(t,r){const i=new TextDecoder().decode(t);return r!=null?r.parse(i):i}};const Wn=new Sd;new zd;new xd;var Nd=Object.defineProperty,Td=(e,t,r)=>t in e?Nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ud=(e,t,r)=>Td(e,t+"",r);let at=class{constructor(t){Ud(this,"value"),this.value=t}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const Zd=e=>e!=null&&typeof e=="object"&&"toString"in e,jd=(e,t=!1)=>{const r=Zd(e)?"stringer":typeof e;let i;switch(r){case"string":i=(n,o)=>n.localeCompare(o);break;case"stringer":i=(n,o)=>n.toString().localeCompare(o.toString());break;case"number":i=(n,o)=>Number(n)-Number(o);break;case"bigint":i=(n,o)=>BigInt(n)-BigInt(o)>0n?1:-1;break;case"boolean":i=(n,o)=>Number(n)-Number(o);break;case"undefined":i=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return t?Ed(i):i},Ed=e=>(t,r)=>e(r,t);function l(e,t,r){function i(s,u){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,u);for(const d in a.prototype)d in s||Object.defineProperty(s,d,{value:a.prototype[d].bind(s)});s._zod.constr=a,s._zod.def=u}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(s){var u;const c=r!=null&&r.Parent?new o:this;i(c,s),(u=c._zod).deferred??(u.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>{var u,c;return r!=null&&r.Parent&&s instanceof r.Parent?!0:(c=(u=s==null?void 0:s._zod)==null?void 0:u.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}const ia=Symbol("zod_brand");let tt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};const Qt={};function de(e){return e&&Object.assign(Qt,e),Qt}function Pd(e){return e}function Dd(e){return e}function Ad(e){}function Rd(e){throw new Error}function Cd(e){}function sr(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function w(e,t="|"){return e.map(r=>U(r)).join(t)}function oa(e,t){return typeof t=="bigint"?t.toString():t}function mn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ve(e){return e==null}function pn(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function aa(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(e.toFixed(n).replace(".","")),a=Number.parseInt(t.toFixed(n).replace(".",""));return o%a/10**n}function E(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function st(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ld(e,t){return t?t.reduce((r,i)=>r==null?void 0:r[i],e):e}function Md(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function ur(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function Xe(e){return JSON.stringify(e)}function Ot(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const sa=mn(()=>{if(typeof navigator<"u"&&navigator!=null&&navigator.userAgent.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function en(e){if(Ot(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Ot(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Wd(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Bd=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},tn=new Set(["string","number","symbol"]),ua=new Set(["string","number","bigint","boolean","symbol","undefined"]);function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _e(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(i._zod.parent=e),i}function h(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Fd(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function U(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ca(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const la={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},da={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fa(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return _e(e,{...e._zod.def,shape:r,checks:[]})}function ma(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return _e(e,{...e._zod.def,shape:r,checks:[]})}function pa(e,t){const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return st(this,"shape",i),i},checks:[]};return _e(e,r)}function ha(e,t){return _e(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return st(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function va(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return _e(t,{...t._zod.def,shape:n,checks:[]})}function ga(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return _e(t,{...t._zod.def,shape:n,checks:[]})}function Qe(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r].continue!==!0)return!0;return!1}function he(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function mt(e){return typeof e=="string"?e:e==null?void 0:e.message}function ge(e,t,r){var i,n,o,a,s,u;const c={...e,path:e.path??[]};if(!e.message){const d=mt((o=(n=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:n.error)==null?void 0:o.call(n,e))??mt((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??mt((s=r.customError)==null?void 0:s.call(r,e))??mt((u=r.localeError)==null?void 0:u.call(r,e))??"Invalid input";c.message=d}return delete c.inst,delete c.continue,t!=null&&t.reportInput||delete c.input,c}function hn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function vn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function nt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Jd(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}class Vd{constructor(...t){}}const qd=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:da,Class:Vd,NUMBER_FORMAT_RANGES:la,aborted:Qe,allowsEval:sa,assert:Cd,assertEqual:Pd,assertIs:Ad,assertNever:Rd,assertNotEqual:Dd,assignProp:st,cached:mn,cleanEnum:Jd,cleanRegex:pn,clone:_e,createTransparentProxy:Fd,defineLazy:E,esc:Xe,escapeRegex:qe,extend:pa,finalizeIssue:ge,floatSafeRemainder:aa,getElementAtPath:Ld,getEnumValues:sr,getLengthableOrigin:vn,getParsedType:Bd,getSizableOrigin:hn,isObject:Ot,isPlainObject:en,issue:nt,joinValues:w,jsonStringifyReplacer:oa,merge:ha,normalizeParams:h,nullish:Ve,numKeys:Wd,omit:ma,optionalKeys:ca,partial:va,pick:fa,prefixIssues:he,primitiveTypes:ua,promiseAllObject:Md,propertyKeyTypes:tn,randomString:ur,required:ga,stringifyPrimitive:U,unwrapMessage:mt},Symbol.toStringTag,{value:"Module"})),ya=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,oa,2)},enumerable:!0})},cr=l("$ZodError",ya),jt=l("$ZodError",ya,{Parent:Error});function lr(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function dr(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)i._errors.push(r(a));else{let s=i,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return n(e),i}function $a(e,t){const r=t||function(o){return o.message},i={errors:[]},n=(o,a=[])=>{var s,u;for(const c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>n({issues:d},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{const d=[...a,...c.path];if(d.length===0){i.errors.push(r(c));continue}let f=i,$=0;for(;$<d.length;){const p=d[$],k=$===d.length-1;typeof p=="string"?(f.properties??(f.properties={}),(s=f.properties)[p]??(s[p]={errors:[]}),f=f.properties[p]):(f.items??(f.items=[]),(u=f.items)[p]??(u[p]={errors:[]}),f=f.items[p]),k&&f.errors.push(r(c)),$++}}};return n(e),i}function ba(e){const t=[];for(const r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function _a(e){var t;const r=[],i=[...e.issues].sort((n,o)=>n.path.length-o.path.length);for(const n of i)r.push(`✖ ${n.message}`),(t=n.path)!=null&&t.length&&r.push(` → at ${ba(n.path)}`);return r.join(`
|
|
4
|
+
`)}const fr=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new tt;if(a.issues.length){const s=new((n==null?void 0:n.Err)??e)(a.issues.map(u=>ge(u,o,de())));throw Error.captureStackTrace(s,n==null?void 0:n.callee),s}return a.value},Bn=fr(jt),mr=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new((n==null?void 0:n.Err)??e)(a.issues.map(u=>ge(u,o,de())));throw Error.captureStackTrace(s,n==null?void 0:n.callee),s}return a.value},Fn=mr(jt),pr=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new tt;return o.issues.length?{success:!1,error:new(e??cr)(o.issues.map(a=>ge(a,n,de())))}:{success:!0,data:o.value}},wa=pr(jt),hr=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>ge(a,n,de())))}:{success:!0,data:o.value}},Ia=hr(jt),ka=/^[cC][^\s-]{8,}$/,Oa=/^[0-9a-z]+$/,Sa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,za=/^[0-9a-vA-V]{20}$/,xa=/^[A-Za-z0-9]{27}$/,Na=/^[a-zA-Z0-9_-]{21}$/,Ta=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gd=/^[-+]?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)?)??$/,Ua=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,rt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Kd=rt(4),Yd=rt(6),Xd=rt(7),Za=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hd=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qd=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ef=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,tf=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ja="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ea(){return new RegExp(ja,"u")}const Pa=/^(?:(?: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])$/,Da=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Aa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ra=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ca=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vr=/^[A-Za-z0-9_-]*$/,La=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,nf=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ma=/^\+(?:[0-9]){6,14}[0-9]$/,Wa="(?:(?:\\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])))",Ba=new RegExp(`^${Wa}$`);function Fa(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ja(e){return new RegExp(`^${Fa(e)}$`)}function Va(e){const t=Fa({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Wa}T(?:${i})$`)}const qa=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ga=/^\d+n?$/,Ka=/^\d+$/,Ya=/^-?\d+(?:\.\d+)?/i,Xa=/true|false/i,Ha=/null/i,Qa=/undefined/i,es=/^[^A-Z]*$/,ts=/^[^a-z]*$/,ns=Object.freeze(Object.defineProperty({__proto__:null,_emoji:ja,base64:Ca,base64url:vr,bigint:Ga,boolean:Xa,browserEmail:tf,cidrv4:Aa,cidrv6:Ra,cuid:ka,cuid2:Oa,date:Ba,datetime:Va,domain:nf,duration:Ta,e164:Ma,email:Za,emoji:Ea,extendedDuration:Gd,guid:Ua,hostname:La,html5Email:Hd,integer:Ka,ipv4:Pa,ipv6:Da,ksuid:xa,lowercase:es,nanoid:Na,null:Ha,number:Ya,rfc5322Email:Qd,string:qa,time:Ja,ulid:Sa,undefined:Qa,unicodeEmail:ef,uppercase:ts,uuid:rt,uuid4:Kd,uuid6:Yd,uuid7:Xd,xid:za},Symbol.toStringTag,{value:"Module"})),te=l("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rs={number:"number",bigint:"bigint",object:"date"},gr=l("$ZodCheckLessThan",(e,t)=>{te.init(e,t);const r=rs[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yr=l("$ZodCheckGreaterThan",(e,t)=>{te.init(e,t);const r=rs[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),is=l("$ZodCheckMultipleOf",(e,t)=>{te.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):aa(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),os=l("$ZodCheckNumberFormat",(e,t)=>{var r;te.init(e,t),t.format=t.format||"float64";const i=(r=t.format)==null?void 0:r.includes("int"),n=i?"int":"number",[o,a]=la[t.format];e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=a,i&&(u.pattern=Ka)}),e._zod.check=s=>{const u=s.value;if(i){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>a&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inst:e})}}),as=l("$ZodCheckBigIntFormat",(e,t)=>{te.init(e,t);const[r,i]=da[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),ss=l("$ZodCheckMaxSize",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.size!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;i.size<=t.maximum||r.issues.push({origin:hn(i),code:"too_big",maximum:t.maximum,input:i,inst:e,continue:!t.abort})}}),us=l("$ZodCheckMinSize",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.size!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;i.size>=t.minimum||r.issues.push({origin:hn(i),code:"too_small",minimum:t.minimum,input:i,inst:e,continue:!t.abort})}}),cs=l("$ZodCheckSizeEquals",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.size!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=r=>{const i=r.value,n=i.size;if(n===t.size)return;const o=n>t.size;r.issues.push({origin:hn(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},input:r.value,inst:e,continue:!t.abort})}}),ls=l("$ZodCheckMaxLength",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const n=vn(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ds=l("$ZodCheckMinLength",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const n=vn(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),fs=l("$ZodCheckLengthEquals",(e,t)=>{te.init(e,t),e._zod.when=r=>{const i=r.value;return!Ve(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,n=i.length;if(n===t.length)return;const o=vn(i),a=n>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},input:r.value,inst:e,continue:!t.abort})}}),Et=l("$ZodCheckStringFormat",(e,t)=>{var r;te.init(e,t),e._zod.onattach.push(i=>{const n=i._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),(r=e._zod).check??(r.check=i=>{if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})})}),ms=l("$ZodCheckRegex",(e,t)=>{Et.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ps=l("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=es),Et.init(e,t)}),hs=l("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ts),Et.init(e,t)}),vs=l("$ZodCheckIncludes",(e,t)=>{te.init(e,t);const r=qe(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),gs=l("$ZodCheckStartsWith",(e,t)=>{te.init(e,t);const r=new RegExp(`^${qe(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),ys=l("$ZodCheckEndsWith",(e,t)=>{te.init(e,t);const r=new RegExp(`.*${qe(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function mo(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues))}const $s=l("$ZodCheckProperty",(e,t)=>{te.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>mo(n,r,t.property));mo(i,r,t.property)}}),bs=l("$ZodCheckMimeType",(e,t)=>{te.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,path:["type"],inst:e})}}),_s=l("$ZodCheckOverwrite",(e,t)=>{te.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class ws{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
5
|
+
`).filter(o=>o),i=Math.min(...r.map(o=>o.length-o.trimStart().length)),n=r.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(const o of n)this.content.push(o)}compile(){const t=Function,r=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(n=>` ${n}`)];return new t(...r,i.join(`
|
|
6
|
+
`))}}const Is={major:4,minor:0,patch:0},N=l("$ZodType",(e,t)=>{var r,i;e??(e={}),E(e._zod,"id",()=>t.type+"_"+ur(10)),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Is;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const a of o._zod.onattach)a(e);if(n.length===0)(i=e._zod).deferred??(i.deferred=[]),(r=e._zod.deferred)==null||r.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,s,u)=>{let c=Qe(a),d;for(const f of s){if(f._zod.when){if(!f._zod.when(a))continue}else if(c)continue;const $=a.issues.length,p=f._zod.check(a);if(p instanceof Promise&&(u==null?void 0:u.async)===!1)throw new tt;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,a.issues.length!==$&&(c||(c=Qe(a,$)))});else{if(a.issues.length===$)continue;c||(c=Qe(a,$))}}return d?d.then(()=>a):a};e._zod.run=(a,s)=>{const u=e._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new tt;return u.then(c=>o(c,n,s))}return o(u,n,s)}}e["~standard"]={validate:o=>{var a;try{const s=wa(e,o);return s.success?{value:s.data}:{issues:(a=s.error)==null?void 0:a.issues}}catch{return Ia(e,o).then(s=>{var u;return s.success?{value:s.data}:{issues:(u=s.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}}),Pt=l("$ZodString",(e,t)=>{var r;N.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??qa(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),B=l("$ZodStringFormat",(e,t)=>{Et.init(e,t),Pt.init(e,t)}),ks=l("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ua),B.init(e,t)}),Os=l("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=rt(r))}else t.pattern??(t.pattern=rt());B.init(e,t)}),Ss=l("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Za),B.init(e,t)}),zs=l("$ZodURL",(e,t)=>{B.init(e,t),e._zod.check=r=>{try{const i=new URL(r.value);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:La.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}));return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),xs=l("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ea()),B.init(e,t)}),Ns=l("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Na),B.init(e,t)}),Ts=l("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ka),B.init(e,t)}),Us=l("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Oa),B.init(e,t)}),Zs=l("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sa),B.init(e,t)}),js=l("$ZodXID",(e,t)=>{t.pattern??(t.pattern=za),B.init(e,t)}),Es=l("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=xa),B.init(e,t)}),Ps=l("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Va(t)),B.init(e,t),e._zod.check}),Ds=l("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ba),B.init(e,t)}),As=l("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ja(t)),B.init(e,t),e._zod.check}),Rs=l("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ta),B.init(e,t)}),Cs=l("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Pa),B.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),Ls=l("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Da),B.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ms=l("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Aa),B.init(e,t)}),Ws=l("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ra),B.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function $r(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Bs=l("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ca),B.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{$r(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Fs(e){if(!vr.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return $r(r)}const Js=l("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vr),B.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{Fs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Vs=l("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ma),B.init(e,t)});function qs(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r,n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const Gs=l("$ZodJWT",(e,t)=>{B.init(e,t),e._zod.check=r=>{qs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),br=l("$ZodNumber",(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ya,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Ks=l("$ZodNumber",(e,t)=>{os.init(e,t),br.init(e,t)}),_r=l("$ZodBoolean",(e,t)=>{N.init(e,t),e._zod.pattern=Xa,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),wr=l("$ZodBigInt",(e,t)=>{N.init(e,t),e._zod.pattern=Ga,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}const{value:n}=r;return typeof n=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:n,inst:e}),r}}),Ys=l("$ZodBigInt",(e,t)=>{as.init(e,t),wr.init(e,t)}),Xs=l("$ZodSymbol",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const{value:n}=r;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Hs=l("$ZodUndefined",(e,t)=>{N.init(e,t),e._zod.pattern=Qa,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{const{value:n}=r;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Qs=l("$ZodNull",(e,t)=>{N.init(e,t),e._zod.pattern=Ha,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const{value:n}=r;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),eu=l("$ZodAny",(e,t)=>{N.init(e,t),e._zod.parse=r=>r}),nn=l("$ZodUnknown",(e,t)=>{N.init(e,t),e._zod.parse=r=>r}),tu=l("$ZodNever",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),nu=l("$ZodVoid",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const{value:n}=r;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ru=l("$ZodDate",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function po(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}const Ir=l("$ZodArray",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const s=n[a],u=t.element._zod.run({value:s,issues:[]},i);u instanceof Promise?o.push(u.then(c=>po(c,r,a))):po(u,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Ct(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}function ho(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...he(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const iu=l("$ZodObject",(e,t)=>{N.init(e,t);const r=mn(()=>{const d=Object.keys(t.shape);for(const $ of d)if(!(t.shape[$]instanceof N))throw new Error(`Invalid element at key "${$}": expected a Zod schema`);const f=ca(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});E(e._zod,"propValues",()=>{const d=t.shape,f={};for(const $ in d){const p=d[$]._zod;if(p.values){f[$]??(f[$]=new Set);for(const k of p.values)f[$].add(k)}}return f});const i=d=>{const f=new ws(["shape","payload","ctx"]),{keys:$,optionalKeys:p}=r.value,k=_=>{const g=Xe(_);return`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`};f.write("const input = payload.value;");const O=Object.create(null);for(const _ of $)O[_]=ur(15);f.write("const newResult = {}");for(const _ of $)if(p.has(_)){const g=O[_];f.write(`const ${g} = ${k(_)};`);const I=Xe(_);f.write(`
|
|
7
|
+
if (${g}.issues.length) {
|
|
8
|
+
if (input[${I}] === undefined) {
|
|
9
|
+
if (${I} in input) {
|
|
10
|
+
newResult[${I}] = undefined;
|
|
11
|
+
}
|
|
12
|
+
} else {
|
|
13
|
+
payload.issues = payload.issues.concat(
|
|
14
|
+
${g}.issues.map((iss) => ({
|
|
15
|
+
...iss,
|
|
16
|
+
path: iss.path ? [${I}, ...iss.path] : [${I}],
|
|
17
|
+
}))
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
} else if (${g}.value === undefined) {
|
|
21
|
+
if (${I} in input) newResult[${I}] = undefined;
|
|
22
|
+
} else {
|
|
23
|
+
newResult[${I}] = ${g}.value;
|
|
24
|
+
}
|
|
25
|
+
`)}else{const g=O[_];f.write(`const ${g} = ${k(_)};`),f.write(`
|
|
26
|
+
if (${g}.issues.length) payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
|
|
27
|
+
...iss,
|
|
28
|
+
path: iss.path ? [${Xe(_)}, ...iss.path] : [${Xe(_)}]
|
|
29
|
+
})));`),f.write(`newResult[${Xe(_)}] = ${g}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");const m=f.compile();return(_,g)=>m(d,_,g)};let n;const o=Ot,a=!Qt.jitless,s=a&&sa.value,{catchall:u}=t;let c;e._zod.parse=(d,f)=>{c??(c=r.value);const $=d.value;if(!o($))return d.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),d;const p=[];if(a&&s&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)n||(n=i(t.shape)),d=n(d,f);else{d.value={};const g=c.shape;for(const I of c.keys){const S=g[I],P=S._zod.run({value:$[I],issues:[]},f),ae=S._zod.optin==="optional"&&S._zod.optout==="optional";P instanceof Promise?p.push(P.then(je=>ae?ho(je,d,I,$):Ct(je,d,I))):ae?ho(P,d,I,$):Ct(P,d,I)}}if(!u)return p.length?Promise.all(p).then(()=>d):d;const k=[],O=c.keySet,m=u._zod,_=m.def.type;for(const g of Object.keys($)){if(O.has(g))continue;if(_==="never"){k.push(g);continue}const I=m.run({value:$[g],issues:[]},f);I instanceof Promise?p.push(I.then(S=>Ct(S,d,g))):Ct(I,d,g)}return k.length&&d.issues.push({code:"unrecognized_keys",keys:k,input:$,inst:e}),p.length?Promise.all(p).then(()=>d):d}});function vo(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>ge(o,i,de())))}),t}const kr=l("$ZodUnion",(e,t)=>{N.init(e,t),E(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>pn(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const a of t.options){const s=a._zod.run({value:r.value,issues:[]},i);if(s instanceof Promise)o.push(s),n=!0;else{if(s.issues.length===0)return s;o.push(s)}}return n?Promise.all(o).then(a=>vo(a,r,e,i)):vo(o,r,e,i)}}),ou=l("$ZodDiscriminatedUnion",(e,t)=>{kr.init(e,t);const r=e._zod.parse;E(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[s,u]of Object.entries(a)){n[s]||(n[s]=new Set);for(const c of u)n[s].add(c)}}return n});const i=mn(()=>{const n=t.options,o=new Map;for(const a of n){const s=a._zod.propValues[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const u of s){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!Ot(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const s=i.value.get(a==null?void 0:a[t.discriminator]);return s?s._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[t.discriminator],inst:e}),n)}}),au=l("$ZodIntersection",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const{value:n}=r,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,u])=>go(r,s,u)):go(r,o,a)}});function Jn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(en(e)&&en(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=Jn(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=Jn(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function go(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Qe(e))return e;const i=Jn(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const gn=l("$ZodTuple",(e,t)=>{N.init(e,t);const r=t.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,o)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const s=[];if(!t.rest){const c=a.length>r.length,d=a.length<i-1;if(c||d)return n.issues.push({input:a,inst:e,origin:"array",...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let u=-1;for(const c of r){if(u++,u>=a.length&&u>=i)continue;const d=c._zod.run({value:a[u],issues:[]},o);d instanceof Promise?s.push(d.then(f=>Lt(f,n,u))):Lt(d,n,u)}if(t.rest){const c=a.slice(r.length);for(const d of c){u++;const f=t.rest._zod.run({value:d,issues:[]},o);f instanceof Promise?s.push(f.then($=>Lt($,n,u))):Lt(f,n,u)}}return s.length?Promise.all(s).then(()=>n):n}});function Lt(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}const su=l("$ZodRecord",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!en(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[];if(t.keyType._zod.values){const a=t.keyType._zod.values;r.value={};for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){const c=t.valueType._zod.run({value:n[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...he(u,d.issues)),r.value[u]=d.value})):(c.issues.length&&r.issues.push(...he(u,c.issues)),r.value[u]=c.value)}let s;for(const u in n)a.has(u)||(s=s??[],s.push(u));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:s})}else{r.value={};for(const a of Reflect.ownKeys(n)){if(a==="__proto__")continue;const s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(c=>ge(c,i,de())),input:a,path:[a],inst:e}),r.value[s.value]=s.value;continue}const u=t.valueType._zod.run({value:n[a],issues:[]},i);u instanceof Promise?o.push(u.then(c=>{c.issues.length&&r.issues.push(...he(a,c.issues)),r.value[s.value]=c.value})):(u.issues.length&&r.issues.push(...he(a,u.issues)),r.value[s.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),uu=l("$ZodMap",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,s]of n){const u=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([d,f])=>{yo(d,f,r,a,n,e,i)})):yo(u,c,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function yo(e,t,r,i,n,o,a){e.issues.length&&(tn.has(typeof i)?r.issues.push(...he(i,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:e.issues.map(s=>ge(s,a,de()))})),t.issues.length&&(tn.has(typeof i)?r.issues.push(...he(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>ge(s,a,de()))})),r.value.set(e.value,t.value)}const cu=l("$ZodSet",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(u=>$o(u,r))):$o(s,r)}return o.length?Promise.all(o).then(()=>r):r}});function $o(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const lu=l("$ZodEnum",(e,t)=>{N.init(e,t);const r=sr(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>tn.has(typeof i)).map(i=>typeof i=="string"?qe(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),du=l("$ZodLiteral",(e,t)=>{N.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qe(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),fu=l("$ZodFile",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Or=l("$ZodTransform",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(o=>(r.value=o,r));if(n instanceof Promise)throw new tt;return r.value=n,r}}),mu=l("$ZodOptional",(e,t)=>{N.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${pn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>r.value===void 0?r:t.innerType._zod.run(r,i)}),pu=l("$ZodNullable",(e,t)=>{N.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${pn(r.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),hu=l("$ZodDefault",(e,t)=>{N.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>bo(o,t)):bo(n,t)}});function bo(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const vu=l("$ZodPrefault",(e,t)=>{N.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),gu=l("$ZodNonOptional",(e,t)=>{N.init(e,t),E(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>_o(o,e)):_o(n,e)}});function _o(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yu=l("$ZodSuccess",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),$u=l("$ZodCatch",(e,t)=>{N.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>ge(a,i,de()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>ge(o,i,de()))},input:r.value}),r.issues=[]),r)}}),bu=l("$ZodNaN",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Sr=l("$ZodPipe",(e,t)=>{N.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>wo(o,t,i)):wo(n,t,i)}});function wo(e,t,r){return Qe(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const _u=l("$ZodReadonly",(e,t)=>{N.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Io):Io(n)}});function Io(e){return e.value=Object.freeze(e.value),e}const wu=l("$ZodTemplateLiteral",(e,t)=>{N.init(e,t);const r=[];for(const i of t.parts)if(i instanceof N){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||ua.has(typeof i))r.push(qe(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:"template_literal",pattern:e._zod.pattern.source}),i)}),Iu=l("$ZodPromise",(e,t)=>{N.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),ku=l("$ZodLazy",(e,t)=>{N.init(e,t),E(e._zod,"innerType",()=>t.getter()),E(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),E(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),E(e._zod,"optin",()=>e._zod.innerType._zod.optin),E(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Ou=l("$ZodCustom",(e,t)=>{te.init(e,t),N.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>ko(o,r,i,e));ko(n,r,i,e)}});function ko(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(nt(n))}}const Su=Symbol("ZodOutput"),zu=Symbol("ZodInput");class zr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}remove(t){return this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function xr(){return new zr}const Pe=xr();function xu(e,t){return new e({type:"string",...h(t)})}function Nu(e,t){return new e({type:"string",coerce:!0,...h(t)})}function Nr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...h(t)})}function rn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...h(t)})}function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...h(t)})}function Ur(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...h(t)})}function Zr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...h(t)})}function jr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...h(t)})}function Er(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...h(t)})}function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...h(t)})}function Dr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...h(t)})}function Ar(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...h(t)})}function Rr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...h(t)})}function Cr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...h(t)})}function Lr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...h(t)})}function Mr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...h(t)})}function Wr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...h(t)})}function Br(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...h(t)})}function Fr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...h(t)})}function Jr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...h(t)})}function Vr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...h(t)})}function qr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...h(t)})}function Gr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...h(t)})}function Kr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...h(t)})}const Tu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Uu(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...h(t)})}function Zu(e,t){return new e({type:"string",format:"date",check:"string_format",...h(t)})}function ju(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...h(t)})}function Eu(e,t){return new e({type:"string",format:"duration",check:"string_format",...h(t)})}function Pu(e,t){return new e({type:"number",checks:[],...h(t)})}function Du(e,t){return new e({type:"number",coerce:!0,checks:[],...h(t)})}function Au(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...h(t)})}function Ru(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...h(t)})}function Cu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...h(t)})}function Lu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...h(t)})}function Mu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...h(t)})}function Wu(e,t){return new e({type:"boolean",...h(t)})}function Bu(e,t){return new e({type:"boolean",coerce:!0,...h(t)})}function Fu(e,t){return new e({type:"bigint",...h(t)})}function Ju(e,t){return new e({type:"bigint",coerce:!0,...h(t)})}function Vu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...h(t)})}function qu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...h(t)})}function Gu(e,t){return new e({type:"symbol",...h(t)})}function Ku(e,t){return new e({type:"undefined",...h(t)})}function Yu(e,t){return new e({type:"null",...h(t)})}function Xu(e){return new e({type:"any"})}function on(e){return new e({type:"unknown"})}function Hu(e,t){return new e({type:"never",...h(t)})}function Qu(e,t){return new e({type:"void",...h(t)})}function ec(e,t){return new e({type:"date",...h(t)})}function tc(e,t){return new e({type:"date",coerce:!0,...h(t)})}function nc(e,t){return new e({type:"nan",...h(t)})}function Le(e,t){return new gr({check:"less_than",...h(t),value:e,inclusive:!1})}function ve(e,t){return new gr({check:"less_than",...h(t),value:e,inclusive:!0})}function Me(e,t){return new yr({check:"greater_than",...h(t),value:e,inclusive:!1})}function fe(e,t){return new yr({check:"greater_than",...h(t),value:e,inclusive:!0})}function rc(e){return Me(0,e)}function ic(e){return Le(0,e)}function oc(e){return ve(0,e)}function ac(e){return fe(0,e)}function St(e,t){return new is({check:"multiple_of",...h(t),value:e})}function yn(e,t){return new ss({check:"max_size",...h(t),maximum:e})}function zt(e,t){return new us({check:"min_size",...h(t),minimum:e})}function Yr(e,t){return new cs({check:"size_equals",...h(t),size:e})}function $n(e,t){return new ls({check:"max_length",...h(t),maximum:e})}function it(e,t){return new ds({check:"min_length",...h(t),minimum:e})}function bn(e,t){return new fs({check:"length_equals",...h(t),length:e})}function Xr(e,t){return new ms({check:"string_format",format:"regex",...h(t),pattern:e})}function Hr(e){return new ps({check:"string_format",format:"lowercase",...h(e)})}function Qr(e){return new hs({check:"string_format",format:"uppercase",...h(e)})}function ei(e,t){return new vs({check:"string_format",format:"includes",...h(t),includes:e})}function ti(e,t){return new gs({check:"string_format",format:"starts_with",...h(t),prefix:e})}function ni(e,t){return new ys({check:"string_format",format:"ends_with",...h(t),suffix:e})}function sc(e,t,r){return new $s({check:"property",property:e,schema:t,...h(r)})}function ri(e,t){return new bs({check:"mime_type",mime:e,...h(t)})}function Ge(e){return new _s({check:"overwrite",tx:e})}function ii(e){return Ge(t=>t.normalize(e))}function oi(){return Ge(e=>e.trim())}function ai(){return Ge(e=>e.toLowerCase())}function si(){return Ge(e=>e.toUpperCase())}function ui(e,t,r){return new e({type:"array",element:t,...h(r)})}function rf(e,t,r){return new e({type:"union",options:t,...h(r)})}function of(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...h(i)})}function af(e,t,r){return new e({type:"intersection",left:t,right:r})}function uc(e,t,r,i){const n=r instanceof N,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...h(o)})}function sf(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...h(i)})}function uf(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...h(i)})}function cf(e,t,r){return new e({type:"set",valueType:t,...h(r)})}function lf(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...h(r)})}function df(e,t,r){return new e({type:"enum",entries:t,...h(r)})}function ff(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...h(r)})}function cc(e,t){return new e({type:"file",...h(t)})}function mf(e,t){return new e({type:"transform",transform:t})}function pf(e,t){return new e({type:"optional",innerType:t})}function hf(e,t){return new e({type:"nullable",innerType:t})}function vf(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function gf(e,t,r){return new e({type:"nonoptional",innerType:t,...h(r)})}function yf(e,t){return new e({type:"success",innerType:t})}function $f(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function bf(e,t,r){return new e({type:"pipe",in:t,out:r})}function _f(e,t){return new e({type:"readonly",innerType:t})}function wf(e,t,r){return new e({type:"template_literal",parts:t,...h(r)})}function If(e,t){return new e({type:"lazy",getter:t})}function kf(e,t){return new e({type:"promise",innerType:t})}function lc(e,t,r){const i=h(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function dc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...h(r)})}function fc(e,t){const{case:r,error:i,truthy:n,falsy:o}=h(t);let a=n??["true","1","yes","on","y","enabled"],s=o??["false","0","no","off","n","disabled"];r!=="sensitive"&&(a=a.map(m=>typeof m=="string"?m.toLowerCase():m),s=s.map(m=>typeof m=="string"?m.toLowerCase():m));const u=new Set(a),c=new Set(s),d=e.Pipe??Sr,f=e.Boolean??_r,$=e.String??Pt,p=e.Transform??Or,k=new p({type:"transform",transform:(m,_)=>{let g=m;return r!=="sensitive"&&(g=g.toLowerCase()),u.has(g)?!0:c.has(g)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...u,...c],input:_.value,inst:k}),{})},error:i}),O=new d({type:"pipe",in:new $({type:"string",error:i}),out:k,error:i});return new d({type:"pipe",in:O,out:new f({type:"boolean",error:i}),error:i})}const ci=l("ZodISODateTime",(e,t)=>{Ps.init(e,t),J.init(e,t)});function mc(e){return Uu(ci,e)}const li=l("ZodISODate",(e,t)=>{Ds.init(e,t),J.init(e,t)});function pc(e){return Zu(li,e)}const di=l("ZodISOTime",(e,t)=>{As.init(e,t),J.init(e,t)});function hc(e){return ju(di,e)}const fi=l("ZodISODuration",(e,t)=>{Rs.init(e,t),J.init(e,t)});function vc(e){return Eu(fi,e)}const Of=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:li,ZodISODateTime:ci,ZodISODuration:fi,ZodISOTime:di,date:pc,datetime:mc,duration:vc,time:hc},Symbol.toStringTag,{value:"Module"})),gc=(e,t)=>{cr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>dr(e,r)},flatten:{value:r=>lr(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},Sf=l("ZodError",gc),Dt=l("ZodError",gc,{Parent:Error}),yc=fr(Dt),$c=mr(Dt),bc=pr(Dt),_c=hr(Dt),j=l("ZodType",(e,t)=>(N.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>_e(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>yc(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>bc(e,r,i),e.parseAsync=async(r,i)=>$c(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>_c(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(il(r,i)),e.superRefine=r=>e.check(ol(r)),e.overwrite=r=>e.check(Ge(r)),e.optional=()=>sn(e),e.nullable=()=>un(e),e.nullish=()=>sn(un(e)),e.nonoptional=r=>Vc(e,r),e.array=()=>At(e),e.or=r=>Y([e,r]),e.and=r=>Ec(e,r),e.transform=r=>cn(e,Ri(r)),e.default=r=>Bc(e,r),e.prefault=r=>Jc(e,r),e.catch=r=>Kc(e,r),e.pipe=r=>cn(e,r),e.readonly=()=>Hc(e),e.describe=r=>{const i=e.clone();return Pe.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=Pe.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Pe.get(e);const i=e.clone();return Pe.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),mi=l("_ZodString",(e,t)=>{Pt.init(e,t),j.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Xr(...i)),e.includes=(...i)=>e.check(ei(...i)),e.startsWith=(...i)=>e.check(ti(...i)),e.endsWith=(...i)=>e.check(ni(...i)),e.min=(...i)=>e.check(it(...i)),e.max=(...i)=>e.check($n(...i)),e.length=(...i)=>e.check(bn(...i)),e.nonempty=(...i)=>e.check(it(1,...i)),e.lowercase=i=>e.check(Hr(i)),e.uppercase=i=>e.check(Qr(i)),e.trim=()=>e.check(oi()),e.normalize=(...i)=>e.check(ii(...i)),e.toLowerCase=()=>e.check(ai()),e.toUpperCase=()=>e.check(si())}),_n=l("ZodString",(e,t)=>{Pt.init(e,t),mi.init(e,t),e.email=r=>e.check(Nr(pi,r)),e.url=r=>e.check(Er(hi,r)),e.jwt=r=>e.check(Kr(Ti,r)),e.emoji=r=>e.check(Pr(vi,r)),e.guid=r=>e.check(rn(an,r)),e.uuid=r=>e.check(Tr(ke,r)),e.uuidv4=r=>e.check(Ur(ke,r)),e.uuidv6=r=>e.check(Zr(ke,r)),e.uuidv7=r=>e.check(jr(ke,r)),e.nanoid=r=>e.check(Dr(gi,r)),e.guid=r=>e.check(rn(an,r)),e.cuid=r=>e.check(Ar(yi,r)),e.cuid2=r=>e.check(Rr($i,r)),e.ulid=r=>e.check(Cr(bi,r)),e.base64=r=>e.check(Vr(zi,r)),e.base64url=r=>e.check(qr(xi,r)),e.xid=r=>e.check(Lr(_i,r)),e.ksuid=r=>e.check(Mr(wi,r)),e.ipv4=r=>e.check(Wr(Ii,r)),e.ipv6=r=>e.check(Br(ki,r)),e.cidrv4=r=>e.check(Fr(Oi,r)),e.cidrv6=r=>e.check(Jr(Si,r)),e.e164=r=>e.check(Gr(Ni,r)),e.datetime=r=>e.check(mc(r)),e.date=r=>e.check(pc(r)),e.time=r=>e.check(hc(r)),e.duration=r=>e.check(vc(r))});function G(e){return xu(_n,e)}const J=l("ZodStringFormat",(e,t)=>{B.init(e,t),mi.init(e,t)}),pi=l("ZodEmail",(e,t)=>{Ss.init(e,t),J.init(e,t)});function zf(e){return Nr(pi,e)}const an=l("ZodGUID",(e,t)=>{ks.init(e,t),J.init(e,t)});function xf(e){return rn(an,e)}const ke=l("ZodUUID",(e,t)=>{Os.init(e,t),J.init(e,t)});function Nf(e){return Tr(ke,e)}function Tf(e){return Ur(ke,e)}function Uf(e){return Zr(ke,e)}function Zf(e){return jr(ke,e)}const hi=l("ZodURL",(e,t)=>{zs.init(e,t),J.init(e,t)});function jf(e){return Er(hi,e)}const vi=l("ZodEmoji",(e,t)=>{xs.init(e,t),J.init(e,t)});function Ef(e){return Pr(vi,e)}const gi=l("ZodNanoID",(e,t)=>{Ns.init(e,t),J.init(e,t)});function Pf(e){return Dr(gi,e)}const yi=l("ZodCUID",(e,t)=>{Ts.init(e,t),J.init(e,t)});function Df(e){return Ar(yi,e)}const $i=l("ZodCUID2",(e,t)=>{Us.init(e,t),J.init(e,t)});function Af(e){return Rr($i,e)}const bi=l("ZodULID",(e,t)=>{Zs.init(e,t),J.init(e,t)});function Rf(e){return Cr(bi,e)}const _i=l("ZodXID",(e,t)=>{js.init(e,t),J.init(e,t)});function Cf(e){return Lr(_i,e)}const wi=l("ZodKSUID",(e,t)=>{Es.init(e,t),J.init(e,t)});function Lf(e){return Mr(wi,e)}const Ii=l("ZodIPv4",(e,t)=>{Cs.init(e,t),J.init(e,t)});function Mf(e){return Wr(Ii,e)}const ki=l("ZodIPv6",(e,t)=>{Ls.init(e,t),J.init(e,t)});function Wf(e){return Br(ki,e)}const Oi=l("ZodCIDRv4",(e,t)=>{Ms.init(e,t),J.init(e,t)});function Bf(e){return Fr(Oi,e)}const Si=l("ZodCIDRv6",(e,t)=>{Ws.init(e,t),J.init(e,t)});function Ff(e){return Jr(Si,e)}const zi=l("ZodBase64",(e,t)=>{Bs.init(e,t),J.init(e,t)});function Jf(e){return Vr(zi,e)}const xi=l("ZodBase64URL",(e,t)=>{Js.init(e,t),J.init(e,t)});function Vf(e){return qr(xi,e)}const Ni=l("ZodE164",(e,t)=>{Vs.init(e,t),J.init(e,t)});function qf(e){return Gr(Ni,e)}const Ti=l("ZodJWT",(e,t)=>{Gs.init(e,t),J.init(e,t)});function Gf(e){return Kr(Ti,e)}const wn=l("ZodNumber",(e,t)=>{br.init(e,t),j.init(e,t),e.gt=(i,n)=>e.check(Me(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Le(i,n)),e.lte=(i,n)=>e.check(ve(i,n)),e.max=(i,n)=>e.check(ve(i,n)),e.int=i=>e.check(Vn(i)),e.safe=i=>e.check(Vn(i)),e.positive=i=>e.check(Me(0,i)),e.nonnegative=i=>e.check(fe(0,i)),e.negative=i=>e.check(Le(0,i)),e.nonpositive=i=>e.check(ve(0,i)),e.multipleOf=(i,n)=>e.check(St(i,n)),e.step=(i,n)=>e.check(St(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Z(e){return Pu(wn,e)}const ut=l("ZodNumberFormat",(e,t)=>{Ks.init(e,t),wn.init(e,t)});function Vn(e){return Au(ut,e)}function Kf(e){return Ru(ut,e)}function Yf(e){return Cu(ut,e)}function Xf(e){return Lu(ut,e)}function Hf(e){return Mu(ut,e)}const In=l("ZodBoolean",(e,t)=>{_r.init(e,t),j.init(e,t)});function Ui(e){return Wu(In,e)}const kn=l("ZodBigInt",(e,t)=>{wr.init(e,t),j.init(e,t),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.gt=(i,n)=>e.check(Me(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Le(i,n)),e.lte=(i,n)=>e.check(ve(i,n)),e.max=(i,n)=>e.check(ve(i,n)),e.positive=i=>e.check(Me(BigInt(0),i)),e.negative=i=>e.check(Le(BigInt(0),i)),e.nonpositive=i=>e.check(ve(BigInt(0),i)),e.nonnegative=i=>e.check(fe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(St(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function We(e){return Fu(kn,e)}const Zi=l("ZodBigIntFormat",(e,t)=>{Ys.init(e,t),kn.init(e,t)});function Qf(e){return Vu(Zi,e)}function em(e){return qu(Zi,e)}const wc=l("ZodSymbol",(e,t)=>{Xs.init(e,t),j.init(e,t)});function Ic(e){return Gu(wc,e)}const kc=l("ZodUndefined",(e,t)=>{Hs.init(e,t),j.init(e,t)});function Oc(e){return Ku(kc,e)}const Sc=l("ZodNull",(e,t)=>{Qs.init(e,t),j.init(e,t)});function ji(e){return Yu(Sc,e)}const zc=l("ZodAny",(e,t)=>{eu.init(e,t),j.init(e,t)});function tm(){return Xu(zc)}const xc=l("ZodUnknown",(e,t)=>{nn.init(e,t),j.init(e,t)});function ot(){return on(xc)}const Nc=l("ZodNever",(e,t)=>{tu.init(e,t),j.init(e,t)});function On(e){return Hu(Nc,e)}const Tc=l("ZodVoid",(e,t)=>{nu.init(e,t),j.init(e,t)});function nm(e){return Qu(Tc,e)}const Ei=l("ZodDate",(e,t)=>{ru.init(e,t),j.init(e,t),e.min=(i,n)=>e.check(fe(i,n)),e.max=(i,n)=>e.check(ve(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function rm(e){return ec(Ei,e)}const Uc=l("ZodArray",(e,t)=>{Ir.init(e,t),j.init(e,t),e.element=t.element,e.min=(r,i)=>e.check(it(r,i)),e.nonempty=r=>e.check(it(1,r)),e.max=(r,i)=>e.check($n(r,i)),e.length=(r,i)=>e.check(bn(r,i)),e.unwrap=()=>e.element});function At(e,t){return ui(Uc,e,t)}function im(e){const t=e._zod.def.shape;return Cc(Object.keys(t))}const Sn=l("ZodObject",(e,t)=>{iu.init(e,t),j.init(e,t),E(e,"shape",()=>Object.fromEntries(Object.entries(e._zod.def.shape))),e.keyof=()=>oe(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ot()}),e.loose=()=>e.clone({...e._zod.def,catchall:ot()}),e.strict=()=>e.clone({...e._zod.def,catchall:On()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>pa(e,r),e.merge=r=>ha(e,r),e.pick=r=>fa(e,r),e.omit=r=>ma(e,r),e.partial=(...r)=>va(Ci,e,r[0]),e.required=(...r)=>ga(Li,e,r[0])});function C(e,t){const r={type:"object",get shape(){return st(this,"shape",{...e}),this.shape},...h(t)};return new Sn(r)}function om(e,t){return new Sn({type:"object",get shape(){return st(this,"shape",{...e}),this.shape},catchall:On(),...h(t)})}function am(e,t){return new Sn({type:"object",get shape(){return st(this,"shape",{...e}),this.shape},catchall:ot(),...h(t)})}const Pi=l("ZodUnion",(e,t)=>{kr.init(e,t),j.init(e,t),e.options=t.options});function Y(e,t){return new Pi({type:"union",options:e,...h(t)})}const Zc=l("ZodDiscriminatedUnion",(e,t)=>{Pi.init(e,t),ou.init(e,t)});function sm(e,t,r){return new Zc({type:"union",options:t,discriminator:e,...h(r)})}const jc=l("ZodIntersection",(e,t)=>{au.init(e,t),j.init(e,t)});function Ec(e,t){return new jc({type:"intersection",left:e,right:t})}const Pc=l("ZodTuple",(e,t)=>{gn.init(e,t),j.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function ct(e,t,r){const i=t instanceof N,n=i?r:t,o=i?t:null;return new Pc({type:"tuple",items:e,rest:o,...h(n)})}const Di=l("ZodRecord",(e,t)=>{su.init(e,t),j.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function zn(e,t,r){return new Di({type:"record",keyType:e,valueType:t,...h(r)})}function um(e,t,r){return new Di({type:"record",keyType:Y([e,On()]),valueType:t,...h(r)})}const Dc=l("ZodMap",(e,t)=>{uu.init(e,t),j.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function cm(e,t,r){return new Dc({type:"map",keyType:e,valueType:t,...h(r)})}const Ac=l("ZodSet",(e,t)=>{cu.init(e,t),j.init(e,t),e.min=(...r)=>e.check(zt(...r)),e.nonempty=r=>e.check(zt(1,r)),e.max=(...r)=>e.check(yn(...r)),e.size=(...r)=>e.check(Yr(...r))});function lm(e,t){return new Ac({type:"set",valueType:e,...h(t)})}const xt=l("ZodEnum",(e,t)=>{lu.init(e,t),j.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new xt({...t,checks:[],...h(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new xt({...t,checks:[],...h(n),entries:o})}});function oe(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new xt({type:"enum",entries:r,...h(t)})}function dm(e,t){return new xt({type:"enum",entries:e,...h(t)})}const Rc=l("ZodLiteral",(e,t)=>{du.init(e,t),j.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Cc(e,t){return new Rc({type:"literal",values:Array.isArray(e)?e:[e],...h(t)})}const Lc=l("ZodFile",(e,t)=>{fu.init(e,t),j.init(e,t),e.min=(r,i)=>e.check(zt(r,i)),e.max=(r,i)=>e.check(yn(r,i)),e.mime=(r,i)=>e.check(ri(Array.isArray(r)?r:[r],i))});function fm(e){return cc(Lc,e)}const Ai=l("ZodTransform",(e,t)=>{Or.init(e,t),j.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(nt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),a.continue??(a.continue=!0),r.issues.push(nt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Ri(e){return new Ai({type:"transform",transform:e})}const Ci=l("ZodOptional",(e,t)=>{mu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sn(e){return new Ci({type:"optional",innerType:e})}const Mc=l("ZodNullable",(e,t)=>{pu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function un(e){return new Mc({type:"nullable",innerType:e})}function mm(e){return sn(un(e))}const Wc=l("ZodDefault",(e,t)=>{hu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Bc(e,t){return new Wc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const Fc=l("ZodPrefault",(e,t)=>{vu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jc(e,t){return new Fc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const Li=l("ZodNonOptional",(e,t)=>{gu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Vc(e,t){return new Li({type:"nonoptional",innerType:e,...h(t)})}const qc=l("ZodSuccess",(e,t)=>{yu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pm(e){return new qc({type:"success",innerType:e})}const Gc=l("ZodCatch",(e,t)=>{$u.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Kc(e,t){return new Gc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Yc=l("ZodNaN",(e,t)=>{bu.init(e,t),j.init(e,t)});function hm(e){return nc(Yc,e)}const Mi=l("ZodPipe",(e,t)=>{Sr.init(e,t),j.init(e,t),e.in=t.in,e.out=t.out});function cn(e,t){return new Mi({type:"pipe",in:e,out:t})}const Xc=l("ZodReadonly",(e,t)=>{_u.init(e,t),j.init(e,t)});function Hc(e){return new Xc({type:"readonly",innerType:e})}const Qc=l("ZodTemplateLiteral",(e,t)=>{wu.init(e,t),j.init(e,t)});function vm(e,t){return new Qc({type:"template_literal",parts:e,...h(t)})}const el=l("ZodLazy",(e,t)=>{ku.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.getter()});function tl(e){return new el({type:"lazy",getter:e})}const nl=l("ZodPromise",(e,t)=>{Iu.init(e,t),j.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gm(e){return new nl({type:"promise",innerType:e})}const xn=l("ZodCustom",(e,t)=>{Ou.init(e,t),j.init(e,t)});function rl(e,t){const r=new te({check:"custom",...h(t)});return r._zod.check=e,r}function ym(e,t){return lc(xn,e??(()=>!0),t)}function il(e,t={}){return dc(xn,e,t)}function ol(e,t){const r=rl(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(nt(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(nt(o))}},e(i.value,i)),t);return r}function M(e,t={error:`Input not instance of ${e.name}`}){const r=new xn({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...h(t)});return r._zod.bag.Class=e,r}const $m=(...e)=>fc({Pipe:Mi,Boolean:In,String:_n,Transform:Ai},...e);function bm(e){const t=tl(()=>Y([G(e),Z(),Ui(),ji(),At(t),zn(G(),t)]));return t}function _m(e,t){return cn(Ri(e),t)}const Nn=ct([Z(),Z()]);ct([We(),We()]);const Wi=C({width:Z(),height:Z()}),wm=C({signedWidth:Z(),signedHeight:Z()}),Im=["width","height"];oe(Im);const km=["start","center","end"],Om=["signedWidth","signedHeight"];oe(Om);const Nt=C({x:Z(),y:Z()}),al=C({clientX:Z(),clientY:Z()}),sl=["x","y"],ul=oe(sl),cl=["top","right","bottom","left"];oe(cl);const Bi=["left","right"],ll=oe(Bi),Fi=["top","bottom"],dl=oe(Fi),fl=["center"],Oo=oe(fl),Sm=[...cl,...fl],ml=oe(Sm);oe(km);const zm=["first","last"];oe(zm);const xm=C({lower:Z(),upper:Z()}),Nm=C({lower:We(),upper:We()});Y([xm,Nn]);Y([Nm,Nn]);oe([...ul.options,...ml.options]);Y([ul,ml,M(String)]);const Tm=e=>typeof e=="bigint"||e instanceof BigInt,Ye=(e,t)=>Tm(e)?e.valueOf()*BigInt(t.valueOf()):e.valueOf()*Number(t.valueOf()),Ae=(e,t,r)=>{const i={};if(typeof t=="object"&&(r=t,t=void 0),r={makeValid:!0,...r},typeof e=="number"||typeof e=="bigint")t!=null?(i.lower=e,i.upper=t):(i.lower=typeof e=="bigint"?0n:0,i.upper=e);else if(Array.isArray(e)){if(e.length!==2)throw new Error("bounds: expected array of length 2");[i.lower,i.upper]=e}else i.lower=e.lower,i.upper=e.upper;return r!=null&&r.makeValid?Um(i):i},Um=e=>e.lower>e.upper?{lower:e.upper,upper:e.lower}:e,So=(e,t)=>{const r=Ae(e);return t<r.lower?r.lower:t>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):t},Ji=e=>sl.includes(e)?e:Fi.includes(e)?"y":"x";C({x:ll.or(Oo),y:dl.or(Oo)});const Zm=C({x:ll,y:dl}),Vi=Object.freeze({x:"left",y:"top"}),jm=Object.freeze({x:"right",y:"top"}),pl=Object.freeze({x:"left",y:"bottom"}),Em=Object.freeze({x:"right",y:"bottom"}),Pm=Object.freeze({x:"center",y:"top"}),Dm=Object.freeze({x:"center",y:"bottom"}),Am=Object.freeze({x:"right",y:"center"}),Rm=Object.freeze({x:"left",y:"center"}),hl=(e,t)=>e.x===t.x&&e.y===t.y,Cm=e=>[e.x,e.y],qn=Y([Z(),Nt,Nn,Wi,wm,al]),W=(e,t)=>{if(typeof e=="string"){if(t===void 0)throw new Error("The y coordinate must be given.");return e==="x"?{x:t,y:0}:{x:0,y:t}}return typeof e=="number"?{x:e,y:t??e}:Array.isArray(e)?{x:e[0],y:e[1]}:"signedWidth"in e?{x:e.signedWidth,y:e.signedHeight}:"clientX"in e?{x:e.clientX,y:e.clientY}:"width"in e?{x:e.width,y:e.height}:{x:e.x,y:e.y}},be=Object.freeze({x:0,y:0}),vl=Object.freeze({x:1,y:1}),Lm=Object.freeze({x:1/0,y:1/0}),Mm=Object.freeze({x:NaN,y:NaN}),ln=(e,t,r=0)=>{const i=W(e),n=W(t);return r===0?i.x===n.x&&i.y===n.y:Math.abs(i.x-n.x)<=r&&Math.abs(i.y-n.y)<=r},Wm=e=>ln(e,be),qi=(e,t,r)=>{const i=W(e),n=W(t,r);return{x:i.x*n.x,y:i.y*n.y}},gl=(e,t)=>{const r=W(e);return{x:r.x+t,y:r.y}},yl=(e,t)=>{const r=W(e);return{x:r.x,y:r.y+t}},Tt=(e,t,r,...i)=>typeof t=="string"&&typeof r=="number"?t==="x"?gl(e,r):yl(e,r):[e,t,r??be,...i].reduce((n,o)=>{const a=W(o);return{x:n.x+a.x,y:n.y+a.y}},be),Bm=(e,t,r)=>{const i=W(e);return t==="x"?{x:r,y:i.y}:{x:i.x,y:r}},Fm=(e,t)=>{const r=W(e),i=W(t);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)},Jm=(e,t)=>{const r=W(e),i=W(t);return{x:i.x-r.x,y:i.y-r.y}},Vm=e=>{const t=W(e);return Number.isNaN(t.x)||Number.isNaN(t.y)},qm=e=>{const t=W(e);return Number.isFinite(t.x)&&Number.isFinite(t.y)},Gm=e=>{const t=W(e);return[t.x,t.y]},Km=e=>{const t=W(e);return{left:t.x,top:t.y}},Gn=(e,t=0)=>{const r=W(e);return{x:Number(r.x.toFixed(t)),y:Number(r.y.toFixed(t))}},pt=(e,t)=>{const r=W(e),i=W(t);return{x:r.x-i.x,y:r.y-i.y}},ht=e=>{const t=W(e),r=Math.hypot(t.x,t.y);return r===0?{x:0,y:0}:{x:-t.y/r,y:t.x/r}},$l=e=>{const t=W(e),r=Math.hypot(t.x,t.y);return r===0?{x:0,y:0}:{x:t.x/r,y:t.y/r}},bl=(...e)=>{const t=e.reduce((r,i)=>Tt(r,i),be);return qi(t,1/e.length)},Ym=(e,t)=>{const r=[];for(let i=0;i<e.length;i++){const n=e[i];let o,a,s,u;if(i===0){const c=e[i+1],d=pt(c,n);a=ht(d),s=a,u=t}else if(i===e.length-1){const c=e[i-1],d=pt(n,c);o=ht(d),s=o,u=t}else{const c=e[i-1],d=e[i+1],f=pt(n,c),$=pt(d,n);o=ht(f),a=ht($);const p=Math.acos((f.x*$.x+f.y*$.y)/(Math.hypot(f.x,f.y)*Math.hypot($.x,$.y))),k=Math.sin(p/2);k===0?u=t:u=t/k,s=$l(bl(o,a))}r.push(qi(s,u))}return r},Xm=e=>{const t=W(e);return{x:t.y,y:t.x}},dn=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Lm,NAN:Mm,ONE:vl,ZERO:be,average:bl,calculateMiters:Ym,clientXY:al,construct:W,couple:Gm,crudeZ:qn,css:Km,distance:Fm,equals:ln,isFinite:qm,isNan:Vm,isZero:Wm,normal:ht,normalize:$l,scale:qi,set:Bm,sub:pt,swap:Xm,translate:Tt,translateX:gl,translateY:yl,translation:Jm,truncate:Gn,xy:Nt},Symbol.toStringTag,{value:"Module"})),Mt=Y([Z(),G()]),Hm=C({top:Mt,left:Mt,width:Mt,height:Mt}),Qm=C({left:Z(),top:Z(),right:Z(),bottom:Z()}),ep=C({one:Nt,two:Nt,root:Zm}),_l={one:be,two:be,root:Vi},tp={one:be,two:vl,root:pl},wl=(e,t)=>({one:e.one,two:e.two,root:t??e.root}),F=(e,t,r=0,i=0,n)=>{const o={one:{...be},two:{...be},root:n??Vi};if(typeof e=="number"){if(typeof t!="number")throw new Error("Box constructor called with invalid arguments");return o.one={x:e,y:t},o.two={x:o.one.x+r,y:o.one.y+i},o}return"one"in e&&"two"in e&&"root"in e?{...e,root:n??e.root}:("getBoundingClientRect"in e&&(e=e.getBoundingClientRect()),"left"in e?(o.one={x:e.left,y:e.top},o.two={x:e.right,y:e.bottom},o):(o.one=e,t==null?o.two={x:o.one.x+r,y:o.one.y+i}:typeof t=="number"?o.two={x:o.one.x+t,y:o.one.y+r}:"width"in t?o.two={x:o.one.x+t.width,y:o.one.y+t.height}:"signedWidth"in t?o.two={x:o.one.x+t.signedWidth,y:o.one.y+t.signedHeight}:o.two=t,o))},np=(e,t,r)=>{const i=F(e);if(typeof t=="string"){if(r==null)throw new Error("Invalid arguments for resize");const n=Ji(t);return F(i.one,void 0,n==="x"?r:Te(i),n==="y"?r:Ue(i),i.root)}return F(i.one,t,void 0,void 0,i.root)},rp=(e,t,r=!0)=>{const i=F(e);let n=(o,a)=>o<a;return r&&(n=(o,a)=>o<=a),"one"in t?n(xe(i),xe(t))&&n(Re(t),Re(i))&&n(Ne(i),Ne(t))&&n(Ce(t),Ce(i)):n(xe(i),t.x)&&n(t.x,Re(i))&&n(Ne(i),t.y)&&n(t.y,Ce(i))},ip=(e,t)=>ln(e.one,t.one)&&ln(e.two,t.two)&&hl(e.root,t.root),Il=e=>({width:Te(e),height:Ue(e)}),op=e=>({signedWidth:Tn(e),signedHeight:Un(e)}),ap=e=>({top:Ne(e),left:xe(e),width:Te(e),height:Ue(e)}),Gi=(e,t,r=!1)=>{const i=Ji(t)==="y"?Un(e):Tn(e);return r?i:Math.abs(i)},Se=(e,t)=>{const r=F(e);return{x:t.x==="center"?Kn(r).x:Be(r,t.x),y:t.y==="center"?Kn(r).y:Be(r,t.y)}},Be=(e,t)=>{const r=F(e),i=Cm(r.root).includes(t)?Math.min:Math.max;return Bi.includes(t)?i(r.one.x,r.two.x):i(r.one.y,r.two.y)},sp=e=>e.one.x===e.two.x&&e.one.y===e.two.y,Te=e=>Gi(e,"x"),Ue=e=>Gi(e,"y"),Tn=e=>{const t=F(e);return t.two.x-t.one.x},Un=e=>{const t=F(e);return t.two.y-t.one.y},kl=e=>Se(e,Vi),up=e=>Se(e,Pm),cp=e=>Se(e,jm),lp=e=>Se(e,pl),dp=e=>Se(e,Dm),fp=e=>Se(e,Em),mp=e=>Se(e,Rm),pp=e=>Se(e,Am),Re=e=>Be(e,"right"),Ce=e=>Be(e,"bottom"),xe=e=>Be(e,"left"),Ne=e=>Be(e,"top"),Kn=e=>Tt(kl(e),{x:Tn(e)/2,y:Un(e)/2}),Ki=e=>{const t=F(e);return t.root.x==="left"?xe(t):Re(t)},Yi=e=>{const t=F(e);return t.root.y==="top"?Ne(t):Ce(t)},hp=e=>({x:Ki(e),y:Yi(e)}),Gt=e=>{const t=F(e);return{lower:t.one.x,upper:t.two.x}},Kt=e=>{const t=F(e);return{lower:t.one.y,upper:t.two.y}},vp=(e,t)=>wl(e,t),gp=(e,t)=>{const r=F(e),i=Bi.includes(t)?"x":Fi.includes(t)?"y":null;if(i===null)throw new Error(`Invalid location: ${t}`);const n=t==="top"||t==="left"?Math.min:Math.max,o={...r.one},a={...r.two};return o[i]=n(r.one[i],r.two[i]),a[i]=n(r.one[i],r.two[i]),[o,a]},yp=(e,t)=>{const r=F(e),i=F(t),n=Ki(i)+(Te(i)-Te(r))/2,o=Yi(i)+(Ue(i)-Ue(r))/2;return F({x:n,y:o},Il(r))},Ol=e=>typeof e!="object"||e==null?!1:"one"in e&&"two"in e&&"root"in e,$p=e=>Te(e)/Ue(e),bp=(e,t,r)=>{if(typeof t=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const n=Ji(t);t=W(n,r)}const i=F(e);return F(Tt(i.one,t),Tt(i.two,t),void 0,void 0,i.root)},_p=(e,t)=>{const r=Math.max(xe(e),xe(t)),i=Math.max(Ne(e),Ne(t)),n=Math.min(Re(e),Re(t)),o=Math.min(Ce(e),Ce(t));return r>n||i>o?_l:F({x:r,y:i},{x:n,y:o},void 0,void 0,e.root)},wp=e=>Te(e)*Ue(e),Ip=(e,t)=>{const r=F(e);return F(Gn(r.one,t),Gn(r.two,t),void 0,void 0,r.root)},kp=(e,t,r,i,n,o)=>{const a={x:e,y:t},s={x:e+r,y:t+i};return n.x!==o.x&&(n.x==="center"?(a.x-=r/2,s.x-=r/2):(a.x-=r,s.x-=r)),n.y!==o.y&&(n.y==="center"?(a.y-=i/2,s.y-=i/2):(a.y-=i,s.y-=i)),F(a,s,void 0,void 0,o)},vt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:tp,ZERO:_l,area:wp,areaIsZero:sp,aspect:$p,bottom:Ce,bottomCenter:dp,bottomLeft:lp,bottomRight:fp,box:ep,center:Kn,centerLeft:mp,centerRight:pp,construct:F,constructWithAlternateRoot:kp,contains:rp,copy:wl,css:ap,cssBox:Hm,dim:Gi,dims:Il,domRect:Qm,edgePoints:gp,equals:ip,height:Ue,intersection:_p,isBox:Ol,left:xe,loc:Be,positionInCenter:yp,reRoot:vp,resize:np,right:Re,root:hp,signedDims:op,signedHeight:Un,signedWidth:Tn,top:Ne,topCenter:up,topLeft:kl,topRight:cp,translate:bp,truncate:Ip,width:Te,x:Ki,xBounds:Gt,xyLoc:Se,y:Yi,yBounds:Kt},Symbol.toStringTag,{value:"Module"})),Sl=C({signedWidth:Z(),signedHeight:Z()}),Op=Y([Wi,Sl,Nt,Nn]),Sp={width:0,height:0},zp={width:1,height:1},ye=(e,t)=>typeof e=="number"?{width:e,height:t??e}:Array.isArray(e)?{width:e[0],height:e[1]}:"x"in e?{width:e.x,height:e.y}:"signedWidth"in e?{width:e.signedWidth,height:e.signedHeight}:{...e},xp=(e,t)=>{if(t==null)return!1;const r=ye(e),i=ye(t);return r.width===i.width&&r.height===i.height},Np=e=>{const t=ye(e);return{width:t.height,height:t.width}},Tp=e=>{const t=ye(e);return`0 0 ${t.width} ${t.height}`},Up=e=>{const t=ye(e);return[t.width,t.height]},Zp=e=>({width:Math.max(...e.map(t=>ye(t).width)),height:Math.max(...e.map(t=>ye(t).height))}),jp=e=>({width:Math.min(...e.map(t=>ye(t).width)),height:Math.min(...e.map(t=>ye(t).height))}),Ep=(e,t)=>{const r=ye(e);return{width:r.width*t,height:r.height*t}},Yt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:zp,ZERO:Sp,construct:ye,couple:Up,crude:Op,dimensions:Wi,equals:xp,max:Zp,min:jp,scale:Ep,signed:Sl,svgViewBox:Tp,swap:Np},Symbol.toStringTag,{value:"Module"}));var Pp=Object.defineProperty,Dp=(e,t,r)=>t in e?Pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Oe=(e,t,r)=>Dp(e,typeof t!="symbol"?t+"":t,r);const Ap=(e,t,r)=>t!==void 0&&e<t?t:r!==void 0&&e>r?r:e;C({offset:qn,scale:qn});C({offset:Z(),scale:Z()});const Rp=e=>(t,r,i,n)=>r==="dimension"?[t,i]:[t,n?i-e:i+e],Cp=e=>(t,r,i,n)=>[t,n?i/e:i*e],Lp=e=>(t,r,i)=>{if(t===null)return[e,i];const{lower:n,upper:o}=t,{lower:a,upper:s}=e,u=o-n,c=s-a;if(r==="dimension")return[e,i*(c/u)];const d=(i-n)*(c/u)+a;return[e,d]},Mp=e=>(t,r,i)=>[e,i],Wp=()=>(e,t,r)=>{if(e===null)throw new Error("cannot invert without bounds");if(t==="dimension")return[e,r];const{lower:i,upper:n}=e;return[e,n-(r-i)]},Bp=e=>(t,r,i)=>{const{lower:n,upper:o}=e;return i=Ap(i,n,o),[t,i]},Yn=class gt{constructor(){Oe(this,"ops",[]),Oe(this,"currBounds",null),Oe(this,"currType",null),Oe(this,"reversed",!1),this.ops=[]}static translate(t){return new gt().translate(t)}static magnify(t){return new gt().magnify(t)}static scale(t,r){return new gt().scale(t,r)}translate(t){const r=this.new(),i=Rp(t);return i.type="translate",r.ops.push(i),r}magnify(t){const r=this.new(),i=Cp(t);return i.type="magnify",r.ops.push(i),r}scale(t,r){const i=Ae(t,r),n=this.new(),o=Lp(i);return o.type="scale",n.ops.push(o),n}clamp(t,r){const i=Ae(t,r),n=this.new(),o=Bp(i);return o.type="clamp",n.ops.push(o),n}reBound(t,r){const i=Ae(t,r),n=this.new(),o=Mp(i);return o.type="re-bound",n.ops.push(o),n}invert(){const t=Wp();t.type="invert";const r=this.new();return r.ops.push(t),r}pos(t){return this.exec("position",t)}dim(t){return this.exec("dimension",t)}new(){const t=new gt;return t.ops=this.ops.slice(),t.reversed=this.reversed,t}exec(t,r){return this.currBounds=null,this.ops.reduce(([i,n],o)=>o(i,t,n,this.reversed),[null,r])[1]}reverse(){const t=this.new();t.ops.reverse();const r=[];return t.ops.forEach((i,n)=>{if(i.type==="scale"||r.some(([a,s])=>n>=a&&n<=s))return;const o=t.ops.findIndex((a,s)=>a.type==="scale"&&s>n);o!==-1&&r.push([n,o])}),r.forEach(([i,n])=>{const o=t.ops.slice(i,n);o.unshift(t.ops[n]),t.ops.splice(i,n-i+1,...o)}),t.reversed=!t.reversed,t}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}};Oe(Yn,"IDENTITY",new Yn);let zo=Yn;const xo=class Ie{constructor(t=new zo,r=new zo,i=null){Oe(this,"x"),Oe(this,"y"),Oe(this,"currRoot"),this.x=t,this.y=r,this.currRoot=i}static translate(t,r){return new Ie().translate(t,r)}static translateX(t){return new Ie().translateX(t)}static translateY(t){return new Ie().translateY(t)}static clamp(t){return new Ie().clamp(t)}static magnify(t){return new Ie().magnify(t)}static scale(t){return new Ie().scale(t)}static reBound(t){return new Ie().reBound(t)}translate(t,r){const i=W(t,r),n=this.copy();return n.x=this.x.translate(i.x),n.y=this.y.translate(i.y),n}translateX(t){const r=this.copy();return r.x=this.x.translate(t),r}translateY(t){const r=this.copy();return r.y=this.y.translate(t),r}magnify(t){const r=this.copy();return r.x=this.x.magnify(t.x),r.y=this.y.magnify(t.y),r}scale(t){const r=this.copy();if(Ol(t)){const i=this.currRoot;return r.currRoot=t.root,i!=null&&!hl(i,t.root)&&(i.x!==t.root.x&&(r.x=r.x.invert()),i.y!==t.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(Gt(t)),r.y=r.y.scale(Kt(t)),r}return r.x=r.x.scale(t.width),r.y=r.y.scale(t.height),r}reBound(t){const r=this.copy();return r.x=this.x.reBound(Gt(t)),r.y=this.y.reBound(Kt(t)),r}clamp(t){const r=this.copy();return r.x=this.x.clamp(Gt(t)),r.y=this.y.clamp(Kt(t)),r}copy(){const t=new Ie;return t.currRoot=this.currRoot,t.x=this.x,t.y=this.y,t}reverse(){const t=this.copy();return t.x=this.x.reverse(),t.y=this.y.reverse(),t}pos(t){return{x:this.x.pos(t.x),y:this.y.pos(t.y)}}dim(t){return{x:this.x.dim(t.x),y:this.y.dim(t.y)}}box(t){return F(this.pos(t.one),this.pos(t.two),0,0,this.currRoot??t.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}};Oe(xo,"IDENTITY",new xo);var Fp=Object.defineProperty,Jp=(e,t,r)=>t in e?Fp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t,r)=>Jp(e,typeof t!="symbol"?t+"":t,r);function Vp(e){return Nu(_n,e)}function qp(e){return Du(wn,e)}function Gp(e){return Bu(In,e)}function zl(e){return Ju(kn,e)}function Kp(e){return tc(Ei,e)}const Yp=Object.freeze(Object.defineProperty({__proto__:null,bigint:zl,boolean:Gp,date:Kp,number:qp,string:Vp},Symbol.toStringTag,{value:"Module"}));let Xp=(e,t=21)=>(r=t)=>{let i="",n=r|0;for(;n--;)i+=e[Math.random()*e.length|0];return i};const Hp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Qp=Xp(Hp,11),xl=()=>Qp(),Xn=Object.freeze(Object.defineProperty({__proto__:null,create:xl},Symbol.toStringTag,{value:"Module"})),eh=(e,t)=>r=>r instanceof t||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===e,th=oe(["static","dynamic"]),Nl=(e,t)=>{const r=new L(t);if(![R.DAY,R.HOUR,R.MINUTE,R.SECOND,R.MILLISECOND,R.MICROSECOND,R.NANOSECOND].some(n=>n.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const i=e.valueOf()%r.valueOf();return e instanceof L?new L(i):new R(i)},D=class z extends at{constructor(t,r="UTC"){if(t==null)super(z.now().valueOf());else if(t instanceof Date)super(BigInt(t.getTime())*z.MILLISECOND.valueOf());else if(typeof t=="string")super(z.parseDateTimeString(t,r).valueOf());else if(Array.isArray(t))super(z.parseDate(t));else{let i=BigInt(0);t instanceof Number&&(t=t.valueOf()),r==="local"&&(i=z.utcOffset.valueOf()),typeof t=="number"&&(isFinite(t)?t=Math.trunc(t):(isNaN(t)&&(t=0),t===1/0?t=z.MAX:t=z.MIN)),super(BigInt(t.valueOf())+i)}}static parseDate([t=1970,r=1,i=1]){const n=new Date(t,r-1,i,0,0,0,0);return new z(BigInt(n.getTime())*z.MILLISECOND.valueOf()).truncate(z.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(t,r="UTC"){const[i,n,o]=t.split(":");let a="00",s="00";o!=null&&([a,s]=o.split("."));let u=z.hours(parseInt(i??"00")).add(z.minutes(parseInt(n??"00"))).add(z.seconds(parseInt(a??"00"))).add(z.milliseconds(parseInt(s??"00")));return r==="local"&&(u=u.add(z.utcOffset)),u.valueOf()}static parseDateTimeString(t,r="UTC"){if(!t.includes("/")&&!t.includes("-"))return z.parseTimeString(t,r);const i=new Date(t);return t.includes(":")||i.setUTCHours(0,0,0,0),new z(BigInt(i.getTime())*z.MILLISECOND.valueOf(),r).valueOf()}fString(t="ISO",r="UTC"){switch(t){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}toISOString(t="UTC"){return t==="UTC"?this.date().toISOString():this.sub(z.utcOffset).date().toISOString()}timeString(t=!1,r="UTC"){const i=this.toISOString(r);return t?i.slice(11,23):i.slice(11,19)}dateString(){const t=this.date(),r=t.toLocaleString("default",{month:"short"}),i=t.toLocaleString("default",{day:"numeric"});return`${r} ${i}`}static get utcOffset(){return new R(BigInt(new Date().getTimezoneOffset())*z.MINUTE.valueOf())}static since(t){return new z().span(t)}date(){return new Date(this.milliseconds)}equals(t){return this.valueOf()===new z(t).valueOf()}span(t){return this.range(t).span}range(t){return new It(this,t).makeValid()}spanRange(t){return this.range(this.add(t)).makeValid()}get isZero(){return this.valueOf()===BigInt(0)}after(t){return this.valueOf()>new z(t).valueOf()}afterEq(t){return this.valueOf()>=new z(t).valueOf()}before(t){return this.valueOf()<new z(t).valueOf()}beforeEq(t){return this.valueOf()<=new z(t).valueOf()}add(t){return new z(this.valueOf()+BigInt(t.valueOf()))}sub(t){return new z(this.valueOf()-BigInt(t.valueOf()))}get hours(){return Number(this.valueOf())/Number(R.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(R.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(R.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(R.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(z.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(z.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(t){const r=this.date();return r.setUTCFullYear(t),new z(r)}get month(){return this.date().getUTCMonth()}setMonth(t){const r=this.date();return r.setUTCMonth(t),new z(r)}get day(){return this.date().getUTCDate()}setDay(t){const r=this.date();return r.setUTCDate(t),new z(r)}get hour(){return this.date().getUTCHours()}setHour(t){const r=this.date();return r.setUTCHours(t),new z(r,"UTC")}get minute(){return this.date().getUTCMinutes()}setMinute(t){const r=this.date();return r.setUTCMinutes(t),new z(r)}get second(){return this.date().getUTCSeconds()}setSecond(t){const r=this.date();return r.setUTCSeconds(t),new z(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(t){const r=this.date();return r.setUTCMilliseconds(t),new z(r)}toString(){return this.date().toISOString()}remainder(t){return Nl(this,t)}get isToday(){return this.truncate(R.DAY).equals(z.now().truncate(R.DAY))}truncate(t){return this.sub(this.remainder(t))}static now(){return new z(new Date)}static max(...t){let r=z.MIN;for(const i of t){const n=new z(i);n.after(r)&&(r=n)}return r}static min(...t){let r=z.MAX;for(const i of t){const n=new z(i);n.before(r)&&(r=n)}return r}static nanoseconds(t,r="UTC"){return new z(t,r)}static microseconds(t,r="UTC"){return z.nanoseconds(t*1e3,r)}static milliseconds(t,r="UTC"){return z.microseconds(t*1e3,r)}static seconds(t,r="UTC"){return z.milliseconds(t*1e3,r)}static minutes(t,r="UTC"){return z.seconds(t*60,r)}static hours(t,r="UTC"){return z.minutes(t*60,r)}static days(t,r="UTC"){return z.hours(t*24,r)}};b(D,"NANOSECOND",D.nanoseconds(1)),b(D,"MICROSECOND",D.microseconds(1)),b(D,"MILLISECOND",D.milliseconds(1)),b(D,"SECOND",D.seconds(1)),b(D,"MINUTE",D.minutes(1)),b(D,"HOUR",D.hours(1)),b(D,"DAY",D.days(1)),b(D,"MAX",new D((1n<<63n)-1n)),b(D,"MIN",new D(0)),b(D,"ZERO",new D(0)),b(D,"z",Y([C({value:We()}).transform(e=>new D(e.value)),G().transform(e=>new D(BigInt(e))),M(Number).transform(e=>new D(e)),Z().transform(e=>new D(e)),M(D)]));let L=D;const A=class T extends at{constructor(t){typeof t=="number"&&(t=Math.trunc(t.valueOf())),super(BigInt(t.valueOf()))}static fromSeconds(t){return t instanceof T?t:t instanceof No?t.period:t instanceof L?new T(t):["number","bigint"].includes(typeof t)?T.seconds(t):new T(t)}static fromMilliseconds(t){return t instanceof T?t:t instanceof No?t.period:t instanceof L?new T(t):["number","bigint"].includes(typeof t)?T.milliseconds(t):new T(t)}valueOf(){return this.value}lessThan(t){return this.valueOf()<new T(t).valueOf()}greaterThan(t){return this.valueOf()>new T(t).valueOf()}lessThanOrEqual(t){return this.valueOf()<=new T(t).valueOf()}greaterThanOrEqual(t){return this.valueOf()>=new T(t).valueOf()}remainder(t){return Nl(this,t)}truncate(t){return new T(BigInt(Math.trunc(Number(this.valueOf()/t.valueOf())))*t.valueOf())}toString(){const t=this.truncate(T.DAY),r=this.truncate(T.HOUR),i=this.truncate(T.MINUTE),n=this.truncate(T.SECOND),o=this.truncate(T.MILLISECOND),a=this.truncate(T.MICROSECOND),s=this.truncate(T.NANOSECOND),u=t,c=r.sub(t),d=i.sub(r),f=n.sub(i),$=o.sub(n),p=a.sub(o),k=s.sub(a);let O="";return u.isZero||(O+=`${u.days}d `),c.isZero||(O+=`${c.hours}h `),d.isZero||(O+=`${d.minutes}m `),f.isZero||(O+=`${f.seconds}s `),$.isZero||(O+=`${$.milliseconds}ms `),p.isZero||(O+=`${p.microseconds}µs `),k.isZero||(O+=`${k.nanoseconds}ns`),O.trim()}mult(t){return new T(this.valueOf()*BigInt(t))}get days(){return Number(this.valueOf())/Number(T.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(T.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(T.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(T.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(T.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(T.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===BigInt(0)}equals(t){return this.valueOf()===new T(t).valueOf()}add(t){return new T(this.valueOf()+new T(t).valueOf())}sub(t){return new T(this.valueOf()-new T(t).valueOf())}static nanoseconds(t=1){return new T(t)}static microseconds(t=1){return T.nanoseconds(Ye(t,1e3))}static milliseconds(t=1){return T.microseconds(Ye(t,1e3))}static seconds(t=1){return T.milliseconds(Ye(t,1e3))}static minutes(t=1){return T.seconds(Ye(t,60))}static hours(t){return T.minutes(Ye(t,60))}static days(t){return T.hours(Ye(t,24))}};b(A,"NANOSECOND",A.nanoseconds(1)),b(A,"MICROSECOND",A.microseconds(1)),b(A,"MILLISECOND",A.milliseconds(1)),b(A,"SECOND",A.seconds(1)),b(A,"MINUTE",A.minutes(1)),b(A,"HOUR",A.hours(1)),b(A,"DAY",A.days(1)),b(A,"MAX",new A((1n<<63n)-1n)),b(A,"MIN",new A(0)),b(A,"ZERO",new A(0)),b(A,"z",Y([C({value:We()}).transform(e=>new A(e.value)),G().transform(e=>new A(BigInt(e))),M(Number).transform(e=>new A(e)),Z().transform(e=>new A(e)),M(A)]));let R=A;const yt=class Xt extends at{constructor(t){super(t.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(t){return this.valueOf()===new Xt(t).valueOf()}get period(){return R.seconds(1/this.valueOf())}sampleCount(t){return new R(t).seconds*this.valueOf()}byteCount(t,r){return this.sampleCount(t)*new le(r).valueOf()}span(t){return R.seconds(t/this.valueOf())}byteSpan(t,r){return this.span(t.valueOf()/r.valueOf())}static hz(t){return new Xt(t)}static khz(t){return Xt.hz(t*1e3)}};b(yt,"z",Y([Z().transform(e=>new yt(e)),M(Number).transform(e=>new yt(e)),M(yt)]));let No=yt;const se=class extends at{constructor(t){super(t.valueOf())}length(t){return t.valueOf()/this.valueOf()}size(t){return new Hn(t*this.valueOf())}};b(se,"UNKNOWN",new se(0)),b(se,"BIT128",new se(16)),b(se,"BIT64",new se(8)),b(se,"BIT32",new se(4)),b(se,"BIT16",new se(2)),b(se,"BIT8",new se(1)),b(se,"z",Y([Z().transform(e=>new se(e)),M(Number).transform(e=>new se(e)),M(se)]));let le=se;const $e=class $t{constructor(t,r){b(this,"start"),b(this,"end"),typeof t=="object"&&"start"in t?(this.start=new L(t.start),this.end=new L(t.end)):(this.start=new L(t),this.end=new L(r))}get span(){return new R(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.span.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new $t(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(t,r=R.ZERO){if(r.isZero)return this.start.equals(t.start)&&this.end.equals(t.end);let i=this.start.sub(t.start).valueOf(),n=this.end.sub(t.end).valueOf();return i<0&&(i=-i),n<0&&(n=-n),i<=r.valueOf()&&n<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.fString("preciseDate")} - ${this.span.toString()}`}overlapsWith(t,r=R.ZERO){t=t.makeValid();const i=this.makeValid();if(this.equals(t))return!0;if(t.end.equals(i.start)||i.end.equals(t.start))return!1;const n=L.max(i.start,t.start),o=L.min(i.end,t.end);return o.before(n)?!1:new R(o.sub(n)).greaterThanOrEqual(r)}contains(t){return t instanceof $t?this.contains(t.start)&&this.contains(t.end):this.start.beforeEq(t)&&this.end.after(t)}boundBy(t){const r=new $t(this.start,this.end);return t.start.after(this.start)&&(r.start=t.start),t.start.after(this.end)&&(r.end=t.start),t.end.before(this.end)&&(r.end=t.end),t.end.before(this.start)&&(r.start=t.end),r}static max(...t){return new $t(L.min(...t.map(r=>r.start)),L.max(...t.map(r=>r.end)))}};b($e,"MAX",new $e(L.MIN,L.MAX)),b($e,"MIN",new $e(L.MAX,L.MIN)),b($e,"ZERO",new $e(L.ZERO,L.ZERO)),b($e,"z",Y([C({start:L.z,end:L.z}).transform(e=>new $e(e.start,e.end)),M($e)]));let It=$e;const y=class X extends at{constructor(t){if(t instanceof X||typeof t=="string"||typeof t.valueOf()=="string")super(t.valueOf());else{const r=X.ARRAY_CONSTRUCTOR_DATA_TYPES.get(t.constructor.name);if(r==null)throw new Error(`unable to find data type for ${t.toString()}`);super(r.valueOf())}}get Array(){const t=X.ARRAY_CONSTRUCTORS.get(this.toString());if(t==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return t}equals(t){return this.valueOf()===t.valueOf()}matches(...t){return t.some(r=>this.equals(r))}toString(){return this.valueOf()}get isVariable(){return this.equals(X.JSON)||this.equals(X.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(X.UUID)}get isInteger(){const t=this.toString();return t.startsWith("int")||t.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const t=X.DENSITIES.get(this.toString());if(t==null)throw new Error(`unable to find density for ${this.valueOf()}`);return t}get isUnsignedInteger(){return this.equals(X.UINT8)||this.equals(X.UINT16)||this.equals(X.UINT32)||this.equals(X.UINT64)}get isSignedInteger(){return this.equals(X.INT8)||this.equals(X.INT16)||this.equals(X.INT32)||this.equals(X.INT64)}canSafelyCastTo(t){return this.equals(t)?!0:!this.isNumeric||!t.isNumeric||this.isVariable||t.isVariable||this.isUnsignedInteger&&t.isSignedInteger?!1:this.isFloat?t.isFloat&&this.density.valueOf()<=t.density.valueOf():this.equals(X.INT32)&&t.equals(X.FLOAT64)||this.equals(X.INT8)&&t.equals(X.FLOAT32)?!0:this.isInteger&&t.isInteger?this.density.valueOf()<=t.density.valueOf()&&this.isUnsignedInteger===t.isUnsignedInteger:!1}canCastTo(t){return this.isNumeric&&t.isNumeric?!0:this.equals(t)}checkArray(t){return t.constructor===this.Array}get usesBigInt(){return X.BIG_INT_TYPES.some(t=>t.equals(this))}};b(y,"UNKNOWN",new y("unknown")),b(y,"FLOAT64",new y("float64")),b(y,"FLOAT32",new y("float32")),b(y,"INT64",new y("int64")),b(y,"INT32",new y("int32")),b(y,"INT16",new y("int16")),b(y,"INT8",new y("int8")),b(y,"UINT64",new y("uint64")),b(y,"UINT32",new y("uint32")),b(y,"UINT16",new y("uint16")),b(y,"UINT8",new y("uint8")),b(y,"BOOLEAN",y.UINT8),b(y,"TIMESTAMP",new y("timestamp")),b(y,"UUID",new y("uuid")),b(y,"STRING",new y("string")),b(y,"JSON",new y("json")),b(y,"ARRAY_CONSTRUCTORS",new Map([[y.UINT8.toString(),Uint8Array],[y.UINT16.toString(),Uint16Array],[y.UINT32.toString(),Uint32Array],[y.UINT64.toString(),BigUint64Array],[y.FLOAT32.toString(),Float32Array],[y.FLOAT64.toString(),Float64Array],[y.INT8.toString(),Int8Array],[y.INT16.toString(),Int16Array],[y.INT32.toString(),Int32Array],[y.INT64.toString(),BigInt64Array],[y.TIMESTAMP.toString(),BigInt64Array],[y.STRING.toString(),Uint8Array],[y.JSON.toString(),Uint8Array],[y.UUID.toString(),Uint8Array]])),b(y,"ARRAY_CONSTRUCTOR_DATA_TYPES",new Map([[Uint8Array.name,y.UINT8],[Uint16Array.name,y.UINT16],[Uint32Array.name,y.UINT32],[BigUint64Array.name,y.UINT64],[Float32Array.name,y.FLOAT32],[Float64Array.name,y.FLOAT64],[Int8Array.name,y.INT8],[Int16Array.name,y.INT16],[Int32Array.name,y.INT32],[BigInt64Array.name,y.INT64]])),b(y,"DENSITIES",new Map([[y.UINT8.toString(),le.BIT8],[y.UINT16.toString(),le.BIT16],[y.UINT32.toString(),le.BIT32],[y.UINT64.toString(),le.BIT64],[y.FLOAT32.toString(),le.BIT32],[y.FLOAT64.toString(),le.BIT64],[y.INT8.toString(),le.BIT8],[y.INT16.toString(),le.BIT16],[y.INT32.toString(),le.BIT32],[y.INT64.toString(),le.BIT64],[y.TIMESTAMP.toString(),le.BIT64],[y.STRING.toString(),le.UNKNOWN],[y.JSON.toString(),le.UNKNOWN],[y.UUID.toString(),le.BIT128]])),b(y,"ALL",[y.UNKNOWN,y.FLOAT64,y.FLOAT32,y.INT64,y.INT32,y.INT16,y.INT8,y.UINT64,y.UINT32,y.UINT16,y.UINT8,y.TIMESTAMP,y.UUID,y.STRING,y.JSON]),b(y,"BIG_INT_TYPES",[y.INT64,y.UINT64,y.TIMESTAMP]),b(y,"z",Y([G().transform(e=>new y(e)),M(y)]));let H=y;const ce=class ne extends at{constructor(t){super(t.valueOf())}largerThan(t){return this.valueOf()>t.valueOf()}smallerThan(t){return this.valueOf()<t.valueOf()}add(t){return ne.bytes(this.valueOf()+t.valueOf())}sub(t){return ne.bytes(this.valueOf()-t.valueOf())}truncate(t){return new ne(Math.trunc(this.valueOf()/t.valueOf())*t.valueOf())}remainder(t){return ne.bytes(this.valueOf()%t.valueOf())}get gigabytes(){return this.valueOf()/ne.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/ne.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/ne.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/ne.TERABYTE.valueOf()}toString(){const t=this.truncate(ne.TERABYTE),r=this.truncate(ne.GIGABYTE),i=this.truncate(ne.MEGABYTE),n=this.truncate(ne.KILOBYTE),o=this.truncate(ne.BYTE),a=t,s=r.sub(t),u=i.sub(r),c=n.sub(i),d=o.sub(n);let f="";return a.isZero||(f+=`${a.terabytes}TB `),s.isZero||(f+=`${s.gigabytes}GB `),u.isZero||(f+=`${u.megabytes}MB `),c.isZero||(f+=`${c.kilobytes}KB `),(!d.isZero||f==="")&&(f+=`${d.valueOf()}B`),f.trim()}static bytes(t=1){return new ne(t)}static kilobytes(t=1){return ne.bytes(t.valueOf()*1e3)}static megabytes(t=1){return ne.kilobytes(t.valueOf()*1e3)}static gigabytes(t=1){return ne.megabytes(t.valueOf()*1e3)}static terabytes(t){return ne.gigabytes(t.valueOf()*1e3)}get isZero(){return this.valueOf()===0}};b(ce,"BYTE",new ce(1)),b(ce,"KILOBYTE",ce.kilobytes(1)),b(ce,"MEGABYTE",ce.megabytes(1)),b(ce,"GIGABYTE",ce.gigabytes(1)),b(ce,"TERABYTE",ce.terabytes(1)),b(ce,"ZERO",new ce(0)),b(ce,"z",Y([Z().transform(e=>new ce(e)),M(ce)]));let Hn=ce;Y([M(Uint8Array),M(Uint16Array),M(Uint32Array),M(BigUint64Array),M(Float32Array),M(Float64Array),M(Int8Array),M(Int16Array),M(Int32Array),M(BigInt64Array)]);const Tl=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"||e instanceof L||e instanceof R||e instanceof Date},nh=(e,t,r,i=0)=>e.usesBigInt&&!t.usesBigInt?Number(r)-Number(i):!e.usesBigInt&&t.usesBigInt?BigInt(r.valueOf())-BigInt(i.valueOf()):Ht(r,-i).valueOf(),Ht=(e,t)=>t==0?e:e==0?t:typeof e=="bigint"&&typeof t=="bigint"||typeof e=="number"&&typeof t=="number"?e+t:Number(e)+Number(t),rh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function ih(e){return typeof e=="string"&&rh.test(e)}const ue=[];for(let e=0;e<256;++e)ue.push((e+256).toString(16).slice(1));function oh(e,t=0){return(ue[e[t+0]]+ue[e[t+1]]+ue[e[t+2]]+ue[e[t+3]]+"-"+ue[e[t+4]]+ue[e[t+5]]+"-"+ue[e[t+6]]+ue[e[t+7]]+"-"+ue[e[t+8]]+ue[e[t+9]]+"-"+ue[e[t+10]]+ue[e[t+11]]+ue[e[t+12]]+ue[e[t+13]]+ue[e[t+14]]+ue[e[t+15]]).toLowerCase()}function ah(e,t=0){const r=oh(e,t);if(!ih(r))throw TypeError("Stringified UUID is invalid");return r}typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const sh=(e,t)=>ah(e,t),ze=-1,uh=G().transform(e=>new Uint8Array(atob(e).split("").map(t=>t.charCodeAt(0))).buffer),ch=Y([ji(),Oc()]).transform(()=>new Uint8Array().buffer),Qn=10,lh=(e,t)=>{if(e==="string"&&!t.isVariable)throw new Error(`cannot convert series of type ${t.toString()} to string`);if(e==="number"&&!t.isNumeric)throw new Error(`cannot convert series of type ${t.toString()} to number`);if(e==="bigint"&&!t.usesBigInt)throw new Error(`cannot convert series of type ${t.toString()} to bigint`)},Ul="sy_x_telem_series",bt=class He{constructor(t){b(this,"key"),b(this,"discriminator",Ul),b(this,"dataType"),b(this,"sampleOffset"),b(this,"gl"),b(this,"_data"),b(this,"timeRange",It.ZERO),b(this,"alignment",0n),b(this,"cachedMin"),b(this,"cachedMax"),b(this,"writePos",ze),b(this,"_refCount",0),b(this,"cachedLength"),b(this,"_cachedIndexes"),dh(t)&&(t={data:t}),t.data??(t.data=[]);const{dataType:r,timeRange:i,sampleOffset:n=0,glBufferUsage:o="static",alignment:a=0n,key:s=xl(),data:u}=t;if(fh(u)){const f=u;this.key=f.key,this.dataType=f.dataType,this.sampleOffset=f.sampleOffset,this.gl=f.gl,this._data=f._data,this.timeRange=f.timeRange,this.alignment=f.alignment,this.cachedMin=f.cachedMin,this.cachedMax=f.cachedMax,this.writePos=f.writePos,this._refCount=f._refCount,this.cachedLength=f.cachedLength;return}const c=Tl(u),d=Array.isArray(u);if(r!=null)this.dataType=new H(r);else{if(u instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(d||c){let f=u;if(!c){if(u.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");f=u[0]}if(typeof f=="string")this.dataType=H.STRING;else if(typeof f=="number")this.dataType=H.FLOAT64;else if(typeof f=="bigint")this.dataType=H.INT64;else if(typeof f=="boolean")this.dataType=H.BOOLEAN;else if(f instanceof L||f instanceof Date||f instanceof L)this.dataType=H.TIMESTAMP;else if(typeof f=="object")this.dataType=H.JSON;else throw new Error(`cannot infer data type of ${typeof f} when constructing a Series from a JS array`)}else this.dataType=new H(u)}if(!d&&!c)this._data=u;else{let f=c?[u]:u;const $=f[0];($ instanceof L||$ instanceof Date||$ instanceof R)&&(f=f.map(p=>new L(p).valueOf())),this.dataType.equals(H.STRING)?(this.cachedLength=f.length,this._data=new TextEncoder().encode(`${f.join(`
|
|
30
|
+
`)}
|
|
31
|
+
`).buffer):this.dataType.equals(H.JSON)?(this.cachedLength=f.length,this._data=new TextEncoder().encode(`${f.map(p=>Wn.encodeString(p)).join(`
|
|
32
|
+
`)}
|
|
33
|
+
`).buffer):this.dataType.usesBigInt&&typeof $=="number"?this._data=new this.dataType.Array(f.map(p=>BigInt(Math.round(p)))).buffer:!this.dataType.usesBigInt&&typeof $=="bigint"?this._data=new this.dataType.Array(f.map(p=>Number(p))).buffer:this._data=new this.dataType.Array(f).buffer}this.key=s,this.alignment=a,this.sampleOffset=n??0,this.timeRange=i??It.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:o}}static alloc({capacity:t,dataType:r,...i}){if(t===0)throw new Error("[Series] - cannot allocate an array of length 0");const n=new new H(r).Array(t),o=new He({data:n.buffer,dataType:r,...i});return o.writePos=0,o}get refCount(){return this._refCount}acquire(t){this._refCount++,t!=null&&this.updateGLBuffer(t)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(t){if(!t.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(t):this.writeFixed(t)}writeVariable(t){if(this.writePos===ze)return 0;const r=this.byteCapacity.valueOf()-this.writePos,i=t.subBytes(0,r);return this.writeToUnderlyingData(i),this.writePos+=i.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=i.length,this.calculateCachedLength()),i.length}writeFixed(t){if(this.writePos===ze)return 0;const r=this.capacity-this.writePos,i=t.sub(0,r);return this.writeToUnderlyingData(i),this.cachedLength=void 0,this.maybeRecomputeMinMax(i),this.writePos+=i.length,i.length}writeToUnderlyingData(t){this.underlyingData.set(t.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===ze?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
|
|
34
|
+
`).slice(0,-1):Array.from(this).map(t=>t.toString())}toUUIDs(){if(!this.dataType.equals(H.UUID))throw new Error("cannot convert non-uuid series to uuids");const t=H.UUID.density.valueOf(),r=new Uint8Array(this.underlyingData.buffer);return Array.from({length:this.length},(i,n)=>sh(r,n*t))}parseJSON(t){if(!this.dataType.equals(H.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>t.parse(Wn.decodeString(r)))}get byteCapacity(){return new Hn(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===ze?this.byteCapacity:this.dataType.isVariable?new Hn(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===ze?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let t=0;const r=[0];return this.data.forEach((i,n)=>{i===Qn&&(t++,r.push(n+1))}),this._cachedIndexes=r,this.cachedLength=t,t}convert(t,r=0){if(this.dataType.equals(t))return this;const i=new t.Array(this.length);for(let n=0;n<this.length;n++)i[n]=nh(this.dataType,t,this.data[n],r);return new He({data:i.buffer,dataType:t,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(H.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const t=this.data;this.cachedMax=t.reduce((r,i)=>r>i?r:i)}else{const t=this.data;this.cachedMax=t.reduce((r,i)=>r>i?r:i)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??(this.cachedMax=this.calcRawMax()),Ht(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(H.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const t=this.data;this.cachedMin=t.reduce((r,i)=>r<i?r:i)}else{const t=this.data;this.cachedMin=t.reduce((r,i)=>r<i?r:i)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??(this.cachedMin=this.calcRawMin()),Ht(this.cachedMin,this.sampleOffset))}get bounds(){return Ae(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(t){if(this.cachedMin!=null){const r=t.cachedMin??t.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=t.cachedMax??t.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(t,r){const i=Number(t-this.alignment);if(i<0||i>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${i}`);return}return this.at(i,r)}at(t,r){if(this.dataType.isVariable)return this.atVariable(t,r??!1);t<0&&(t=this.length+t);const i=this.data[t];if(i==null){if(r===!0)throw new Error(`[series] - no value at index ${t}`);return}return Ht(i,this.sampleOffset)}atVariable(t,r){let i=0,n=0;if(this._cachedIndexes!=null)i=this._cachedIndexes[t],n=this._cachedIndexes[t+1]-1;else{t<0&&(t=this.length+t);for(let a=0;a<this.data.length;a++)if(this.data[a]===Qn){if(t===0){n=a;break}i=a+1,t--}if(n===0&&(n=this.data.length),i>=n||t>0){if(r)throw new Error(`[series] - no value at index ${t}`);return}}const o=this.data.slice(i,n);return this.dataType.equals(H.STRING)?new TextDecoder().decode(o):ra(JSON.parse(new TextDecoder().decode(o)))}binarySearch(t){let r=0,i=this.length-1;const n=jd(t);for(;r<=i;){const o=Math.floor((r+i)/2),a=n(this.at(o,!0),t);if(a===0)return o;a<0?r=o+1:i=o-1}return r}updateGLBuffer(t){if(this.gl.control=t,!this.dataType.equals(H.FLOAT32)&&!this.dataType.equals(H.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:i,prevBuffer:n}=this.gl;if(r==null&&(this.gl.buffer=t.createBuffer()),this.writePos!==n)if(t.bindBuffer(t.ARRAY_BUFFER,this.gl.buffer),this.writePos!==ze){n===0&&t.bufferData(t.ARRAY_BUFFER,this.byteCapacity.valueOf(),t.STATIC_DRAW);const o=this.dataType.density.size(n).valueOf(),a=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);t.bufferSubData(t.ARRAY_BUFFER,o,a.buffer),this.gl.prevBuffer=this.writePos}else t.bufferData(t.ARRAY_BUFFER,this.buffer,i==="static"?t.STATIC_DRAW:t.DYNAMIC_DRAW),this.gl.prevBuffer=ze}as(t){return lh(t,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:Uo(this.alignmentBounds.lower),upper:Uo(this.alignmentBounds.upper)},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return Ae(this.alignment,this.alignment+BigInt(this.length))}maybeGarbageCollectGLBuffer(t){this.gl.buffer!=null&&(t.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const t=new mh(this);return this.dataType.equals(H.JSON)?new ph(t):t}return new hh(this)}slice(t,r){return this.sliceSub(!1,t,r)}sub(t,r){return this.sliceSub(!0,t,r)}subIterator(t,r){return new To(this,t,r??this.length)}subAlignmentIterator(t,r){return new To(this,Number(t-this.alignment),Number(r-this.alignment))}subBytes(t,r){if(t>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const i=this.data.subarray(t,r);return new He({data:i,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(t)})}sliceSub(t,r,i){if(r<=0&&(i==null||i>=this.length))return this;let n;return t?n=this.data.subarray(r,i):n=this.data.slice(r,i),new He({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(t){return new He({data:this.buffer,dataType:this.dataType,timeRange:It.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:t})}toString(){var t,r;let i=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)i+=Array.from(this).map(n=>n.toString());else{for(let n=0;n<5;n++)i+=`${(t=this.at(n))==null?void 0:t.toString()}`,i+=",";i+="...,";for(let n=-5;n<0;n++)i+=(r=this.at(n))==null?void 0:r.toString(),n<-1&&(i+=",")}return i+="])",i}};b(bt,"crudeZ",C({timeRange:It.z.optional(),dataType:H.z,alignment:zl().optional(),data:Y([uh,ch,M(ArrayBuffer),M(Uint8Array)]),glBufferUsage:th.optional().default("static").optional()})),b(bt,"z",bt.crudeZ.transform(e=>new bt(e)));let Zl=bt;const dh=e=>e==null?!1:Array.isArray(e)||e instanceof ArrayBuffer||ArrayBuffer.isView(e)&&!(e instanceof DataView)||e instanceof Zl?!0:Tl(e),fh=eh(Ul,Zl);class To{constructor(t,r,i){b(this,"series"),b(this,"end"),b(this,"index"),this.series=t;const n=Ae(0,t.length);this.end=So(n,i),this.index=So(n,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}class mh{constructor(t){if(b(this,"series"),b(this,"index"),b(this,"decoder"),!t.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=t,this.index=0,this.decoder=new TextDecoder}next(){const t=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==Qn;)this.index++;const i=this.index;return t===i?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(t,i))})}}const jl=class El{constructor(t){b(this,"wrapped"),this.wrapped=t}next(){const t=this.wrapped.next();return t.done===!0?{done:!0,value:void 0}:{done:!1,value:Wn.decodeString(t.value,El.schema)}}};b(jl,"schema",zn(G(),ot()));let ph=jl;class hh{constructor(t){b(this,"series"),b(this,"index"),this.series=t,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}const Uo=e=>{const t=e>>32n,r=e&0xffffffffn;return{domain:t,sample:r}},vh=(e,t,r=".")=>{const i=e.split(r);return i.map((n,o)=>{const a=t(n,o,i);return a==null?null:typeof a=="string"?a:a.join(r)}).filter(n=>n!=null).join(r)},Pl=(e,t,r={optional:!1,separator:"."})=>{r.separator??(r.separator=".");const{optional:i,getter:n=(s,u)=>s[u]}=r,o=t.split(r.separator);if(o.length===1&&o[0]==="")return e;let a=e;for(const s of o){const u=n(a,s);if(u==null){if(i)return null;throw new Error(`Path ${t} does not exist. ${s} is null`)}a=u}return a},gh=(e,t,r)=>{const i=t.split(".");let n=e;for(let o=0;o<i.length-1;o++){const a=i[o];n[a]??(n[a]={}),n=n[a]}try{n[i[i.length-1]]=r}catch(o){throw console.error("failed to set value",r,"at path",t,"on object",e),o}},yh=(e,t)=>{const r=t.split(".");let i=e;for(let n=0;n<r.length-1;n++){const o=r[n];if(i[o]==null)return;i=i[o]}if(Array.isArray(i)){const n=parseInt(r[r.length-1]);if(isNaN(n))return;i.splice(n,1);return}delete i[r[r.length-1]]},$h=(e,t)=>{const r=e.split(".");return t<0?r[r.length+t]:r[t]},bh=(e,t)=>{try{return Pl(e,t),!0}catch{return!1}},_h=(e,t)=>{if(t.length===0)return!0;const r=e.split("."),i=t.split(".");if(i.length>r.length)return!1;for(let n=0;n<i.length;n++){const o=r[n],a=i[n];if(a!=="*"&&o!==a)return!1}return!0},wh=e=>JSON.parse(JSON.stringify(e)),Ih=(e,...t)=>(t.forEach(r=>{let i=e;const n=r.split(".");n.forEach((o,a)=>{typeof i!="object"||i===null||(a===n.length-1?delete i[o]:o in i&&(i=i[o]))})}),e),kh=(e,t,r="")=>{const i={},n=(o,a,s)=>{if(typeof o!=typeof a||o===null||a===null){i[s]=[o,a];return}if(typeof o=="object"&&typeof a=="object")if(Array.isArray(o)&&Array.isArray(a)){if(o.length!==a.length){i[s]=[o,a];return}for(let u=0;u<o.length;u++)n(o[u],a[u],`${s}[${u}]`)}else new Set([...Object.keys(o),...Object.keys(a)]).forEach(u=>{n(o[u],a[u],s!==""?`${s}.${u}`:u)});else o!==a&&(i[s]=[o,a])};return n(e,t,r),i},er=(e,t)=>{const r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){const a=e,s=t;if(a.length!==s.length)return!1;for(let u=0;u<a.length;u++)if(!er(a[u],s[u]))return!1;return!0}if(e==null||t==null||typeof e!="object"||typeof t!="object")return e===t;if("equals"in e)return e.equals(t);const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const a of n){const s=e[a],u=t[a];if(typeof s=="object"&&typeof u=="object"){if(!er(s,u))return!1}else if(s!==u)return!1}return!0},Dl=(e,t)=>{if(typeof e!="object"||e==null)return e===t;const r=Object.keys(e),i=Object.keys(t);if(i.length>r.length)return!1;for(const n of i){const o=e[n],a=t[n];if(typeof o=="object"&&typeof a=="object"){if(!Dl(o,a))return!1}else if(o!==a)return!1}return!0},tr=(e,...t)=>{if(t.length===0)return e;const r=t.shift();if(qt(e)&&qt(r))for(const i in r)try{qt(r[i])?(i in e||Object.assign(e,{[i]:{}}),tr(e[i],r[i])):Object.assign(e,{[i]:r[i]})}catch(n){throw n instanceof TypeError?new TypeError(`.${i}: ${n.message}`):n}return tr(e,...t)},Oh=(e,t,r)=>{const i=(n,o,a)=>{var s,u,c;if(((s=a.def)==null?void 0:s.type)==="union")return a.def.options.reduce((d,f)=>i(d,o,f),n);if(((u=a.def)==null?void 0:u.type)==="intersection"){const d=i(n,o,a.def.left);return i(d,o,a.def.right)}for(const d in o){const f=o[d];let $=a==null?void 0:a.shape;if($!=null)for(;$!=null;){if($[d]!=null){const p=$[d].safeParse(f);if(p.success){n[d]=p.data;break}}$=(c=$.def)==null?void 0:c.shape}typeof f=="object"&&!Array.isArray(f)&&f!==null&&a&&a.shape&&a.shape[d]&&(n[d]||(n[d]={}),i(n[d],f,a.shape[d]))}return n};return i({...e},t,r)},Xi=Object.freeze(Object.defineProperty({__proto__:null,copy:wh,deleteD:Ih,difference:kh,element:$h,equal:er,get:Pl,has:bh,override:tr,overrideValidItems:Oh,partialEqual:Dl,pathsMatch:_h,remove:yh,set:gh,transformPath:vh},Symbol.toStringTag,{value:"Module"}));C({key:G(),value:G()});zn(Y([Z(),G(),Ic()]),ot());const Al=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Sh=Al(),Rl=["macOS","Windows","Linux"],zh=["macos","windows","linux"],xh={macos:"macOS",windows:"Windows",linux:"Linux"},Nh=oe(Rl).or(oe(zh).transform(e=>xh[e])),Th=()=>{if(typeof window>"u")return;const e=window.navigator.userAgent.toLowerCase();if(e.includes("mac"))return"macOS";if(e.includes("win"))return"Windows";if(e.includes("linux"))return"Linux"};let Rn;const Uh=(e={})=>{const{force:t,default:r}=e;return t??Rn??(Rn=Th(),Rn??r)},Zh=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:Rl,RUNTIME:Sh,detect:Al,getOS:Uh,osZ:Nh},Symbol.toStringTag,{value:"Module"}));var jh=Object.defineProperty,Eh=(e,t,r)=>t in e?jh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_t=(e,t,r)=>Eh(e,typeof t!="symbol"?t+"":t,r);const Ph=(...e)=>e.map(Cl).join(""),Cl=e=>(e.endsWith("/")||(e+="/"),e.startsWith("/")&&(e=e.slice(1)),e),Dh=e=>e.endsWith("/")?e.slice(0,-1):e,Zo=class nr{constructor({host:t,port:r,protocol:i="",pathPrefix:n=""}){_t(this,"protocol"),_t(this,"host"),_t(this,"port"),_t(this,"path"),this.protocol=i,this.host=t,this.port=r,this.path=Cl(n)}replace(t){return new nr({host:t.host??this.host,port:t.port??this.port,protocol:t.protocol??this.protocol,pathPrefix:t.pathPrefix??this.path})}child(t){return new nr({...this,pathPrefix:Ph(this.path,t)})}toString(){return Dh(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}};_t(Zo,"UNKNOWN",new Zo({host:"unknown",port:0}));var Ah=Object.defineProperty,Rh=(e,t,r)=>t in e?Ah(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ee=(e,t,r)=>Rh(e,typeof t!="symbol"?t+"":t,r);const Ch=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${U(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${w(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Lh(){return{localeError:Ch()}}const Mh=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${U(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${w(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Wh(){return{localeError:Mh()}}function jo(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Bh=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${U(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),u=jo(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${u}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),u=jo(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${u}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${w(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Fh(){return{localeError:Bh()}}const Jh=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${U(n.values[0])}`:`Opció invàlida: s'esperava una de ${w(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function Vh(){return{localeError:Jh()}}const qh=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${U(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${w(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function Gh(){return{localeError:qh()}}const Kh=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${U(n.values[0])}`:`Ungültige Option: erwartet eine von ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${w(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function Yh(){return{localeError:Kh()}}const Xh=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Hh=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Xh(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${U(i.values[0])}`:`Invalid option: expected one of ${w(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${w(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Ll(){return{localeError:Hh()}}const Qh=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${U(n.values[0])}`:`Opción inválida: se esperaba una de ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function ev(){return{localeError:Qh()}}const tv=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${U(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${w(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${w(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function nv(){return{localeError:tv()}}const rv=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${U(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${w(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function iv(){return{localeError:rv()}}const ov=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${U(n.values[0])} attendu`:`Option invalide : une valeur parmi ${w(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${w(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function av(){return{localeError:ov()}}const sv=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${U(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${w(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function uv(){return{localeError:sv()}}const cv=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${U(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${a.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${w(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function lv(){return{localeError:cv()}}const dv=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${U(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function fv(){return{localeError:dv()}}const mv=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${U(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function pv(){return{localeError:mv()}}const hv=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${U(n.values[0])}`:`Opzione non valida: atteso uno tra ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${w(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function vv(){return{localeError:hv()}}const gv=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${U(n.values[0])}が期待されました`:`無効な選択: ${w(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${w(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function yv(){return{localeError:gv()}}const $v=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${U(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${w(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function bv(){return{localeError:$v()}}const _v=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${U(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${w(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",s=t(n.origin),u=(s==null?void 0:s.unit)??"요소";return s?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${u} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",s=t(n.origin),u=(s==null?void 0:s.unit)??"요소";return s?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${u} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${w(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function wv(){return{localeError:_v()}}const Iv=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(n.values[0])}`:`Грешана опција: се очекува една ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${w(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function kv(){return{localeError:Iv()}}const Ov=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${U(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${w(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Sv(){return{localeError:Ov()}}const zv=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${U(n.values[0])}`:`Ongeldige optie: verwacht één van ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function xv(){return{localeError:zv()}}const Nv=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${U(n.values[0])}`:`Ugyldig valg: forventet en av ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${w(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Tv(){return{localeError:Nv()}}const Uv=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${U(n.values[0])}`:`Fâsit tercih: mûteberler ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Zv(){return{localeError:Uv()}}const jv=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${U(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${w(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${w(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Ev(){return{localeError:jv()}}const Pv=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${U(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Dv(){return{localeError:Pv()}}const Av=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${U(n.values[0])}`:`Opção inválida: esperada uma das ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function Rv(){return{localeError:Av()}}function Eo(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Cv=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${U(n.values[0])}`:`Неверный вариант: ожидалось одно из ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),u=Eo(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${u}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),u=Eo(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${u}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function Lv(){return{localeError:Cv()}}const Mv=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${U(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${w(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Wv(){return{localeError:Mv()}}const Bv=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${U(n.values[0])}`:`Ogiltigt val: förväntade en av ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${w(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function Fv(){return{localeError:Bv()}}const Jv=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${U(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${w(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${w(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Vv(){return{localeError:Jv()}}const qv=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${U(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${w(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Gv(){return{localeError:qv()}}const Kv=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Yv=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${Kv(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${U(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${w(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${w(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Xv(){return{localeError:Yv()}}const Hv=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${U(n.values[0])}`:`Неправильна опція: очікується одне з ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${w(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Qv(){return{localeError:Hv()}}const eg=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${U(n.values[0])} متوقع تھا`:`غلط آپشن: ${w(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${w(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function tg(){return{localeError:eg()}}const ng=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${U(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${w(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function rg(){return{localeError:ng()}}const ig=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${U(n.values[0])}`:`无效选项:期望以下之一 ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${w(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function og(){return{localeError:ig()}}const ag=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${U(n.values[0])}`:`無效的選項:預期為以下其中之一 ${w(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${w(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function sg(){return{localeError:ag()}}const Ml=Object.freeze(Object.defineProperty({__proto__:null,ar:Lh,az:Wh,be:Fh,ca:Vh,cs:Gh,de:Yh,en:Ll,es:ev,fa:nv,fi:iv,fr:av,frCA:uv,he:lv,hu:fv,id:pv,it:vv,ja:yv,kh:bv,ko:wv,mk:kv,ms:Sv,nl:xv,no:Tv,ota:Zv,pl:Dv,ps:Ev,pt:Rv,ru:Lv,sl:Wv,sv:Fv,ta:Vv,th:Gv,tr:Xv,ua:Qv,ur:tg,vi:rg,zhCN:og,zhTW:sg},Symbol.toStringTag,{value:"Module"}));class Wl{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?Bn(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=t(...n);return this._def.output?Bn(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await Fn(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await t(...n);return this._def.output?Fn(this._def.output,o,void 0,{callee:r}):o};return r}input(...t){const r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new gn({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){const r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}}function Bl(e){return new Wl({type:"function",input:Array.isArray(e==null?void 0:e.input)?uc(gn,e==null?void 0:e.input):(e==null?void 0:e.input)??ui(Ir,on(nn)),output:(e==null?void 0:e.output)??on(nn)})}class rr{constructor(t){this.counter=0,this.metadataRegistry=(t==null?void 0:t.metadata)??Pe,this.target=(t==null?void 0:t.target)??"draft-2020-12",this.unrepresentable=(t==null?void 0:t.unrepresentable)??"throw",this.override=(t==null?void 0:t.override)??(()=>{}),this.io=(t==null?void 0:t.io)??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var i,n,o,a;const s=t._zod.def,u={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},c=this.seen.get(t);if(c)return c.count++,r.schemaPath.includes(t)&&(c.cycle=r.path),c.schema;const d={schema:{},count:1,cycle:void 0};this.seen.set(t,d);const f=(n=(i=t._zod).toJSONSchema)==null?void 0:n.call(i);if(f)d.schema=f;else{const p={...r,schemaPath:[...r.schemaPath,t],path:r.path},k=t._zod.parent;if(k)d.ref=k,this.process(k,p),this.seen.get(k).isParent=!0;else{const O=d.schema;switch(s.type){case"string":{const m=O;m.type="string";const{minimum:_,maximum:g,format:I,patterns:S,contentEncoding:P}=t._zod.bag;if(typeof _=="number"&&(m.minLength=_),typeof g=="number"&&(m.maxLength=g),I&&(m.format=u[I]??I,m.format===""&&delete m.format),P&&(m.contentEncoding=P),S&&S.size>0){const ae=[...S];ae.length===1?m.pattern=ae[0].source:ae.length>1&&(d.schema.allOf=[...ae.map(je=>({...this.target==="draft-7"?{type:"string"}:{},pattern:je.source}))])}break}case"number":{const m=O,{minimum:_,maximum:g,format:I,multipleOf:S,exclusiveMaximum:P,exclusiveMinimum:ae}=t._zod.bag;typeof I=="string"&&I.includes("int")?m.type="integer":m.type="number",typeof ae=="number"&&(m.exclusiveMinimum=ae),typeof _=="number"&&(m.minimum=_,typeof ae=="number"&&(ae>=_?delete m.minimum:delete m.exclusiveMinimum)),typeof P=="number"&&(m.exclusiveMaximum=P),typeof g=="number"&&(m.maximum=g,typeof P=="number"&&(P<=g?delete m.maximum:delete m.exclusiveMaximum)),typeof S=="number"&&(m.multipleOf=S);break}case"boolean":{const m=O;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"undefined":{const m=O;m.type="null";break}case"null":{O.type="null";break}case"any":break;case"unknown":break;case"never":{O.not={};break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const m=O,{minimum:_,maximum:g}=t._zod.bag;typeof _=="number"&&(m.minItems=_),typeof g=="number"&&(m.maxItems=g),m.type="array",m.items=this.process(s.element,{...p,path:[...p.path,"items"]});break}case"object":{const m=O;m.type="object",m.properties={};const _=s.shape;for(const S in _)m.properties[S]=this.process(_[S],{...p,path:[...p.path,"properties",S]});const g=new Set(Object.keys(_)),I=new Set([...g].filter(S=>{const P=s.shape[S]._zod;return this.io==="input"?P.optin===void 0:P.optout===void 0}));I.size>0&&(m.required=Array.from(I)),((o=s.catchall)==null?void 0:o._zod.def.type)==="never"?m.additionalProperties=!1:s.catchall?s.catchall&&(m.additionalProperties=this.process(s.catchall,{...p,path:[...p.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{const m=O;m.anyOf=s.options.map((_,g)=>this.process(_,{...p,path:[...p.path,"anyOf",g]}));break}case"intersection":{const m=O,_=this.process(s.left,{...p,path:[...p.path,"allOf",0]}),g=this.process(s.right,{...p,path:[...p.path,"allOf",1]}),I=P=>"allOf"in P&&Object.keys(P).length===1,S=[...I(_)?_.allOf:[_],...I(g)?g.allOf:[g]];m.allOf=S;break}case"tuple":{const m=O;m.type="array";const _=s.items.map((S,P)=>this.process(S,{...p,path:[...p.path,"prefixItems",P]}));if(this.target==="draft-2020-12"?m.prefixItems=_:m.items=_,s.rest){const S=this.process(s.rest,{...p,path:[...p.path,"items"]});this.target==="draft-2020-12"?m.items=S:m.additionalItems=S}s.rest&&(m.items=this.process(s.rest,{...p,path:[...p.path,"items"]}));const{minimum:g,maximum:I}=t._zod.bag;typeof g=="number"&&(m.minItems=g),typeof I=="number"&&(m.maxItems=I);break}case"record":{const m=O;m.type="object",m.propertyNames=this.process(s.keyType,{...p,path:[...p.path,"propertyNames"]}),m.additionalProperties=this.process(s.valueType,{...p,path:[...p.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const m=O,_=sr(s.entries);_.every(g=>typeof g=="number")&&(m.type="number"),_.every(g=>typeof g=="string")&&(m.type="string"),m.enum=_;break}case"literal":{const m=O,_=[];for(const g of s.values)if(g===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof g=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");_.push(Number(g))}else _.push(g);if(_.length!==0)if(_.length===1){const g=_[0];m.type=g===null?"null":typeof g,m.const=g}else _.every(g=>typeof g=="number")&&(m.type="number"),_.every(g=>typeof g=="string")&&(m.type="string"),_.every(g=>typeof g=="boolean")&&(m.type="string"),_.every(g=>g===null)&&(m.type="null"),m.enum=_;break}case"file":{const m=O,_={type:"string",format:"binary",contentEncoding:"binary"},{minimum:g,maximum:I,mime:S}=t._zod.bag;g!==void 0&&(_.minLength=g),I!==void 0&&(_.maxLength=I),S?S.length===1?(_.contentMediaType=S[0],Object.assign(m,_)):m.anyOf=S.map(P=>({..._,contentMediaType:P})):Object.assign(m,_);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const m=this.process(s.innerType,p);O.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(s.innerType,p),d.ref=s.innerType;break}case"success":{const m=O;m.type="boolean";break}case"default":{this.process(s.innerType,p),d.ref=s.innerType,O.default=JSON.parse(JSON.stringify(s.defaultValue));break}case"prefault":{this.process(s.innerType,p),d.ref=s.innerType,this.io==="input"&&(O._prefault=JSON.parse(JSON.stringify(s.defaultValue)));break}case"catch":{this.process(s.innerType,p),d.ref=s.innerType;let m;try{m=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}O.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const m=O,_=t._zod.pattern;if(!_)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=_.source;break}case"pipe":{const m=this.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;this.process(m,p),d.ref=m;break}case"readonly":{this.process(s.innerType,p),d.ref=s.innerType,O.readOnly=!0;break}case"promise":{this.process(s.innerType,p),d.ref=s.innerType;break}case"optional":{this.process(s.innerType,p),d.ref=s.innerType;break}case"lazy":{const m=t._zod.innerType;this.process(m,p),d.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const $=this.metadataRegistry.get(t);return $&&Object.assign(d.schema,$),this.io==="input"&&re(t)&&(delete d.schema.examples,delete d.schema.default),this.io==="input"&&d.schema._prefault&&((a=d.schema).default??(a.default=d.schema._prefault)),delete d.schema._prefault,this.seen.get(t).schema}emit(t,r){var i,n,o,a;const s={cycles:(r==null?void 0:r.cycles)??"ref",reused:(r==null?void 0:r.reused)??"inline",external:(r==null?void 0:r.external)??void 0},u=this.seen.get(t);if(!u)throw new Error("Unprocessed schema. This is a bug in Zod.");const c=k=>{var O;const m=this.target==="draft-2020-12"?"$defs":"definitions";if(s.external){const I=(O=s.external.registry.get(k[0]))==null?void 0:O.id;if(I)return{ref:s.external.uri(I)};const S=k[1].defId??k[1].schema.id??`schema${this.counter++}`;return k[1].defId=S,{defId:S,ref:`${s.external.uri("__shared")}#/${m}/${S}`}}if(k[1]===u)return{ref:"#"};const _=`#/${m}/`,g=k[1].schema.id??`__schema${this.counter++}`;return{defId:g,ref:_+g}},d=k=>{if(k[1].schema.$ref)return;const O=k[1],{ref:m,defId:_}=c(k);O.def={...O.schema},_&&(O.defId=_);const g=O.schema;for(const I in g)delete g[I];g.$ref=m};for(const k of this.seen.entries()){const O=k[1];if(t===k[0]){d(k);continue}if(s.external){const m=(i=s.external.registry.get(k[0]))==null?void 0:i.id;if(t!==k[0]&&m){d(k);continue}}if((n=this.metadataRegistry.get(k[0]))!=null&&n.id){d(k);continue}if(O.cycle){if(s.cycles==="throw")throw new Error(`Cycle detected: #/${(o=O.cycle)==null?void 0:o.join("/")}/<root>
|
|
35
|
+
|
|
36
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);s.cycles==="ref"&&d(k);continue}if(O.count>1&&s.reused==="ref"){d(k);continue}}const f=(k,O)=>{const m=this.seen.get(k),_=m.def??m.schema,g={..._};if(m.ref===null)return;const I=m.ref;if(m.ref=null,I){f(I,O);const S=this.seen.get(I).schema;S.$ref&&O.target==="draft-7"?(_.allOf=_.allOf??[],_.allOf.push(S)):(Object.assign(_,S),Object.assign(_,g))}m.isParent||this.override({zodSchema:k,jsonSchema:_})};for(const k of[...this.seen.entries()].reverse())f(k[0],{target:this.target});const $={};this.target==="draft-2020-12"?$.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?$.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign($,u.def);const p=((a=s.external)==null?void 0:a.defs)??{};for(const k of this.seen.entries()){const O=k[1];O.def&&O.defId&&(p[O.defId]=O.def)}!s.external&&Object.keys(p).length>0&&(this.target==="draft-2020-12"?$.$defs=p:$.definitions=p);try{return JSON.parse(JSON.stringify($))}catch{throw new Error("Error converting schema to JSON.")}}}function Fl(e,t){if(e instanceof zr){const i=new rr(t),n={};for(const s of e._idmap.entries()){const[u,c]=s;i.process(c)}const o={},a={registry:e,uri:(t==null?void 0:t.uri)||(s=>s),defs:n};for(const s of e._idmap.entries()){const[u,c]=s;o[u]=i.emit(c,{...t,external:a})}if(Object.keys(n).length>0){const s=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[s]:n}}return{schemas:o}}const r=new rr(t);return r.process(e),r.emit(e,t)}function re(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return re(i.element,r);case"object":{for(const n in i.shape)if(re(i.shape[n],r))return!0;return!1}case"union":{for(const n of i.options)if(re(n,r))return!0;return!1}case"intersection":return re(i.left,r)||re(i.right,r);case"tuple":{for(const n of i.items)if(re(n,r))return!0;return!!(i.rest&&re(i.rest,r))}case"record":return re(i.keyType,r)||re(i.valueType,r);case"map":return re(i.keyType,r)||re(i.valueType,r);case"set":return re(i.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return re(i.innerType,r);case"lazy":return re(i.getter(),r);case"default":return re(i.innerType,r);case"prefault":return re(i.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return re(i.in,r)||re(i.out,r);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${i.type}`)}const ug=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cg=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:eu,$ZodArray:Ir,$ZodAsyncError:tt,$ZodBase64:Bs,$ZodBase64URL:Js,$ZodBigInt:wr,$ZodBigIntFormat:Ys,$ZodBoolean:_r,$ZodCIDRv4:Ms,$ZodCIDRv6:Ws,$ZodCUID:Ts,$ZodCUID2:Us,$ZodCatch:$u,$ZodCheck:te,$ZodCheckBigIntFormat:as,$ZodCheckEndsWith:ys,$ZodCheckGreaterThan:yr,$ZodCheckIncludes:vs,$ZodCheckLengthEquals:fs,$ZodCheckLessThan:gr,$ZodCheckLowerCase:ps,$ZodCheckMaxLength:ls,$ZodCheckMaxSize:ss,$ZodCheckMimeType:bs,$ZodCheckMinLength:ds,$ZodCheckMinSize:us,$ZodCheckMultipleOf:is,$ZodCheckNumberFormat:os,$ZodCheckOverwrite:_s,$ZodCheckProperty:$s,$ZodCheckRegex:ms,$ZodCheckSizeEquals:cs,$ZodCheckStartsWith:gs,$ZodCheckStringFormat:Et,$ZodCheckUpperCase:hs,$ZodCustom:Ou,$ZodDate:ru,$ZodDefault:hu,$ZodDiscriminatedUnion:ou,$ZodE164:Vs,$ZodEmail:Ss,$ZodEmoji:xs,$ZodEnum:lu,$ZodError:cr,$ZodFile:fu,$ZodFunction:Wl,$ZodGUID:ks,$ZodIPv4:Cs,$ZodIPv6:Ls,$ZodISODate:Ds,$ZodISODateTime:Ps,$ZodISODuration:Rs,$ZodISOTime:As,$ZodIntersection:au,$ZodJWT:Gs,$ZodKSUID:Es,$ZodLazy:ku,$ZodLiteral:du,$ZodMap:uu,$ZodNaN:bu,$ZodNanoID:Ns,$ZodNever:tu,$ZodNonOptional:gu,$ZodNull:Qs,$ZodNullable:pu,$ZodNumber:br,$ZodNumberFormat:Ks,$ZodObject:iu,$ZodOptional:mu,$ZodPipe:Sr,$ZodPrefault:vu,$ZodPromise:Iu,$ZodReadonly:_u,$ZodRealError:jt,$ZodRecord:su,$ZodRegistry:zr,$ZodSet:cu,$ZodString:Pt,$ZodStringFormat:B,$ZodSuccess:yu,$ZodSymbol:Xs,$ZodTemplateLiteral:wu,$ZodTransform:Or,$ZodTuple:gn,$ZodType:N,$ZodULID:Zs,$ZodURL:zs,$ZodUUID:Os,$ZodUndefined:Hs,$ZodUnion:kr,$ZodUnknown:nn,$ZodVoid:nu,$ZodXID:js,$brand:ia,$constructor:l,$input:zu,$output:Su,Doc:ws,JSONSchema:ug,JSONSchemaGenerator:rr,TimePrecision:Tu,_any:Xu,_array:ui,_base64:Vr,_base64url:qr,_bigint:Fu,_boolean:Wu,_catch:$f,_cidrv4:Fr,_cidrv6:Jr,_coercedBigint:Ju,_coercedBoolean:Bu,_coercedDate:tc,_coercedNumber:Du,_coercedString:Nu,_cuid:Ar,_cuid2:Rr,_custom:lc,_date:ec,_default:vf,_discriminatedUnion:of,_e164:Gr,_email:Nr,_emoji:Pr,_endsWith:ni,_enum:lf,_file:cc,_float32:Ru,_float64:Cu,_gt:Me,_gte:fe,_guid:rn,_includes:ei,_int:Au,_int32:Lu,_int64:Vu,_intersection:af,_ipv4:Wr,_ipv6:Br,_isoDate:Zu,_isoDateTime:Uu,_isoDuration:Eu,_isoTime:ju,_jwt:Kr,_ksuid:Mr,_lazy:If,_length:bn,_literal:ff,_lowercase:Hr,_lt:Le,_lte:ve,_map:uf,_max:ve,_maxLength:$n,_maxSize:yn,_mime:ri,_min:fe,_minLength:it,_minSize:zt,_multipleOf:St,_nan:nc,_nanoid:Dr,_nativeEnum:df,_negative:ic,_never:Hu,_nonnegative:ac,_nonoptional:gf,_nonpositive:oc,_normalize:ii,_null:Yu,_nullable:hf,_number:Pu,_optional:pf,_overwrite:Ge,_parse:fr,_parseAsync:mr,_pipe:bf,_positive:rc,_promise:kf,_property:sc,_readonly:_f,_record:sf,_refine:dc,_regex:Xr,_safeParse:pr,_safeParseAsync:hr,_set:cf,_size:Yr,_startsWith:ti,_string:xu,_stringbool:fc,_success:yf,_symbol:Gu,_templateLiteral:wf,_toLowerCase:ai,_toUpperCase:si,_transform:mf,_trim:oi,_tuple:uc,_uint32:Mu,_uint64:qu,_ulid:Cr,_undefined:Ku,_union:rf,_unknown:on,_uppercase:Qr,_url:Er,_uuid:Tr,_uuidv4:Ur,_uuidv6:Zr,_uuidv7:jr,_void:Qu,_xid:Lr,clone:_e,config:de,flattenError:lr,formatError:dr,function:Bl,globalConfig:Qt,globalRegistry:Pe,isValidBase64:$r,isValidBase64URL:Fs,isValidJWT:qs,locales:Ml,parse:Bn,parseAsync:Fn,prettifyError:_a,regexes:ns,registry:xr,safeParse:wa,safeParseAsync:Ia,toDotPath:ba,toJSONSchema:Fl,treeifyError:$a,util:qd,version:Is},Symbol.toStringTag,{value:"Module"})),lg={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"},dg=Object.freeze({status:"aborted"}),fg=dg;function mg(e){de({customError:e})}function pg(){return de().customError}de(Ll());const Q=Object.freeze(Object.defineProperty({__proto__:null,$brand:ia,$input:zu,$output:Su,NEVER:fg,TimePrecision:Tu,ZodAny:zc,ZodArray:Uc,ZodBase64:zi,ZodBase64URL:xi,ZodBigInt:kn,ZodBigIntFormat:Zi,ZodBoolean:In,ZodCIDRv4:Oi,ZodCIDRv6:Si,ZodCUID:yi,ZodCUID2:$i,ZodCatch:Gc,ZodCustom:xn,ZodDate:Ei,ZodDefault:Wc,ZodDiscriminatedUnion:Zc,ZodE164:Ni,ZodEmail:pi,ZodEmoji:vi,ZodEnum:xt,ZodError:Sf,ZodFile:Lc,ZodGUID:an,ZodIPv4:Ii,ZodIPv6:ki,ZodISODate:li,ZodISODateTime:ci,ZodISODuration:fi,ZodISOTime:di,ZodIntersection:jc,ZodIssueCode:lg,ZodJWT:Ti,ZodKSUID:wi,ZodLazy:el,ZodLiteral:Rc,ZodMap:Dc,ZodNaN:Yc,ZodNanoID:gi,ZodNever:Nc,ZodNonOptional:Li,ZodNull:Sc,ZodNullable:Mc,ZodNumber:wn,ZodNumberFormat:ut,ZodObject:Sn,ZodOptional:Ci,ZodPipe:Mi,ZodPrefault:Fc,ZodPromise:nl,ZodReadonly:Xc,ZodRealError:Dt,ZodRecord:Di,ZodSet:Ac,ZodString:_n,ZodStringFormat:J,ZodSuccess:qc,ZodSymbol:wc,ZodTemplateLiteral:Qc,ZodTransform:Ai,ZodTuple:Pc,ZodType:j,ZodULID:bi,ZodURL:hi,ZodUUID:ke,ZodUndefined:kc,ZodUnion:Pi,ZodUnknown:xc,ZodVoid:Tc,ZodXID:_i,_ZodString:mi,_default:Bc,any:tm,array:At,base64:Jf,base64url:Vf,bigint:We,boolean:Ui,catch:Kc,check:rl,cidrv4:Bf,cidrv6:Ff,clone:_e,coerce:Yp,config:de,core:cg,cuid:Df,cuid2:Af,custom:ym,date:rm,discriminatedUnion:sm,e164:qf,email:zf,emoji:Ef,endsWith:ni,enum:oe,file:fm,flattenError:lr,float32:Kf,float64:Yf,formatError:dr,function:Bl,getErrorMap:pg,globalRegistry:Pe,gt:Me,gte:fe,guid:xf,includes:ei,instanceof:M,int:Vn,int32:Xf,int64:Qf,intersection:Ec,ipv4:Mf,ipv6:Wf,iso:Of,json:bm,jwt:Gf,keyof:im,ksuid:Lf,lazy:tl,length:bn,literal:Cc,locales:Ml,looseObject:am,lowercase:Hr,lt:Le,lte:ve,map:cm,maxLength:$n,maxSize:yn,mime:ri,minLength:it,minSize:zt,multipleOf:St,nan:hm,nanoid:Pf,nativeEnum:dm,negative:ic,never:On,nonnegative:ac,nonoptional:Vc,nonpositive:oc,normalize:ii,null:ji,nullable:un,nullish:mm,number:Z,object:C,optional:sn,overwrite:Ge,parse:yc,parseAsync:$c,partialRecord:um,pipe:cn,positive:rc,prefault:Jc,preprocess:_m,prettifyError:_a,promise:gm,property:sc,readonly:Hc,record:zn,refine:il,regex:Xr,regexes:ns,registry:xr,safeParse:bc,safeParseAsync:_c,set:lm,setErrorMap:mg,size:Yr,startsWith:ti,strictObject:om,string:G,stringbool:$m,success:pm,superRefine:ol,symbol:Ic,templateLiteral:vm,toJSONSchema:Fl,toLowerCase:ai,toUpperCase:si,transform:Ri,treeifyError:$a,trim:oi,tuple:ct,uint32:Hf,uint64:em,ulid:Rf,undefined:Oc,union:Y,unknown:ot,uppercase:Qr,url:jf,uuid:Nf,uuidv4:Tf,uuidv6:Uf,uuidv7:Zf,void:nm,xid:Cf},Symbol.toStringTag,{value:"Module"}));C({baseInterval:R.z.optional(),maxRetries:Z().optional(),scale:Z().optional()});const hg=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Jl=G().regex(hg),et=Z().min(0).max(255),Vl=Z().min(0).max(1),ql=ct([et,et,et,Vl]),vg=ct([et,et,et]),gg=C({rgba255:ql}),yg=Z().min(0).max(360),$g=Z().min(0).max(100),bg=Z().min(0).max(100),_g=ct([yg,$g,bg,Vl]),Hi=Y([Jl,vg,ql,_g,gg]),wg=Hi.transform(e=>Qi(e)),Qi=(e,t=1)=>{if(e=Hi.parse(e),typeof e=="string")return Ig(e,t);if(Array.isArray(e)){if(e.length<3||e.length>4)throw new Error(`Invalid color: [${e.join(", ")}]`);return e.length===3?[...e,t]:e}return e.rgba255},Ig=(e,t=1)=>(e=Jl.parse(e),e=kg(e),[Wt(e,0),Wt(e,2),Wt(e,4),e.length===8?Wt(e,6)/255:t]),Wt=(e,t)=>parseInt(e.slice(t,t+2),16),kg=e=>e.startsWith("#")?e.slice(1):e;Qi("#000000");Qi("#ffffff");const Og=C({key:G(),color:Hi,position:Z(),switched:Ui().optional()});At(Og);const Sg=C({key:G(),name:G(),color:wg});C({key:G(),name:G(),swatches:At(Sg)});Z().int().min(0).max(255);C({name:G(),key:G()});const zg=e=>Object.getOwnPropertySymbols(globalThis).includes(e),xg=(e,t)=>{const r=Symbol.for(e);if(!zg(r)){const i=t();Object.defineProperty(globalThis,r,{value:i})}return()=>globalThis[r]},Gl="sy_x_error",Ng=e=>t=>t!=null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type.startsWith(e):t instanceof Error?t.message.startsWith(e):typeof t!="string"?!1:t.startsWith(e),eo=e=>{var t;return t=class extends Error{constructor(r,i){super(r,i),Ee(this,"discriminator",t.discriminator),Ee(this,"type",t.TYPE),Ee(this,"matches",t.matches),this.name=t.TYPE}static sub(r){return eo(`${e}.${r}`)}},Ee(t,"discriminator",Gl),Ee(t,"TYPE",e),Ee(t,"matches",Ng(e)),t},Tg=e=>{if(e==null||typeof e!="object")return!1;const t=e;if(t.discriminator!==Gl)return!1;if(!("type"in t))throw new Error(`X Error is missing its type property: ${JSON.stringify(t)}`);return!0},lt="unknown",Po="nil";class Ug{constructor(){Ee(this,"providers",[])}register(t){this.providers.push(t)}encode(t){if(t==null)return{type:Po,data:""};if(Tg(t))for(const r of this.providers){const i=r.encode(t);if(i!=null)return i}if(t instanceof Error)return{type:lt,data:t.message};if(typeof t=="string")return{type:lt,data:t};try{return{type:lt,data:JSON.stringify(t)}}catch{return{type:lt,data:"unable to encode error information"}}}decode(t){if(t==null||t.type===Po)return null;if(t.type===lt)return new Do(t.data);for(const r of this.providers){const i=r.decode(t);if(i!=null)return i}return new Do(t.data)}}xg("synnax-error-registry",()=>new Ug);class Do extends eo("unknown"){}C({type:G(),data:G()});class xw extends eo("canceled"){}const Zg=Q.object({jsonrpc:Q.literal("2.0"),method:Q.string(),params:Q.any().optional(),id:Q.union([Q.string(),Q.number(),Q.null()]).optional()}),Kl=Q.object({jsonrpc:Q.literal("2.0"),id:Q.union([Q.string(),Q.number(),Q.null()])}),jg=Kl.extend({result:Q.json()}),Eg=Kl.extend({error:Q.object({code:Q.number().int(),message:Q.string().optional(),data:Q.json().optional()})}),Pg=Q.union([jg,Eg]);Q.union([Zg,Pg]);G().regex(/^\d+\.\d+\.\d+$/);const Dg=["standard","scientific","engineering"];oe(Dg);oe(["success","info","warning","error","loading","disabled"]);function v(e,t,r){function i(s,u){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,u);for(const d in a.prototype)d in s||Object.defineProperty(s,d,{value:a.prototype[d].bind(s)});s._zod.constr=a,s._zod.def=u}const n=(r==null?void 0:r.Parent)??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(s){var u;const c=r!=null&&r.Parent?new o:this;i(c,s),(u=c._zod).deferred??(u.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>{var u,c;return r!=null&&r.Parent&&s instanceof r.Parent?!0:(c=(u=s==null?void 0:s._zod)==null?void 0:u.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Ut extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Yl={};function Fe(e){return Yl}function Ag(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function Rg(e,t){return typeof t=="bigint"?t.toString():t}function Xl(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function to(e){return e==null}function no(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function q(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ro(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Hl(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function dt(e){return JSON.stringify(e)}function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Cg=Xl(()=>{if(typeof navigator<"u"&&(navigator!=null&&navigator.userAgent.includes("Cloudflare")))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ao(e){if(ir(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(ir(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}const Lg=new Set(["string","number","symbol"]);function Zn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ke(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(i._zod.parent=e),i}function x(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Mg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Wg(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return Ke(e,{...e._zod.def,shape:r,checks:[]})}function Bg(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return Ke(e,{...e._zod.def,shape:r,checks:[]})}function Fg(e,t){const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return ro(this,"shape",i),i},checks:[]};return Ke(e,r)}function Jg(e,t){return Ke(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ro(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Vg(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Ke(t,{...t._zod.def,shape:n,checks:[]})}function qg(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return Ke(t,{...t._zod.def,shape:n,checks:[]})}function kt(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r].continue!==!0)return!0;return!1}function io(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Bt(e){return typeof e=="string"?e:e==null?void 0:e.message}function Je(e,t,r){var n,o,a,s,u,c;const i={...e,path:e.path??[]};if(!e.message){const d=Bt((a=(o=(n=e.inst)==null?void 0:n._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??Bt((s=t==null?void 0:t.error)==null?void 0:s.call(t,e))??Bt((u=r.customError)==null?void 0:u.call(r,e))??Bt((c=r.localeError)==null?void 0:c.call(r,e))??"Invalid input";i.message=d}return delete i.inst,delete i.continue,t!=null&&t.reportInput||delete i.input,i}function oo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zt(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}const Ql=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Rg,2)},enumerable:!0})},ed=v("$ZodError",Ql),td=v("$ZodError",Ql,{Parent:Error});function Gg(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Kg(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)i._errors.push(r(a));else{let s=i,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return n(e),i}const Yg=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ut;if(a.issues.length){const s=new((n==null?void 0:n.Err)??e)(a.issues.map(u=>Je(u,o,Fe())));throw Error.captureStackTrace(s,n==null?void 0:n.callee),s}return a.value},Xg=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new((n==null?void 0:n.Err)??e)(a.issues.map(u=>Je(u,o,Fe())));throw Error.captureStackTrace(s,n==null?void 0:n.callee),s}return a.value},nd=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Ut;return o.issues.length?{success:!1,error:new(e??ed)(o.issues.map(a=>Je(a,n,Fe())))}:{success:!0,data:o.value}},Hg=nd(td),rd=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>Je(a,n,Fe())))}:{success:!0,data:o.value}},Qg=rd(td),ey=/^[cC][^\s-]{8,}$/,ty=/^[0-9a-z]+$/,ny=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ry=/^[0-9a-vA-V]{20}$/,iy=/^[A-Za-z0-9]{27}$/,oy=/^[a-zA-Z0-9_-]{21}$/,ay=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,sy=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ro=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,uy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ly(){return new RegExp(cy,"u")}const dy=/^(?:(?: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])$/,fy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,my=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,py=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,id=/^[A-Za-z0-9_-]*$/,vy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,gy=/^\+(?:[0-9]){6,14}[0-9]$/,od="(?:(?:\\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])))",yy=new RegExp(`^${od}$`);function ad(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $y(e){return new RegExp(`^${ad(e)}$`)}function by(e){const t=ad({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${od}T(?:${i})$`)}const _y=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},wy=/true|false/i,Iy=/^[^A-Z]*$/,ky=/^[^a-z]*$/,we=v("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Oy=v("$ZodCheckMaxLength",(e,t)=>{we.init(e,t),e._zod.when=r=>{const i=r.value;return!to(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=oo(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Sy=v("$ZodCheckMinLength",(e,t)=>{we.init(e,t),e._zod.when=r=>{const i=r.value;return!to(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=oo(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),zy=v("$ZodCheckLengthEquals",(e,t)=>{we.init(e,t),e._zod.when=r=>{const i=r.value;return!to(i)&&i.length!==void 0},e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,n=i.length;if(n===t.length)return;const o=oo(i),a=n>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},input:r.value,inst:e,continue:!t.abort})}}),jn=v("$ZodCheckStringFormat",(e,t)=>{var r;we.init(e,t),e._zod.onattach.push(i=>{const n=i._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),(r=e._zod).check??(r.check=i=>{if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})})}),xy=v("$ZodCheckRegex",(e,t)=>{jn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ny=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Iy),jn.init(e,t)}),Ty=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ky),jn.init(e,t)}),Uy=v("$ZodCheckIncludes",(e,t)=>{we.init(e,t);const r=Zn(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Zy=v("$ZodCheckStartsWith",(e,t)=>{we.init(e,t);const r=new RegExp(`^${Zn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),jy=v("$ZodCheckEndsWith",(e,t)=>{we.init(e,t);const r=new RegExp(`.*${Zn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),Ey=v("$ZodCheckOverwrite",(e,t)=>{we.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Py{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
37
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const t=Function,r=this==null?void 0:this.args,n=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
|
|
38
|
+
`))}}const Dy={major:4,minor:0,patch:0},ee=v("$ZodType",(e,t)=>{var n;var r;e??(e={}),q(e._zod,"id",()=>t.type+"_"+Hl(10)),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dy;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const a of o._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),(n=e._zod.deferred)==null||n.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,s,u)=>{let c=kt(a),d;for(const f of s){if(f._zod.when){if(!f._zod.when(a))continue}else if(c)continue;const $=a.issues.length,p=f._zod.check(a);if(p instanceof Promise&&(u==null?void 0:u.async)===!1)throw new Ut;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,a.issues.length!==$&&(c||(c=kt(a,$)))});else{if(a.issues.length===$)continue;c||(c=kt(a,$))}}return d?d.then(()=>a):a};e._zod.run=(a,s)=>{const u=e._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new Ut;return u.then(c=>o(c,i,s))}return o(u,i,s)}}e["~standard"]={validate:o=>{var a;try{const s=Hg(e,o);return s.success?{value:s.data}:{issues:(a=s.error)==null?void 0:a.issues}}catch{return Qg(e,o).then(u=>{var c;return u.success?{value:u.data}:{issues:(c=u.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}}),ao=v("$ZodString",(e,t)=>{var r;ee.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??_y(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),V=v("$ZodStringFormat",(e,t)=>{jn.init(e,t),ao.init(e,t)}),Ay=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=sy),V.init(e,t)}),Ry=v("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ro(i))}else t.pattern??(t.pattern=Ro());V.init(e,t)}),Cy=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uy),V.init(e,t)}),Ly=v("$ZodURL",(e,t)=>{V.init(e,t),e._zod.check=r=>{try{const i=new URL(r.value);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:vy.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}));return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),My=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ly()),V.init(e,t)}),Wy=v("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=oy),V.init(e,t)}),By=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ey),V.init(e,t)}),Fy=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ty),V.init(e,t)}),Jy=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ny),V.init(e,t)}),Vy=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ry),V.init(e,t)}),qy=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=iy),V.init(e,t)}),Gy=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=by(t)),V.init(e,t),e._zod.check}),Ky=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yy),V.init(e,t)}),Yy=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$y(t)),V.init(e,t),e._zod.check}),Xy=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ay),V.init(e,t)}),Hy=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dy),V.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),Qy=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fy),V.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),e$=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=my),V.init(e,t)}),t$=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=py),V.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function sd(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const n$=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=hy),V.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{sd(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function r$(e){if(!id.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return sd(r)}const i$=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=id),V.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{r$(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),o$=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=gy),V.init(e,t)});function a$(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r,n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const s$=v("$ZodJWT",(e,t)=>{V.init(e,t),e._zod.check=r=>{a$(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),u$=v("$ZodBoolean",(e,t)=>{ee.init(e,t),e._zod.pattern=wy,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),c$=v("$ZodUnknown",(e,t)=>{ee.init(e,t),e._zod.parse=r=>r}),l$=v("$ZodNever",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Co(e,t,r){e.issues.length&&t.issues.push(...io(r,e.issues)),t.value[r]=e.value}const d$=v("$ZodArray",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const s=n[a],u=t.element._zod.run({value:s,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Co(c,r,a))):Co(u,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Ft(e,t,r){e.issues.length&&t.issues.push(...io(r,e.issues)),t.value[r]=e.value}function Lo(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...io(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const f$=v("$ZodObject",(e,t)=>{ee.init(e,t);const r=Xl(()=>{const f=Object.keys(t.shape);for(const p of f)if(!(t.shape[p]instanceof ee))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);const $=Mg(t.shape);return{shape:t.shape,keys:f,keySet:new Set(f),numKeys:f.length,optionalKeys:new Set($)}});q(e._zod,"propValues",()=>{const f=t.shape,$={};for(const p in f){const k=f[p]._zod;if(k.values){$[p]??($[p]=new Set);for(const O of k.values)$[p].add(O)}}return $});const i=f=>{const $=new Py(["shape","payload","ctx"]),{keys:p,optionalKeys:k}=r.value,O=g=>{const I=dt(g);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};$.write("const input = payload.value;");const m=Object.create(null);for(const g of p)m[g]=Hl(15);$.write("const newResult = {}");for(const g of p)if(k.has(g)){const I=m[g];$.write(`const ${I} = ${O(g)};`);const S=dt(g);$.write(`
|
|
39
|
+
if (${I}.issues.length) {
|
|
40
|
+
if (input[${S}] === undefined) {
|
|
41
|
+
if (${S} in input) {
|
|
42
|
+
newResult[${S}] = undefined;
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
payload.issues = payload.issues.concat(
|
|
46
|
+
${I}.issues.map((iss) => ({
|
|
47
|
+
...iss,
|
|
48
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}],
|
|
49
|
+
}))
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
} else if (${I}.value === undefined) {
|
|
53
|
+
if (${S} in input) newResult[${S}] = undefined;
|
|
54
|
+
} else {
|
|
55
|
+
newResult[${S}] = ${I}.value;
|
|
56
|
+
}
|
|
57
|
+
`)}else{const I=m[g];$.write(`const ${I} = ${O(g)};`),$.write(`
|
|
58
|
+
if (${I}.issues.length) payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
59
|
+
...iss,
|
|
60
|
+
path: iss.path ? [${dt(g)}, ...iss.path] : [${dt(g)}]
|
|
61
|
+
})));`),$.write(`newResult[${dt(g)}] = ${I}.value`)}$.write("payload.value = newResult;"),$.write("return payload;");const _=$.compile();return(g,I)=>_(f,g,I)};let n;const o=ir,a=!Yl.jitless,u=a&&Cg.value,{catchall:c}=t;let d;e._zod.parse=(f,$)=>{d??(d=r.value);const p=f.value;if(!o(p))return f.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),f;const k=[];if(a&&u&&($==null?void 0:$.async)===!1&&$.jitless!==!0)n||(n=i(t.shape)),f=n(f,$);else{f.value={};const I=d.shape;for(const S of d.keys){const P=I[S],ae=P._zod.run({value:p[S],issues:[]},$),je=P._zod.optin==="optional"&&P._zod.optout==="optional";ae instanceof Promise?k.push(ae.then(co=>je?Lo(co,f,S,p):Ft(co,f,S))):je?Lo(ae,f,S,p):Ft(ae,f,S)}}if(!c)return k.length?Promise.all(k).then(()=>f):f;const O=[],m=d.keySet,_=c._zod,g=_.def.type;for(const I of Object.keys(p)){if(m.has(I))continue;if(g==="never"){O.push(I);continue}const S=_.run({value:p[I],issues:[]},$);S instanceof Promise?k.push(S.then(P=>Ft(P,f,I))):Ft(S,f,I)}return O.length&&f.issues.push({code:"unrecognized_keys",keys:O,input:p,inst:e}),k.length?Promise.all(k).then(()=>f):f}});function Mo(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>Je(o,i,Fe())))}),t}const m$=v("$ZodUnion",(e,t)=>{ee.init(e,t),q(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),q(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>no(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const a of t.options){const s=a._zod.run({value:r.value,issues:[]},i);if(s instanceof Promise)o.push(s),n=!0;else{if(s.issues.length===0)return s;o.push(s)}}return n?Promise.all(o).then(a=>Mo(a,r,e,i)):Mo(o,r,e,i)}}),p$=v("$ZodIntersection",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{const{value:n}=r,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,c])=>Wo(r,u,c)):Wo(r,o,a)}});function or(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ao(e)&&Ao(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=or(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=or(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Wo(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),kt(e))return e;const i=or(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const h$=v("$ZodEnum",(e,t)=>{ee.init(e,t);const r=Ag(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>Lg.has(typeof i)).map(i=>typeof i=="string"?Zn(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),v$=v("$ZodTransform",(e,t)=>{ee.init(e,t),e._zod.parse=(r,i)=>{const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Ut;return r.value=n,r}}),g$=v("$ZodOptional",(e,t)=>{ee.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${no(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>r.value===void 0?r:t.innerType._zod.run(r,i)}),y$=v("$ZodNullable",(e,t)=>{ee.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${no(r.source)}|null)$`):void 0}),q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),$$=v("$ZodDefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Bo(o,t)):Bo(n,t)}});function Bo(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const b$=v("$ZodPrefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),_$=v("$ZodNonOptional",(e,t)=>{ee.init(e,t),q(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Fo(o,e)):Fo(n,e)}});function Fo(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const w$=v("$ZodCatch",(e,t)=>{ee.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>Je(a,i,Fe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>Je(o,i,Fe()))},input:r.value}),r.issues=[]),r)}}),I$=v("$ZodPipe",(e,t)=>{ee.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Jo(o,t,i)):Jo(n,t,i)}});function Jo(e,t,r){return kt(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const k$=v("$ZodReadonly",(e,t)=>{ee.init(e,t),q(e._zod,"propValues",()=>t.innerType._zod.propValues),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Vo):Vo(n)}});function Vo(e){return e.value=Object.freeze(e.value),e}const O$=v("$ZodCustom",(e,t)=>{we.init(e,t),ee.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>qo(o,r,i,e));qo(n,r,i,e)}});function qo(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Zt(n))}}class S${constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}remove(t){return this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function z$(){return new S$}const Jt=z$();function x$(e,t){return new e({type:"string",...x(t)})}function N$(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...x(t)})}function Go(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...x(t)})}function T$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...x(t)})}function U$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(t)})}function Z$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(t)})}function j$(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(t)})}function E$(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...x(t)})}function P$(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...x(t)})}function D$(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(t)})}function A$(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...x(t)})}function R$(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(t)})}function C$(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...x(t)})}function L$(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...x(t)})}function M$(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(t)})}function W$(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(t)})}function B$(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(t)})}function F$(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x(t)})}function J$(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(t)})}function V$(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...x(t)})}function q$(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...x(t)})}function G$(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...x(t)})}function K$(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...x(t)})}function Y$(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(t)})}function X$(e,t){return new e({type:"string",format:"date",check:"string_format",...x(t)})}function H$(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...x(t)})}function Q$(e,t){return new e({type:"string",format:"duration",check:"string_format",...x(t)})}function eb(e,t){return new e({type:"boolean",...x(t)})}function tb(e){return new e({type:"unknown"})}function nb(e,t){return new e({type:"never",...x(t)})}function ud(e,t){return new Oy({check:"max_length",...x(t),maximum:e})}function fn(e,t){return new Sy({check:"min_length",...x(t),minimum:e})}function cd(e,t){return new zy({check:"length_equals",...x(t),length:e})}function rb(e,t){return new xy({check:"string_format",format:"regex",...x(t),pattern:e})}function ib(e){return new Ny({check:"string_format",format:"lowercase",...x(e)})}function ob(e){return new Ty({check:"string_format",format:"uppercase",...x(e)})}function ab(e,t){return new Uy({check:"string_format",format:"includes",...x(t),includes:e})}function sb(e,t){return new Zy({check:"string_format",format:"starts_with",...x(t),prefix:e})}function ub(e,t){return new jy({check:"string_format",format:"ends_with",...x(t),suffix:e})}function Rt(e){return new Ey({check:"overwrite",tx:e})}function cb(e){return Rt(t=>t.normalize(e))}function lb(){return Rt(e=>e.trim())}function db(){return Rt(e=>e.toLowerCase())}function fb(){return Rt(e=>e.toUpperCase())}function mb(e,t,r){return new e({type:"array",element:t,...x(r)})}function pb(e,t,r){return new e({type:"custom",check:"custom",fn:t,...x(r)})}const hb=v("ZodISODateTime",(e,t)=>{Gy.init(e,t),K.init(e,t)});function vb(e){return Y$(hb,e)}const gb=v("ZodISODate",(e,t)=>{Ky.init(e,t),K.init(e,t)});function yb(e){return X$(gb,e)}const $b=v("ZodISOTime",(e,t)=>{Yy.init(e,t),K.init(e,t)});function bb(e){return H$($b,e)}const _b=v("ZodISODuration",(e,t)=>{Xy.init(e,t),K.init(e,t)});function wb(e){return Q$(_b,e)}const Ib=(e,t)=>{ed.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Kg(e,r)},flatten:{value:r=>Gg(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},En=v("ZodError",Ib,{Parent:Error}),kb=Yg(En),Ob=Xg(En),Sb=nd(En),zb=rd(En),ie=v("ZodType",(e,t)=>(ee.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>Ke(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>kb(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Sb(e,r,i),e.parseAsync=async(r,i)=>Ob(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>zb(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(b_(r,i)),e.superRefine=r=>e.check(__(r)),e.overwrite=r=>e.check(Rt(r)),e.optional=()=>Xo(e),e.nullable=()=>Ho(e),e.nullish=()=>Xo(Ho(e)),e.nonoptional=r=>f_(e,r),e.array=()=>Xb(e),e.or=r=>t_([e,r]),e.and=r=>r_(e,r),e.transform=r=>Qo(e,a_(r)),e.default=r=>c_(e,r),e.prefault=r=>d_(e,r),e.catch=r=>p_(e,r),e.pipe=r=>Qo(e,r),e.readonly=()=>g_(e),e.describe=r=>{const i=e.clone();return Jt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){var r;return(r=Jt.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jt.get(e);const i=e.clone();return Jt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),ld=v("_ZodString",(e,t)=>{ao.init(e,t),ie.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(rb(...i)),e.includes=(...i)=>e.check(ab(...i)),e.startsWith=(...i)=>e.check(sb(...i)),e.endsWith=(...i)=>e.check(ub(...i)),e.min=(...i)=>e.check(fn(...i)),e.max=(...i)=>e.check(ud(...i)),e.length=(...i)=>e.check(cd(...i)),e.nonempty=(...i)=>e.check(fn(1,...i)),e.lowercase=i=>e.check(ib(i)),e.uppercase=i=>e.check(ob(i)),e.trim=()=>e.check(lb()),e.normalize=(...i)=>e.check(cb(...i)),e.toLowerCase=()=>e.check(db()),e.toUpperCase=()=>e.check(fb())}),xb=v("ZodString",(e,t)=>{ao.init(e,t),ld.init(e,t),e.email=r=>e.check(N$(Nb,r)),e.url=r=>e.check(E$(Tb,r)),e.jwt=r=>e.check(K$(Jb,r)),e.emoji=r=>e.check(P$(Ub,r)),e.guid=r=>e.check(Go(Ko,r)),e.uuid=r=>e.check(T$(Vt,r)),e.uuidv4=r=>e.check(U$(Vt,r)),e.uuidv6=r=>e.check(Z$(Vt,r)),e.uuidv7=r=>e.check(j$(Vt,r)),e.nanoid=r=>e.check(D$(Zb,r)),e.guid=r=>e.check(Go(Ko,r)),e.cuid=r=>e.check(A$(jb,r)),e.cuid2=r=>e.check(R$(Eb,r)),e.ulid=r=>e.check(C$(Pb,r)),e.base64=r=>e.check(V$(Wb,r)),e.base64url=r=>e.check(q$(Bb,r)),e.xid=r=>e.check(L$(Db,r)),e.ksuid=r=>e.check(M$(Ab,r)),e.ipv4=r=>e.check(W$(Rb,r)),e.ipv6=r=>e.check(B$(Cb,r)),e.cidrv4=r=>e.check(F$(Lb,r)),e.cidrv6=r=>e.check(J$(Mb,r)),e.e164=r=>e.check(G$(Fb,r)),e.datetime=r=>e.check(vb(r)),e.date=r=>e.check(yb(r)),e.time=r=>e.check(bb(r)),e.duration=r=>e.check(wb(r))});function Cn(e){return x$(xb,e)}const K=v("ZodStringFormat",(e,t)=>{V.init(e,t),ld.init(e,t)}),Nb=v("ZodEmail",(e,t)=>{Cy.init(e,t),K.init(e,t)}),Ko=v("ZodGUID",(e,t)=>{Ay.init(e,t),K.init(e,t)}),Vt=v("ZodUUID",(e,t)=>{Ry.init(e,t),K.init(e,t)}),Tb=v("ZodURL",(e,t)=>{Ly.init(e,t),K.init(e,t)}),Ub=v("ZodEmoji",(e,t)=>{My.init(e,t),K.init(e,t)}),Zb=v("ZodNanoID",(e,t)=>{Wy.init(e,t),K.init(e,t)}),jb=v("ZodCUID",(e,t)=>{By.init(e,t),K.init(e,t)}),Eb=v("ZodCUID2",(e,t)=>{Fy.init(e,t),K.init(e,t)}),Pb=v("ZodULID",(e,t)=>{Jy.init(e,t),K.init(e,t)}),Db=v("ZodXID",(e,t)=>{Vy.init(e,t),K.init(e,t)}),Ab=v("ZodKSUID",(e,t)=>{qy.init(e,t),K.init(e,t)}),Rb=v("ZodIPv4",(e,t)=>{Hy.init(e,t),K.init(e,t)}),Cb=v("ZodIPv6",(e,t)=>{Qy.init(e,t),K.init(e,t)}),Lb=v("ZodCIDRv4",(e,t)=>{e$.init(e,t),K.init(e,t)}),Mb=v("ZodCIDRv6",(e,t)=>{t$.init(e,t),K.init(e,t)}),Wb=v("ZodBase64",(e,t)=>{n$.init(e,t),K.init(e,t)}),Bb=v("ZodBase64URL",(e,t)=>{i$.init(e,t),K.init(e,t)}),Fb=v("ZodE164",(e,t)=>{o$.init(e,t),K.init(e,t)}),Jb=v("ZodJWT",(e,t)=>{s$.init(e,t),K.init(e,t)}),Vb=v("ZodBoolean",(e,t)=>{u$.init(e,t),ie.init(e,t)});function pe(e){return eb(Vb,e)}const qb=v("ZodUnknown",(e,t)=>{c$.init(e,t),ie.init(e,t)});function Yo(){return tb(qb)}const Gb=v("ZodNever",(e,t)=>{l$.init(e,t),ie.init(e,t)});function Kb(e){return nb(Gb,e)}const Yb=v("ZodArray",(e,t)=>{d$.init(e,t),ie.init(e,t),e.element=t.element,e.min=(r,i)=>e.check(fn(r,i)),e.nonempty=r=>e.check(fn(1,r)),e.max=(r,i)=>e.check(ud(r,i)),e.length=(r,i)=>e.check(cd(r,i)),e.unwrap=()=>e.element});function Xb(e,t){return mb(Yb,e,t)}const Hb=v("ZodObject",(e,t)=>{f$.init(e,t),ie.init(e,t),q(e,"shape",()=>Object.fromEntries(Object.entries(e._zod.def.shape))),e.keyof=()=>i_(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yo()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yo()}),e.strict=()=>e.clone({...e._zod.def,catchall:Kb()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Fg(e,r),e.merge=r=>Jg(e,r),e.pick=r=>Wg(e,r),e.omit=r=>Bg(e,r),e.partial=(...r)=>Vg(dd,e,r[0]),e.required=(...r)=>qg(fd,e,r[0])});function Qb(e,t){const r={type:"object",get shape(){return ro(this,"shape",{...e}),this.shape},...x(t)};return new Hb(r)}const e_=v("ZodUnion",(e,t)=>{m$.init(e,t),ie.init(e,t),e.options=t.options});function t_(e,t){return new e_({type:"union",options:e,...x(t)})}const n_=v("ZodIntersection",(e,t)=>{p$.init(e,t),ie.init(e,t)});function r_(e,t){return new n_({type:"intersection",left:e,right:t})}const ar=v("ZodEnum",(e,t)=>{h$.init(e,t),ie.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ar({...t,checks:[],...x(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new ar({...t,checks:[],...x(n),entries:o})}});function i_(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ar({type:"enum",entries:r,...x(t)})}const o_=v("ZodTransform",(e,t)=>{v$.init(e,t),ie.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(Zt(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),a.continue??(a.continue=!0),r.issues.push(Zt(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function a_(e){return new o_({type:"transform",transform:e})}const dd=v("ZodOptional",(e,t)=>{g$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xo(e){return new dd({type:"optional",innerType:e})}const s_=v("ZodNullable",(e,t)=>{y$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ho(e){return new s_({type:"nullable",innerType:e})}const u_=v("ZodDefault",(e,t)=>{$$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function c_(e,t){return new u_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const l_=v("ZodPrefault",(e,t)=>{b$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});function d_(e,t){return new l_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const fd=v("ZodNonOptional",(e,t)=>{_$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType});function f_(e,t){return new fd({type:"nonoptional",innerType:e,...x(t)})}const m_=v("ZodCatch",(e,t)=>{w$.init(e,t),ie.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function p_(e,t){return new m_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const h_=v("ZodPipe",(e,t)=>{I$.init(e,t),ie.init(e,t),e.in=t.in,e.out=t.out});function Qo(e,t){return new h_({type:"pipe",in:e,out:t})}const v_=v("ZodReadonly",(e,t)=>{k$.init(e,t),ie.init(e,t)});function g_(e){return new v_({type:"readonly",innerType:e})}const y_=v("ZodCustom",(e,t)=>{O$.init(e,t),ie.init(e,t)});function $_(e,t){const r=new we({check:"custom",...x(t)});return r._zod.check=e,r}function b_(e,t={}){return pb(y_,e,t)}function __(e,t){const r=$_(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Zt(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(Zt(o))}},e(i.value,i)),t);return r}const De="main",so="prerender",Pn={stage:"creating",processCount:0,reserved:!1,focusCount:0,centerCount:0},md={...Pn,key:so,visible:!1},w_=Qb({key:Cn(),url:Cn().optional(),title:Cn().optional(),center:pe().optional(),position:dn.xy.optional(),size:Yt.dimensions.optional(),minSize:Yt.dimensions.optional(),maxSize:Yt.dimensions.optional(),resizable:pe().optional(),fullscreen:pe().optional(),focus:pe().optional(),maximized:pe().optional(),visible:pe().optional(),minimized:pe().optional(),decorations:pe().optional(),skipTaskbar:pe().optional(),fileDropEnabled:pe().optional(),transparent:pe().optional(),alwaysOnTop:pe().optional()}),I_=R.milliseconds(50),pd=()=>setTimeout(()=>window.location.reload(),I_.milliseconds),hd={label:De,config:{enablePrerender:!0,debug:!1,defaultWindowProps:{}},windows:{main:{...Pn,key:De,reserved:!0}},labelKeys:{main:De},keyLabels:{main:De}},k_=(e,t)=>{if(e.type===gd.type)return t.label!==De||(e.payload.label=Xn.create(),e.payload.prerenderLabel=Xn.create()),e;if("label"in e.payload)return e;let r=t.label;const i=e.payload;return i.key!=null&&(i.key in t.windows?r=i.key:r=t.keyLabels[i.key]),e.payload={...e.payload,label:r},e},me=e=>(t,r)=>{if(!("label"in r.payload))throw new Error("Missing label");e(t,r)},Ze=(e,t=!1)=>me((r,i)=>{let n=t;const o=r.windows[i.payload.label];if(o!=null){if(i.payload.value!=null)n=i.payload.value;else{const a=o[e];a!=null&&(n=!a)}r.windows[i.payload.label]={...o,[e]:n}}}),Dn=(e,t=!1)=>(r,i)=>{const n=r.windows[i.payload.label];n!=null&&(r.windows[i.payload.label]={...n,[e]:n[e]+(t?-1:1)})},O_=e=>Object.values(e.windows).some(t=>t.key===so&&!t.reserved),uo="drift",S_=(e,t,r)=>e.position!=null&&e.size!=null&&t==null?vt.topLeft(vt.positionInCenter(vt.construct(dn.ZERO,r??dn.ZERO),vt.construct(e.position,e.size))):t,z_=(e,{payload:t})=>{if(t.key===so)return;const{key:r,label:i,prerenderLabel:n}=t;if(i==null||n==null)throw new Error("[drift] - bug - missing label and prerender label");console.log(e.config.debug),ta(e.config.debug,"reducer create window");const o=e.windows.main;if(t.position=S_(o,t.position,t.size),r in e.keyLabels){ft(e.config.debug,"window already exists, un-minimize and focus it");const u=e.keyLabels[t.key];e.windows[u].visible=!0,e.windows[u].focusCount+=1,e.windows[u].minimized=!1,e.windows[u].position=t.position,Ln(e.config.debug);return}const[a,s]=Object.entries(e.windows).find(([,u])=>!u.reserved)??[null,null];a!=null?(ft(e.config.debug,"using available pre-rendered window"),e.windows[a]={...s,visible:!0,reserved:!0,focusCount:1,focus:!0,...t},e.labelKeys[a]=t.key,e.keyLabels[t.key]=a):(ft(e.config.debug,"creating new window"),e.windows[i]={...e.config.defaultWindowProps,...Pn,...t,reserved:!0},e.labelKeys[i]=r,e.keyLabels[r]=i),e.config.enablePrerender&&!O_(e)&&(ft(e.config.debug,"creating pre-render window"),e.windows[n]=Xi.copy({...e.config.defaultWindowProps,...md})),Ln(e.config.debug)},x_=me((e,t)=>{const r=e.windows[t.payload.label];r!=null&&(r.stage=t.payload.stage)}),N_=me((e,{payload:{label:t}})=>{const r=e.windows[t];r==null||r.processCount>0||(r.stage="closing",delete e.windows[t],delete e.labelKeys[t],delete e.keyLabels[r.key])}),T_=me((e,t)=>{const r=e.windows[t.payload.label];r==null||r.processCount>0||(r.stage="reloading",pd())}),U_=me(Dn("processCount")),Z_=me((e,t)=>{Dn("processCount",!0)(e,t);const r=e.windows[t.payload.label];r!=null&&r.processCount===0&&(r.stage==="reloading"?pd():(e.windows[t.payload.label].visible=!1,delete e.windows[t.payload.label],delete e.labelKeys[t.payload.label],delete e.keyLabels[r.key]))}),j_=(e,t)=>{const r=e.windows[t.payload.key];r!=null&&(r.error=t.payload.message)},E_=me((e,t)=>{const r=e.windows[t.payload.label];r!=null&&(r.visible!==!0&&(r.visible=!0),Dn("focusCount")(e,t))}),P_=Ze("minimized"),D_=Ze("maximized"),A_=Ze("visible",!0),R_=Ze("fullscreen",!0),C_=me(Dn("centerCount")),L_=me((e,t)=>{e.windows[t.payload.label].position=t.payload.position}),M_=me((e,t)=>{e.windows[t.payload.label].size=t.payload.size}),W_=me((e,t)=>{e.windows[t.payload.label].minSize=t.payload.size}),B_=me((e,t)=>{e.windows[t.payload.label].maxSize=t.payload.size}),F_=Ze("resizable"),J_=Ze("skipTaskbar"),V_=Ze("alwaysOnTop"),q_=me((e,t)=>{e.windows[t.payload.label].title=t.payload.title}),G_=Ze("decorations"),ea=(e,t)=>{const r=e.windows[t.payload.label];Xi.partialEqual(r,t.payload)||(e.windows[t.payload.label]={...r,...t.payload})},K_=(e,t)=>{if(e.config={...e.config,...t.payload},e.label=t.payload.label,e.label===De&&e.config.enablePrerender){const r=Xn.create();e.windows[r]={...e.config.defaultWindowProps,...md}}},vd=$d.createSlice({name:uo,initialState:hd,reducers:{internalSetInitial:K_,createWindow:z_,setWindowStage:x_,closeWindow:N_,registerProcess:U_,completeProcess:Z_,setWindowError:j_,focusWindow:E_,reloadWindow:T_,setWindowMinimized:P_,setWindowMaximized:D_,setWindowVisible:A_,setWindowFullscreen:R_,centerWindow:C_,setWindowPosition:L_,setWindowSize:M_,setWindowMinSize:W_,setWindowMaxSize:B_,setWindowResizable:F_,setWindowSkipTaskbar:J_,setWindowAlwaysOnTop:V_,setWindowTitle:q_,setWindowDecorations:G_,runtimeSetWindowProps:ea,setWindowProps:ea}}),{actions:{runtimeSetWindowProps:Y_,setWindowProps:X_,createWindow:gd,internalSetInitial:yd,setWindowStage:H_,closeWindow:Q_,registerProcess:ew,completeProcess:tw,setWindowError:nw,focusWindow:rw,reloadWindow:iw,setWindowMinimized:ow,setWindowMaximized:aw,setWindowVisible:sw,setWindowFullscreen:uw,centerWindow:Nw,setWindowPosition:cw,setWindowSize:lw,setWindowMinSize:dw,setWindowMaxSize:fw,setWindowResizable:mw,setWindowSkipTaskbar:pw,setWindowAlwaysOnTop:hw,setWindowTitle:vw,setWindowDecorations:gw}}=vd,yw=vd.reducer,$w=e=>e.startsWith(uo),bw=[yd.type],_w=(e,t)=>!e&&!bw.includes(t);exports.A=Yt;exports.INITIAL_WINDOW_STATE=Pn;exports.J=Xi;exports.K=dn;exports.MAIN_WINDOW=De;exports.Pt=vt;exports.S=Zh;exports.SLICE_NAME=uo;exports.ZERO_SLICE_STATE=hd;exports.assignLabel=k_;exports.closeWindow=Q_;exports.completeProcess=tw;exports.createWindow=gd;exports.focusWindow=rw;exports.g=R;exports.group=ta;exports.groupEnd=Ln;exports.internalSetInitial=yd;exports.isDriftAction=$w;exports.log=ft;exports.reducer=yw;exports.registerProcess=ew;exports.reloadWindow=iw;exports.runtimeSetWindowProps=Y_;exports.setWindowAlwaysOnTop=hw;exports.setWindowDecorations=gw;exports.setWindowError=nw;exports.setWindowFullscreen=uw;exports.setWindowMaxSize=fw;exports.setWindowMaximized=aw;exports.setWindowMinSize=dw;exports.setWindowMinimized=ow;exports.setWindowPosition=cw;exports.setWindowProps=X_;exports.setWindowResizable=mw;exports.setWindowSize=lw;exports.setWindowSkipTaskbar=pw;exports.setWindowStage=H_;exports.setWindowTitle=vw;exports.setWindowVisible=sw;exports.shouldEmit=_w;exports.windowPropsZ=w_;
|