@synnaxlabs/drift 0.44.0 → 0.44.2

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.
@@ -1,34 +0,0 @@
1
- "use strict";const Gc=require("@reduxjs/toolkit"),Ve=(t=!1,...e)=>{t&&console.log(...e)},Mi=(t=!1,...e)=>{t&&console.group(...e)},nn=t=>{t&&console.groupEnd()},Kc=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},Ri=t=>{const e=(r,o=rn)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(a=>e(a,o));if(!Qt(r))return r;o=Qc(o);const n={},i=r;return"toJSON"in i&&typeof i.toJSON=="function"?e(i.toJSON(),o):(Object.keys(i).forEach(a=>{let u=i[a];const s=t(a);o.recursive&&(Qt(u)?gi(u)||(u=e(u,o)):o.recursiveInArray&&pi(u)&&(u=[...u].map(m=>{let g=m;return Qt(m)?gi(g)||(g=e(m,o)):pi(m)&&(g=e({key:m},o).key),g}))),n[s]=u}),n)};return e},Li=Ri(Kc),Yc=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,o)=>`${r}_${o.toLowerCase()}`),Xc=Ri(Yc),Hc=[Number,String,Uint8Array],rn={recursive:!0,recursiveInArray:!0},Qc=(t=rn)=>(t.recursive==null?t=rn:t.recursiveInArray??=!1,t),pi=t=>t!=null&&Array.isArray(t),Qt=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),gi=t=>Hc.some(e=>t instanceof e),en=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);let el=class{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const o=JSON.parse(e),n=Li(o);return r!=null?r.parse(n):n}encodeString(e){const r=Xc(e);return JSON.stringify(r,(o,n)=>ArrayBuffer.isView(n)?Array.from(n):typeof n=="bigint"?n.toString():n)}};const on=new el,Wi=Object.freeze({status:"aborted"});function l(t,e,r){function o(u,s){var m;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(m=u._zod).traits??(m.traits=new Set),u._zod.traits.add(t),e(u,s);for(const g in a.prototype)g in u||Object.defineProperty(u,g,{value:a.prototype[g].bind(u)});u._zod.constr=a,u._zod.def=s}const n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:t});function a(u){var s;const m=r?.Parent?new i:this;o(m,u),(s=m._zod).deferred??(s.deferred=[]);for(const g of m._zod.deferred)g();return m}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}const Bi=Symbol("zod_brand");class Ze extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const wt={};function K(t){return t&&Object.assign(wt,t),wt}function tl(t){return t}function nl(t){return t}function rl(t){}function il(t){throw new Error}function ol(t){}function yn(t){const e=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,n])=>e.indexOf(+o)===-1).map(([o,n])=>n)}function y(t,e="|"){return t.map(r=>O(r)).join(e)}function Fi(t,e){return typeof e=="bigint"?e.toString():e}function jt(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function xe(t){return t==null}function Et(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Ji(t,e){const r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}function N(t,e,r){Object.defineProperty(t,e,{get(){{const o=r();return t[e]=o,o}},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function We(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function al(t,e){return e?e.reduce((r,o)=>r?.[o],t):t}function ul(t){const e=Object.keys(t),r=e.map(o=>t[o]);return Promise.all(r).then(o=>{const n={};for(let i=0;i<e.length;i++)n[e[i]]=o[i];return n})}function sl(t=10){const e="abcdefghijklmnopqrstuvwxyz";let r="";for(let o=0;o<t;o++)r+=e[Math.floor(Math.random()*e.length)];return r}function je(t){return JSON.stringify(t)}const bn=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function Qe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Vi=jt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function et(t){if(Qe(t)===!1)return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(Qe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function cl(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}const ll=t=>{const e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},_t=new Set(["string","number","symbol"]),qi=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ne(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ue(t,e,r){const o=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(o._zod.parent=t),o}function p(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function dl(t){let e;return new Proxy({},{get(r,o,n){return e??(e=t()),Reflect.get(e,o,n)},set(r,o,n,i){return e??(e=t()),Reflect.set(e,o,n,i)},has(r,o){return e??(e=t()),Reflect.has(e,o)},deleteProperty(r,o){return e??(e=t()),Reflect.deleteProperty(e,o)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,o){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,o)},defineProperty(r,o,n){return e??(e=t()),Reflect.defineProperty(e,o,n)}})}function O(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Gi(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Ki={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]},Yi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Xi(t,e){const r={},o=t._zod.def;for(const n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&(r[n]=o.shape[n])}return ue(t,{...t._zod.def,shape:r,checks:[]})}function Hi(t,e){const r={...t._zod.def.shape},o=t._zod.def;for(const n in e){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&delete r[n]}return ue(t,{...t._zod.def,shape:r,checks:[]})}function Qi(t,e){if(!et(e))throw new Error("Invalid input to extend: expected a plain object");const r={...t._zod.def,get shape(){const o={...t._zod.def.shape,...e};return We(this,"shape",o),o},checks:[]};return ue(t,r)}function eo(t,e){return ue(t,{...t._zod.def,get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return We(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function to(t,e,r){const o=e._zod.def.shape,n={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=t?new t({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)n[i]=t?new t({type:"optional",innerType:o[i]}):o[i];return ue(e,{...e._zod.def,shape:n,checks:[]})}function no(t,e,r){const o=e._zod.def.shape,n={...o};if(r)for(const i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new t({type:"nonoptional",innerType:o[i]}))}else for(const i in o)n[i]=new t({type:"nonoptional",innerType:o[i]});return ue(e,{...e._zod.def,shape:n,checks:[]})}function Pe(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function H(t,e){return e.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(t),r})}function qe(t){return typeof t=="string"?t:t?.message}function ee(t,e,r){const o={...t,path:t.path??[]};if(!t.message){const n=qe(t.inst?._zod.def?.error?.(t))??qe(e?.error?.(t))??qe(r.customError?.(t))??qe(r.localeError?.(t))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,e?.reportInput||delete o.input,o}function Dt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Pt(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ce(...t){const[e,r,o]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:o}:{...e}}function fl(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}class ml{constructor(...e){}}const pl=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:Yi,Class:ml,NUMBER_FORMAT_RANGES:Ki,aborted:Pe,allowsEval:Vi,assert:ol,assertEqual:tl,assertIs:rl,assertNever:il,assertNotEqual:nl,assignProp:We,cached:jt,captureStackTrace:bn,cleanEnum:fl,cleanRegex:Et,clone:ue,createTransparentProxy:dl,defineLazy:N,esc:je,escapeRegex:Ne,extend:Qi,finalizeIssue:ee,floatSafeRemainder:Ji,getElementAtPath:al,getEnumValues:yn,getLengthableOrigin:Pt,getParsedType:ll,getSizableOrigin:Dt,isObject:Qe,isPlainObject:et,issue:Ce,joinValues:y,jsonStringifyReplacer:Fi,merge:eo,normalizeParams:p,nullish:xe,numKeys:cl,omit:Hi,optionalKeys:Gi,partial:to,pick:Xi,prefixIssues:H,primitiveTypes:qi,promiseAllObject:ul,propertyKeyTypes:_t,randomString:sl,required:no,stringifyPrimitive:O,unwrapMessage:qe},Symbol.toStringTag,{value:"Module"})),ro=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,Fi,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},$n=l("$ZodError",ro),at=l("$ZodError",ro,{Parent:Error});function wn(t,e=r=>r.message){const r={},o=[];for(const n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):o.push(e(n));return{formErrors:o,fieldErrors:r}}function _n(t,e){const r=e||function(i){return i.message},o={_errors:[]},n=i=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(u=>n({issues:u}));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)o._errors.push(r(a));else{let u=o,s=0;for(;s<a.path.length;){const m=a.path[s];s===a.path.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(r(a))):u[m]=u[m]||{_errors:[]},u=u[m],s++}}};return n(t),o}function io(t,e){const r=e||function(i){return i.message},o={errors:[]},n=(i,a=[])=>{var u,s;for(const m of i.issues)if(m.code==="invalid_union"&&m.errors.length)m.errors.map(g=>n({issues:g},m.path));else if(m.code==="invalid_key")n({issues:m.issues},m.path);else if(m.code==="invalid_element")n({issues:m.issues},m.path);else{const g=[...a,...m.path];if(g.length===0){o.errors.push(r(m));continue}let c=o,w=0;for(;w<g.length;){const v=g[w],d=w===g.length-1;typeof v=="string"?(c.properties??(c.properties={}),(u=c.properties)[v]??(u[v]={errors:[]}),c=c.properties[v]):(c.items??(c.items=[]),(s=c.items)[v]??(s[v]={errors:[]}),c=c.items[v]),d&&c.errors.push(r(m)),w++}}};return n(t),o}function oo(t){const e=[];for(const r of t)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function ao(t){const e=[],r=[...t.issues].sort((o,n)=>o.path.length-n.path.length);for(const o of r)e.push(`✖ ${o.message}`),o.path?.length&&e.push(` → at ${oo(o.path)}`);return e.join(`
2
- `)}const In=t=>(e,r,o,n)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ze;if(a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ee(s,i,K())));throw bn(u,n?.callee),u}return a.value},an=In(at),kn=t=>async(e,r,o,n)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ee(s,i,K())));throw bn(u,n?.callee),u}return a.value},un=kn(at),Sn=t=>(e,r,o)=>{const n=o?{...o,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Ze;return i.issues.length?{success:!1,error:new(t??$n)(i.issues.map(a=>ee(a,n,K())))}:{success:!0,data:i.value}},uo=Sn(at),On=t=>async(e,r,o)=>{const n=o?Object.assign(o,{async:!0}):{async:!0};let i=e._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(a=>ee(a,n,K())))}:{success:!0,data:i.value}},so=On(at),co=/^[cC][^\s-]{8,}$/,lo=/^[0-9a-z]+$/,fo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mo=/^[0-9a-vA-V]{20}$/,po=/^[A-Za-z0-9]{27}$/,go=/^[a-zA-Z0-9_-]{21}$/,ho=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gl=/^[-+]?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)?)??$/,vo=/^([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})$/,Me=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,hl=Me(4),vl=Me(6),yl=Me(7),yo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bl=/^[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])?)*$/,$l=/^(([^<>()\[\]\\.,;:\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,}))$/,wl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,_l=/^[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])?)*$/,Il="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bo(){return new RegExp(Il,"u")}const $o=/^(?:(?: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])$/,wo=/^(([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})$/,_o=/^((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])$/,Io=/^(([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])$/,ko=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zn=/^[A-Za-z0-9_-]*$/,So=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,kl=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Oo=/^\+(?:[0-9]){6,14}[0-9]$/,zo="(?:(?:\\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])))",xo=new RegExp(`^${zo}$`);function No(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function To(t){return new RegExp(`^${No(t)}$`)}function Uo(t){const e=No({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");const o=`${e}(?:${r.join("|")})`;return new RegExp(`^${zo}T(?:${o})$`)}const jo=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Eo=/^\d+n?$/,Do=/^\d+$/,Po=/^-?\d+(?:\.\d+)?/i,Ao=/true|false/i,Zo=/null/i,Co=/undefined/i,Mo=/^[^A-Z]*$/,Ro=/^[^a-z]*$/,Lo=Object.freeze(Object.defineProperty({__proto__:null,base64:ko,base64url:zn,bigint:Eo,boolean:Ao,browserEmail:_l,cidrv4:_o,cidrv6:Io,cuid:co,cuid2:lo,date:xo,datetime:Uo,domain:kl,duration:ho,e164:Oo,email:yo,emoji:bo,extendedDuration:gl,guid:vo,hostname:So,html5Email:bl,integer:Do,ipv4:$o,ipv6:wo,ksuid:po,lowercase:Mo,nanoid:go,null:Zo,number:Po,rfc5322Email:$l,string:jo,time:To,ulid:fo,undefined:Co,unicodeEmail:wl,uppercase:Ro,uuid:Me,uuid4:hl,uuid6:vl,uuid7:yl,xid:mo},Symbol.toStringTag,{value:"Module"})),B=l("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Wo={number:"number",bigint:"bigint",object:"date"},xn=l("$ZodCheckLessThan",(t,e)=>{B.init(t,e);const r=Wo[typeof e.value];t._zod.onattach.push(o=>{const n=o._zod.bag,i=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value<=e.value:o.value<e.value)||o.issues.push({origin:r,code:"too_big",maximum:e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Nn=l("$ZodCheckGreaterThan",(t,e)=>{B.init(t,e);const r=Wo[typeof e.value];t._zod.onattach.push(o=>{const n=o._zod.bag,i=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value>=e.value:o.value>e.value)||o.issues.push({origin:r,code:"too_small",minimum:e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Bo=l("$ZodCheckMultipleOf",(t,e)=>{B.init(t,e),t._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Ji(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Fo=l("$ZodCheckNumberFormat",(t,e)=>{B.init(t,e),e.format=e.format||"float64";const r=e.format?.includes("int"),o=r?"int":"number",[n,i]=Ki[e.format];t._zod.onattach.push(a=>{const u=a._zod.bag;u.format=e.format,u.minimum=n,u.maximum=i,r&&(u.pattern=Do)}),t._zod.check=a=>{const u=a.value;if(r){if(!Number.isInteger(u)){a.issues.push({expected:o,format:e.format,code:"invalid_type",input:u,inst:t});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,continue:!e.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,continue:!e.abort});return}}u<n&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),u>i&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inst:t})}}),Jo=l("$ZodCheckBigIntFormat",(t,e)=>{B.init(t,e);const[r,o]=Yi[e.format];t._zod.onattach.push(n=>{const i=n._zod.bag;i.format=e.format,i.minimum=r,i.maximum=o}),t._zod.check=n=>{const i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:t})}}),Vo=l("$ZodCheckMaxSize",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{const n=o.value;n.size<=e.maximum||o.issues.push({origin:Dt(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),qo=l("$ZodCheckMinSize",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{const n=o.value;n.size>=e.minimum||o.issues.push({origin:Dt(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),Go=l("$ZodCheckSizeEquals",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.size!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=o=>{const n=o.value,i=n.size;if(i===e.size)return;const a=i>e.size;o.issues.push({origin:Dt(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),Ko=l("$ZodCheckMaxLength",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{const n=o.value;if(n.length<=e.maximum)return;const a=Pt(n);o.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Yo=l("$ZodCheckMinLength",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{const n=o.value;if(n.length>=e.minimum)return;const a=Pt(n);o.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Xo=l("$ZodCheckLengthEquals",(t,e)=>{var r;B.init(t,e),(r=t._zod.def).when??(r.when=o=>{const n=o.value;return!xe(n)&&n.length!==void 0}),t._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=o=>{const n=o.value,i=n.length;if(i===e.length)return;const a=Pt(n),u=i>e.length;o.issues.push({origin:a,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),ut=l("$ZodCheckStringFormat",(t,e)=>{var r,o;B.init(t,e),t._zod.onattach.push(n=>{const i=n._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(o=t._zod).check??(o.check=()=>{})}),Ho=l("$ZodCheckRegex",(t,e)=>{ut.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Qo=l("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Mo),ut.init(t,e)}),ea=l("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Ro),ut.init(t,e)}),ta=l("$ZodCheckIncludes",(t,e)=>{B.init(t,e);const r=Ne(e.includes),o=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=o,t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),na=l("$ZodCheckStartsWith",(t,e)=>{B.init(t,e);const r=new RegExp(`^${Ne(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.startsWith(e.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:o.value,inst:t,continue:!e.abort})}}),ra=l("$ZodCheckEndsWith",(t,e)=>{B.init(t,e);const r=new RegExp(`.*${Ne(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=o=>{o.value.endsWith(e.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:o.value,inst:t,continue:!e.abort})}});function hi(t,e,r){t.issues.length&&e.issues.push(...H(r,t.issues))}const ia=l("$ZodCheckProperty",(t,e)=>{B.init(t,e),t._zod.check=r=>{const o=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>hi(n,r,e.property));hi(o,r,e.property)}}),oa=l("$ZodCheckMimeType",(t,e)=>{B.init(t,e);const r=new Set(e.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=e.mime}),t._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:e.mime,input:o.value.type,inst:t})}}),aa=l("$ZodCheckOverwrite",(t,e)=>{B.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class ua{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const o=e.split(`
3
- `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
4
- `))}}const sa={major:4,minor:0,patch:2},k=l("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=sa;const o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(const n of o)for(const i of n._zod.onattach)i(t);if(o.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const n=(i,a,u)=>{let s=Pe(i),m;for(const g of a){if(g._zod.def.when){if(!g._zod.def.when(i))continue}else if(s)continue;const c=i.issues.length,w=g._zod.check(i);if(w instanceof Promise&&u?.async===!1)throw new Ze;if(m||w instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await w,i.issues.length!==c&&(s||(s=Pe(i,c)))});else{if(i.issues.length===c)continue;s||(s=Pe(i,c))}}return m?m.then(()=>i):i};t._zod.run=(i,a)=>{const u=t._zod.parse(i,a);if(u instanceof Promise){if(a.async===!1)throw new Ze;return u.then(s=>n(s,o,a))}return n(u,o,a)}}t["~standard"]={validate:n=>{try{const i=uo(t,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return so(t,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),st=l("$ZodString",(t,e)=>{k.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??jo(t._zod.bag),t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),A=l("$ZodStringFormat",(t,e)=>{ut.init(t,e),st.init(t,e)}),ca=l("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=vo),A.init(t,e)}),la=l("$ZodUUID",(t,e)=>{if(e.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(o===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Me(o))}else e.pattern??(e.pattern=Me());A.init(t,e)}),da=l("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=yo),A.init(t,e)}),fa=l("$ZodURL",(t,e)=>{A.init(t,e),t._zod.check=r=>{try{const o=r.value,n=new URL(o),i=n.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:So.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!o.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),ma=l("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=bo()),A.init(t,e)}),pa=l("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=go),A.init(t,e)}),ga=l("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=co),A.init(t,e)}),ha=l("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=lo),A.init(t,e)}),va=l("$ZodULID",(t,e)=>{e.pattern??(e.pattern=fo),A.init(t,e)}),ya=l("$ZodXID",(t,e)=>{e.pattern??(e.pattern=mo),A.init(t,e)}),ba=l("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=po),A.init(t,e)}),$a=l("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Uo(e)),A.init(t,e)}),wa=l("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=xo),A.init(t,e)}),_a=l("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=To(e)),A.init(t,e)}),Ia=l("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ho),A.init(t,e)}),ka=l("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=$o),A.init(t,e),t._zod.onattach.push(r=>{const o=r._zod.bag;o.format="ipv4"})}),Sa=l("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=wo),A.init(t,e),t._zod.onattach.push(r=>{const o=r._zod.bag;o.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Oa=l("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=_o),A.init(t,e)}),za=l("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Io),A.init(t,e),t._zod.check=r=>{const[o,n]=r.value.split("/");try{if(!n)throw new Error;const i=Number(n);if(`${i}`!==n)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Tn(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const xa=l("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ko),A.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{Tn(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Na(t){if(!zn.test(t))return!1;const e=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Tn(r)}const Ta=l("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=zn),A.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Na(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Ua=l("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Oo),A.init(t,e)});function ja(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}const Ea=l("$ZodJWT",(t,e)=>{A.init(t,e),t._zod.check=r=>{ja(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Da=l("$ZodCustomStringFormat",(t,e)=>{A.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Un=l("$ZodNumber",(t,e)=>{k.init(t,e),t._zod.pattern=t._zod.bag.pattern??Po,t._zod.parse=(r,o)=>{if(e.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 i=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:t,...i?{received:i}:{}}),r}}),Pa=l("$ZodNumber",(t,e)=>{Fo.init(t,e),Un.init(t,e)}),jn=l("$ZodBoolean",(t,e)=>{k.init(t,e),t._zod.pattern=Ao,t._zod.parse=(r,o)=>{if(e.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:t}),r}}),En=l("$ZodBigInt",(t,e)=>{k.init(t,e),t._zod.pattern=Eo,t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Aa=l("$ZodBigInt",(t,e)=>{Jo.init(t,e),En.init(t,e)}),Za=l("$ZodSymbol",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),Ca=l("$ZodUndefined",(t,e)=>{k.init(t,e),t._zod.pattern=Co,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),Ma=l("$ZodNull",(t,e)=>{k.init(t,e),t._zod.pattern=Zo,t._zod.values=new Set([null]),t._zod.parse=(r,o)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),Ra=l("$ZodAny",(t,e)=>{k.init(t,e),t._zod.parse=r=>r}),It=l("$ZodUnknown",(t,e)=>{k.init(t,e),t._zod.parse=r=>r}),La=l("$ZodNever",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Wa=l("$ZodVoid",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),Ba=l("$ZodDate",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:t}),r}});function vi(t,e,r){t.issues.length&&e.issues.push(...H(r,t.issues)),e.value[r]=t.value}const Dn=l("$ZodArray",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);const i=[];for(let a=0;a<n.length;a++){const u=n[a],s=e.element._zod.run({value:u,issues:[]},o);s instanceof Promise?i.push(s.then(m=>vi(m,r,a))):vi(s,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function ft(t,e,r){t.issues.length&&e.issues.push(...H(r,t.issues)),e.value[r]=t.value}function yi(t,e,r,o){t.issues.length?o[r]===void 0?r in o?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...H(r,t.issues)):t.value===void 0?r in o&&(e.value[r]=void 0):e.value[r]=t.value}const Fa=l("$ZodObject",(t,e)=>{k.init(t,e);const r=jt(()=>{const c=Object.keys(e.shape);for(const v of c)if(!(e.shape[v]instanceof k))throw new Error(`Invalid element at key "${v}": expected a Zod schema`);const w=Gi(e.shape);return{shape:e.shape,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(w)}});N(t._zod,"propValues",()=>{const c=e.shape,w={};for(const v in c){const d=c[v]._zod;if(d.values){w[v]??(w[v]=new Set);for(const b of d.values)w[v].add(b)}}return w});const o=c=>{const w=new ua(["shape","payload","ctx"]),v=r.value,d=I=>{const S=je(I);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};w.write("const input = payload.value;");const b=Object.create(null);let _=0;for(const I of v.keys)b[I]=`key_${_++}`;w.write("const newResult = {}");for(const I of v.keys)if(v.optionalKeys.has(I)){const S=b[I];w.write(`const ${S} = ${d(I)};`);const T=je(I);w.write(`
5
- if (${S}.issues.length) {
6
- if (input[${T}] === undefined) {
7
- if (${T} in input) {
8
- newResult[${T}] = undefined;
9
- }
10
- } else {
11
- payload.issues = payload.issues.concat(
12
- ${S}.issues.map((iss) => ({
13
- ...iss,
14
- path: iss.path ? [${T}, ...iss.path] : [${T}],
15
- }))
16
- );
17
- }
18
- } else if (${S}.value === undefined) {
19
- if (${T} in input) newResult[${T}] = undefined;
20
- } else {
21
- newResult[${T}] = ${S}.value;
22
- }
23
- `)}else{const S=b[I];w.write(`const ${S} = ${d(I)};`),w.write(`
24
- if (${S}.issues.length) payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
25
- ...iss,
26
- path: iss.path ? [${je(I)}, ...iss.path] : [${je(I)}]
27
- })));`),w.write(`newResult[${je(I)}] = ${S}.value`)}w.write("payload.value = newResult;"),w.write("return payload;");const E=w.compile();return(I,S)=>E(c,I,S)};let n;const i=Qe,a=!wt.jitless,s=a&&Vi.value,m=e.catchall;let g;t._zod.parse=(c,w)=>{g??(g=r.value);const v=c.value;if(!i(v))return c.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),c;const d=[];if(a&&s&&w?.async===!1&&w.jitless!==!0)n||(n=o(e.shape)),c=n(c,w);else{c.value={};const S=g.shape;for(const T of g.keys){const be=S[T],dt=be._zod.run({value:v[T],issues:[]},w),fi=be._zod.optin==="optional"&&be._zod.optout==="optional";dt instanceof Promise?d.push(dt.then(mi=>fi?yi(mi,c,T,v):ft(mi,c,T))):fi?yi(dt,c,T,v):ft(dt,c,T)}}if(!m)return d.length?Promise.all(d).then(()=>c):c;const b=[],_=g.keySet,E=m._zod,I=E.def.type;for(const S of Object.keys(v)){if(_.has(S))continue;if(I==="never"){b.push(S);continue}const T=E.run({value:v[S],issues:[]},w);T instanceof Promise?d.push(T.then(be=>ft(be,c,S))):ft(T,c,S)}return b.length&&c.issues.push({code:"unrecognized_keys",keys:b,input:v,inst:t}),d.length?Promise.all(d).then(()=>c):c}});function bi(t,e,r,o){for(const n of t)if(n.issues.length===0)return e.value=n.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(n=>n.issues.map(i=>ee(i,o,K())))}),e}const Pn=l("$ZodUnion",(t,e)=>{k.init(t,e),N(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),N(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),N(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),N(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){const r=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>Et(o.source)).join("|")})$`)}}),t._zod.parse=(r,o)=>{let n=!1;const i=[];for(const a of e.options){const u=a._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)i.push(u),n=!0;else{if(u.issues.length===0)return u;i.push(u)}}return n?Promise.all(i).then(a=>bi(a,r,t,o)):bi(i,r,t,o)}}),Ja=l("$ZodDiscriminatedUnion",(t,e)=>{Pn.init(t,e);const r=t._zod.parse;N(t._zod,"propValues",()=>{const n={};for(const i of e.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const m of s)n[u].add(m)}}return n});const o=jt(()=>{const n=e.options,i=new Map;for(const a of n){const u=a._zod.propValues[e.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const s of u){if(i.has(s))throw new Error(`Duplicate discriminator value "${String(s)}"`);i.set(s,a)}}return i});t._zod.parse=(n,i)=>{const a=n.value;if(!Qe(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),n;const u=o.value.get(a?.[e.discriminator]);return u?u._zod.run(n,i):e.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[e.discriminator],inst:t}),n)}}),Va=l("$ZodIntersection",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value,i=e.left._zod.run({value:n,issues:[]},o),a=e.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([s,m])=>$i(r,s,m)):$i(r,i,a)}});function sn(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(et(t)&&et(e)){const r=Object.keys(e),o=Object.keys(t).filter(i=>r.indexOf(i)!==-1),n={...t,...e};for(const i of o){const a=sn(t[i],e[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<t.length;o++){const n=t[o],i=e[o],a=sn(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function $i(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Pe(t))return t;const o=sn(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const At=l("$ZodTuple",(t,e)=>{k.init(t,e);const r=e.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,i)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];const u=[];if(!e.rest){const m=a.length>r.length,g=a.length<o-1;if(m||g)return n.issues.push({input:a,inst:t,origin:"array",...m?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let s=-1;for(const m of r){if(s++,s>=a.length&&s>=o)continue;const g=m._zod.run({value:a[s],issues:[]},i);g instanceof Promise?u.push(g.then(c=>mt(c,n,s))):mt(g,n,s)}if(e.rest){const m=a.slice(r.length);for(const g of m){s++;const c=e.rest._zod.run({value:g,issues:[]},i);c instanceof Promise?u.push(c.then(w=>mt(w,n,s))):mt(c,n,s)}}return u.length?Promise.all(u).then(()=>n):n}});function mt(t,e,r){t.issues.length&&e.issues.push(...H(r,t.issues)),e.value[r]=t.value}const qa=l("$ZodRecord",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;if(!et(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;const i=[];if(e.keyType._zod.values){const a=e.keyType._zod.values;r.value={};for(const s of a)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){const m=e.valueType._zod.run({value:n[s],issues:[]},o);m instanceof Promise?i.push(m.then(g=>{g.issues.length&&r.issues.push(...H(s,g.issues)),r.value[s]=g.value})):(m.issues.length&&r.issues.push(...H(s,m.issues)),r.value[s]=m.value)}let u;for(const s in n)a.has(s)||(u=u??[],u.push(s));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:u})}else{r.value={};for(const a of Reflect.ownKeys(n)){if(a==="__proto__")continue;const u=e.keyType._zod.run({value:a,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map(m=>ee(m,o,K())),input:a,path:[a],inst:t}),r.value[u.value]=u.value;continue}const s=e.valueType._zod.run({value:n[a],issues:[]},o);s instanceof Promise?i.push(s.then(m=>{m.issues.length&&r.issues.push(...H(a,m.issues)),r.value[u.value]=m.value})):(s.issues.length&&r.issues.push(...H(a,s.issues)),r.value[u.value]=s.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Ga=l("$ZodMap",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;const i=[];r.value=new Map;for(const[a,u]of n){const s=e.keyType._zod.run({value:a,issues:[]},o),m=e.valueType._zod.run({value:u,issues:[]},o);s instanceof Promise||m instanceof Promise?i.push(Promise.all([s,m]).then(([g,c])=>{wi(g,c,r,a,n,t,o)})):wi(s,m,r,a,n,t,o)}return i.length?Promise.all(i).then(()=>r):r}});function wi(t,e,r,o,n,i,a){t.issues.length&&(_t.has(typeof o)?r.issues.push(...H(o,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:i,issues:t.issues.map(u=>ee(u,a,K()))})),e.issues.length&&(_t.has(typeof o)?r.issues.push(...H(o,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:e.issues.map(u=>ee(u,a,K()))})),r.value.set(t.value,e.value)}const Ka=l("$ZodSet",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;const i=[];r.value=new Set;for(const a of n){const u=e.valueType._zod.run({value:a,issues:[]},o);u instanceof Promise?i.push(u.then(s=>_i(s,r))):_i(u,r)}return i.length?Promise.all(i).then(()=>r):r}});function _i(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}const Ya=l("$ZodEnum",(t,e)=>{k.init(t,e);const r=yn(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(o=>_t.has(typeof o)).map(o=>typeof o=="string"?Ne(o):o.toString()).join("|")})$`),t._zod.parse=(o,n)=>{const i=o.value;return t._zod.values.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:t}),o}}),Xa=l("$ZodLiteral",(t,e)=>{k.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?Ne(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,o)=>{const n=r.value;return t._zod.values.has(n)||r.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),r}}),Ha=l("$ZodFile",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),An=l("$ZodTransform",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=e.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Ze;return r.value=n,r}}),Qa=l("$ZodOptional",(t,e)=>{k.init(t,e),t._zod.optin="optional",t._zod.optout="optional",N(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),N(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),t._zod.parse=(r,o)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,o):r.value===void 0?r:e.innerType._zod.run(r,o)}),eu=l("$ZodNullable",(t,e)=>{k.init(t,e),N(t._zod,"optin",()=>e.innerType._zod.optin),N(t._zod,"optout",()=>e.innerType._zod.optout),N(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),N(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,o)=>r.value===null?r:e.innerType._zod.run(r,o)}),tu=l("$ZodDefault",(t,e)=>{k.init(t,e),t._zod.optin="optional",N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{if(r.value===void 0)return r.value=e.defaultValue,r;const n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Ii(i,e)):Ii(n,e)}});function Ii(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const nu=l("$ZodPrefault",(t,e)=>{k.init(t,e),t._zod.optin="optional",N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,o))}),ru=l("$ZodNonOptional",(t,e)=>{k.init(t,e),N(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(r,o)=>{const n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>ki(i,t)):ki(n,t)}});function ki(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const iu=l("$ZodSuccess",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>{const n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),ou=l("$ZodCatch",(t,e)=>{k.init(t,e),t._zod.optin="optional",N(t._zod,"optout",()=>e.innerType._zod.optout),N(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,o)=>{const n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>ee(a,o,K()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(i=>ee(i,o,K()))},input:r.value}),r.issues=[]),r)}}),au=l("$ZodNaN",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Zn=l("$ZodPipe",(t,e)=>{k.init(t,e),N(t._zod,"values",()=>e.in._zod.values),N(t._zod,"optin",()=>e.in._zod.optin),N(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,o)=>{const n=e.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Si(i,e,o)):Si(n,e,o)}});function Si(t,e,r){return Pe(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}const uu=l("$ZodReadonly",(t,e)=>{k.init(t,e),N(t._zod,"propValues",()=>e.innerType._zod.propValues),N(t._zod,"values",()=>e.innerType._zod.values),N(t._zod,"optin",()=>e.innerType._zod.optin),N(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,o)=>{const n=e.innerType._zod.run(r,o);return n instanceof Promise?n.then(Oi):Oi(n)}});function Oi(t){return t.value=Object.freeze(t.value),t}const su=l("$ZodTemplateLiteral",(t,e)=>{k.init(t,e);const r=[];for(const o of e.parts)if(o instanceof k){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);const n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);const i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||qi.has(typeof o))r.push(Ne(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:t,expected:"template_literal",code:"invalid_type"}),o):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),o)}),cu=l("$ZodPromise",(t,e)=>{k.init(t,e),t._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},o))}),lu=l("$ZodLazy",(t,e)=>{k.init(t,e),N(t._zod,"innerType",()=>e.getter()),N(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),N(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),N(t._zod,"optin",()=>t._zod.innerType._zod.optin),N(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,o)=>t._zod.innerType._zod.run(r,o)}),du=l("$ZodCustom",(t,e)=>{B.init(t,e),k.init(t,e),t._zod.parse=(r,o)=>r,t._zod.check=r=>{const o=r.value,n=e.fn(o);if(n instanceof Promise)return n.then(i=>zi(i,r,o,t));zi(n,r,o,t)}});function zi(t,e,r,o){if(!t){const n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),e.issues.push(Ce(n))}}const Sl=()=>{const t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`مدخلات غير مقبولة: يفترض إدخال ${O(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${i} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${i} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:i.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`:i.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`:i.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`:`${o[i.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Ol(){return{localeError:Sl()}}const zl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`:i.format==="ends_with"?`Yanlış mətn: "${i.suffix}" ilə bitməlidir`:i.format==="includes"?`Yanlış mətn: "${i.includes}" daxil olmalıdır`:i.format==="regex"?`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${o[i.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":""}: ${y(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 xl(){return{localeError:zl()}}function xi(t,e,r,o){const n=Math.abs(t),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?e:i>=2&&i<=4?r:o}const Nl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`Няправільны ўвод: чакалася ${O(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=xi(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${i}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=xi(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${i}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${i.prefix}"`:i.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${i.suffix}"`:i.format==="includes"?`Няправільны радок: павінен змяшчаць "${i.includes}"`:i.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`:`Няправільны ${o[i.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${y(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Tl(){return{localeError:Nl()}}const Ul=()=>{const t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Opció invàlida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{const i=n.inclusive?"com a màxim":"menys de",a=e(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"com a mínim":"més de",a=e(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Format invàlid: ha de començar amb "${i.prefix}"`:i.format==="ends_with"?`Format invàlid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format invàlid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${i.pattern}`:`Format invàlid per a ${o[i.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":""}: ${y(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 jl(){return{localeError:Ul()}}const El=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${i}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${i}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neplatný řetězec: musí začínat na "${i.prefix}"`:i.format==="ends_with"?`Neplatný řetězec: musí končit na "${i.suffix}"`:i.format==="includes"?`Neplatný řetězec: musí obsahovat "${i.includes}"`:i.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`:`Neplatný formát ${o[i.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: ${y(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 Dl(){return{localeError:El()}}const Pl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Ungültige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ungültiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ungültiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ungültiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`:`Ungültig: ${o[i.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"}: ${y(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 Al(){return{localeError:Pl()}}const Zl=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Cl=()=>{const t={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 e(o){return t[o]??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 o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${Zl(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${O(o.values[0])}`:`Invalid option: expected one of ${y(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=e(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=e(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;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]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${y(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function fu(){return{localeError:Cl()}}const Ml=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Rl=()=>{const t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(o){return t[o]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${o.expected}, riceviĝis ${Ml(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendiĝis ${O(o.values[0])}`:`Nevalida opcio: atendiĝis unu el ${y(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=e(o.origin);return i?`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=e(o.origin);return i?`Tro malgranda: atendiĝis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} ŝlosilo${o.keys.length>1?"j":""}: ${y(o.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Ll(){return{localeError:Rl()}}const Wl=()=>{const t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Opción inválida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Cadena inválida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inválida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inválida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${i.pattern}`:`Inválido ${o[i.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":""}: ${y(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 Bl(){return{localeError:Wl()}}const Fl=()=>{const t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`ورودی نامعتبر: می‌بایست ${O(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${y(n.values,"|")} می‌بود`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${i}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${i}${n.maximum.toString()} باشد`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${i}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${i}${n.minimum.toString()} باشد`}case"invalid_format":{const i=n;return i.format==="starts_with"?`رشته نامعتبر: باید با "${i.prefix}" شروع شود`:i.format==="ends_with"?`رشته نامعتبر: باید با "${i.suffix}" تمام شود`:i.format==="includes"?`رشته نامعتبر: باید شامل "${i.includes}" باشد`:i.format==="regex"?`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`:`${o[i.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${y(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Jl(){return{localeError:Fl()}}const Vl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen syöte: täytyy sisältää "${i.includes}"`:i.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`:`Virheellinen ${o[i.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"}: ${y(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 ql(){return{localeError:Vl()}}const Gl=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 : ${O(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${i.pattern}`:`${o[i.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":""} : ${y(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 Kl(){return{localeError:Gl()}}const Yl=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"≤":"<",a=e(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"≥":">",a=e(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.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":""} : ${y(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 Xl(){return{localeError:Yl()}}const Hl=()=>{const t={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`קלט לא תקין: צריך ${O(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`גדול מדי: ${n.origin??"value"} צריך להיות ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`קטן מדי: ${n.origin} צריך להיות ${i}${n.minimum.toString()} ${a.unit}`:`קטן מדי: ${n.origin} צריך להיות ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${i.prefix}"`:i.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${i.suffix}"`:i.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${i.includes}"`:i.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${i.pattern}`:`${o[i.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${y(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function Ql(){return{localeError:Hl()}}const ed=()=>{const t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`:i.format==="ends_with"?`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`:i.format==="includes"?`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`:i.format==="regex"?`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`:`Érvénytelen ${o[i.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":""}: ${y(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 td(){return{localeError:ed()}}const nd=()=>{const t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.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":""}: ${y(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 rd(){return{localeError:nd()}}const id=()=>{const t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.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"}: ${y(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 od(){return{localeError:id()}}const ad=()=>{const t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`無効な入力: ${O(n.values[0])}が期待されました`:`無効な選択: ${y(n.values,"、")}のいずれかである必要があります`;case"too_big":{const i=n.inclusive?"以下である":"より小さい",a=e(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${i}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${i}必要があります`}case"too_small":{const i=n.inclusive?"以上である":"より大きい",a=e(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${i}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${i}必要があります`}case"invalid_format":{const i=n;return i.format==="starts_with"?`無効な文字列: "${i.prefix}"で始まる必要があります`:i.format==="ends_with"?`無効な文字列: "${i.suffix}"で終わる必要があります`:i.format==="includes"?`無効な文字列: "${i.includes}"を含む必要があります`:i.format==="regex"?`無効な文字列: パターン${i.pattern}に一致する必要があります`:`無効な${o[i.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${y(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function ud(){return{localeError:ad()}}const sd=()=>{const t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${O(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${i} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`:i.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`:i.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`:i.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`:`មិនត្រឹមត្រូវ៖ ${o[i.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${y(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function cd(){return{localeError:sd()}}const ld=()=>{const t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`잘못된 입력: 값은 ${O(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${y(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const i=n.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${i}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${i}${a}`}case"too_small":{const i=n.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${i}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`:i.format==="ends_with"?`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`:i.format==="includes"?`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`:i.format==="regex"?`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`:`잘못된 ${o[i.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${y(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function dd(){return{localeError:ld()}}const fd=()=>{const t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Грешана опција: се очекува една ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${i}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${i}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неважечка низа: мора да започнува со "${i.prefix}"`:i.format==="ends_with"?`Неважечка низа: мора да завршува со "${i.suffix}"`:i.format==="includes"?`Неважечка низа: мора да вклучува "${i.includes}"`:i.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${y(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function md(){return{localeError:fd()}}const pd=()=>{const t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(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 gd(){return{localeError:pd()}}const hd=()=>{const t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Ongeldige optie: verwacht één van ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.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":""}: ${y(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 vd(){return{localeError:hd()}}const yd=()=>{const t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ugyldig streng: må starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: må ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: må inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: må matche mønsteret ${i.pattern}`:`Ugyldig ${o[i.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"}: ${y(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 bd(){return{localeError:yd()}}const $d=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Fâsit tercih: mûteberler ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmalıydı.`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Fazla küçük: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${i}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Fâsit metin: "${i.prefix}" ile başlamalı.`:i.format==="ends_with"?`Fâsit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`Fâsit metin: "${i.includes}" ihtivâ etmeli.`:i.format==="regex"?`Fâsit metin: ${i.pattern} nakşına uymalı.`:`Fâsit ${o[i.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":""}: ${y(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 wd(){return{localeError:$d()}}const _d=()=>{const t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`ناسم ورودي: باید ${O(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${y(n.values,"|")} څخه وای`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${i}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${i}${n.maximum.toString()} وي`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${i}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${i}${n.minimum.toString()} وي`}case"invalid_format":{const i=n;return i.format==="starts_with"?`ناسم متن: باید د "${i.prefix}" سره پیل شي`:i.format==="ends_with"?`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`:i.format==="includes"?`ناسم متن: باید "${i.includes}" ولري`:i.format==="regex"?`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`:`${o[i.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${y(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Id(){return{localeError:_d()}}const kd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${i}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${i}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`:i.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`:i.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`:i.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`:`Nieprawidłow(y/a/e) ${o[i.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":""}: ${y(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 Sd(){return{localeError:kd()}}const Od=()=>{const t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Opção inválida: esperada uma das ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Texto inválido: deve começar com "${i.prefix}"`:i.format==="ends_with"?`Texto inválido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inválido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inválido: deve corresponder ao padrão ${i.pattern}`:`${o[i.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":""}: ${y(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 zd(){return{localeError:Od()}}function Ni(t,e,r,o){const n=Math.abs(t),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?e:i>=2&&i<=4?r:o}const xd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`Неверный ввод: ожидалось ${O(n.values[0])}`:`Неверный вариант: ожидалось одно из ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=Ni(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${i}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=Ni(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${i}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неверная строка: должна начинаться с "${i.prefix}"`:i.format==="ends_with"?`Неверная строка: должна заканчиваться на "${i.suffix}"`:i.format==="includes"?`Неверная строка: должна содержать "${i.includes}"`:i.format==="regex"?`Неверная строка: должна соответствовать шаблону ${i.pattern}`:`Неверный ${o[i.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function Nd(){return{localeError:xd()}}const Td=()=>{const t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neveljaven niz: mora se začeti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se končati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.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č"}: ${y(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 Ud(){return{localeError:Td()}}const jd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Ogiltigt val: förväntade en av ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ogiltig sträng: måste börja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig sträng: måste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig sträng: måste innehålla "${i.includes}"`:i.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`:`Ogiltig(t) ${o[i.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"}: ${y(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 Ed(){return{localeError:jd()}}const Dd=()=>{const t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${O(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${y(n.values,"|")} இல் ஒன்று`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${i}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${i}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${i}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const i=n;return i.format==="starts_with"?`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`:i.format==="ends_with"?`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`:i.format==="includes"?`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`:i.format==="regex"?`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${o[i.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Pd(){return{localeError:Dd()}}const Ad=()=>{const t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`ค่าไม่ถูกต้อง: ควรเป็น ${O(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=e(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${i} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"อย่างน้อย":"มากกว่า",a=e(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${i} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`:i.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`:i.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`:i.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`:`รูปแบบไม่ถูกต้อง: ${o[i.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${y(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Zd(){return{localeError:Ad()}}const Cd=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Md=()=>{const t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function e(o){return t[o]??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 o=>{switch(o.code){case"invalid_type":return`Geçersiz değer: beklenen ${o.expected}, alınan ${Cd(o.input)}`;case"invalid_value":return o.values.length===1?`Geçersiz değer: beklenen ${O(o.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${y(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=e(o.origin);return i?`Çok büyük: beklenen ${o.origin??"değer"} ${n}${o.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${o.origin??"değer"} ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=e(o.origin);return i?`Çok küçük: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;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]??o.format}`}case"not_multiple_of":return`Geçersiz sayı: ${o.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${o.keys.length>1?"lar":""}: ${y(o.keys,", ")}`;case"invalid_key":return`${o.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${o.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Rd(){return{localeError:Md()}}const Ld=()=>{const t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`Неправильні вхідні дані: очікується ${O(n.values[0])}`:`Неправильна опція: очікується одне з ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неправильний рядок: повинен починатися з "${i.prefix}"`:i.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`:i.format==="includes"?`Неправильний рядок: повинен містити "${i.includes}"`:i.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`:`Неправильний ${o[i.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Wd(){return{localeError:Ld()}}const Bd=()=>{const t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`غلط ان پٹ: ${O(n.values[0])} متوقع تھا`:`غلط آپشن: ${y(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${i}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${i}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${i}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${i}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const i=n;return i.format==="starts_with"?`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`:i.format==="ends_with"?`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`:i.format==="includes"?`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`:i.format==="regex"?`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`:`غلط ${o[i.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${y(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Fd(){return{localeError:Bd()}}const Jd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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 ${O(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`:i.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`:i.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`:i.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`:`${o[i.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: ${y(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 Vd(){return{localeError:Jd()}}const qd=()=>{const t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`无效输入:期望 ${O(n.values[0])}`:`无效选项:期望以下之一 ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${i}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`数值过小:期望 ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`无效字符串:必须以 "${i.prefix}" 开头`:i.format==="ends_with"?`无效字符串:必须以 "${i.suffix}" 结尾`:i.format==="includes"?`无效字符串:必须包含 "${i.includes}"`:i.format==="regex"?`无效字符串:必须满足正则表达式 ${i.pattern}`:`无效${o[i.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Gd(){return{localeError:qd()}}const Kd=()=>{const t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function e(n){return t[n]??null}const r=n=>{const i=typeof n;switch(i){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 i},o={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?`無效的輸入值:預期為 ${O(n.values[0])}`:`無效的選項:預期為以下其中之一 ${y(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=e(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${i}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=e(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${i}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`無效的字串:必須以 "${i.prefix}" 開頭`:i.format==="ends_with"?`無效的字串:必須以 "${i.suffix}" 結尾`:i.format==="includes"?`無效的字串:必須包含 "${i.includes}"`:i.format==="regex"?`無效的字串:必須符合格式 ${i.pattern}`:`無效的 ${o[i.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${y(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Yd(){return{localeError:Kd()}}const mu=Object.freeze(Object.defineProperty({__proto__:null,ar:Ol,az:xl,be:Tl,ca:jl,cs:Dl,de:Al,en:fu,eo:Ll,es:Bl,fa:Jl,fi:ql,fr:Kl,frCA:Xl,he:Ql,hu:td,id:rd,it:od,ja:ud,kh:cd,ko:dd,mk:md,ms:gd,nl:vd,no:bd,ota:wd,pl:Sd,ps:Id,pt:zd,ru:Nd,sl:Ud,sv:Ed,ta:Pd,th:Zd,tr:Rd,ua:Wd,ur:Fd,vi:Vd,zhCN:Gd,zhTW:Yd},Symbol.toStringTag,{value:"Module"})),pu=Symbol("ZodOutput"),gu=Symbol("ZodInput");class Cn{constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){const o=r[0];if(this._map.set(e,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const o={...this.get(r)??{}};return delete o.id,{...o,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function Mn(){return new Cn}const $e=Mn();function hu(t,e){return new t({type:"string",...p(e)})}function vu(t,e){return new t({type:"string",coerce:!0,...p(e)})}function Rn(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...p(e)})}function kt(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...p(e)})}function Ln(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...p(e)})}function Wn(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...p(e)})}function Bn(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...p(e)})}function Fn(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...p(e)})}function Jn(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...p(e)})}function Vn(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...p(e)})}function qn(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...p(e)})}function Gn(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...p(e)})}function Kn(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...p(e)})}function Yn(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...p(e)})}function Xn(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...p(e)})}function Hn(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...p(e)})}function Qn(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...p(e)})}function er(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...p(e)})}function tr(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...p(e)})}function nr(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...p(e)})}function rr(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...p(e)})}function ir(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...p(e)})}function or(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...p(e)})}function ar(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...p(e)})}const yu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function bu(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...p(e)})}function $u(t,e){return new t({type:"string",format:"date",check:"string_format",...p(e)})}function wu(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...p(e)})}function _u(t,e){return new t({type:"string",format:"duration",check:"string_format",...p(e)})}function Iu(t,e){return new t({type:"number",checks:[],...p(e)})}function ku(t,e){return new t({type:"number",coerce:!0,checks:[],...p(e)})}function Su(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...p(e)})}function Ou(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...p(e)})}function zu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...p(e)})}function xu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...p(e)})}function Nu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...p(e)})}function Tu(t,e){return new t({type:"boolean",...p(e)})}function Uu(t,e){return new t({type:"boolean",coerce:!0,...p(e)})}function ju(t,e){return new t({type:"bigint",...p(e)})}function Eu(t,e){return new t({type:"bigint",coerce:!0,...p(e)})}function Du(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...p(e)})}function Pu(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...p(e)})}function Au(t,e){return new t({type:"symbol",...p(e)})}function Zu(t,e){return new t({type:"undefined",...p(e)})}function Cu(t,e){return new t({type:"null",...p(e)})}function Mu(t){return new t({type:"any"})}function St(t){return new t({type:"unknown"})}function Ru(t,e){return new t({type:"never",...p(e)})}function Lu(t,e){return new t({type:"void",...p(e)})}function Wu(t,e){return new t({type:"date",...p(e)})}function Bu(t,e){return new t({type:"date",coerce:!0,...p(e)})}function Fu(t,e){return new t({type:"nan",...p(e)})}function Se(t,e){return new xn({check:"less_than",...p(e),value:t,inclusive:!1})}function Q(t,e){return new xn({check:"less_than",...p(e),value:t,inclusive:!0})}function Oe(t,e){return new Nn({check:"greater_than",...p(e),value:t,inclusive:!1})}function Y(t,e){return new Nn({check:"greater_than",...p(e),value:t,inclusive:!0})}function Ju(t){return Oe(0,t)}function Vu(t){return Se(0,t)}function qu(t){return Q(0,t)}function Gu(t){return Y(0,t)}function tt(t,e){return new Bo({check:"multiple_of",...p(e),value:t})}function Zt(t,e){return new Vo({check:"max_size",...p(e),maximum:t})}function nt(t,e){return new qo({check:"min_size",...p(e),minimum:t})}function ur(t,e){return new Go({check:"size_equals",...p(e),size:t})}function Ct(t,e){return new Ko({check:"max_length",...p(e),maximum:t})}function Re(t,e){return new Yo({check:"min_length",...p(e),minimum:t})}function Mt(t,e){return new Xo({check:"length_equals",...p(e),length:t})}function sr(t,e){return new Ho({check:"string_format",format:"regex",...p(e),pattern:t})}function cr(t){return new Qo({check:"string_format",format:"lowercase",...p(t)})}function lr(t){return new ea({check:"string_format",format:"uppercase",...p(t)})}function dr(t,e){return new ta({check:"string_format",format:"includes",...p(e),includes:t})}function fr(t,e){return new na({check:"string_format",format:"starts_with",...p(e),prefix:t})}function mr(t,e){return new ra({check:"string_format",format:"ends_with",...p(e),suffix:t})}function Ku(t,e,r){return new ia({check:"property",property:t,schema:e,...p(r)})}function pr(t,e){return new oa({check:"mime_type",mime:t,...p(e)})}function Te(t){return new aa({check:"overwrite",tx:t})}function gr(t){return Te(e=>e.normalize(t))}function hr(){return Te(t=>t.trim())}function vr(){return Te(t=>t.toLowerCase())}function yr(){return Te(t=>t.toUpperCase())}function br(t,e,r){return new t({type:"array",element:e,...p(r)})}function Xd(t,e,r){return new t({type:"union",options:e,...p(r)})}function Hd(t,e,r,o){return new t({type:"union",options:r,discriminator:e,...p(o)})}function Qd(t,e,r){return new t({type:"intersection",left:e,right:r})}function Yu(t,e,r,o){const n=r instanceof k,i=n?o:r,a=n?r:null;return new t({type:"tuple",items:e,rest:a,...p(i)})}function ef(t,e,r,o){return new t({type:"record",keyType:e,valueType:r,...p(o)})}function tf(t,e,r,o){return new t({type:"map",keyType:e,valueType:r,...p(o)})}function nf(t,e,r){return new t({type:"set",valueType:e,...p(r)})}function rf(t,e,r){const o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:o,...p(r)})}function of(t,e,r){return new t({type:"enum",entries:e,...p(r)})}function af(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...p(r)})}function Xu(t,e){return new t({type:"file",...p(e)})}function uf(t,e){return new t({type:"transform",transform:e})}function sf(t,e){return new t({type:"optional",innerType:e})}function cf(t,e){return new t({type:"nullable",innerType:e})}function lf(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function df(t,e,r){return new t({type:"nonoptional",innerType:e,...p(r)})}function ff(t,e){return new t({type:"success",innerType:e})}function mf(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function pf(t,e,r){return new t({type:"pipe",in:e,out:r})}function gf(t,e){return new t({type:"readonly",innerType:e})}function hf(t,e,r){return new t({type:"template_literal",parts:e,...p(r)})}function vf(t,e){return new t({type:"lazy",getter:e})}function yf(t,e){return new t({type:"promise",innerType:e})}function Hu(t,e,r){const o=p(r);return o.abort??(o.abort=!0),new t({type:"custom",check:"custom",fn:e,...o})}function Qu(t,e,r){return new t({type:"custom",check:"custom",fn:e,...p(r)})}function es(t,e){const r=p(e);let o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(d=>typeof d=="string"?d.toLowerCase():d),n=n.map(d=>typeof d=="string"?d.toLowerCase():d));const i=new Set(o),a=new Set(n),u=t.Pipe??Zn,s=t.Boolean??jn,m=t.String??st,g=t.Transform??An,c=new g({type:"transform",transform:(d,b)=>{let _=d;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:a.has(_)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:b.value,inst:c}),{})},error:r.error}),w=new u({type:"pipe",in:new m({type:"string",error:r.error}),out:c,error:r.error});return new u({type:"pipe",in:w,out:new s({type:"boolean",error:r.error}),error:r.error})}function ts(t,e,r,o={}){const n=p(o),i={...p(o),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(i.pattern=r),new t(i)}class ns{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");const r=(...o)=>{const n=this._def.input?an(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const i=e(...n);return this._def.output?an(this._def.output,i,void 0,{callee:r}):i};return r}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");const r=async(...o)=>{const n=this._def.input?await un(this._def.input,o,void 0,{callee:r}):o;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const i=await e(...n);return this._def.output?un(this._def.output,i,void 0,{callee:r}):i};return r}input(...e){const r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new At({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){const r=this.constructor;return new r({type:"function",input:this._def.input,output:e})}}function rs(t){return new ns({type:"function",input:Array.isArray(t?.input)?Yu(At,t?.input):t?.input??br(Dn,St(It)),output:t?.output??St(It)})}class cn{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??$e,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var o;const n=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,u);const s=e._zod.toJSONSchema?.();if(s)u.schema=s;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path},w=e._zod.parent;if(w)u.ref=w,this.process(w,c),this.seen.get(w).isParent=!0;else{const v=u.schema;switch(n.type){case"string":{const d=v;d.type="string";const{minimum:b,maximum:_,format:E,patterns:I,contentEncoding:S}=e._zod.bag;if(typeof b=="number"&&(d.minLength=b),typeof _=="number"&&(d.maxLength=_),E&&(d.format=i[E]??E,d.format===""&&delete d.format),S&&(d.contentEncoding=S),I&&I.size>0){const T=[...I];T.length===1?d.pattern=T[0].source:T.length>1&&(u.schema.allOf=[...T.map(be=>({...this.target==="draft-7"?{type:"string"}:{},pattern:be.source}))])}break}case"number":{const d=v,{minimum:b,maximum:_,format:E,multipleOf:I,exclusiveMaximum:S,exclusiveMinimum:T}=e._zod.bag;typeof E=="string"&&E.includes("int")?d.type="integer":d.type="number",typeof T=="number"&&(d.exclusiveMinimum=T),typeof b=="number"&&(d.minimum=b,typeof T=="number"&&(T>=b?delete d.minimum:delete d.exclusiveMinimum)),typeof S=="number"&&(d.exclusiveMaximum=S),typeof _=="number"&&(d.maximum=_,typeof S=="number"&&(S<=_?delete d.maximum:delete d.exclusiveMaximum)),typeof I=="number"&&(d.multipleOf=I);break}case"boolean":{const d=v;d.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{v.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{v.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const d=v,{minimum:b,maximum:_}=e._zod.bag;typeof b=="number"&&(d.minItems=b),typeof _=="number"&&(d.maxItems=_),d.type="array",d.items=this.process(n.element,{...c,path:[...c.path,"items"]});break}case"object":{const d=v;d.type="object",d.properties={};const b=n.shape;for(const I in b)d.properties[I]=this.process(b[I],{...c,path:[...c.path,"properties",I]});const _=new Set(Object.keys(b)),E=new Set([..._].filter(I=>{const S=n.shape[I]._zod;return this.io==="input"?S.optin===void 0:S.optout===void 0}));E.size>0&&(d.required=Array.from(E)),n.catchall?._zod.def.type==="never"?d.additionalProperties=!1:n.catchall?n.catchall&&(d.additionalProperties=this.process(n.catchall,{...c,path:[...c.path,"additionalProperties"]})):this.io==="output"&&(d.additionalProperties=!1);break}case"union":{const d=v;d.anyOf=n.options.map((b,_)=>this.process(b,{...c,path:[...c.path,"anyOf",_]}));break}case"intersection":{const d=v,b=this.process(n.left,{...c,path:[...c.path,"allOf",0]}),_=this.process(n.right,{...c,path:[...c.path,"allOf",1]}),E=S=>"allOf"in S&&Object.keys(S).length===1,I=[...E(b)?b.allOf:[b],...E(_)?_.allOf:[_]];d.allOf=I;break}case"tuple":{const d=v;d.type="array";const b=n.items.map((I,S)=>this.process(I,{...c,path:[...c.path,"prefixItems",S]}));if(this.target==="draft-2020-12"?d.prefixItems=b:d.items=b,n.rest){const I=this.process(n.rest,{...c,path:[...c.path,"items"]});this.target==="draft-2020-12"?d.items=I:d.additionalItems=I}n.rest&&(d.items=this.process(n.rest,{...c,path:[...c.path,"items"]}));const{minimum:_,maximum:E}=e._zod.bag;typeof _=="number"&&(d.minItems=_),typeof E=="number"&&(d.maxItems=E);break}case"record":{const d=v;d.type="object",d.propertyNames=this.process(n.keyType,{...c,path:[...c.path,"propertyNames"]}),d.additionalProperties=this.process(n.valueType,{...c,path:[...c.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 d=v,b=yn(n.entries);b.every(_=>typeof _=="number")&&(d.type="number"),b.every(_=>typeof _=="string")&&(d.type="string"),d.enum=b;break}case"literal":{const d=v,b=[];for(const _ of n.values)if(_===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof _=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(_))}else b.push(_);if(b.length!==0)if(b.length===1){const _=b[0];d.type=_===null?"null":typeof _,d.const=_}else b.every(_=>typeof _=="number")&&(d.type="number"),b.every(_=>typeof _=="string")&&(d.type="string"),b.every(_=>typeof _=="boolean")&&(d.type="string"),b.every(_=>_===null)&&(d.type="null"),d.enum=b;break}case"file":{const d=v,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:_,maximum:E,mime:I}=e._zod.bag;_!==void 0&&(b.minLength=_),E!==void 0&&(b.maxLength=E),I?I.length===1?(b.contentMediaType=I[0],Object.assign(d,b)):d.anyOf=I.map(S=>({...b,contentMediaType:S})):Object.assign(d,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const d=this.process(n.innerType,c);v.anyOf=[d,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,c),u.ref=n.innerType;break}case"success":{const d=v;d.type="boolean";break}case"default":{this.process(n.innerType,c),u.ref=n.innerType,v.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,c),u.ref=n.innerType,this.io==="input"&&(v._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,c),u.ref=n.innerType;let d;try{d=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}v.default=d;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const d=v,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");d.type="string",d.pattern=b.source;break}case"pipe":{const d=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(d,c),u.ref=d;break}case"readonly":{this.process(n.innerType,c),u.ref=n.innerType,v.readOnly=!0;break}case"promise":{this.process(n.innerType,c),u.ref=n.innerType;break}case"optional":{this.process(n.innerType,c),u.ref=n.innerType;break}case"lazy":{const d=e._zod.innerType;this.process(d,c),u.ref=d;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const m=this.metadataRegistry.get(e);return m&&Object.assign(u.schema,m),this.io==="input"&&F(e)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((o=u.schema).default??(o.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(e).schema}emit(e,r){const o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=g=>{const c=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){const b=o.external.registry.get(g[0])?.id,_=o.external.uri??(I=>I);if(b)return{ref:_(b)};const E=g[1].defId??g[1].schema.id??`schema${this.counter++}`;return g[1].defId=E,{defId:E,ref:`${_("__shared")}#/${c}/${E}`}}if(g[1]===n)return{ref:"#"};const v=`#/${c}/`,d=g[1].schema.id??`__schema${this.counter++}`;return{defId:d,ref:v+d}},a=g=>{if(g[1].schema.$ref)return;const c=g[1],{ref:w,defId:v}=i(g);c.def={...c.schema},v&&(c.defId=v);const d=c.schema;for(const b in d)delete d[b];d.$ref=w};if(o.cycles==="throw")for(const g of this.seen.entries()){const c=g[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
28
-
29
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const g of this.seen.entries()){const c=g[1];if(e===g[0]){a(g);continue}if(o.external){const v=o.external.registry.get(g[0])?.id;if(e!==g[0]&&v){a(g);continue}}if(this.metadataRegistry.get(g[0])?.id){a(g);continue}if(c.cycle){a(g);continue}if(c.count>1&&o.reused==="ref"){a(g);continue}}const u=(g,c)=>{const w=this.seen.get(g),v=w.def??w.schema,d={...v};if(w.ref===null)return;const b=w.ref;if(w.ref=null,b){u(b,c);const _=this.seen.get(b).schema;_.$ref&&c.target==="draft-7"?(v.allOf=v.allOf??[],v.allOf.push(_)):(Object.assign(v,_),Object.assign(v,d))}w.isParent||this.override({zodSchema:g,jsonSchema:v,path:w.path??[]})};for(const g of[...this.seen.entries()].reverse())u(g[0],{target:this.target});const s={};if(this.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?s.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){const g=o.external.registry.get(e)?.id;if(!g)throw new Error("Schema is missing an `id` property");s.$id=o.external.uri(g)}Object.assign(s,n.def);const m=o.external?.defs??{};for(const g of this.seen.entries()){const c=g[1];c.def&&c.defId&&(m[c.defId]=c.def)}o.external||Object.keys(m).length>0&&(this.target==="draft-2020-12"?s.$defs=m:s.definitions=m);try{return JSON.parse(JSON.stringify(s))}catch{throw new Error("Error converting schema to JSON.")}}}function is(t,e){if(t instanceof Cn){const o=new cn(e),n={};for(const u of t._idmap.entries()){const[s,m]=u;o.process(m)}const i={},a={registry:t,uri:e?.uri,defs:n};for(const u of t._idmap.entries()){const[s,m]=u;i[s]=o.emit(m,{...e,external:a})}if(Object.keys(n).length>0){const u=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[u]:n}}return{schemas:i}}const r=new cn(e);return r.process(t),r.emit(t,e)}function F(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;switch(n.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 F(n.element,r);case"object":{for(const i in n.shape)if(F(n.shape[i],r))return!0;return!1}case"union":{for(const i of n.options)if(F(i,r))return!0;return!1}case"intersection":return F(n.left,r)||F(n.right,r);case"tuple":{for(const i of n.items)if(F(i,r))return!0;return!!(n.rest&&F(n.rest,r))}case"record":return F(n.keyType,r)||F(n.valueType,r);case"map":return F(n.keyType,r)||F(n.valueType,r);case"set":return F(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return F(n.innerType,r);case"lazy":return F(n.getter(),r);case"default":return F(n.innerType,r);case"prefault":return F(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return F(n.in,r)||F(n.out,r);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${n.type}`)}const bf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),$f=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Ra,$ZodArray:Dn,$ZodAsyncError:Ze,$ZodBase64:xa,$ZodBase64URL:Ta,$ZodBigInt:En,$ZodBigIntFormat:Aa,$ZodBoolean:jn,$ZodCIDRv4:Oa,$ZodCIDRv6:za,$ZodCUID:ga,$ZodCUID2:ha,$ZodCatch:ou,$ZodCheck:B,$ZodCheckBigIntFormat:Jo,$ZodCheckEndsWith:ra,$ZodCheckGreaterThan:Nn,$ZodCheckIncludes:ta,$ZodCheckLengthEquals:Xo,$ZodCheckLessThan:xn,$ZodCheckLowerCase:Qo,$ZodCheckMaxLength:Ko,$ZodCheckMaxSize:Vo,$ZodCheckMimeType:oa,$ZodCheckMinLength:Yo,$ZodCheckMinSize:qo,$ZodCheckMultipleOf:Bo,$ZodCheckNumberFormat:Fo,$ZodCheckOverwrite:aa,$ZodCheckProperty:ia,$ZodCheckRegex:Ho,$ZodCheckSizeEquals:Go,$ZodCheckStartsWith:na,$ZodCheckStringFormat:ut,$ZodCheckUpperCase:ea,$ZodCustom:du,$ZodCustomStringFormat:Da,$ZodDate:Ba,$ZodDefault:tu,$ZodDiscriminatedUnion:Ja,$ZodE164:Ua,$ZodEmail:da,$ZodEmoji:ma,$ZodEnum:Ya,$ZodError:$n,$ZodFile:Ha,$ZodFunction:ns,$ZodGUID:ca,$ZodIPv4:ka,$ZodIPv6:Sa,$ZodISODate:wa,$ZodISODateTime:$a,$ZodISODuration:Ia,$ZodISOTime:_a,$ZodIntersection:Va,$ZodJWT:Ea,$ZodKSUID:ba,$ZodLazy:lu,$ZodLiteral:Xa,$ZodMap:Ga,$ZodNaN:au,$ZodNanoID:pa,$ZodNever:La,$ZodNonOptional:ru,$ZodNull:Ma,$ZodNullable:eu,$ZodNumber:Un,$ZodNumberFormat:Pa,$ZodObject:Fa,$ZodOptional:Qa,$ZodPipe:Zn,$ZodPrefault:nu,$ZodPromise:cu,$ZodReadonly:uu,$ZodRealError:at,$ZodRecord:qa,$ZodRegistry:Cn,$ZodSet:Ka,$ZodString:st,$ZodStringFormat:A,$ZodSuccess:iu,$ZodSymbol:Za,$ZodTemplateLiteral:su,$ZodTransform:An,$ZodTuple:At,$ZodType:k,$ZodULID:va,$ZodURL:fa,$ZodUUID:la,$ZodUndefined:Ca,$ZodUnion:Pn,$ZodUnknown:It,$ZodVoid:Wa,$ZodXID:ya,$brand:Bi,$constructor:l,$input:gu,$output:pu,Doc:ua,JSONSchema:bf,JSONSchemaGenerator:cn,NEVER:Wi,TimePrecision:yu,_any:Mu,_array:br,_base64:rr,_base64url:ir,_bigint:ju,_boolean:Tu,_catch:mf,_cidrv4:tr,_cidrv6:nr,_coercedBigint:Eu,_coercedBoolean:Uu,_coercedDate:Bu,_coercedNumber:ku,_coercedString:vu,_cuid:Gn,_cuid2:Kn,_custom:Hu,_date:Wu,_default:lf,_discriminatedUnion:Hd,_e164:or,_email:Rn,_emoji:Vn,_endsWith:mr,_enum:rf,_file:Xu,_float32:Ou,_float64:zu,_gt:Oe,_gte:Y,_guid:kt,_includes:dr,_int:Su,_int32:xu,_int64:Du,_intersection:Qd,_ipv4:Qn,_ipv6:er,_isoDate:$u,_isoDateTime:bu,_isoDuration:_u,_isoTime:wu,_jwt:ar,_ksuid:Hn,_lazy:vf,_length:Mt,_literal:af,_lowercase:cr,_lt:Se,_lte:Q,_map:tf,_max:Q,_maxLength:Ct,_maxSize:Zt,_mime:pr,_min:Y,_minLength:Re,_minSize:nt,_multipleOf:tt,_nan:Fu,_nanoid:qn,_nativeEnum:of,_negative:Vu,_never:Ru,_nonnegative:Gu,_nonoptional:df,_nonpositive:qu,_normalize:gr,_null:Cu,_nullable:cf,_number:Iu,_optional:sf,_overwrite:Te,_parse:In,_parseAsync:kn,_pipe:pf,_positive:Ju,_promise:yf,_property:Ku,_readonly:gf,_record:ef,_refine:Qu,_regex:sr,_safeParse:Sn,_safeParseAsync:On,_set:nf,_size:ur,_startsWith:fr,_string:hu,_stringFormat:ts,_stringbool:es,_success:ff,_symbol:Au,_templateLiteral:hf,_toLowerCase:vr,_toUpperCase:yr,_transform:uf,_trim:hr,_tuple:Yu,_uint32:Nu,_uint64:Pu,_ulid:Yn,_undefined:Zu,_union:Xd,_unknown:St,_uppercase:lr,_url:Jn,_uuid:Ln,_uuidv4:Wn,_uuidv6:Bn,_uuidv7:Fn,_void:Lu,_xid:Xn,clone:ue,config:K,flattenError:wn,formatError:_n,function:rs,globalConfig:wt,globalRegistry:$e,isValidBase64:Tn,isValidBase64URL:Na,isValidJWT:ja,locales:mu,parse:an,parseAsync:un,prettifyError:ao,regexes:Lo,registry:Mn,safeParse:uo,safeParseAsync:so,toDotPath:oo,toJSONSchema:is,treeifyError:io,util:pl,version:sa},Symbol.toStringTag,{value:"Module"})),$r=l("ZodISODateTime",(t,e)=>{$a.init(t,e),C.init(t,e)});function os(t){return bu($r,t)}const wr=l("ZodISODate",(t,e)=>{wa.init(t,e),C.init(t,e)});function as(t){return $u(wr,t)}const _r=l("ZodISOTime",(t,e)=>{_a.init(t,e),C.init(t,e)});function us(t){return wu(_r,t)}const Ir=l("ZodISODuration",(t,e)=>{Ia.init(t,e),C.init(t,e)});function ss(t){return _u(Ir,t)}const wf=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:wr,ZodISODateTime:$r,ZodISODuration:Ir,ZodISOTime:_r,date:as,datetime:os,duration:ss,time:us},Symbol.toStringTag,{value:"Module"})),cs=(t,e)=>{$n.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>_n(t,r)},flatten:{value:r=>wn(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},_f=l("ZodError",cs),ct=l("ZodError",cs,{Parent:Error}),ls=In(ct),ds=kn(ct),fs=Sn(ct),ms=On(ct),z=l("ZodType",(t,e)=>(k.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),t.clone=(r,o)=>ue(t,r,o),t.brand=()=>t,t.register=(r,o)=>(r.add(t,o),t),t.parse=(r,o)=>ls(t,r,o,{callee:t.parse}),t.safeParse=(r,o)=>fs(t,r,o),t.parseAsync=async(r,o)=>ds(t,r,o,{callee:t.parseAsync}),t.safeParseAsync=async(r,o)=>ms(t,r,o),t.spa=t.safeParseAsync,t.refine=(r,o)=>t.check(Qs(r,o)),t.superRefine=r=>t.check(ec(r)),t.overwrite=r=>t.check(Te(r)),t.optional=()=>zt(t),t.nullable=()=>xt(t),t.nullish=()=>zt(xt(t)),t.nonoptional=r=>Rs(t,r),t.array=()=>lt(t),t.or=r=>R([t,r]),t.and=r=>xs(t,r),t.transform=r=>Nt(t,Gr(r)),t.default=r=>Zs(t,r),t.prefault=r=>Ms(t,r),t.catch=r=>Bs(t,r),t.pipe=r=>Nt(t,r),t.readonly=()=>Vs(t),t.describe=r=>{const o=t.clone();return $e.add(o,{description:r}),o},Object.defineProperty(t,"description",{get(){return $e.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return $e.get(t);const o=t.clone();return $e.add(o,r[0]),o},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),kr=l("_ZodString",(t,e)=>{st.init(t,e),z.init(t,e);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...o)=>t.check(sr(...o)),t.includes=(...o)=>t.check(dr(...o)),t.startsWith=(...o)=>t.check(fr(...o)),t.endsWith=(...o)=>t.check(mr(...o)),t.min=(...o)=>t.check(Re(...o)),t.max=(...o)=>t.check(Ct(...o)),t.length=(...o)=>t.check(Mt(...o)),t.nonempty=(...o)=>t.check(Re(1,...o)),t.lowercase=o=>t.check(cr(o)),t.uppercase=o=>t.check(lr(o)),t.trim=()=>t.check(hr()),t.normalize=(...o)=>t.check(gr(...o)),t.toLowerCase=()=>t.check(vr()),t.toUpperCase=()=>t.check(yr())}),Rt=l("ZodString",(t,e)=>{st.init(t,e),kr.init(t,e),t.email=r=>t.check(Rn(Sr,r)),t.url=r=>t.check(Jn(Or,r)),t.jwt=r=>t.check(ar(Lr,r)),t.emoji=r=>t.check(Vn(zr,r)),t.guid=r=>t.check(kt(Ot,r)),t.uuid=r=>t.check(Ln(ce,r)),t.uuidv4=r=>t.check(Wn(ce,r)),t.uuidv6=r=>t.check(Bn(ce,r)),t.uuidv7=r=>t.check(Fn(ce,r)),t.nanoid=r=>t.check(qn(xr,r)),t.guid=r=>t.check(kt(Ot,r)),t.cuid=r=>t.check(Gn(Nr,r)),t.cuid2=r=>t.check(Kn(Tr,r)),t.ulid=r=>t.check(Yn(Ur,r)),t.base64=r=>t.check(rr(Cr,r)),t.base64url=r=>t.check(ir(Mr,r)),t.xid=r=>t.check(Xn(jr,r)),t.ksuid=r=>t.check(Hn(Er,r)),t.ipv4=r=>t.check(Qn(Dr,r)),t.ipv6=r=>t.check(er(Pr,r)),t.cidrv4=r=>t.check(tr(Ar,r)),t.cidrv6=r=>t.check(nr(Zr,r)),t.e164=r=>t.check(or(Rr,r)),t.datetime=r=>t.check(os(r)),t.date=r=>t.check(as(r)),t.time=r=>t.check(us(r)),t.duration=r=>t.check(ss(r))});function P(t){return hu(Rt,t)}const C=l("ZodStringFormat",(t,e)=>{A.init(t,e),kr.init(t,e)}),Sr=l("ZodEmail",(t,e)=>{da.init(t,e),C.init(t,e)});function If(t){return Rn(Sr,t)}const Ot=l("ZodGUID",(t,e)=>{ca.init(t,e),C.init(t,e)});function kf(t){return kt(Ot,t)}const ce=l("ZodUUID",(t,e)=>{la.init(t,e),C.init(t,e)});function Sf(t){return Ln(ce,t)}function Of(t){return Wn(ce,t)}function zf(t){return Bn(ce,t)}function xf(t){return Fn(ce,t)}const Or=l("ZodURL",(t,e)=>{fa.init(t,e),C.init(t,e)});function Nf(t){return Jn(Or,t)}const zr=l("ZodEmoji",(t,e)=>{ma.init(t,e),C.init(t,e)});function Tf(t){return Vn(zr,t)}const xr=l("ZodNanoID",(t,e)=>{pa.init(t,e),C.init(t,e)});function Uf(t){return qn(xr,t)}const Nr=l("ZodCUID",(t,e)=>{ga.init(t,e),C.init(t,e)});function jf(t){return Gn(Nr,t)}const Tr=l("ZodCUID2",(t,e)=>{ha.init(t,e),C.init(t,e)});function Ef(t){return Kn(Tr,t)}const Ur=l("ZodULID",(t,e)=>{va.init(t,e),C.init(t,e)});function Df(t){return Yn(Ur,t)}const jr=l("ZodXID",(t,e)=>{ya.init(t,e),C.init(t,e)});function Pf(t){return Xn(jr,t)}const Er=l("ZodKSUID",(t,e)=>{ba.init(t,e),C.init(t,e)});function Af(t){return Hn(Er,t)}const Dr=l("ZodIPv4",(t,e)=>{ka.init(t,e),C.init(t,e)});function Zf(t){return Qn(Dr,t)}const Pr=l("ZodIPv6",(t,e)=>{Sa.init(t,e),C.init(t,e)});function Cf(t){return er(Pr,t)}const Ar=l("ZodCIDRv4",(t,e)=>{Oa.init(t,e),C.init(t,e)});function Mf(t){return tr(Ar,t)}const Zr=l("ZodCIDRv6",(t,e)=>{za.init(t,e),C.init(t,e)});function Rf(t){return nr(Zr,t)}const Cr=l("ZodBase64",(t,e)=>{xa.init(t,e),C.init(t,e)});function Lf(t){return rr(Cr,t)}const Mr=l("ZodBase64URL",(t,e)=>{Ta.init(t,e),C.init(t,e)});function Wf(t){return ir(Mr,t)}const Rr=l("ZodE164",(t,e)=>{Ua.init(t,e),C.init(t,e)});function Bf(t){return or(Rr,t)}const Lr=l("ZodJWT",(t,e)=>{Ea.init(t,e),C.init(t,e)});function Ff(t){return ar(Lr,t)}const ps=l("ZodCustomStringFormat",(t,e)=>{Da.init(t,e),C.init(t,e)});function Jf(t,e,r={}){return ts(ps,t,e,r)}const Lt=l("ZodNumber",(t,e)=>{Un.init(t,e),z.init(t,e),t.gt=(o,n)=>t.check(Oe(o,n)),t.gte=(o,n)=>t.check(Y(o,n)),t.min=(o,n)=>t.check(Y(o,n)),t.lt=(o,n)=>t.check(Se(o,n)),t.lte=(o,n)=>t.check(Q(o,n)),t.max=(o,n)=>t.check(Q(o,n)),t.int=o=>t.check(oe(o)),t.safe=o=>t.check(oe(o)),t.positive=o=>t.check(Oe(0,o)),t.nonnegative=o=>t.check(Y(0,o)),t.negative=o=>t.check(Se(0,o)),t.nonpositive=o=>t.check(Q(0,o)),t.multipleOf=(o,n)=>t.check(tt(o,n)),t.step=(o,n)=>t.check(tt(o,n)),t.finite=()=>t;const r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function x(t){return Iu(Lt,t)}const Be=l("ZodNumberFormat",(t,e)=>{Pa.init(t,e),Lt.init(t,e)});function oe(t){return Su(Be,t)}function Vf(t){return Ou(Be,t)}function qf(t){return zu(Be,t)}function Gf(t){return xu(Be,t)}function Kf(t){return Nu(Be,t)}const Wt=l("ZodBoolean",(t,e)=>{jn.init(t,e),z.init(t,e)});function G(t){return Tu(Wt,t)}const Bt=l("ZodBigInt",(t,e)=>{En.init(t,e),z.init(t,e),t.gte=(o,n)=>t.check(Y(o,n)),t.min=(o,n)=>t.check(Y(o,n)),t.gt=(o,n)=>t.check(Oe(o,n)),t.gte=(o,n)=>t.check(Y(o,n)),t.min=(o,n)=>t.check(Y(o,n)),t.lt=(o,n)=>t.check(Se(o,n)),t.lte=(o,n)=>t.check(Q(o,n)),t.max=(o,n)=>t.check(Q(o,n)),t.positive=o=>t.check(Oe(BigInt(0),o)),t.negative=o=>t.check(Se(BigInt(0),o)),t.nonpositive=o=>t.check(Q(BigInt(0),o)),t.nonnegative=o=>t.check(Y(BigInt(0),o)),t.multipleOf=(o,n)=>t.check(tt(o,n));const r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function ge(t){return ju(Bt,t)}const Wr=l("ZodBigIntFormat",(t,e)=>{Aa.init(t,e),Bt.init(t,e)});function Yf(t){return Du(Wr,t)}function Xf(t){return Pu(Wr,t)}const gs=l("ZodSymbol",(t,e)=>{Za.init(t,e),z.init(t,e)});function hs(t){return Au(gs,t)}const vs=l("ZodUndefined",(t,e)=>{Ca.init(t,e),z.init(t,e)});function ys(t){return Zu(vs,t)}const bs=l("ZodNull",(t,e)=>{Ma.init(t,e),z.init(t,e)});function Br(t){return Cu(bs,t)}const $s=l("ZodAny",(t,e)=>{Ra.init(t,e),z.init(t,e)});function Hf(){return Mu($s)}const ws=l("ZodUnknown",(t,e)=>{It.init(t,e),z.init(t,e)});function Le(){return St(ws)}const _s=l("ZodNever",(t,e)=>{La.init(t,e),z.init(t,e)});function Ft(t){return Ru(_s,t)}const Is=l("ZodVoid",(t,e)=>{Wa.init(t,e),z.init(t,e)});function Qf(t){return Lu(Is,t)}const Fr=l("ZodDate",(t,e)=>{Ba.init(t,e),z.init(t,e),t.min=(o,n)=>t.check(Y(o,n)),t.max=(o,n)=>t.check(Q(o,n));const r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function ks(t){return Wu(Fr,t)}const Ss=l("ZodArray",(t,e)=>{Dn.init(t,e),z.init(t,e),t.element=e.element,t.min=(r,o)=>t.check(Re(r,o)),t.nonempty=r=>t.check(Re(1,r)),t.max=(r,o)=>t.check(Ct(r,o)),t.length=(r,o)=>t.check(Mt(r,o)),t.unwrap=()=>t.element});function lt(t,e){return br(Ss,t,e)}function em(t){const e=t._zod.def.shape;return Es(Object.keys(e))}const Jt=l("ZodObject",(t,e)=>{Fa.init(t,e),z.init(t,e),N(t,"shape",()=>e.shape),t.keyof=()=>J(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Le()}),t.loose=()=>t.clone({...t._zod.def,catchall:Le()}),t.strict=()=>t.clone({...t._zod.def,catchall:Ft()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Qi(t,r),t.merge=r=>eo(t,r),t.pick=r=>Xi(t,r),t.omit=r=>Hi(t,r),t.partial=(...r)=>to(Kr,t,r[0]),t.required=(...r)=>no(Yr,t,r[0])});function j(t,e){const r={type:"object",get shape(){return We(this,"shape",{...t}),this.shape},...p(e)};return new Jt(r)}function tm(t,e){return new Jt({type:"object",get shape(){return We(this,"shape",{...t}),this.shape},catchall:Ft(),...p(e)})}function nm(t,e){return new Jt({type:"object",get shape(){return We(this,"shape",{...t}),this.shape},catchall:Le(),...p(e)})}const Jr=l("ZodUnion",(t,e)=>{Pn.init(t,e),z.init(t,e),t.options=e.options});function R(t,e){return new Jr({type:"union",options:t,...p(e)})}const Os=l("ZodDiscriminatedUnion",(t,e)=>{Jr.init(t,e),Ja.init(t,e)});function rm(t,e,r){return new Os({type:"union",options:e,discriminator:t,...p(r)})}const zs=l("ZodIntersection",(t,e)=>{Va.init(t,e),z.init(t,e)});function xs(t,e){return new zs({type:"intersection",left:t,right:e})}const Ns=l("ZodTuple",(t,e)=>{At.init(t,e),z.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function le(t,e,r){const o=e instanceof k,n=o?r:e,i=o?e:null;return new Ns({type:"tuple",items:t,rest:i,...p(n)})}const Vr=l("ZodRecord",(t,e)=>{qa.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function Vt(t,e,r){return new Vr({type:"record",keyType:t,valueType:e,...p(r)})}function im(t,e,r){return new Vr({type:"record",keyType:R([t,Ft()]),valueType:e,...p(r)})}const Ts=l("ZodMap",(t,e)=>{Ga.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function om(t,e,r){return new Ts({type:"map",keyType:t,valueType:e,...p(r)})}const Us=l("ZodSet",(t,e)=>{Ka.init(t,e),z.init(t,e),t.min=(...r)=>t.check(nt(...r)),t.nonempty=r=>t.check(nt(1,r)),t.max=(...r)=>t.check(Zt(...r)),t.size=(...r)=>t.check(ur(...r))});function am(t,e){return new Us({type:"set",valueType:t,...p(e)})}const rt=l("ZodEnum",(t,e)=>{Ya.init(t,e),z.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);const r=new Set(Object.keys(e.entries));t.extract=(o,n)=>{const i={};for(const a of o)if(r.has(a))i[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new rt({...e,checks:[],...p(n),entries:i})},t.exclude=(o,n)=>{const i={...e.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new rt({...e,checks:[],...p(n),entries:i})}});function J(t,e){const r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new rt({type:"enum",entries:r,...p(e)})}function um(t,e){return new rt({type:"enum",entries:t,...p(e)})}const js=l("ZodLiteral",(t,e)=>{Xa.init(t,e),z.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Es(t,e){return new js({type:"literal",values:Array.isArray(t)?t:[t],...p(e)})}const Ds=l("ZodFile",(t,e)=>{Ha.init(t,e),z.init(t,e),t.min=(r,o)=>t.check(nt(r,o)),t.max=(r,o)=>t.check(Zt(r,o)),t.mime=(r,o)=>t.check(pr(Array.isArray(r)?r:[r],o))});function sm(t){return Xu(Ds,t)}const qr=l("ZodTransform",(t,e)=>{An.init(t,e),z.init(t,e),t._zod.parse=(r,o)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ce(i,r.value,e));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(Ce(a))}};const n=e.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function Gr(t){return new qr({type:"transform",transform:t})}const Kr=l("ZodOptional",(t,e)=>{Qa.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function zt(t){return new Kr({type:"optional",innerType:t})}const Ps=l("ZodNullable",(t,e)=>{eu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function xt(t){return new Ps({type:"nullable",innerType:t})}function cm(t){return zt(xt(t))}const As=l("ZodDefault",(t,e)=>{tu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Zs(t,e){return new As({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const Cs=l("ZodPrefault",(t,e)=>{nu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Ms(t,e){return new Cs({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const Yr=l("ZodNonOptional",(t,e)=>{ru.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Rs(t,e){return new Yr({type:"nonoptional",innerType:t,...p(e)})}const Ls=l("ZodSuccess",(t,e)=>{iu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function lm(t){return new Ls({type:"success",innerType:t})}const Ws=l("ZodCatch",(t,e)=>{ou.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Bs(t,e){return new Ws({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const Fs=l("ZodNaN",(t,e)=>{au.init(t,e),z.init(t,e)});function dm(t){return Fu(Fs,t)}const Xr=l("ZodPipe",(t,e)=>{Zn.init(t,e),z.init(t,e),t.in=e.in,t.out=e.out});function Nt(t,e){return new Xr({type:"pipe",in:t,out:e})}const Js=l("ZodReadonly",(t,e)=>{uu.init(t,e),z.init(t,e)});function Vs(t){return new Js({type:"readonly",innerType:t})}const qs=l("ZodTemplateLiteral",(t,e)=>{su.init(t,e),z.init(t,e)});function fm(t,e){return new qs({type:"template_literal",parts:t,...p(e)})}const Gs=l("ZodLazy",(t,e)=>{lu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.getter()});function Ks(t){return new Gs({type:"lazy",getter:t})}const Ys=l("ZodPromise",(t,e)=>{cu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function mm(t){return new Ys({type:"promise",innerType:t})}const qt=l("ZodCustom",(t,e)=>{du.init(t,e),z.init(t,e)});function Xs(t){const e=new B({check:"custom"});return e._zod.check=t,e}function Hs(t,e){return Hu(qt,t??(()=>!0),e)}function Qs(t,e={}){return Qu(qt,t,e)}function ec(t){const e=Xs(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Ce(o,r.value,e._zod.def));else{const n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(Ce(n))}},t(r.value,r)));return e}function L(t,e={error:`Input not instance of ${t.name}`}){const r=new qt({type:"custom",check:"custom",fn:o=>o instanceof t,abort:!0,...p(e)});return r._zod.bag.Class=t,r}const pm=(...t)=>es({Pipe:Xr,Boolean:Wt,String:Rt,Transform:qr},...t);function gm(t){const e=Ks(()=>R([P(t),x(),G(),Br(),lt(e),Vt(P(),e)]));return e}function hm(t,e){return Nt(Gr(t),e)}const vm={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ym(t){K({customError:t})}function bm(){return K().customError}function $m(t){return vu(Rt,t)}function wm(t){return ku(Lt,t)}function _m(t){return Uu(Wt,t)}function tc(t){return Eu(Bt,t)}function Im(t){return Bu(Fr,t)}const km=Object.freeze(Object.defineProperty({__proto__:null,bigint:tc,boolean:_m,date:Im,number:wm,string:$m},Symbol.toStringTag,{value:"Module"}));K(fu());const W=Object.freeze(Object.defineProperty({__proto__:null,$brand:Bi,$input:gu,$output:pu,NEVER:Wi,TimePrecision:yu,ZodAny:$s,ZodArray:Ss,ZodBase64:Cr,ZodBase64URL:Mr,ZodBigInt:Bt,ZodBigIntFormat:Wr,ZodBoolean:Wt,ZodCIDRv4:Ar,ZodCIDRv6:Zr,ZodCUID:Nr,ZodCUID2:Tr,ZodCatch:Ws,ZodCustom:qt,ZodCustomStringFormat:ps,ZodDate:Fr,ZodDefault:As,ZodDiscriminatedUnion:Os,ZodE164:Rr,ZodEmail:Sr,ZodEmoji:zr,ZodEnum:rt,ZodError:_f,ZodFile:Ds,ZodGUID:Ot,ZodIPv4:Dr,ZodIPv6:Pr,ZodISODate:wr,ZodISODateTime:$r,ZodISODuration:Ir,ZodISOTime:_r,ZodIntersection:zs,ZodIssueCode:vm,ZodJWT:Lr,ZodKSUID:Er,ZodLazy:Gs,ZodLiteral:js,ZodMap:Ts,ZodNaN:Fs,ZodNanoID:xr,ZodNever:_s,ZodNonOptional:Yr,ZodNull:bs,ZodNullable:Ps,ZodNumber:Lt,ZodNumberFormat:Be,ZodObject:Jt,ZodOptional:Kr,ZodPipe:Xr,ZodPrefault:Cs,ZodPromise:Ys,ZodReadonly:Js,ZodRealError:ct,ZodRecord:Vr,ZodSet:Us,ZodString:Rt,ZodStringFormat:C,ZodSuccess:Ls,ZodSymbol:gs,ZodTemplateLiteral:qs,ZodTransform:qr,ZodTuple:Ns,ZodType:z,ZodULID:Ur,ZodURL:Or,ZodUUID:ce,ZodUndefined:vs,ZodUnion:Jr,ZodUnknown:ws,ZodVoid:Is,ZodXID:jr,_ZodString:kr,_default:Zs,any:Hf,array:lt,base64:Lf,base64url:Wf,bigint:ge,boolean:G,catch:Bs,check:Xs,cidrv4:Mf,cidrv6:Rf,clone:ue,coerce:km,config:K,core:$f,cuid:jf,cuid2:Ef,custom:Hs,date:ks,discriminatedUnion:rm,e164:Bf,email:If,emoji:Tf,endsWith:mr,enum:J,file:sm,flattenError:wn,float32:Vf,float64:qf,formatError:_n,function:rs,getErrorMap:bm,globalRegistry:$e,gt:Oe,gte:Y,guid:kf,includes:dr,instanceof:L,int:oe,int32:Gf,int64:Yf,intersection:xs,ipv4:Zf,ipv6:Cf,iso:wf,json:gm,jwt:Ff,keyof:em,ksuid:Af,lazy:Ks,length:Mt,literal:Es,locales:mu,looseObject:nm,lowercase:cr,lt:Se,lte:Q,map:om,maxLength:Ct,maxSize:Zt,mime:pr,minLength:Re,minSize:nt,multipleOf:tt,nan:dm,nanoid:Uf,nativeEnum:um,negative:Vu,never:Ft,nonnegative:Gu,nonoptional:Rs,nonpositive:qu,normalize:gr,null:Br,nullable:xt,nullish:cm,number:x,object:j,optional:zt,overwrite:Te,parse:ls,parseAsync:ds,partialRecord:im,pipe:Nt,positive:Ju,prefault:Ms,preprocess:hm,prettifyError:ao,promise:mm,property:Ku,readonly:Vs,record:Vt,refine:Qs,regex:sr,regexes:Lo,registry:Mn,safeParse:fs,safeParseAsync:ms,set:am,setErrorMap:ym,size:ur,startsWith:fr,strictObject:tm,string:P,stringFormat:Jf,stringbool:pm,success:lm,superRefine:ec,symbol:hs,templateLiteral:fm,toJSONSchema:is,toLowerCase:vr,toUpperCase:yr,transform:Gr,treeifyError:io,trim:hr,tuple:le,uint32:Kf,uint64:Xf,ulid:Df,undefined:ys,union:R,unknown:Le,uppercase:lr,url:Nf,uuid:Sf,uuidv4:Of,uuidv6:zf,uuidv7:xf,void:Qf,xid:Pf},Symbol.toStringTag,{value:"Module"}));let Fe=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const Sm=t=>t!=null&&typeof t=="object"&&"toString"in t,Om=(t,e=!1)=>{const r=Sm(t)?"stringer":typeof t;let o;switch(r){case"string":o=(n,i)=>n.localeCompare(i);break;case"stringer":o=(n,i)=>n.toString().localeCompare(i.toString());break;case"number":o=(n,i)=>Number(n)-Number(i);break;case"bigint":o=(n,i)=>BigInt(n)-BigInt(i)>0n?1:-1;break;case"boolean":o=(n,i)=>Number(n)-Number(i);break;case"undefined":o=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?zm(o):o},zm=t=>(e,r)=>t(r,e),Gt=le([x(),x()]);le([ge(),ge()]);const Hr=j({width:x(),height:x()}),xm=j({signedWidth:x(),signedHeight:x()}),Nm=["width","height"];J(Nm);const Tm=["start","center","end"],Um=["signedWidth","signedHeight"];J(Um);const it=j({x:x(),y:x()}),nc=j({clientX:x(),clientY:x()}),rc=["x","y"],ic=J(rc),oc=["top","right","bottom","left"];J(oc);const Qr=["left","right"],ac=J(Qr),ei=["top","bottom"],uc=J(ei),sc=["center"],Ti=J(sc),jm=[...oc,...sc],cc=J(jm);J(Tm);const Em=["first","last"];J(Em);const Dm=j({lower:x(),upper:x()}),Pm=j({lower:ge(),upper:ge()});R([Dm,Gt]);R([Pm,Gt]);J([...ic.options,...cc.options]);R([ic,cc,L(String)]);const Ue=(t,e)=>typeof t=="bigint"?t*BigInt(e):t*Number(e),_e=(t,e,r)=>{const o={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(o.lower=t,o.upper=e):(o.lower=typeof t=="bigint"?0n:0,o.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[o.lower,o.upper]=t}else o.lower=t.lower,o.upper=t.upper;return r?.makeValid?Am(o):o},Am=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,Ui=(t,e)=>{const r=_e(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},ti=t=>rc.includes(t)?t:ei.includes(t)?"y":"x";j({x:ac.or(Ti),y:uc.or(Ti)});const Zm=j({x:ac,y:uc}),ni=Object.freeze({x:"left",y:"top"}),Cm=Object.freeze({x:"right",y:"top"}),lc=Object.freeze({x:"left",y:"bottom"}),Mm=Object.freeze({x:"right",y:"bottom"}),Rm=Object.freeze({x:"center",y:"top"}),Lm=Object.freeze({x:"center",y:"bottom"}),Wm=Object.freeze({x:"right",y:"center"}),Bm=Object.freeze({x:"left",y:"center"}),dc=(t,e)=>t.x===e.x&&t.y===e.y,Fm=t=>[t.x,t.y],ln=R([x(),it,Gt,Hr,xm,nc]),Z=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}return typeof t=="number"?{x:t,y:e??t}:Array.isArray(t)?{x:t[0],y:t[1]}:"signedWidth"in t?{x:t.signedWidth,y:t.signedHeight}:"clientX"in t?{x:t.clientX,y:t.clientY}:"width"in t?{x:t.width,y:t.height}:{x:t.x,y:t.y}},ae=Object.freeze({x:0,y:0}),fc=Object.freeze({x:1,y:1}),Jm=Object.freeze({x:1/0,y:1/0}),Vm=Object.freeze({x:NaN,y:NaN}),Tt=(t,e,r=0)=>{const o=Z(t),n=Z(e);return r===0?o.x===n.x&&o.y===n.y:Math.abs(o.x-n.x)<=r&&Math.abs(o.y-n.y)<=r},qm=t=>Tt(t,ae),ri=(t,e,r)=>{const o=Z(t),n=Z(e,r);return{x:o.x*n.x,y:o.y*n.y}},mc=(t,e)=>{const r=Z(t);return{x:r.x+e,y:r.y}},pc=(t,e)=>{const r=Z(t);return{x:r.x,y:r.y+e}},ot=(t,e,r,...o)=>typeof e=="string"&&typeof r=="number"?e==="x"?mc(t,r):pc(t,r):[t,e,r??ae,...o].reduce((n,i)=>{const a=Z(i);return{x:n.x+a.x,y:n.y+a.y}},ae),Gm=(t,e,r)=>{const o=Z(t);return e==="x"?{x:r,y:o.y}:{x:o.x,y:r}},Km=(t,e)=>{const r=Z(t),o=Z(e);return Math.sqrt((r.x-o.x)**2+(r.y-o.y)**2)},Ym=(t,e)=>{const r=Z(t),o=Z(e);return{x:o.x-r.x,y:o.y-r.y}},Xm=t=>{const e=Z(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},Hm=t=>{const e=Z(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},Qm=t=>{const e=Z(t);return[e.x,e.y]},ep=t=>{const e=Z(t);return{left:e.x,top:e.y}},dn=(t,e=0)=>{const r=Z(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},Ge=(t,e)=>{const r=Z(t),o=Z(e);return{x:r.x-o.x,y:r.y-o.y}},Ke=t=>{const e=Z(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},gc=t=>{const e=Z(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},hc=(...t)=>{const e=t.reduce((r,o)=>ot(r,o),ae);return ri(e,1/t.length)},tp=(t,e)=>{const r=[];for(let o=0;o<t.length;o++){const n=t[o];let i,a,u,s;if(o===0){const m=t[o+1],g=Ge(m,n);a=Ke(g),u=a,s=e}else if(o===t.length-1){const m=t[o-1],g=Ge(n,m);i=Ke(g),u=i,s=e}else{const m=t[o-1],g=t[o+1],c=Ge(n,m),w=Ge(g,n);i=Ke(c),a=Ke(w);const v=Math.acos((c.x*w.x+c.y*w.y)/(Math.hypot(c.x,c.y)*Math.hypot(w.x,w.y))),d=Math.sin(v/2);d===0?s=e:s=e/d,u=gc(hc(i,a))}r.push(ri(u,s))}return r},np=t=>{const e=Z(t);return{x:e.y,y:e.x}},Ut=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Jm,NAN:Vm,ONE:fc,ZERO:ae,average:hc,calculateMiters:tp,clientXY:nc,construct:Z,couple:Qm,crudeZ:ln,css:ep,distance:Km,equals:Tt,isFinite:Hm,isNan:Xm,isZero:qm,normal:Ke,normalize:gc,scale:ri,set:Gm,sub:Ge,swap:np,translate:ot,translateX:mc,translateY:pc,translation:Ym,truncate:dn,xy:it},Symbol.toStringTag,{value:"Module"})),pt=R([x(),P()]),rp=j({top:pt,left:pt,width:pt,height:pt}),ip=j({left:x(),top:x(),right:x(),bottom:x()}),op=j({one:it,two:it,root:Zm}),vc={one:ae,two:ae,root:ni},ap={one:ae,two:fc,root:lc},yc=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),M=(t,e,r=0,o=0,n)=>{const i={one:{...ae},two:{...ae},root:n??ni};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return i.one={x:t,y:e},i.two={x:i.one.x+r,y:i.one.y+o},i}return"one"in t&&"two"in t&&"root"in t?{...t,root:n??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(i.one={x:t.left,y:t.top},i.two={x:t.right,y:t.bottom},i):(i.one=t,e==null?i.two={x:i.one.x+r,y:i.one.y+o}:typeof e=="number"?i.two={x:i.one.x+e,y:i.one.y+r}:"width"in e?i.two={x:i.one.x+e.width,y:i.one.y+e.height}:"signedWidth"in e?i.two={x:i.one.x+e.signedWidth,y:i.one.y+e.signedHeight}:i.two=e,i))},up=(t,e,r)=>{const o=M(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const n=ti(e);return M(o.one,void 0,n==="x"?r:he(o),n==="y"?r:ve(o),o.root)}return M(o.one,e,void 0,void 0,o.root)},sp=(t,e,r=!0)=>{const o=M(t);let n=(i,a)=>i<a;return r&&(n=(i,a)=>i<=a),"one"in e?n(me(o),me(e))&&n(Ie(e),Ie(o))&&n(pe(o),pe(e))&&n(ke(e),ke(o)):n(me(o),e.x)&&n(e.x,Ie(o))&&n(pe(o),e.y)&&n(e.y,ke(o))},cp=(t,e)=>Tt(t.one,e.one)&&Tt(t.two,e.two)&&dc(t.root,e.root),bc=t=>({width:he(t),height:ve(t)}),lp=t=>({signedWidth:Kt(t),signedHeight:Yt(t)}),dp=t=>({top:pe(t),left:me(t),width:he(t),height:ve(t)}),ii=(t,e,r=!1)=>{const o=ti(e)==="y"?Yt(t):Kt(t);return r?o:Math.abs(o)},de=(t,e)=>{const r=M(t);return{x:e.x==="center"?fn(r).x:ze(r,e.x),y:e.y==="center"?fn(r).y:ze(r,e.y)}},ze=(t,e)=>{const r=M(t),o=Fm(r.root).includes(e)?Math.min:Math.max;return Qr.includes(e)?o(r.one.x,r.two.x):o(r.one.y,r.two.y)},fp=t=>t.one.x===t.two.x&&t.one.y===t.two.y,he=t=>ii(t,"x"),ve=t=>ii(t,"y"),Kt=t=>{const e=M(t);return e.two.x-e.one.x},Yt=t=>{const e=M(t);return e.two.y-e.one.y},$c=t=>de(t,ni),mp=t=>de(t,Rm),pp=t=>de(t,Cm),gp=t=>de(t,lc),hp=t=>de(t,Lm),vp=t=>de(t,Mm),yp=t=>de(t,Bm),bp=t=>de(t,Wm),Ie=t=>ze(t,"right"),ke=t=>ze(t,"bottom"),me=t=>ze(t,"left"),pe=t=>ze(t,"top"),fn=t=>ot($c(t),{x:Kt(t)/2,y:Yt(t)/2}),oi=t=>{const e=M(t);return e.root.x==="left"?me(e):Ie(e)},ai=t=>{const e=M(t);return e.root.y==="top"?pe(e):ke(e)},$p=t=>({x:oi(t),y:ai(t)}),ht=t=>{const e=M(t);return{lower:e.one.x,upper:e.two.x}},vt=t=>{const e=M(t);return{lower:e.one.y,upper:e.two.y}},wp=(t,e)=>yc(t,e),_p=(t,e)=>{const r=M(t),o=Qr.includes(e)?"x":ei.includes(e)?"y":null;if(o===null)throw new Error(`Invalid location: ${e}`);const n=e==="top"||e==="left"?Math.min:Math.max,i={...r.one},a={...r.two};return i[o]=n(r.one[o],r.two[o]),a[o]=n(r.one[o],r.two[o]),[i,a]},Ip=(t,e)=>{const r=M(t),o=M(e),n=oi(o)+(he(o)-he(r))/2,i=ai(o)+(ve(o)-ve(r))/2;return M({x:n,y:i},bc(r))},wc=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,kp=t=>he(t)/ve(t),Sp=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const n=ti(e);e=Z(n,r)}const o=M(t);return M(ot(o.one,e),ot(o.two,e),void 0,void 0,o.root)},Op=(t,e)=>{const r=Math.max(me(t),me(e)),o=Math.max(pe(t),pe(e)),n=Math.min(Ie(t),Ie(e)),i=Math.min(ke(t),ke(e));return r>n||o>i?vc:M({x:r,y:o},{x:n,y:i},void 0,void 0,t.root)},zp=t=>he(t)*ve(t),xp=(t,e)=>{const r=M(t);return M(dn(r.one,e),dn(r.two,e),void 0,void 0,r.root)},Np=(t,e,r,o,n,i)=>{const a={x:t,y:e},u={x:t+r,y:e+o};return n.x!==i.x&&(n.x==="center"?(a.x-=r/2,u.x-=r/2):(a.x-=r,u.x-=r)),n.y!==i.y&&(n.y==="center"?(a.y-=o/2,u.y-=o/2):(a.y-=o,u.y-=o)),M(a,u,void 0,void 0,i)},Ye=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:ap,ZERO:vc,area:zp,areaIsZero:fp,aspect:kp,bottom:ke,bottomCenter:hp,bottomLeft:gp,bottomRight:vp,box:op,center:fn,centerLeft:yp,centerRight:bp,construct:M,constructWithAlternateRoot:Np,contains:sp,copy:yc,css:dp,cssBox:rp,dim:ii,dims:bc,domRect:ip,edgePoints:_p,equals:cp,height:ve,intersection:Op,isBox:wc,left:me,loc:ze,positionInCenter:Ip,reRoot:wp,resize:up,right:Ie,root:$p,signedDims:lp,signedHeight:Yt,signedWidth:Kt,top:pe,topCenter:mp,topLeft:$c,topRight:pp,translate:Sp,truncate:xp,width:he,x:oi,xBounds:ht,xyLoc:de,y:ai,yBounds:vt},Symbol.toStringTag,{value:"Module"})),_c=j({signedWidth:x(),signedHeight:x()}),Tp=R([Hr,_c,it,Gt]),Up={width:0,height:0},jp={width:1,height:1},te=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},Ep=(t,e)=>{if(e==null)return!1;const r=te(t),o=te(e);return r.width===o.width&&r.height===o.height},Dp=t=>{const e=te(t);return{width:e.height,height:e.width}},Pp=t=>{const e=te(t);return`0 0 ${e.width} ${e.height}`},Ap=t=>{const e=te(t);return[e.width,e.height]},Zp=t=>({width:Math.max(...t.map(e=>te(e).width)),height:Math.max(...t.map(e=>te(e).height))}),Cp=t=>({width:Math.min(...t.map(e=>te(e).width)),height:Math.min(...t.map(e=>te(e).height))}),Mp=(t,e)=>{const r=te(t);return{width:r.width*e,height:r.height*e}},yt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:jp,ZERO:Up,construct:te,couple:Ap,crude:Tp,dimensions:Hr,equals:Ep,max:Zp,min:Cp,scale:Mp,signed:_c,svgViewBox:Pp,swap:Dp},Symbol.toStringTag,{value:"Module"})),Rp=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t;j({offset:ln,scale:ln});j({offset:x(),scale:x()});const Lp=t=>(e,r,o,n)=>r==="dimension"?[e,o]:[e,n?o-t:o+t],Wp=t=>(e,r,o,n)=>[e,n?o/t:o*t],Bp=t=>(e,r,o)=>{if(e===null)return[t,o];const{lower:n,upper:i}=e,{lower:a,upper:u}=t,s=i-n,m=u-a;if(r==="dimension")return[t,o*(m/s)];const g=(o-n)*(m/s)+a;return[t,g]},Fp=t=>(e,r,o)=>[t,o],Jp=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:o,upper:n}=t;return[t,n-(r-o)]},Vp=t=>(e,r,o)=>{const{lower:n,upper:i}=t;return o=Rp(o,n,i),[e,o]};let ji=class Ee{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new Ee().translate(e)}static magnify(e){return new Ee().magnify(e)}static scale(e,r){return new Ee().scale(e,r)}translate(e){const r=this.new(),o=Lp(e);return o.type="translate",r.ops.push(o),r}magnify(e){const r=this.new(),o=Wp(e);return o.type="magnify",r.ops.push(o),r}scale(e,r){const o=_e(e,r),n=this.new(),i=Bp(o);return i.type="scale",n.ops.push(i),n}clamp(e,r){const o=_e(e,r),n=this.new(),i=Vp(o);return i.type="clamp",n.ops.push(i),n}reBound(e,r){const o=_e(e,r),n=this.new(),i=Fp(o);return i.type="re-bound",n.ops.push(i),n}invert(){const e=Jp();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new Ee;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([o,n],i)=>i(o,e,n,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((o,n)=>{if(o.type==="scale"||r.some(([a,u])=>n>=a&&n<=u))return;const i=e.ops.findIndex((a,u)=>a.type==="scale"&&u>n);i!==-1&&r.push([n,i])}),r.forEach(([o,n])=>{const i=e.ops.slice(o,n);i.unshift(e.ops[n]),e.ops.splice(o,n-o+1,...i)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new Ee},nv=class ne{x;y;currRoot;constructor(e=new ji,r=new ji,o=null){this.x=e,this.y=r,this.currRoot=o}static translate(e,r){return new ne().translate(e,r)}static translateX(e){return new ne().translateX(e)}static translateY(e){return new ne().translateY(e)}static clamp(e){return new ne().clamp(e)}static magnify(e){return new ne().magnify(e)}static scale(e){return new ne().scale(e)}static reBound(e){return new ne().reBound(e)}translate(e,r){const o=Z(e,r),n=this.copy();return n.x=this.x.translate(o.x),n.y=this.y.translate(o.y),n}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(wc(e)){const o=this.currRoot;return r.currRoot=e.root,o!=null&&!dc(o,e.root)&&(o.x!==e.root.x&&(r.x=r.x.invert()),o.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(ht(e)),r.y=r.y.scale(vt(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound(ht(e)),r.y=this.y.reBound(vt(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(ht(e)),r.y=this.y.clamp(vt(e)),r}copy(){const e=new ne;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return M(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new ne},qp=(t,e=21)=>(r=e)=>{let o="",n=r|0;for(;n--;)o+=t[Math.random()*t.length|0];return o};const Gp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ic=11,Kp=qp(Gp,Ic),kc=()=>Kp(),mn=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Ic,create:kc},Symbol.toStringTag,{value:"Module"})),Yp=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,Xp=J(["static","dynamic"]),Hp=R([le([oe()]),le([oe(),oe().min(1).max(12)]),le([oe(),oe().min(1).max(12),oe().min(1).max(31)])]),Sc=(t,e)=>{const r=new U(e);if(![h.DAY,h.HOUR,h.MINUTE,h.SECOND,h.MILLISECOND,h.MICROSECOND,h.NANOSECOND].some(n=>n.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const o=t.valueOf()%r.valueOf();return t instanceof U?new U(o):new h(o)};let U=class $ extends Fe{constructor(e,r="UTC"){if(e==null)super($.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*$.MILLISECOND.valueOf());else if(typeof e=="string")super($.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super($.parseDate(e));else{let o=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(o=$.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=$.MAX:e=$.MIN)),super(BigInt(e.valueOf())+o)}}static parseDate([e=1970,r=1,o=1]){const n=new Date(e,r-1,o,0,0,0,0);return new $(BigInt(n.getTime())*$.MILLISECOND.valueOf()).truncate($.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[o,n,i]=e.split(":");let a="00",u="00";i!=null&&([a,u]=i.split("."));let s=$.hours(parseInt(o??"00")).add($.minutes(parseInt(n??"00"))).add($.seconds(parseInt(a??"00"))).add($.milliseconds(parseInt(u??"00")));return r==="local"&&(s=s.add($.utcOffset)),s.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return $.parseTimeString(e,r);const o=new Date(e);return e.includes(":")||o.setUTCHours(0,0,0,0),new $(BigInt(o.getTime())*$.MILLISECOND.valueOf(),r).valueOf()}fString(e="ISO",r="UTC"){switch(e){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(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub($.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const o=this.toISOString(r);return e?o.slice(11,23):o.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),o=e.toLocaleString("default",{day:"numeric"});return`${r} ${o}`}static get utcOffset(){return new h(BigInt(new Date().getTimezoneOffset())*$.MINUTE.valueOf())}static since(e){return new $().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new $(e).valueOf()}span(e){return this.range(e).span}range(e){return new Xe(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new $(e).valueOf()}afterEq(e){return this.valueOf()>=new $(e).valueOf()}before(e){return this.valueOf()<new $(e).valueOf()}beforeEq(e){return this.valueOf()<=new $(e).valueOf()}add(e){return new $(this.valueOf()+BigInt(e.valueOf()))}sub(e){return new $(this.valueOf()-BigInt(e.valueOf()))}get hours(){return Number(this.valueOf())/Number(h.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(h.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(h.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(h.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number($.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number($.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new $(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new $(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new $(r)}get hour(){return this.date().getUTCHours()}setHour(e){const r=this.date();return r.setUTCHours(e),new $(r,"UTC")}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new $(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new $(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new $(r)}toString(){return this.date().toISOString()}remainder(e){return Sc(this,e)}get isToday(){return this.truncate(h.DAY).equals($.now().truncate(h.DAY))}truncate(e){return this.sub(this.remainder(e))}static now(){return new $(new Date)}static max(...e){let r=$.MIN;for(const o of e){const n=new $(o);n.after(r)&&(r=n)}return r}static min(...e){let r=$.MAX;for(const o of e){const n=new $(o);n.before(r)&&(r=n)}return r}static nanoseconds(e,r="UTC"){return new $(e,r)}static NANOSECOND=$.nanoseconds(1);static microseconds(e,r="UTC"){return $.nanoseconds(e*1e3,r)}static MICROSECOND=$.microseconds(1);static milliseconds(e,r="UTC"){return $.microseconds(e*1e3,r)}static MILLISECOND=$.milliseconds(1);static seconds(e,r="UTC"){return $.milliseconds(e*1e3,r)}static SECOND=$.seconds(1);static minutes(e,r="UTC"){return $.seconds(e*60,r)}static MINUTE=$.minutes(1);static hours(e,r="UTC"){return $.minutes(e*60,r)}static HOUR=$.hours(1);static days(e,r="UTC"){return $.hours(e*24,r)}static DAY=$.days(1);static MAX=new $((1n<<63n)-1n);static MIN=new $(0);static ZERO=new $(0);static z=R([L($),j({value:ge()}).transform(e=>new $(e.value)),P().transform(e=>new $(BigInt(e))),x().transform(e=>new $(e)),ge().transform(e=>new $(e)),ks().transform(e=>new $(e)),Hs(e=>e instanceof h).transform(e=>new $(e)),Hp.transform(e=>new $(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}};class h extends Fe{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof h?e:e instanceof Ei?e.period:e instanceof U?new h(e):["number","bigint"].includes(typeof e)?h.seconds(e):new h(e)}static fromMilliseconds(e){return e instanceof h?e:e instanceof Ei?e.period:e instanceof U?new h(e):["number","bigint"].includes(typeof e)?h.milliseconds(e):new h(e)}valueOf(){return this.value}lessThan(e){return this.valueOf()<new h(e).valueOf()}greaterThan(e){return this.valueOf()>new h(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new h(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new h(e).valueOf()}remainder(e){return Sc(this,e)}truncate(e){return new h(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(){const e=this.truncate(h.DAY),r=this.truncate(h.HOUR),o=this.truncate(h.MINUTE),n=this.truncate(h.SECOND),i=this.truncate(h.MILLISECOND),a=this.truncate(h.MICROSECOND),u=this.truncate(h.NANOSECOND),s=e,m=r.sub(e),g=o.sub(r),c=n.sub(o),w=i.sub(n),v=a.sub(i),d=u.sub(a);let b="";return s.isZero||(b+=`${s.days}d `),m.isZero||(b+=`${m.hours}h `),g.isZero||(b+=`${g.minutes}m `),c.isZero||(b+=`${c.seconds}s `),w.isZero||(b+=`${w.milliseconds}ms `),v.isZero||(b+=`${v.microseconds}µs `),d.isZero||(b+=`${d.nanoseconds}ns`),b.trim()}mult(e){return new h(this.valueOf()*BigInt(e))}get days(){return Number(this.valueOf())/Number(h.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(h.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(h.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(h.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(h.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(h.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new h(e).valueOf()}add(e){return new h(this.valueOf()+new h(e).valueOf())}sub(e){return new h(this.valueOf()-new h(e).valueOf())}static nanoseconds(e=1){return new h(e)}static NANOSECOND=h.nanoseconds(1);static microseconds(e=1){return h.nanoseconds(Ue(e,1e3))}static MICROSECOND=h.microseconds(1);static milliseconds(e=1){return h.microseconds(Ue(e,1e3))}static MILLISECOND=h.milliseconds(1);static seconds(e=1){return h.milliseconds(Ue(e,1e3))}static SECOND=h.seconds(1);static minutes(e=1){return h.seconds(Ue(e,60))}static MINUTE=h.minutes(1);static hours(e){return h.minutes(Ue(e,60))}static HOUR=h.hours(1);static days(e){return h.hours(Ue(e,24))}static DAY=h.days(1);static MAX=new h((1n<<63n)-1n);static MIN=new h(0);static ZERO=new h(0);static z=R([j({value:ge()}).transform(e=>new h(e.value)),P().transform(e=>new h(BigInt(e))),x().transform(e=>new h(e)),L(h)])}let Ei=class De extends Fe{constructor(e){super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new De(e).valueOf()}get period(){return h.seconds(1/this.valueOf())}sampleCount(e){return new h(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new q(r).valueOf()}span(e){return h.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/r.valueOf())}static hz(e){return new De(e)}static khz(e){return De.hz(e*1e3)}static z=R([x().transform(e=>new De(e)),L(De)])},q=class se extends Fe{constructor(e){super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new pn(e*this.valueOf())}static UNKNOWN=new se(0);static BIT128=new se(16);static BIT64=new se(8);static BIT32=new se(4);static BIT16=new se(2);static BIT8=new se(1);static z=R([x().transform(e=>new se(e)),L(se)])},Xe=class re{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new U(e.start),this.end=new U(e.end)):(this.start=new U(e),this.end=new U(r))}get span(){return new h(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 re(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=h.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let o=this.start.sub(e.start).valueOf(),n=this.end.sub(e.end).valueOf();return o<0&&(o=-o),n<0&&(n=-n),o<=r.valueOf()&&n<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.fString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=h.ZERO){e=e.makeValid();const o=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(o.start)||o.end.equals(e.start))return!1;const n=U.max(o.start,e.start),i=U.min(o.end,e.end);return i.before(n)?!1:new h(i.sub(n)).greaterThanOrEqual(r)}contains(e){return e instanceof re?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new re(this.start,this.end);return e.start.after(this.start)&&(r.start=e.start),e.start.after(this.end)&&(r.end=e.start),e.end.before(this.end)&&(r.end=e.end),e.end.before(this.start)&&(r.start=e.end),r}static max(...e){return new re(U.min(...e.map(r=>r.start)),U.max(...e.map(r=>r.end)))}static MAX=new re(U.MIN,U.MAX);static MIN=new re(U.MAX,U.MIN);static ZERO=new re(U.ZERO,U.ZERO);static z=R([j({start:U.z,end:U.z}).transform(e=>new re(e.start,e.end)),L(re)]);static sort(e,r){return U.sort(e.start,r.start)||U.sort(e.end,r.end)}};class f extends Fe{constructor(e){if(e instanceof f||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=f.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=f.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(){return this.valueOf()}get isVariable(){return this.equals(f.JSON)||this.equals(f.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(f.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=f.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(f.UINT8)||this.equals(f.UINT16)||this.equals(f.UINT32)||this.equals(f.UINT64)}get isSignedInteger(){return this.equals(f.INT8)||this.equals(f.INT16)||this.equals(f.INT32)||this.equals(f.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(f.INT32)&&e.equals(f.FLOAT64)||this.equals(f.INT8)&&e.equals(f.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return f.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new f("unknown");static FLOAT64=new f("float64");static FLOAT32=new f("float32");static INT64=new f("int64");static INT32=new f("int32");static INT16=new f("int16");static INT8=new f("int8");static UINT64=new f("uint64");static UINT32=new f("uint32");static UINT16=new f("uint16");static UINT8=new f("uint8");static BOOLEAN=this.UINT8;static TIMESTAMP=new f("timestamp");static UUID=new f("uuid");static STRING=new f("string");static JSON=new f("json");static ARRAY_CONSTRUCTORS=new Map([[f.UINT8.toString(),Uint8Array],[f.UINT16.toString(),Uint16Array],[f.UINT32.toString(),Uint32Array],[f.UINT64.toString(),BigUint64Array],[f.FLOAT32.toString(),Float32Array],[f.FLOAT64.toString(),Float64Array],[f.INT8.toString(),Int8Array],[f.INT16.toString(),Int16Array],[f.INT32.toString(),Int32Array],[f.INT64.toString(),BigInt64Array],[f.TIMESTAMP.toString(),BigInt64Array],[f.STRING.toString(),Uint8Array],[f.JSON.toString(),Uint8Array],[f.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,f.UINT8],[Uint16Array.name,f.UINT16],[Uint32Array.name,f.UINT32],[BigUint64Array.name,f.UINT64],[Float32Array.name,f.FLOAT32],[Float64Array.name,f.FLOAT64],[Int8Array.name,f.INT8],[Int16Array.name,f.INT16],[Int32Array.name,f.INT32],[BigInt64Array.name,f.INT64]]);static DENSITIES=new Map([[f.UINT8.toString(),q.BIT8],[f.UINT16.toString(),q.BIT16],[f.UINT32.toString(),q.BIT32],[f.UINT64.toString(),q.BIT64],[f.FLOAT32.toString(),q.BIT32],[f.FLOAT64.toString(),q.BIT64],[f.INT8.toString(),q.BIT8],[f.INT16.toString(),q.BIT16],[f.INT32.toString(),q.BIT32],[f.INT64.toString(),q.BIT64],[f.TIMESTAMP.toString(),q.BIT64],[f.STRING.toString(),q.UNKNOWN],[f.JSON.toString(),q.UNKNOWN],[f.UUID.toString(),q.BIT128]]);static ALL=[f.UNKNOWN,f.FLOAT64,f.FLOAT32,f.INT64,f.INT32,f.INT16,f.INT8,f.UINT64,f.UINT32,f.UINT16,f.UINT8,f.TIMESTAMP,f.UUID,f.STRING,f.JSON];static BIG_INT_TYPES=[f.INT64,f.UINT64,f.TIMESTAMP];static z=R([P().transform(e=>new f(e)),L(f)])}let pn=class D extends Fe{constructor(e){super(e.valueOf())}largerThan(e){return this.valueOf()>e.valueOf()}smallerThan(e){return this.valueOf()<e.valueOf()}add(e){return D.bytes(this.valueOf()+e.valueOf())}sub(e){return D.bytes(this.valueOf()-e.valueOf())}truncate(e){return new D(Math.trunc(this.valueOf()/e.valueOf())*e.valueOf())}remainder(e){return D.bytes(this.valueOf()%e.valueOf())}get gigabytes(){return this.valueOf()/D.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/D.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/D.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/D.TERABYTE.valueOf()}toString(){const e=this.truncate(D.TERABYTE),r=this.truncate(D.GIGABYTE),o=this.truncate(D.MEGABYTE),n=this.truncate(D.KILOBYTE),i=this.truncate(D.BYTE),a=e,u=r.sub(e),s=o.sub(r),m=n.sub(o),g=i.sub(n);let c="";return a.isZero||(c+=`${a.terabytes}TB `),u.isZero||(c+=`${u.gigabytes}GB `),s.isZero||(c+=`${s.megabytes}MB `),m.isZero||(c+=`${m.kilobytes}KB `),(!g.isZero||c==="")&&(c+=`${g.valueOf()}B`),c.trim()}static bytes(e=1){return new D(e)}static BYTE=new D(1);static kilobytes(e=1){return D.bytes(e.valueOf()*1e3)}static KILOBYTE=D.kilobytes(1);static megabytes(e=1){return D.kilobytes(e.valueOf()*1e3)}static MEGABYTE=D.megabytes(1);static gigabytes(e=1){return D.megabytes(e.valueOf()*1e3)}static GIGABYTE=D.gigabytes(1);static terabytes(e){return D.gigabytes(e.valueOf()*1e3)}static TERABYTE=D.terabytes(1);static ZERO=new D(0);static z=R([x().transform(e=>new D(e)),L(D)]);get isZero(){return this.valueOf()===0}};R([L(Uint8Array),L(Uint16Array),L(Uint32Array),L(BigUint64Array),L(Float32Array),L(Float64Array),L(Int8Array),L(Int16Array),L(Int32Array),L(BigInt64Array)]);const Oc=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof U||t instanceof h||t instanceof Date},Qp=(t,e,r,o=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(o):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(o.valueOf()):bt(r,-o),bt=(t,e)=>e==0?t:t==0?e:typeof t=="bigint"&&typeof e=="bigint"||typeof t=="number"&&typeof e=="number"?t+e:Number(t)+Number(e),eg=/^(?:[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 tg(t){return typeof t=="string"&&eg.test(t)}const V=[];for(let t=0;t<256;++t)V.push((t+256).toString(16).slice(1));function ng(t,e=0){return(V[t[e+0]]+V[t[e+1]]+V[t[e+2]]+V[t[e+3]]+"-"+V[t[e+4]]+V[t[e+5]]+"-"+V[t[e+6]]+V[t[e+7]]+"-"+V[t[e+8]]+V[t[e+9]]+"-"+V[t[e+10]]+V[t[e+11]]+V[t[e+12]]+V[t[e+13]]+V[t[e+14]]+V[t[e+15]]).toLowerCase()}function rg(t,e=0){const r=ng(t,e);if(!tg(r))throw TypeError("Stringified UUID is invalid");return r}typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const zc=(t,e)=>rg(t,e),fe=-1,ig=P().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),og=R([Br(),ys()]).transform(()=>new Uint8Array().buffer),gn=10,ag=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},xc="sy_x_telem_series";class ie{key;discriminator=xc;dataType;sampleOffset;gl;_data;timeRange=Xe.ZERO;alignment=0n;cachedMin;cachedMax;writePos=fe;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=j({timeRange:Xe.z.optional(),dataType:f.z,alignment:tc().optional(),data:R([ig,og,L(ArrayBuffer),L(Uint8Array)]),glBufferUsage:Xp.optional().default("static").optional()});static z=ie.crudeZ.transform(e=>new ie(e));constructor(e){ug(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:o,sampleOffset:n=0,glBufferUsage:i="static",alignment:a=0n,key:u=kc(),data:s}=e;if(sg(s)){const c=s;this.key=c.key,this.dataType=c.dataType,this.sampleOffset=c.sampleOffset,this.gl=c.gl,this._data=c._data,this.timeRange=c.timeRange,this.alignment=c.alignment,this.cachedMin=c.cachedMin,this.cachedMax=c.cachedMax,this.writePos=c.writePos,this._refCount=c._refCount,this.cachedLength=c.cachedLength;return}const m=Oc(s),g=Array.isArray(s);if(r!=null)this.dataType=new f(r);else{if(s instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(g||m){let c=s;if(!m){if(s.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");c=s[0]}if(typeof c=="string")this.dataType=f.STRING;else if(typeof c=="number")this.dataType=f.FLOAT64;else if(typeof c=="bigint")this.dataType=f.INT64;else if(typeof c=="boolean")this.dataType=f.BOOLEAN;else if(c instanceof U||c instanceof Date||c instanceof U)this.dataType=f.TIMESTAMP;else if(typeof c=="object")this.dataType=f.JSON;else throw new Error(`cannot infer data type of ${typeof c} when constructing a Series from a JS array`)}else this.dataType=new f(s)}if(!g&&!m)this._data=s;else if(g&&s.length===0)this._data=new this.dataType.Array([]).buffer;else{let c=m?[s]:s;const w=c[0];(w instanceof U||w instanceof Date||w instanceof h)&&(c=c.map(v=>new U(v).valueOf())),this.dataType.equals(f.STRING)?(this.cachedLength=c.length,this._data=new TextEncoder().encode(`${c.join(`
30
- `)}
31
- `).buffer):this.dataType.equals(f.JSON)?(this.cachedLength=c.length,this._data=new TextEncoder().encode(`${c.map(v=>on.encodeString(v)).join(`
32
- `)}
33
- `).buffer):this.dataType.usesBigInt&&typeof w=="number"?this._data=new this.dataType.Array(c.map(v=>BigInt(Math.round(v)))).buffer:!this.dataType.usesBigInt&&typeof w=="bigint"?this._data=new this.dataType.Array(c.map(Number)).buffer:this._data=new this.dataType.Array(c).buffer}this.key=u,this.alignment=a,this.sampleOffset=n??0,this.timeRange=o??Xe.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:i}}static alloc({capacity:e,dataType:r,...o}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const n=new new f(r).Array(e),i=new ie({data:n.buffer,dataType:r,...o});return i.writePos=0,i}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}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(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===fe)return 0;const r=this.byteCapacity.valueOf()-this.writePos,o=e.subBytes(0,r);return this.writeToUnderlyingData(o),this.writePos+=o.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=o.length,this.calculateCachedLength()),o.length}writeFixed(e){if(this.writePos===fe)return 0;const r=this.capacity-this.writePos,o=e.sub(0,r);return this.writeToUnderlyingData(o),this.cachedLength=void 0,this.maybeRecomputeMinMax(o),this.writePos+=o.length,o.length}writeToUnderlyingData(e){this.underlyingData.set(e.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===fe?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(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(f.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(on.decodeString(r)))}get byteCapacity(){return new pn(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===fe?this.byteCapacity:this.dataType.isVariable?new pn(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===fe?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 e=0;const r=[0];return this.data.forEach((o,n)=>{o===gn&&(e++,r.push(n+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const o=new e.Array(this.length);for(let n=0;n<this.length;n++)o[n]=Qp(this.dataType,e,this.data[n],r);return new ie({data:o.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(f.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,o)=>r>o?r:o)}else{const e=this.data;this.cachedMax=e.reduce((r,o)=>r>o?r:o)}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.calcRawMax(),bt(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(f.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,o)=>r<o?r:o)}else{const e=this.data;this.cachedMin=e.reduce((r,o)=>r<o?r:o)}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.calcRawMin(),bt(this.cachedMin,this.sampleOffset))}get bounds(){return _e(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const o=Number(e-this.alignment);if(o<0||o>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${o}`);return}return this.at(o,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(f.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const o=this.data[e];if(o==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return bt(o,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const o=zc(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(o==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return o}atVariable(e,r){let o=0,n=0;if(this._cachedIndexes!=null)o=this._cachedIndexes[e],n=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let a=0;a<this.data.length;a++)if(this.data[a]===gn){if(e===0){n=a;break}o=a+1,e--}if(n===0&&(n=this.data.length),o>=n||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const i=this.data.slice(o,n);return this.dataType.equals(f.STRING)?new TextDecoder().decode(i):Li(JSON.parse(new TextDecoder().decode(i)))}binarySearch(e){let r=0,o=this.length-1;const n=Om(e);for(;r<=o;){const i=Math.floor((r+o)/2),a=n(this.at(i,!0),e);if(a===0)return i;a<0?r=i+1:o=i-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(f.FLOAT32)&&!this.dataType.equals(f.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:o,prevBuffer:n}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==n)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==fe){n===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const i=this.dataType.density.size(n).valueOf(),a=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,i,a.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,o==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=fe}as(e){return ag(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:Pi(this.alignmentBounds.lower),upper:Pi(this.alignmentBounds.upper)},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return _e(this.alignment,this.alignment+BigInt(this.length))}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.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 e=new cg(this);return this.dataType.equals(f.JSON)?new lg(e):e}return this.dataType.equals(f.UUID)?new dg(this):new fg(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new Di(this,e,r??this.length)}subAlignmentIterator(e,r){return new Di(this,Number(e-this.alignment),Number(r-this.alignment))}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const o=this.data.subarray(e,r);return new ie({data:o,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,o){if(r<=0&&(o==null||o>=this.length))return this;let n;return e?n=this.data.subarray(r,o):n=this.data.slice(r,o),new ie({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new ie({data:this.buffer,dataType:this.dataType,timeRange:Xe.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}}const ug=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof ie?!0:Oc(t),sg=Yp(xc,ie);let Di=class{series;end;index;constructor(e,r,o){this.series=e;const n=_e(0,e.length);this.end=Ui(n,o),this.index=Ui(n,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}};class cg{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==gn;)this.index++;const o=this.index;return e===o?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,o))})}}let lg=class Nc{wrapped;static schema=Vt(P(),Le());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:on.decodeString(e.value,Nc.schema)}}};class dg{series;index;data;density;constructor(e){if(!e.dataType.equals(f.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=f.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=zc(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}}class fg{series;index;constructor(e){this.series=e,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 Pi=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}},mg=(t,e,r=".")=>{const o=t.split(r);return o.map((n,i)=>{const a=e(n,i,o);return a==null?null:typeof a=="string"?a:a.join(r)}).filter(n=>n!=null).join(r)},Tc=(t,e)=>{if(!Array.isArray(t))return t[e];const r=t[e];if(r!=null||t.length==0)return r;const o=t[0];if(typeof o=="object"&&"key"in o)return t.find(n=>n.key===e)},Uc=(t,e,r={optional:!1,separator:"."})=>{r.separator??=".";const{optional:o,getter:n=Tc}=r,i=e.split(r.separator);if(i.length===1&&i[0]==="")return t;let a=t;for(const u of i){const s=n(a,u);if(s==null){if(o)return null;throw new Error(`Path ${e} does not exist. ${u} is null`)}a=s}return a},pg=(t,e,r)=>{const o=e.split(".");let n=t;for(let i=0;i<o.length-1;i++){const a=o[i],u=Tc(n,a);if(u==null)throw new Error(`Path ${e} does not exist. ${a} is null`);n=u}try{if(!Array.isArray(n)){n[o[o.length-1]]=r;return}if(n.length===0)return;const i=parseInt(o[o.length-1]);if(isNaN(i)){const a=n[0];if(typeof a=="object"&&"key"in a){const u=n.findIndex(s=>s.key===o[o.length-1]);if(u!==-1){n[u]=r;return}}return}n[i]=r}catch(i){throw console.error("failed to set value",r,"at path",e,"on object",t),i}},gg=(t,e)=>{const r=e.split(".");let o=t;for(let n=0;n<r.length-1;n++){const i=r[n];if(o[i]==null)return;o=o[i]}if(Array.isArray(o)){const n=parseInt(r[r.length-1]);if(isNaN(n))return;o.splice(n,1);return}delete o[r[r.length-1]]},hg=(t,e)=>{const r=t.split(".");return e<0?r[r.length+e]:r[e]},vg=(t,e)=>{try{return Uc(t,e),!0}catch{return!1}},yg=(t,e)=>{if(e.length===0)return!0;const r=t.split("."),o=e.split(".");if(o.length>r.length)return!1;for(let n=0;n<o.length;n++){const i=r[n],a=o[n];if(a!=="*"&&i!==a)return!1}return!0},bg=t=>JSON.parse(JSON.stringify(t)),$g=(t,...e)=>(e.forEach(r=>{let o=t;const n=r.split(".");n.forEach((i,a)=>{typeof o!="object"||o===null||(a===n.length-1?delete o[i]:i in o&&(o=o[i]))})}),t),wg=(t,e,r="")=>{const o={},n=(i,a,u)=>{if(typeof i!=typeof a||i===null||a===null){o[u]=[i,a];return}if(typeof i=="object"&&typeof a=="object")if(Array.isArray(i)&&Array.isArray(a)){if(i.length!==a.length){o[u]=[i,a];return}for(let s=0;s<i.length;s++)n(i[s],a[s],`${u}[${s}]`)}else new Set([...Object.keys(i),...Object.keys(a)]).forEach(s=>{n(i[s],a[s],u!==""?`${u}.${s}`:s)});else i!==a&&(o[u]=[i,a])};return n(t,e,r),o},hn=(t,e)=>{const r=Array.isArray(t),o=Array.isArray(e);if(r!==o)return!1;if(r&&o){const a=t,u=e;if(a.length!==u.length)return!1;for(let s=0;s<a.length;s++)if(!hn(a[s],u[s]))return!1;return!0}if(t==null||e==null||typeof t!="object"||typeof e!="object")return t===e;if("equals"in t)return t.equals(e);const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(const a of n){const u=t[a],s=e[a];if(typeof u=="object"&&typeof s=="object"){if(!hn(u,s))return!1}else if(u!==s)return!1}return!0},jc=(t,e)=>{if(typeof t!="object"||t==null)return t===e;const r=Object.keys(t),o=Object.keys(e);if(o.length>r.length)return!1;for(const n of o){const i=t[n],a=e[n];if(typeof i=="object"&&typeof a=="object"){if(!jc(i,a))return!1}else if(i!==a)return!1}return!0},vn=(t,...e)=>{if(e.length===0)return t;const r=e.shift();if(en(t)&&en(r))for(const o in r)try{en(r[o])?(o in t||Object.assign(t,{[o]:{}}),vn(t[o],r[o])):Object.assign(t,{[o]:r[o]})}catch(n){throw n instanceof TypeError?new TypeError(`.${o}: ${n.message}`):n}return vn(t,...e)},_g=(t,e,r)=>{const o=(n,i,a)=>{if(a.def?.type==="union")return a.def.options.reduce((u,s)=>o(u,i,s),n);if(a.def?.type==="intersection"){const u=o(n,i,a.def.left);return o(u,i,a.def.right)}for(const u in i){const s=i[u];let m=a?.shape;if(m!=null)for(;m!=null;){if(m[u]!=null){const g=m[u].safeParse(s);if(g.success){n[u]=g.data;break}}m=m.def?.shape}typeof s=="object"&&!Array.isArray(s)&&s!==null&&a&&a.shape&&a.shape[u]&&(n[u]||={},o(n[u],s,a.shape[u]))}return n};return o({...t},e,r)},ui=Object.freeze(Object.defineProperty({__proto__:null,copy:bg,deleteD:$g,difference:wg,element:hg,equal:hn,get:Uc,has:vg,override:vn,overrideValidItems:_g,partialEqual:jc,pathsMatch:yg,remove:gg,set:pg,transformPath:mg},Symbol.toStringTag,{value:"Module"}));j({key:P(),value:P()});Vt(R([x(),P(),hs()]),Le());const Ec=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Ig=Ec(),Dc=["macOS","Windows","Linux"],kg=["macos","windows","linux"],Sg={macos:"macOS",windows:"Windows",linux:"Linux"},Og=J(Dc).or(J(kg).transform(t=>Sg[t])),zg=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let tn;const xg=(t={})=>{const{force:e,default:r}=t;return e??tn??(tn=zg(),tn??r)},Ng=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:Dc,RUNTIME:Ig,detect:Ec,getOS:xg,osZ:Og},Symbol.toStringTag,{value:"Module"})),Tg=(...t)=>t.map(Pc).join(""),Pc=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),Ug=t=>t.endsWith("/")?t.slice(0,-1):t;class $t{protocol;host;port;path;constructor({host:e,port:r,protocol:o="",pathPrefix:n=""}){this.protocol=o,this.host=e,this.port=r,this.path=Pc(n)}replace(e){return new $t({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new $t({...this,pathPrefix:Tg(this.path,e)})}toString(){return Ug(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new $t({host:"unknown",port:0})}j({baseInterval:h.z.optional(),maxRetries:x().optional(),scale:x().optional()});const jg=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Ac=P().regex(jg),Ae=x().min(0).max(255),Zc=x().min(0).max(1),Cc=le([Ae,Ae,Ae,Zc]),Eg=le([Ae,Ae,Ae]),Dg=j({rgba255:Cc}),Pg=x().min(0).max(360),Ag=x().min(0).max(100),Zg=x().min(0).max(100),Cg=le([Pg,Ag,Zg,Zc]),si=R([Ac,Eg,Cc,Cg,Dg]),Mg=si.transform(t=>ci(t)),ci=(t,e=1)=>{if(t=si.parse(t),typeof t=="string")return Rg(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},Rg=(t,e=1)=>(t=Ac.parse(t),t=Lg(t),[gt(t,0),gt(t,2),gt(t,4),t.length===8?gt(t,6)/255:e]),gt=(t,e)=>parseInt(t.slice(e,e+2),16),Lg=t=>t.startsWith("#")?t.slice(1):t;ci("#000000");ci("#ffffff");const Wg=j({key:P(),color:si,position:x(),switched:G().optional()});lt(Wg);const Bg=j({key:P(),name:P(),color:Mg});j({key:P(),name:P(),swatches:lt(Bg)});oe().min(0).max(255);j({name:P(),key:P()});const Fg=t=>Object.getOwnPropertySymbols(globalThis).includes(t),Jg=(t,e)=>{const r=Symbol.for(t);if(!Fg(r)){const o=e();Object.defineProperty(globalThis,r,{value:o})}return()=>globalThis[r]},Mc="sy_x_error",Vg=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),Rc=t=>class He extends Error{static discriminator=Mc;discriminator=He.discriminator;static TYPE=t;type=He.TYPE;static matches=Vg(t);matches=He.matches;constructor(r,o){super(r,o),this.name=He.TYPE}static sub(r){return Rc(`${t}.${r}`)}},qg=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==Mc)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},Je="unknown",Ai="nil";class Gg{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:Ai,data:""};if(qg(e))for(const r of this.providers){const o=r.encode(e);if(o!=null)return o}if(e instanceof Error)return{type:Je,data:e.message};if(typeof e=="string")return{type:Je,data:e};try{return{type:Je,data:JSON.stringify(e)}}catch{return{type:Je,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===Ai)return null;if(e.type===Je)return new Zi(e.data);for(const r of this.providers){const o=r.decode(e);if(o!=null)return o}return new Zi(e.data)}}Jg("synnax-error-registry",()=>new Gg);class Zi extends Rc("unknown"){}j({type:P(),data:P()});const Kg=W.object({jsonrpc:W.literal("2.0"),method:W.string(),params:W.any().optional(),id:W.union([W.string(),W.number(),W.null()]).optional()}),Lc=W.object({jsonrpc:W.literal("2.0"),id:W.union([W.string(),W.number(),W.null()])}),Yg=Lc.extend({result:W.json()}),Xg=Lc.extend({error:W.object({code:W.number().int(),message:W.string().optional(),data:W.json().optional()})}),Hg=W.union([Yg,Xg]);W.union([Kg,Hg]);P().regex(/^\d+\.\d+\.\d+$/);const Qg=["standard","scientific","engineering"];J(Qg);J(["success","info","warning","error","loading","disabled"]);const we="main",li="prerender",Xt={stage:"creating",processCount:0,reserved:!1,focusCount:0,centerCount:0},Wc={...Xt,key:li,visible:!1},eh=j({key:P(),url:P().optional(),title:P().optional(),center:G().optional(),position:Ut.xy.optional(),size:yt.dimensions.optional(),minSize:yt.dimensions.optional(),maxSize:yt.dimensions.optional(),resizable:G().optional(),fullscreen:G().optional(),focus:G().optional(),maximized:G().optional(),visible:G().optional(),minimized:G().optional(),decorations:G().optional(),skipTaskbar:G().optional(),fileDropEnabled:G().optional(),transparent:G().optional(),alwaysOnTop:G().optional()}),th=h.milliseconds(50),Bc=()=>setTimeout(()=>window.location.reload(),th.milliseconds),Fc={label:we,config:{enablePrerender:!0,debug:!1,defaultWindowProps:{}},windows:{main:{...Xt,key:we,reserved:!0}},labelKeys:{main:we},keyLabels:{main:we}},nh=(t,e)=>{if(t.type===Vc.type)return e.label!==we||(t.payload.label=mn.create(),t.payload.prerenderLabel=mn.create()),t;if("label"in t.payload)return t;let r=e.label;const o=t.payload;return o.key!=null&&(o.key in e.windows?r=o.key:r=e.keyLabels[o.key]),t.payload={...t.payload,label:r},t},X=t=>(e,r)=>{if(!("label"in r.payload))throw new Error("Missing label");t(e,r)},ye=(t,e=!1)=>X((r,o)=>{let n=e;const i=r.windows[o.payload.label];if(i!=null){if(o.payload.value!=null)n=o.payload.value;else{const a=i[t];a!=null&&(n=!a)}r.windows[o.payload.label]={...i,[t]:n}}}),Ht=(t,e=!1)=>(r,o)=>{const n=r.windows[o.payload.label];n!=null&&(r.windows[o.payload.label]={...n,[t]:n[t]+(e?-1:1)})},rh=t=>Object.values(t.windows).some(e=>e.key===li&&!e.reserved),di="drift",ih=(t,e,r)=>t.position!=null&&t.size!=null&&e==null?Ye.topLeft(Ye.positionInCenter(Ye.construct(Ut.ZERO,r??Ut.ZERO),Ye.construct(t.position,t.size))):e,oh=(t,{payload:e})=>{if(e.key===li)return;const{key:r,label:o,prerenderLabel:n}=e;if(o==null||n==null)throw new Error("[drift] - bug - missing label and prerender label");Mi(t.config.debug,"reducer create window");const i=t.windows.main;if(e.position=ih(i,e.position,e.size),r in t.keyLabels){Ve(t.config.debug,"window already exists, un-minimize and focus it");const s=t.keyLabels[e.key];t.windows[s].visible=!0,t.windows[s].focusCount+=1,t.windows[s].minimized=!1,t.windows[s].position=e.position,nn(t.config.debug);return}const[a,u]=Object.entries(t.windows).find(([,s])=>!s.reserved)??[null,null];a!=null?(Ve(t.config.debug,"using available pre-rendered window"),t.windows[a]={...u,visible:!0,reserved:!0,focusCount:1,focus:!0,...e},t.labelKeys[a]=e.key,t.keyLabels[e.key]=a):(Ve(t.config.debug,"creating new window"),t.windows[o]={...t.config.defaultWindowProps,...Xt,...e,reserved:!0},t.labelKeys[o]=r,t.keyLabels[r]=o),t.config.enablePrerender&&!rh(t)&&(Ve(t.config.debug,"creating pre-render window"),t.windows[n]=ui.copy({...t.config.defaultWindowProps,...Wc})),nn(t.config.debug)},ah=X((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.stage=e.payload.stage)}),uh=X((t,{payload:{label:e}})=>{const r=t.windows[e];r==null||r.processCount>0||(r.stage="closing",delete t.windows[e],delete t.labelKeys[e],delete t.keyLabels[r.key])}),sh=X((t,e)=>{const r=t.windows[e.payload.label];r==null||r.processCount>0||(r.stage="reloading",Bc())}),ch=X(Ht("processCount")),lh=X((t,e)=>{Ht("processCount",!0)(t,e);const r=t.windows[e.payload.label];r!=null&&r.processCount===0&&(r.stage==="reloading"?Bc():(t.windows[e.payload.label].visible=!1,delete t.windows[e.payload.label],delete t.labelKeys[e.payload.label],delete t.keyLabels[r.key]))}),dh=(t,e)=>{const r=t.windows[e.payload.key];r!=null&&(r.error=e.payload.message)},fh=X((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.visible!==!0&&(r.visible=!0),Ht("focusCount")(t,e))}),mh=ye("minimized"),ph=ye("maximized"),gh=ye("visible",!0),hh=ye("fullscreen",!0),vh=X(Ht("centerCount")),yh=X((t,e)=>{t.windows[e.payload.label].position=e.payload.position}),bh=X((t,e)=>{t.windows[e.payload.label].size=e.payload.size}),$h=X((t,e)=>{t.windows[e.payload.label].minSize=e.payload.size}),wh=X((t,e)=>{t.windows[e.payload.label].maxSize=e.payload.size}),_h=ye("resizable"),Ih=ye("skipTaskbar"),kh=ye("alwaysOnTop"),Sh=X((t,e)=>{t.windows[e.payload.label].title=e.payload.title}),Oh=ye("decorations"),Ci=(t,e)=>{const r=t.windows[e.payload.label];ui.partialEqual(r,e.payload)||(t.windows[e.payload.label]={...r,...e.payload})},zh=(t,e)=>{if(t.config={...t.config,...e.payload},t.label=e.payload.label,t.label===we&&t.config.enablePrerender){const r=mn.create();t.windows[r]={...t.config.defaultWindowProps,...Wc}}},Jc=Gc.createSlice({name:di,initialState:Fc,reducers:{internalSetInitial:zh,createWindow:oh,setWindowStage:ah,closeWindow:uh,registerProcess:ch,completeProcess:lh,setWindowError:dh,focusWindow:fh,reloadWindow:sh,setWindowMinimized:mh,setWindowMaximized:ph,setWindowVisible:gh,setWindowFullscreen:hh,centerWindow:vh,setWindowPosition:yh,setWindowSize:bh,setWindowMinSize:$h,setWindowMaxSize:wh,setWindowResizable:_h,setWindowSkipTaskbar:Ih,setWindowAlwaysOnTop:kh,setWindowTitle:Sh,setWindowDecorations:Oh,runtimeSetWindowProps:Ci,setWindowProps:Ci}}),{actions:{runtimeSetWindowProps:xh,setWindowProps:Nh,createWindow:Vc,internalSetInitial:qc,setWindowStage:Th,closeWindow:Uh,registerProcess:jh,completeProcess:Eh,setWindowError:Dh,focusWindow:Ph,reloadWindow:Ah,setWindowMinimized:Zh,setWindowMaximized:Ch,setWindowVisible:Mh,setWindowFullscreen:Rh,centerWindow:iv,setWindowPosition:Lh,setWindowSize:Wh,setWindowMinSize:Bh,setWindowMaxSize:Fh,setWindowResizable:Jh,setWindowSkipTaskbar:Vh,setWindowAlwaysOnTop:qh,setWindowTitle:Gh,setWindowDecorations:Kh}}=Jc,Yh=Jc.reducer,Xh=t=>t.startsWith(di),Hh=[qc.type],Qh=(t,e)=>!t&&!Hh.includes(e);exports.$t=Ye;exports.INITIAL_WINDOW_STATE=Xt;exports.J=Ut;exports.MAIN_WINDOW=we;exports.S=Ng;exports.SLICE_NAME=di;exports.ZERO_SLICE_STATE=Fc;exports._=yt;exports.a=h;exports.assignLabel=nh;exports.closeWindow=Uh;exports.completeProcess=Eh;exports.createWindow=Vc;exports.focusWindow=Ph;exports.group=Mi;exports.groupEnd=nn;exports.internalSetInitial=qc;exports.isDriftAction=Xh;exports.log=Ve;exports.m=ui;exports.reducer=Yh;exports.registerProcess=jh;exports.reloadWindow=Ah;exports.runtimeSetWindowProps=xh;exports.setWindowAlwaysOnTop=qh;exports.setWindowDecorations=Kh;exports.setWindowError=Dh;exports.setWindowFullscreen=Rh;exports.setWindowMaxSize=Fh;exports.setWindowMaximized=Ch;exports.setWindowMinSize=Bh;exports.setWindowMinimized=Zh;exports.setWindowPosition=Lh;exports.setWindowProps=Nh;exports.setWindowResizable=Jh;exports.setWindowSize=Wh;exports.setWindowSkipTaskbar=Vh;exports.setWindowStage=Th;exports.setWindowTitle=Gh;exports.setWindowVisible=Mh;exports.shouldEmit=Qh;exports.windowPropsZ=eh;