@phpsandbox/sdk 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/browser/phpsandbox-sdk.esm.js +40 -8
- package/dist/browser/phpsandbox-sdk.esm.min.js +8 -8
- package/dist/browser/phpsandbox-sdk.iife.js +40 -8
- package/dist/browser/phpsandbox-sdk.iife.min.js +6 -6
- package/dist/errors/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/servers.d.ts +30 -2
- package/dist/servers.js +33 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var PHPSandbox=(()=>{var Gi=Object.defineProperty;var uf=Object.getOwnPropertyDescriptor;var lf=Object.getOwnPropertyNames;var df=Object.prototype.hasOwnProperty;var Ol=r=>{throw TypeError(r)};var te=(r,e)=>{for(var n in e)Gi(r,n,{get:e[n],enumerable:!0})},pf=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of lf(e))!df.call(r,t)&&t!==n&&Gi(r,t,{get:()=>e[t],enumerable:!(i=uf(e,t))||i.enumerable});return r};var mf=r=>pf(Gi({},"__esModule",{value:!0}),r);var Bi=(r,e,n)=>e.has(r)||Ol("Cannot "+n);var ze=(r,e,n)=>(Bi(r,e,"read from private field"),n?n.call(r):e.get(r)),Dt=(r,e,n)=>e.has(r)?Ol("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,n),Ut=(r,e,n,i)=>(Bi(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n),pe=(r,e,n)=>(Bi(r,e,"access private method"),n);var Ib={};te(Ib,{FileChangeFilter:()=>tl,FileChangeType:()=>rl,FileType:()=>el,LspConnection:()=>gr,NotebookInstance:()=>Et,NotebookPublication:()=>wt,PHPSandbox:()=>Il,PHPSandboxError:()=>D,PublicationApi:()=>_t,PublicationDomains:()=>kt,PublicationInstance:()=>Se,PublicationResources:()=>we,PublicationRun:()=>_e,RemoteError:()=>j,TransportError:()=>R,createPublicationStreamResponse:()=>Zm,laravelCloudSetupForRepublish:()=>Fm,notebookBuiltinServices:()=>ul,notebookKnownServices:()=>Bm,readPublicationStream:()=>bi});var k={};te(k,{$brand:()=>Vi,$input:()=>fs,$output:()=>ms,NEVER:()=>Wi,TimePrecision:()=>bs,ZodAny:()=>su,ZodArray:()=>du,ZodBase64:()=>si,ZodBase64URL:()=>ci,ZodBigInt:()=>yt,ZodBigIntFormat:()=>di,ZodBoolean:()=>bt,ZodCIDRv4:()=>oi,ZodCIDRv6:()=>ai,ZodCUID:()=>Yn,ZodCUID2:()=>Qn,ZodCatch:()=>Ru,ZodCodec:()=>lr,ZodCustom:()=>dr,ZodCustomStringFormat:()=>ht,ZodDate:()=>or,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>mu,ZodE164:()=>ui,ZodEmail:()=>qn,ZodEmoji:()=>Hn,ZodEnum:()=>ft,ZodError:()=>Bh,ZodExactOptional:()=>wu,ZodFile:()=>ku,ZodFirstPartyTypeKind:()=>Vu,ZodFunction:()=>Gu,ZodGUID:()=>er,ZodIPv4:()=>ni,ZodIPv6:()=>ii,ZodISODate:()=>Gn,ZodISODateTime:()=>Mn,ZodISODuration:()=>Wn,ZodISOTime:()=>Bn,ZodIntersection:()=>fu,ZodIssueCode:()=>Vh,ZodJWT:()=>li,ZodKSUID:()=>ri,ZodLazy:()=>Zu,ZodLiteral:()=>$u,ZodMAC:()=>eu,ZodMap:()=>yu,ZodNaN:()=>Nu,ZodNanoID:()=>Xn,ZodNever:()=>uu,ZodNonOptional:()=>vi,ZodNull:()=>ou,ZodNullable:()=>Iu,ZodNumber:()=>vt,ZodNumberFormat:()=>Ae,ZodObject:()=>sr,ZodOptional:()=>hi,ZodPipe:()=>ur,ZodPrefault:()=>Eu,ZodPreprocess:()=>ju,ZodPromise:()=>Mu,ZodReadonly:()=>Au,ZodRealError:()=>q,ZodRecord:()=>mt,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>T,ZodSuccess:()=>Uu,ZodSymbol:()=>nu,ZodTemplateLiteral:()=>Lu,ZodTransform:()=>_u,ZodTuple:()=>hu,ZodType:()=>S,ZodULID:()=>ei,ZodURL:()=>ir,ZodUUID:()=>se,ZodUndefined:()=>iu,ZodUnion:()=>cr,ZodUnknown:()=>cu,ZodVoid:()=>lu,ZodXID:()=>ti,ZodXor:()=>pu,_ZodString:()=>Kn,_default:()=>zu,_function:()=>km,any:()=>Qp,array:()=>ar,base64:()=>jp,base64url:()=>Ap,bigint:()=>Kp,boolean:()=>ru,catch:()=>Ou,check:()=>_m,cidrv4:()=>Op,cidrv6:()=>Np,clone:()=>G,codec:()=>bm,coerce:()=>Ju,config:()=>N,core:()=>le,cuid:()=>Ip,cuid2:()=>Pp,custom:()=>wm,date:()=>tm,decode:()=>Jc,decodeAsync:()=>qc,describe:()=>Sm,discriminatedUnion:()=>sm,e164:()=>Cp,email:()=>hp,emoji:()=>wp,encode:()=>Vc,encodeAsync:()=>Kc,endsWith:()=>nt,enum:()=>fi,exactOptional:()=>Su,file:()=>fm,flattenError:()=>Zt,float32:()=>Bp,float64:()=>Wp,formatError:()=>Ft,fromJSONSchema:()=>Um,function:()=>km,getErrorMap:()=>Kh,globalRegistry:()=>Z,gt:()=>oe,gte:()=>W,guid:()=>vp,hash:()=>Gp,hex:()=>Mp,hostname:()=>Fp,httpUrl:()=>_p,includes:()=>tt,instanceof:()=>Pm,int:()=>Vn,int32:()=>Vp,int64:()=>qp,intersection:()=>gu,invertCodec:()=>ym,ipv4:()=>Dp,ipv6:()=>Rp,iso:()=>pt,json:()=>Em,jwt:()=>Lp,keyof:()=>rm,ksuid:()=>Tp,lazy:()=>Fu,length:()=>Ne,literal:()=>mm,locales:()=>qt,looseObject:()=>om,looseRecord:()=>um,lowercase:()=>Qe,lt:()=>ie,lte:()=>Y,mac:()=>Up,map:()=>lm,maxLength:()=>Oe,maxSize:()=>ye,meta:()=>Im,mime:()=>it,minLength:()=>ue,minSize:()=>ae,multipleOf:()=>be,nan:()=>vm,nanoid:()=>Sp,nativeEnum:()=>pm,negative:()=>Un,never:()=>pi,nonnegative:()=>On,nonoptional:()=>Du,nonpositive:()=>Rn,normalize:()=>ot,null:()=>au,nullable:()=>rr,nullish:()=>gm,number:()=>tu,object:()=>nm,optional:()=>tr,overwrite:()=>ne,parse:()=>Mc,parseAsync:()=>Gc,partialRecord:()=>cm,pipe:()=>Jn,positive:()=>Dn,prefault:()=>Tu,preprocess:()=>Tm,prettifyError:()=>oo,promise:()=>$m,property:()=>Nn,readonly:()=>Cu,record:()=>bu,refine:()=>Bu,regex:()=>Ye,regexes:()=>X,registry:()=>ln,safeDecode:()=>Xc,safeDecodeAsync:()=>Qc,safeEncode:()=>Hc,safeEncodeAsync:()=>Yc,safeParse:()=>Bc,safeParseAsync:()=>Wc,set:()=>dm,setErrorMap:()=>Jh,size:()=>Re,slugify:()=>ut,startsWith:()=>rt,strictObject:()=>im,string:()=>Qt,stringFormat:()=>Zp,stringbool:()=>zm,success:()=>hm,superRefine:()=>Wu,symbol:()=>Xp,templateLiteral:()=>xm,toJSONSchema:()=>Ln,toLowerCase:()=>st,toUpperCase:()=>ct,transform:()=>gi,treeifyError:()=>io,trim:()=>at,tuple:()=>vu,uint32:()=>Jp,uint64:()=>Hp,ulid:()=>zp,undefined:()=>Yp,union:()=>mi,unknown:()=>je,uppercase:()=>et,url:()=>kp,util:()=>b,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>$p,void:()=>em,xid:()=>Ep,xor:()=>am});var le={};te(le,{$ZodAny:()=>Na,$ZodArray:()=>Za,$ZodAsyncError:()=>re,$ZodBase64:()=>Sa,$ZodBase64URL:()=>Ia,$ZodBigInt:()=>tn,$ZodBigIntFormat:()=>Da,$ZodBoolean:()=>Wt,$ZodCIDRv4:()=>ka,$ZodCIDRv6:()=>_a,$ZodCUID:()=>la,$ZodCUID2:()=>da,$ZodCatch:()=>is,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>Zo,$ZodCheckEndsWith:()=>Yo,$ZodCheckGreaterThan:()=>qr,$ZodCheckIncludes:()=>Ho,$ZodCheckLengthEquals:()=>Vo,$ZodCheckLessThan:()=>Kr,$ZodCheckLowerCase:()=>Ko,$ZodCheckMaxLength:()=>Bo,$ZodCheckMaxSize:()=>Fo,$ZodCheckMimeType:()=>ea,$ZodCheckMinLength:()=>Wo,$ZodCheckMinSize:()=>Mo,$ZodCheckMultipleOf:()=>Co,$ZodCheckNumberFormat:()=>Lo,$ZodCheckOverwrite:()=>ta,$ZodCheckProperty:()=>Qo,$ZodCheckRegex:()=>Jo,$ZodCheckSizeEquals:()=>Go,$ZodCheckStartsWith:()=>Xo,$ZodCheckStringFormat:()=>He,$ZodCheckUpperCase:()=>qo,$ZodCodec:()=>Jt,$ZodCustom:()=>ps,$ZodCustomStringFormat:()=>Ea,$ZodDate:()=>La,$ZodDefault:()=>es,$ZodDiscriminatedUnion:()=>Ga,$ZodE164:()=>Pa,$ZodEmail:()=>aa,$ZodEmoji:()=>ca,$ZodEncodeError:()=>me,$ZodEnum:()=>Ka,$ZodError:()=>Lt,$ZodExactOptional:()=>Ya,$ZodFile:()=>Ha,$ZodFunction:()=>us,$ZodGUID:()=>ia,$ZodIPv4:()=>ya,$ZodIPv6:()=>xa,$ZodISODate:()=>ha,$ZodISODateTime:()=>ga,$ZodISODuration:()=>ba,$ZodISOTime:()=>va,$ZodIntersection:()=>Ba,$ZodJWT:()=>za,$ZodKSUID:()=>fa,$ZodLazy:()=>ds,$ZodLiteral:()=>qa,$ZodMAC:()=>$a,$ZodMap:()=>Va,$ZodNaN:()=>os,$ZodNanoID:()=>ua,$ZodNever:()=>Aa,$ZodNonOptional:()=>rs,$ZodNull:()=>Oa,$ZodNullable:()=>Qa,$ZodNumber:()=>en,$ZodNumberFormat:()=>Ta,$ZodObject:()=>dd,$ZodObjectJIT:()=>Fa,$ZodOptional:()=>nn,$ZodPipe:()=>on,$ZodPrefault:()=>ts,$ZodPreprocess:()=>as,$ZodPromise:()=>ls,$ZodReadonly:()=>ss,$ZodRealError:()=>K,$ZodRecord:()=>Wa,$ZodRegistry:()=>un,$ZodSet:()=>Ja,$ZodString:()=>Ue,$ZodStringFormat:()=>E,$ZodSuccess:()=>ns,$ZodSymbol:()=>Ua,$ZodTemplateLiteral:()=>cs,$ZodTransform:()=>Xa,$ZodTuple:()=>rn,$ZodType:()=>w,$ZodULID:()=>pa,$ZodURL:()=>sa,$ZodUUID:()=>oa,$ZodUndefined:()=>Ra,$ZodUnion:()=>Vt,$ZodUnknown:()=>ja,$ZodVoid:()=>Ca,$ZodXID:()=>ma,$ZodXor:()=>Ma,$brand:()=>Vi,$constructor:()=>d,$input:()=>fs,$output:()=>ms,Doc:()=>Bt,JSONSchema:()=>mp,JSONSchemaGenerator:()=>Zn,NEVER:()=>Wi,TimePrecision:()=>bs,_any:()=>Ls,_array:()=>Vs,_base64:()=>Pn,_base64url:()=>zn,_bigint:()=>Us,_boolean:()=>Ts,_catch:()=>jh,_check:()=>pp,_cidrv4:()=>Sn,_cidrv6:()=>In,_coercedBigint:()=>Rs,_coercedBoolean:()=>Ds,_coercedDate:()=>Bs,_coercedNumber:()=>ws,_coercedString:()=>hs,_cuid:()=>bn,_cuid2:()=>yn,_custom:()=>Ks,_date:()=>Gs,_decode:()=>Lr,_decodeAsync:()=>Fr,_default:()=>Rh,_discriminatedUnion:()=>$h,_e164:()=>En,_email:()=>dn,_emoji:()=>hn,_encode:()=>Cr,_encodeAsync:()=>Zr,_endsWith:()=>nt,_enum:()=>Ph,_file:()=>Js,_float32:()=>Is,_float64:()=>Ps,_gt:()=>oe,_gte:()=>W,_guid:()=>Ht,_includes:()=>tt,_int:()=>Ss,_int32:()=>zs,_int64:()=>Os,_intersection:()=>kh,_ipv4:()=>_n,_ipv6:()=>wn,_isoDate:()=>xs,_isoDateTime:()=>ys,_isoDuration:()=>ks,_isoTime:()=>$s,_jwt:()=>Tn,_ksuid:()=>kn,_lazy:()=>Zh,_length:()=>Ne,_literal:()=>Eh,_lowercase:()=>Qe,_lt:()=>ie,_lte:()=>Y,_mac:()=>vs,_map:()=>Sh,_max:()=>Y,_maxLength:()=>Oe,_maxSize:()=>ye,_mime:()=>it,_min:()=>W,_minLength:()=>ue,_minSize:()=>ae,_multipleOf:()=>be,_nan:()=>Ws,_nanoid:()=>vn,_nativeEnum:()=>zh,_negative:()=>Un,_never:()=>Fs,_nonnegative:()=>On,_nonoptional:()=>Oh,_nonpositive:()=>Rn,_normalize:()=>ot,_null:()=>Cs,_nullable:()=>Uh,_number:()=>_s,_optional:()=>Dh,_overwrite:()=>ne,_parse:()=>Ve,_parseAsync:()=>Je,_pipe:()=>Ah,_positive:()=>Dn,_promise:()=>Fh,_property:()=>Nn,_readonly:()=>Ch,_record:()=>wh,_refine:()=>qs,_regex:()=>Ye,_safeDecode:()=>Gr,_safeDecodeAsync:()=>Wr,_safeEncode:()=>Mr,_safeEncodeAsync:()=>Br,_safeParse:()=>Ke,_safeParseAsync:()=>qe,_set:()=>Ih,_size:()=>Re,_slugify:()=>ut,_startsWith:()=>rt,_string:()=>gs,_stringFormat:()=>lt,_stringbool:()=>Qs,_success:()=>Nh,_superRefine:()=>Hs,_symbol:()=>js,_templateLiteral:()=>Lh,_toLowerCase:()=>st,_toUpperCase:()=>ct,_transform:()=>Th,_trim:()=>at,_tuple:()=>_h,_uint32:()=>Es,_uint64:()=>Ns,_ulid:()=>xn,_undefined:()=>As,_union:()=>yh,_unknown:()=>Zs,_uppercase:()=>et,_url:()=>Xt,_uuid:()=>pn,_uuidv4:()=>mn,_uuidv6:()=>fn,_uuidv7:()=>gn,_void:()=>Ms,_xid:()=>$n,_xor:()=>xh,clone:()=>G,config:()=>N,createStandardJSONSchemaMethod:()=>dt,createToJSONSchemaMethod:()=>ec,decode:()=>Ff,decodeAsync:()=>Gf,describe:()=>Xs,encode:()=>Zf,encodeAsync:()=>Mf,extractDefs:()=>$e,finalize:()=>ke,flattenError:()=>Zt,formatError:()=>Ft,globalConfig:()=>Ee,globalRegistry:()=>Z,initializeContext:()=>xe,isValidBase64:()=>wa,isValidBase64URL:()=>sd,isValidJWT:()=>cd,locales:()=>qt,meta:()=>Ys,parse:()=>jr,parseAsync:()=>Ar,prettifyError:()=>oo,process:()=>z,regexes:()=>X,registry:()=>ln,safeDecode:()=>Wf,safeDecodeAsync:()=>Jf,safeEncode:()=>Bf,safeEncodeAsync:()=>Vf,safeParse:()=>ao,safeParseAsync:()=>so,toDotPath:()=>Zl,toJSONSchema:()=>Ln,treeifyError:()=>io,util:()=>b,version:()=>ra});var Nl,Wi=Object.freeze({status:"aborted"});function d(r,e,n){function i(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(r))return;s._zod.traits.add(r),e(s,u);let c=a.prototype,l=Object.keys(c);for(let m=0;m<l.length;m++){let g=l[m];g in s||(s[g]=c[g].bind(s))}}let t=n?.Parent??Object;class o extends t{}Object.defineProperty(o,"name",{value:r});function a(s){var u;let c=n?.Parent?new o:this;i(c,s),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(r)}),Object.defineProperty(a,"name",{value:r}),a}var Vi=Symbol("zod_brand"),re=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},me=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Nl=globalThis).__zod_globalConfig??(Nl.__zod_globalConfig={});var Ee=globalThis.__zod_globalConfig;function N(r){return r&&Object.assign(Ee,r),Ee}var b={};te(b,{BIGINT_FORMAT_RANGES:()=>ro,Class:()=>Ki,NUMBER_FORMAT_RANGES:()=>to,aborted:()=>ve,allowsEval:()=>Xi,assert:()=>bf,assertEqual:()=>ff,assertIs:()=>hf,assertNever:()=>vf,assertNotEqual:()=>gf,assignProp:()=>ge,base64ToUint8Array:()=>Al,base64urlToUint8Array:()=>Nf,cached:()=>Be,captureStackTrace:()=>Nr,cleanEnum:()=>Of,cleanRegex:()=>Nt,clone:()=>G,cloneDef:()=>xf,createTransparentProxy:()=>If,defineLazy:()=>I,esc:()=>Or,escapeRegex:()=>ee,explicitlyAborted:()=>no,extend:()=>Ef,finalizeIssue:()=>B,floatSafeRemainder:()=>qi,getElementAtPath:()=>$f,getEnumValues:()=>Ot,getLengthableOrigin:()=>Ct,getParsedType:()=>Sf,getSizableOrigin:()=>At,hexToUint8Array:()=>Af,isObject:()=>Te,isPlainObject:()=>he,issue:()=>We,joinValues:()=>p,jsonStringifyReplacer:()=>Ge,merge:()=>Df,mergeDefs:()=>ce,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>wf,objectClone:()=>yf,omit:()=>zf,optionalKeys:()=>eo,parsedType:()=>v,partial:()=>Uf,pick:()=>Pf,prefixIssues:()=>J,primitiveTypes:()=>Qi,promiseAllObject:()=>kf,propertyKeyTypes:()=>jt,randomString:()=>_f,required:()=>Rf,safeExtend:()=>Tf,shallowClone:()=>Yi,slugify:()=>Hi,stringifyPrimitive:()=>h,uint8ArrayToBase64:()=>Cl,uint8ArrayToBase64url:()=>jf,uint8ArrayToHex:()=>Cf,unwrapMessage:()=>Rt});function ff(r){return r}function gf(r){return r}function hf(r){}function vf(r){throw new Error("Unexpected value in exhaustive check")}function bf(r){}function Ot(r){let e=Object.values(r).filter(i=>typeof i=="number");return Object.entries(r).filter(([i,t])=>e.indexOf(+i)===-1).map(([i,t])=>t)}function p(r,e="|"){return r.map(n=>h(n)).join(e)}function Ge(r,e){return typeof e=="bigint"?e.toString():e}function Be(r){return{get value(){{let n=r();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(r){return r==null}function Nt(r){let e=r.startsWith("^")?1:0,n=r.endsWith("$")?r.length-1:r.length;return r.slice(e,n)}function qi(r,e){let n=r/e,i=Math.round(n),t=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<t?0:n-i}var jl=Symbol("evaluating");function I(r,e,n){let i;Object.defineProperty(r,e,{get(){if(i!==jl)return i===void 0&&(i=jl,i=n()),i},set(t){Object.defineProperty(r,e,{value:t})},configurable:!0})}function yf(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function ge(r,e,n){Object.defineProperty(r,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ce(...r){let e={};for(let n of r){let i=Object.getOwnPropertyDescriptors(n);Object.assign(e,i)}return Object.defineProperties({},e)}function xf(r){return ce(r._zod.def)}function $f(r,e){return e?e.reduce((n,i)=>n?.[i],r):r}function kf(r){let e=Object.keys(r),n=e.map(i=>r[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<e.length;o++)t[e[o]]=i[o];return t})}function _f(r=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<r;i++)n+=e[Math.floor(Math.random()*e.length)];return n}function Or(r){return JSON.stringify(r)}function Hi(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Nr="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function Te(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var Xi=Be(()=>{if(Ee.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let r=Function;return new r(""),!0}catch{return!1}});function he(r){if(Te(r)===!1)return!1;let e=r.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(Te(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Yi(r){return he(r)?{...r}:Array.isArray(r)?[...r]:r instanceof Map?new Map(r):r instanceof Set?new Set(r):r}function wf(r){let e=0;for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&e++;return e}var Sf=r=>{let e=typeof r;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(r)?"array":r===null?"null":r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?"promise":typeof Map<"u"&&r instanceof Map?"map":typeof Set<"u"&&r instanceof Set?"set":typeof Date<"u"&&r instanceof Date?"date":typeof File<"u"&&r instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},jt=new Set(["string","number","symbol"]),Qi=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ee(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function G(r,e,n){let i=new r._zod.constr(e??r._zod.def);return(!e||n?.parent)&&(i._zod.parent=r),i}function y(r){let e=r;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 If(r){let e;return new Proxy({},{get(n,i,t){return e??(e=r()),Reflect.get(e,i,t)},set(n,i,t,o){return e??(e=r()),Reflect.set(e,i,t,o)},has(n,i){return e??(e=r()),Reflect.has(e,i)},deleteProperty(n,i){return e??(e=r()),Reflect.deleteProperty(e,i)},ownKeys(n){return e??(e=r()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,i){return e??(e=r()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(n,i,t){return e??(e=r()),Reflect.defineProperty(e,i,t)}})}function h(r){return typeof r=="bigint"?r.toString()+"n":typeof r=="string"?`"${r}"`:`${r}`}function eo(r){return Object.keys(r).filter(e=>r[e]._zod.optin==="optional"&&r[e]._zod.optout==="optional")}var to={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]},ro={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Pf(r,e){let n=r._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ce(r._zod.def,{get shape(){let a={};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(a[s]=n.shape[s])}return ge(this,"shape",a),a},checks:[]});return G(r,o)}function zf(r,e){let n=r._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ce(r._zod.def,{get shape(){let a={...r._zod.def.shape};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete a[s]}return ge(this,"shape",a),a},checks:[]});return G(r,o)}function Ef(r,e){if(!he(e))throw new Error("Invalid input to extend: expected a plain object");let n=r._zod.def.checks;if(n&&n.length>0){let o=r._zod.def.shape;for(let a in e)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=ce(r._zod.def,{get shape(){let o={...r._zod.def.shape,...e};return ge(this,"shape",o),o}});return G(r,t)}function Tf(r,e){if(!he(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ce(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e};return ge(this,"shape",i),i}});return G(r,n)}function Df(r,e){if(r._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ce(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e._zod.def.shape};return ge(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return G(r,n)}function Uf(r,e,n){let t=e._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ce(e._zod.def,{get shape(){let s=e._zod.def.shape,u={...s};if(n)for(let c in n){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=r?new r({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)u[c]=r?new r({type:"optional",innerType:s[c]}):s[c];return ge(this,"shape",u),u},checks:[]});return G(e,a)}function Rf(r,e,n){let i=ce(e._zod.def,{get shape(){let t=e._zod.def.shape,o={...t};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new r({type:"nonoptional",innerType:t[a]}))}else for(let a in t)o[a]=new r({type:"nonoptional",innerType:t[a]});return ge(this,"shape",o),o}});return G(e,i)}function ve(r,e=0){if(r.aborted===!0)return!0;for(let n=e;n<r.issues.length;n++)if(r.issues[n]?.continue!==!0)return!0;return!1}function no(r,e=0){if(r.aborted===!0)return!0;for(let n=e;n<r.issues.length;n++)if(r.issues[n]?.continue===!1)return!0;return!1}function J(r,e){return e.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(r),n})}function Rt(r){return typeof r=="string"?r:r?.message}function B(r,e,n){let i=r.message?r.message:Rt(r.inst?._zod.def?.error?.(r))??Rt(e?.error?.(r))??Rt(n.customError?.(r))??Rt(n.localeError?.(r))??"Invalid input",{inst:t,continue:o,input:a,...s}=r;return s.path??(s.path=[]),s.message=i,e?.reportInput&&(s.input=a),s}function At(r){return r instanceof Set?"set":r instanceof Map?"map":r instanceof File?"file":"unknown"}function Ct(r){return Array.isArray(r)?"array":typeof r=="string"?"string":"unknown"}function v(r){let e=typeof r;switch(e){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let n=r;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function We(...r){let[e,n,i]=r;return typeof e=="string"?{message:e,code:"custom",input:n,inst:i}:{...e}}function Of(r){return Object.entries(r).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Al(r){let e=atob(r),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}function Cl(r){let e="";for(let n=0;n<r.length;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function Nf(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return Al(e+n)}function jf(r){return Cl(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Af(r){let e=r.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)n[i/2]=Number.parseInt(e.slice(i,i+2),16);return n}function Cf(r){return Array.from(r).map(e=>e.toString(16).padStart(2,"0")).join("")}var Ki=class{constructor(...e){}};var Ll=(r,e)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:e,enumerable:!1}),r.message=JSON.stringify(e,Ge,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},Lt=d("$ZodError",Ll),K=d("$ZodError",Ll,{Parent:Error});function Zt(r,e=n=>n.message){let n={},i=[];for(let t of r.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(e(t))):i.push(e(t));return{formErrors:i,fieldErrors:n}}function Ft(r,e=n=>n.message){let n={_errors:[]},i=(t,o=[])=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(e(a));else{let u=n,c=0;for(;c<s.length;){let l=s[c];c===s.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(e(a))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}}};return i(r),n}function io(r,e=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var a,s;for(let u of t.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){n.errors.push(e(u));continue}let l=n,m=0;for(;m<c.length;){let g=c[m],f=m===c.length-1;typeof g=="string"?(l.properties??(l.properties={}),(a=l.properties)[g]??(a[g]={errors:[]}),l=l.properties[g]):(l.items??(l.items=[]),(s=l.items)[g]??(s[g]={errors:[]}),l=l.items[g]),f&&l.errors.push(e(u)),m++}}};return i(r),n}function Zl(r){let e=[],n=r.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function oo(r){let e=[],n=[...r.issues].sort((i,t)=>(i.path??[]).length-(t.path??[]).length);for(let i of n)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Zl(i.path)}`);return e.join(`
|
|
1
|
+
"use strict";var PHPSandbox=(()=>{var Gi=Object.defineProperty;var uf=Object.getOwnPropertyDescriptor;var lf=Object.getOwnPropertyNames;var df=Object.prototype.hasOwnProperty;var Ol=r=>{throw TypeError(r)};var te=(r,e)=>{for(var n in e)Gi(r,n,{get:e[n],enumerable:!0})},pf=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of lf(e))!df.call(r,t)&&t!==n&&Gi(r,t,{get:()=>e[t],enumerable:!(i=uf(e,t))||i.enumerable});return r};var mf=r=>pf(Gi({},"__esModule",{value:!0}),r);var Bi=(r,e,n)=>e.has(r)||Ol("Cannot "+n);var ze=(r,e,n)=>(Bi(r,e,"read from private field"),n?n.call(r):e.get(r)),Dt=(r,e,n)=>e.has(r)?Ol("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,n),Ut=(r,e,n,i)=>(Bi(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n),pe=(r,e,n)=>(Bi(r,e,"access private method"),n);var Ib={};te(Ib,{FileChangeFilter:()=>tl,FileChangeType:()=>rl,FileType:()=>el,LspConnection:()=>gr,NotebookInstance:()=>Et,NotebookPublication:()=>wt,PHPSandbox:()=>Il,PHPSandboxError:()=>E,PublicationApi:()=>_t,PublicationDomains:()=>kt,PublicationInstance:()=>Se,PublicationResources:()=>we,PublicationRun:()=>_e,RemoteError:()=>j,TransportError:()=>R,createPublicationStreamResponse:()=>Zm,laravelCloudSetupForRepublish:()=>Fm,notebookBuiltinServices:()=>ul,notebookKnownServices:()=>Bm,readPublicationStream:()=>bi});var k={};te(k,{$brand:()=>Vi,$input:()=>fs,$output:()=>ms,NEVER:()=>Wi,TimePrecision:()=>bs,ZodAny:()=>su,ZodArray:()=>du,ZodBase64:()=>si,ZodBase64URL:()=>ci,ZodBigInt:()=>yt,ZodBigIntFormat:()=>di,ZodBoolean:()=>bt,ZodCIDRv4:()=>oi,ZodCIDRv6:()=>ai,ZodCUID:()=>Yn,ZodCUID2:()=>Qn,ZodCatch:()=>Ru,ZodCodec:()=>lr,ZodCustom:()=>dr,ZodCustomStringFormat:()=>ht,ZodDate:()=>or,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>mu,ZodE164:()=>ui,ZodEmail:()=>qn,ZodEmoji:()=>Hn,ZodEnum:()=>ft,ZodError:()=>Bh,ZodExactOptional:()=>wu,ZodFile:()=>ku,ZodFirstPartyTypeKind:()=>Vu,ZodFunction:()=>Gu,ZodGUID:()=>er,ZodIPv4:()=>ni,ZodIPv6:()=>ii,ZodISODate:()=>Gn,ZodISODateTime:()=>Mn,ZodISODuration:()=>Wn,ZodISOTime:()=>Bn,ZodIntersection:()=>fu,ZodIssueCode:()=>Vh,ZodJWT:()=>li,ZodKSUID:()=>ri,ZodLazy:()=>Zu,ZodLiteral:()=>$u,ZodMAC:()=>eu,ZodMap:()=>yu,ZodNaN:()=>Nu,ZodNanoID:()=>Xn,ZodNever:()=>uu,ZodNonOptional:()=>vi,ZodNull:()=>ou,ZodNullable:()=>Iu,ZodNumber:()=>vt,ZodNumberFormat:()=>Ae,ZodObject:()=>sr,ZodOptional:()=>hi,ZodPipe:()=>ur,ZodPrefault:()=>Eu,ZodPreprocess:()=>ju,ZodPromise:()=>Mu,ZodReadonly:()=>Au,ZodRealError:()=>q,ZodRecord:()=>mt,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>D,ZodSuccess:()=>Uu,ZodSymbol:()=>nu,ZodTemplateLiteral:()=>Lu,ZodTransform:()=>_u,ZodTuple:()=>hu,ZodType:()=>S,ZodULID:()=>ei,ZodURL:()=>ir,ZodUUID:()=>se,ZodUndefined:()=>iu,ZodUnion:()=>cr,ZodUnknown:()=>cu,ZodVoid:()=>lu,ZodXID:()=>ti,ZodXor:()=>pu,_ZodString:()=>Kn,_default:()=>zu,_function:()=>km,any:()=>Qp,array:()=>ar,base64:()=>jp,base64url:()=>Ap,bigint:()=>Kp,boolean:()=>ru,catch:()=>Ou,check:()=>_m,cidrv4:()=>Op,cidrv6:()=>Np,clone:()=>G,codec:()=>bm,coerce:()=>Ju,config:()=>N,core:()=>le,cuid:()=>Ip,cuid2:()=>Pp,custom:()=>wm,date:()=>tm,decode:()=>Jc,decodeAsync:()=>qc,describe:()=>Sm,discriminatedUnion:()=>sm,e164:()=>Cp,email:()=>hp,emoji:()=>wp,encode:()=>Vc,encodeAsync:()=>Kc,endsWith:()=>nt,enum:()=>fi,exactOptional:()=>Su,file:()=>fm,flattenError:()=>Zt,float32:()=>Bp,float64:()=>Wp,formatError:()=>Ft,fromJSONSchema:()=>Um,function:()=>km,getErrorMap:()=>Kh,globalRegistry:()=>Z,gt:()=>oe,gte:()=>W,guid:()=>vp,hash:()=>Gp,hex:()=>Mp,hostname:()=>Fp,httpUrl:()=>_p,includes:()=>tt,instanceof:()=>Pm,int:()=>Vn,int32:()=>Vp,int64:()=>qp,intersection:()=>gu,invertCodec:()=>ym,ipv4:()=>Dp,ipv6:()=>Rp,iso:()=>pt,json:()=>Em,jwt:()=>Lp,keyof:()=>rm,ksuid:()=>Tp,lazy:()=>Fu,length:()=>Ne,literal:()=>mm,locales:()=>qt,looseObject:()=>om,looseRecord:()=>um,lowercase:()=>Qe,lt:()=>ie,lte:()=>Y,mac:()=>Up,map:()=>lm,maxLength:()=>Oe,maxSize:()=>ye,meta:()=>Im,mime:()=>it,minLength:()=>ue,minSize:()=>ae,multipleOf:()=>be,nan:()=>vm,nanoid:()=>Sp,nativeEnum:()=>pm,negative:()=>Un,never:()=>pi,nonnegative:()=>On,nonoptional:()=>Du,nonpositive:()=>Rn,normalize:()=>ot,null:()=>au,nullable:()=>rr,nullish:()=>gm,number:()=>tu,object:()=>nm,optional:()=>tr,overwrite:()=>ne,parse:()=>Mc,parseAsync:()=>Gc,partialRecord:()=>cm,pipe:()=>Jn,positive:()=>Dn,prefault:()=>Tu,preprocess:()=>Tm,prettifyError:()=>oo,promise:()=>$m,property:()=>Nn,readonly:()=>Cu,record:()=>bu,refine:()=>Bu,regex:()=>Ye,regexes:()=>X,registry:()=>ln,safeDecode:()=>Xc,safeDecodeAsync:()=>Qc,safeEncode:()=>Hc,safeEncodeAsync:()=>Yc,safeParse:()=>Bc,safeParseAsync:()=>Wc,set:()=>dm,setErrorMap:()=>Jh,size:()=>Re,slugify:()=>ut,startsWith:()=>rt,strictObject:()=>im,string:()=>Qt,stringFormat:()=>Zp,stringbool:()=>zm,success:()=>hm,superRefine:()=>Wu,symbol:()=>Xp,templateLiteral:()=>xm,toJSONSchema:()=>Ln,toLowerCase:()=>st,toUpperCase:()=>ct,transform:()=>gi,treeifyError:()=>io,trim:()=>at,tuple:()=>vu,uint32:()=>Jp,uint64:()=>Hp,ulid:()=>zp,undefined:()=>Yp,union:()=>mi,unknown:()=>je,uppercase:()=>et,url:()=>kp,util:()=>b,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>$p,void:()=>em,xid:()=>Ep,xor:()=>am});var le={};te(le,{$ZodAny:()=>Na,$ZodArray:()=>Za,$ZodAsyncError:()=>re,$ZodBase64:()=>Sa,$ZodBase64URL:()=>Ia,$ZodBigInt:()=>tn,$ZodBigIntFormat:()=>Da,$ZodBoolean:()=>Wt,$ZodCIDRv4:()=>ka,$ZodCIDRv6:()=>_a,$ZodCUID:()=>la,$ZodCUID2:()=>da,$ZodCatch:()=>is,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>Zo,$ZodCheckEndsWith:()=>Yo,$ZodCheckGreaterThan:()=>qr,$ZodCheckIncludes:()=>Ho,$ZodCheckLengthEquals:()=>Vo,$ZodCheckLessThan:()=>Kr,$ZodCheckLowerCase:()=>Ko,$ZodCheckMaxLength:()=>Bo,$ZodCheckMaxSize:()=>Fo,$ZodCheckMimeType:()=>ea,$ZodCheckMinLength:()=>Wo,$ZodCheckMinSize:()=>Mo,$ZodCheckMultipleOf:()=>Co,$ZodCheckNumberFormat:()=>Lo,$ZodCheckOverwrite:()=>ta,$ZodCheckProperty:()=>Qo,$ZodCheckRegex:()=>Jo,$ZodCheckSizeEquals:()=>Go,$ZodCheckStartsWith:()=>Xo,$ZodCheckStringFormat:()=>He,$ZodCheckUpperCase:()=>qo,$ZodCodec:()=>Jt,$ZodCustom:()=>ps,$ZodCustomStringFormat:()=>Ea,$ZodDate:()=>La,$ZodDefault:()=>es,$ZodDiscriminatedUnion:()=>Ga,$ZodE164:()=>Pa,$ZodEmail:()=>aa,$ZodEmoji:()=>ca,$ZodEncodeError:()=>me,$ZodEnum:()=>Ka,$ZodError:()=>Lt,$ZodExactOptional:()=>Ya,$ZodFile:()=>Ha,$ZodFunction:()=>us,$ZodGUID:()=>ia,$ZodIPv4:()=>ya,$ZodIPv6:()=>xa,$ZodISODate:()=>ha,$ZodISODateTime:()=>ga,$ZodISODuration:()=>ba,$ZodISOTime:()=>va,$ZodIntersection:()=>Ba,$ZodJWT:()=>za,$ZodKSUID:()=>fa,$ZodLazy:()=>ds,$ZodLiteral:()=>qa,$ZodMAC:()=>$a,$ZodMap:()=>Va,$ZodNaN:()=>os,$ZodNanoID:()=>ua,$ZodNever:()=>Aa,$ZodNonOptional:()=>rs,$ZodNull:()=>Oa,$ZodNullable:()=>Qa,$ZodNumber:()=>en,$ZodNumberFormat:()=>Ta,$ZodObject:()=>dd,$ZodObjectJIT:()=>Fa,$ZodOptional:()=>nn,$ZodPipe:()=>on,$ZodPrefault:()=>ts,$ZodPreprocess:()=>as,$ZodPromise:()=>ls,$ZodReadonly:()=>ss,$ZodRealError:()=>K,$ZodRecord:()=>Wa,$ZodRegistry:()=>un,$ZodSet:()=>Ja,$ZodString:()=>Ue,$ZodStringFormat:()=>T,$ZodSuccess:()=>ns,$ZodSymbol:()=>Ua,$ZodTemplateLiteral:()=>cs,$ZodTransform:()=>Xa,$ZodTuple:()=>rn,$ZodType:()=>w,$ZodULID:()=>pa,$ZodURL:()=>sa,$ZodUUID:()=>oa,$ZodUndefined:()=>Ra,$ZodUnion:()=>Vt,$ZodUnknown:()=>ja,$ZodVoid:()=>Ca,$ZodXID:()=>ma,$ZodXor:()=>Ma,$brand:()=>Vi,$constructor:()=>d,$input:()=>fs,$output:()=>ms,Doc:()=>Bt,JSONSchema:()=>mp,JSONSchemaGenerator:()=>Zn,NEVER:()=>Wi,TimePrecision:()=>bs,_any:()=>Ls,_array:()=>Vs,_base64:()=>Pn,_base64url:()=>zn,_bigint:()=>Us,_boolean:()=>Ts,_catch:()=>jh,_check:()=>pp,_cidrv4:()=>Sn,_cidrv6:()=>In,_coercedBigint:()=>Rs,_coercedBoolean:()=>Ds,_coercedDate:()=>Bs,_coercedNumber:()=>ws,_coercedString:()=>hs,_cuid:()=>bn,_cuid2:()=>yn,_custom:()=>Ks,_date:()=>Gs,_decode:()=>Lr,_decodeAsync:()=>Fr,_default:()=>Rh,_discriminatedUnion:()=>$h,_e164:()=>En,_email:()=>dn,_emoji:()=>hn,_encode:()=>Cr,_encodeAsync:()=>Zr,_endsWith:()=>nt,_enum:()=>Ph,_file:()=>Js,_float32:()=>Is,_float64:()=>Ps,_gt:()=>oe,_gte:()=>W,_guid:()=>Ht,_includes:()=>tt,_int:()=>Ss,_int32:()=>zs,_int64:()=>Os,_intersection:()=>kh,_ipv4:()=>_n,_ipv6:()=>wn,_isoDate:()=>xs,_isoDateTime:()=>ys,_isoDuration:()=>ks,_isoTime:()=>$s,_jwt:()=>Tn,_ksuid:()=>kn,_lazy:()=>Zh,_length:()=>Ne,_literal:()=>Eh,_lowercase:()=>Qe,_lt:()=>ie,_lte:()=>Y,_mac:()=>vs,_map:()=>Sh,_max:()=>Y,_maxLength:()=>Oe,_maxSize:()=>ye,_mime:()=>it,_min:()=>W,_minLength:()=>ue,_minSize:()=>ae,_multipleOf:()=>be,_nan:()=>Ws,_nanoid:()=>vn,_nativeEnum:()=>zh,_negative:()=>Un,_never:()=>Fs,_nonnegative:()=>On,_nonoptional:()=>Oh,_nonpositive:()=>Rn,_normalize:()=>ot,_null:()=>Cs,_nullable:()=>Uh,_number:()=>_s,_optional:()=>Dh,_overwrite:()=>ne,_parse:()=>Ve,_parseAsync:()=>Je,_pipe:()=>Ah,_positive:()=>Dn,_promise:()=>Fh,_property:()=>Nn,_readonly:()=>Ch,_record:()=>wh,_refine:()=>qs,_regex:()=>Ye,_safeDecode:()=>Gr,_safeDecodeAsync:()=>Wr,_safeEncode:()=>Mr,_safeEncodeAsync:()=>Br,_safeParse:()=>Ke,_safeParseAsync:()=>qe,_set:()=>Ih,_size:()=>Re,_slugify:()=>ut,_startsWith:()=>rt,_string:()=>gs,_stringFormat:()=>lt,_stringbool:()=>Qs,_success:()=>Nh,_superRefine:()=>Hs,_symbol:()=>js,_templateLiteral:()=>Lh,_toLowerCase:()=>st,_toUpperCase:()=>ct,_transform:()=>Th,_trim:()=>at,_tuple:()=>_h,_uint32:()=>Es,_uint64:()=>Ns,_ulid:()=>xn,_undefined:()=>As,_union:()=>yh,_unknown:()=>Zs,_uppercase:()=>et,_url:()=>Xt,_uuid:()=>pn,_uuidv4:()=>mn,_uuidv6:()=>fn,_uuidv7:()=>gn,_void:()=>Ms,_xid:()=>$n,_xor:()=>xh,clone:()=>G,config:()=>N,createStandardJSONSchemaMethod:()=>dt,createToJSONSchemaMethod:()=>ec,decode:()=>Ff,decodeAsync:()=>Gf,describe:()=>Xs,encode:()=>Zf,encodeAsync:()=>Mf,extractDefs:()=>$e,finalize:()=>ke,flattenError:()=>Zt,formatError:()=>Ft,globalConfig:()=>Ee,globalRegistry:()=>Z,initializeContext:()=>xe,isValidBase64:()=>wa,isValidBase64URL:()=>sd,isValidJWT:()=>cd,locales:()=>qt,meta:()=>Ys,parse:()=>jr,parseAsync:()=>Ar,prettifyError:()=>oo,process:()=>z,regexes:()=>X,registry:()=>ln,safeDecode:()=>Wf,safeDecodeAsync:()=>Jf,safeEncode:()=>Bf,safeEncodeAsync:()=>Vf,safeParse:()=>ao,safeParseAsync:()=>so,toDotPath:()=>Zl,toJSONSchema:()=>Ln,treeifyError:()=>io,util:()=>b,version:()=>ra});var Nl,Wi=Object.freeze({status:"aborted"});function d(r,e,n){function i(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(r))return;s._zod.traits.add(r),e(s,u);let c=a.prototype,l=Object.keys(c);for(let m=0;m<l.length;m++){let g=l[m];g in s||(s[g]=c[g].bind(s))}}let t=n?.Parent??Object;class o extends t{}Object.defineProperty(o,"name",{value:r});function a(s){var u;let c=n?.Parent?new o:this;i(c,s),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(r)}),Object.defineProperty(a,"name",{value:r}),a}var Vi=Symbol("zod_brand"),re=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},me=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Nl=globalThis).__zod_globalConfig??(Nl.__zod_globalConfig={});var Ee=globalThis.__zod_globalConfig;function N(r){return r&&Object.assign(Ee,r),Ee}var b={};te(b,{BIGINT_FORMAT_RANGES:()=>ro,Class:()=>Ki,NUMBER_FORMAT_RANGES:()=>to,aborted:()=>ve,allowsEval:()=>Xi,assert:()=>bf,assertEqual:()=>ff,assertIs:()=>hf,assertNever:()=>vf,assertNotEqual:()=>gf,assignProp:()=>ge,base64ToUint8Array:()=>Al,base64urlToUint8Array:()=>Nf,cached:()=>Be,captureStackTrace:()=>Nr,cleanEnum:()=>Of,cleanRegex:()=>Nt,clone:()=>G,cloneDef:()=>xf,createTransparentProxy:()=>If,defineLazy:()=>I,esc:()=>Or,escapeRegex:()=>ee,explicitlyAborted:()=>no,extend:()=>Ef,finalizeIssue:()=>B,floatSafeRemainder:()=>qi,getElementAtPath:()=>$f,getEnumValues:()=>Ot,getLengthableOrigin:()=>Ct,getParsedType:()=>Sf,getSizableOrigin:()=>At,hexToUint8Array:()=>Af,isObject:()=>Te,isPlainObject:()=>he,issue:()=>We,joinValues:()=>p,jsonStringifyReplacer:()=>Ge,merge:()=>Df,mergeDefs:()=>ce,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>wf,objectClone:()=>yf,omit:()=>zf,optionalKeys:()=>eo,parsedType:()=>v,partial:()=>Uf,pick:()=>Pf,prefixIssues:()=>J,primitiveTypes:()=>Qi,promiseAllObject:()=>kf,propertyKeyTypes:()=>jt,randomString:()=>_f,required:()=>Rf,safeExtend:()=>Tf,shallowClone:()=>Yi,slugify:()=>Hi,stringifyPrimitive:()=>h,uint8ArrayToBase64:()=>Cl,uint8ArrayToBase64url:()=>jf,uint8ArrayToHex:()=>Cf,unwrapMessage:()=>Rt});function ff(r){return r}function gf(r){return r}function hf(r){}function vf(r){throw new Error("Unexpected value in exhaustive check")}function bf(r){}function Ot(r){let e=Object.values(r).filter(i=>typeof i=="number");return Object.entries(r).filter(([i,t])=>e.indexOf(+i)===-1).map(([i,t])=>t)}function p(r,e="|"){return r.map(n=>h(n)).join(e)}function Ge(r,e){return typeof e=="bigint"?e.toString():e}function Be(r){return{get value(){{let n=r();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(r){return r==null}function Nt(r){let e=r.startsWith("^")?1:0,n=r.endsWith("$")?r.length-1:r.length;return r.slice(e,n)}function qi(r,e){let n=r/e,i=Math.round(n),t=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<t?0:n-i}var jl=Symbol("evaluating");function I(r,e,n){let i;Object.defineProperty(r,e,{get(){if(i!==jl)return i===void 0&&(i=jl,i=n()),i},set(t){Object.defineProperty(r,e,{value:t})},configurable:!0})}function yf(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function ge(r,e,n){Object.defineProperty(r,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ce(...r){let e={};for(let n of r){let i=Object.getOwnPropertyDescriptors(n);Object.assign(e,i)}return Object.defineProperties({},e)}function xf(r){return ce(r._zod.def)}function $f(r,e){return e?e.reduce((n,i)=>n?.[i],r):r}function kf(r){let e=Object.keys(r),n=e.map(i=>r[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<e.length;o++)t[e[o]]=i[o];return t})}function _f(r=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<r;i++)n+=e[Math.floor(Math.random()*e.length)];return n}function Or(r){return JSON.stringify(r)}function Hi(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Nr="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function Te(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var Xi=Be(()=>{if(Ee.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let r=Function;return new r(""),!0}catch{return!1}});function he(r){if(Te(r)===!1)return!1;let e=r.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(Te(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Yi(r){return he(r)?{...r}:Array.isArray(r)?[...r]:r instanceof Map?new Map(r):r instanceof Set?new Set(r):r}function wf(r){let e=0;for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&e++;return e}var Sf=r=>{let e=typeof r;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(r)?"array":r===null?"null":r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?"promise":typeof Map<"u"&&r instanceof Map?"map":typeof Set<"u"&&r instanceof Set?"set":typeof Date<"u"&&r instanceof Date?"date":typeof File<"u"&&r instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},jt=new Set(["string","number","symbol"]),Qi=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ee(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function G(r,e,n){let i=new r._zod.constr(e??r._zod.def);return(!e||n?.parent)&&(i._zod.parent=r),i}function y(r){let e=r;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 If(r){let e;return new Proxy({},{get(n,i,t){return e??(e=r()),Reflect.get(e,i,t)},set(n,i,t,o){return e??(e=r()),Reflect.set(e,i,t,o)},has(n,i){return e??(e=r()),Reflect.has(e,i)},deleteProperty(n,i){return e??(e=r()),Reflect.deleteProperty(e,i)},ownKeys(n){return e??(e=r()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,i){return e??(e=r()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(n,i,t){return e??(e=r()),Reflect.defineProperty(e,i,t)}})}function h(r){return typeof r=="bigint"?r.toString()+"n":typeof r=="string"?`"${r}"`:`${r}`}function eo(r){return Object.keys(r).filter(e=>r[e]._zod.optin==="optional"&&r[e]._zod.optout==="optional")}var to={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]},ro={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Pf(r,e){let n=r._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=ce(r._zod.def,{get shape(){let a={};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(a[s]=n.shape[s])}return ge(this,"shape",a),a},checks:[]});return G(r,o)}function zf(r,e){let n=r._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=ce(r._zod.def,{get shape(){let a={...r._zod.def.shape};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete a[s]}return ge(this,"shape",a),a},checks:[]});return G(r,o)}function Ef(r,e){if(!he(e))throw new Error("Invalid input to extend: expected a plain object");let n=r._zod.def.checks;if(n&&n.length>0){let o=r._zod.def.shape;for(let a in e)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=ce(r._zod.def,{get shape(){let o={...r._zod.def.shape,...e};return ge(this,"shape",o),o}});return G(r,t)}function Tf(r,e){if(!he(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ce(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e};return ge(this,"shape",i),i}});return G(r,n)}function Df(r,e){if(r._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ce(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e._zod.def.shape};return ge(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return G(r,n)}function Uf(r,e,n){let t=e._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ce(e._zod.def,{get shape(){let s=e._zod.def.shape,u={...s};if(n)for(let c in n){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=r?new r({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)u[c]=r?new r({type:"optional",innerType:s[c]}):s[c];return ge(this,"shape",u),u},checks:[]});return G(e,a)}function Rf(r,e,n){let i=ce(e._zod.def,{get shape(){let t=e._zod.def.shape,o={...t};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new r({type:"nonoptional",innerType:t[a]}))}else for(let a in t)o[a]=new r({type:"nonoptional",innerType:t[a]});return ge(this,"shape",o),o}});return G(e,i)}function ve(r,e=0){if(r.aborted===!0)return!0;for(let n=e;n<r.issues.length;n++)if(r.issues[n]?.continue!==!0)return!0;return!1}function no(r,e=0){if(r.aborted===!0)return!0;for(let n=e;n<r.issues.length;n++)if(r.issues[n]?.continue===!1)return!0;return!1}function J(r,e){return e.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(r),n})}function Rt(r){return typeof r=="string"?r:r?.message}function B(r,e,n){let i=r.message?r.message:Rt(r.inst?._zod.def?.error?.(r))??Rt(e?.error?.(r))??Rt(n.customError?.(r))??Rt(n.localeError?.(r))??"Invalid input",{inst:t,continue:o,input:a,...s}=r;return s.path??(s.path=[]),s.message=i,e?.reportInput&&(s.input=a),s}function At(r){return r instanceof Set?"set":r instanceof Map?"map":r instanceof File?"file":"unknown"}function Ct(r){return Array.isArray(r)?"array":typeof r=="string"?"string":"unknown"}function v(r){let e=typeof r;switch(e){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let n=r;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function We(...r){let[e,n,i]=r;return typeof e=="string"?{message:e,code:"custom",input:n,inst:i}:{...e}}function Of(r){return Object.entries(r).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Al(r){let e=atob(r),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}function Cl(r){let e="";for(let n=0;n<r.length;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function Nf(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return Al(e+n)}function jf(r){return Cl(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Af(r){let e=r.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)n[i/2]=Number.parseInt(e.slice(i,i+2),16);return n}function Cf(r){return Array.from(r).map(e=>e.toString(16).padStart(2,"0")).join("")}var Ki=class{constructor(...e){}};var Ll=(r,e)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:e,enumerable:!1}),r.message=JSON.stringify(e,Ge,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},Lt=d("$ZodError",Ll),K=d("$ZodError",Ll,{Parent:Error});function Zt(r,e=n=>n.message){let n={},i=[];for(let t of r.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(e(t))):i.push(e(t));return{formErrors:i,fieldErrors:n}}function Ft(r,e=n=>n.message){let n={_errors:[]},i=(t,o=[])=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(e(a));else{let u=n,c=0;for(;c<s.length;){let l=s[c];c===s.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(e(a))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}}};return i(r),n}function io(r,e=n=>n.message){let n={errors:[]},i=(t,o=[])=>{var a,s;for(let u of t.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let c=[...o,...u.path];if(c.length===0){n.errors.push(e(u));continue}let l=n,m=0;for(;m<c.length;){let g=c[m],f=m===c.length-1;typeof g=="string"?(l.properties??(l.properties={}),(a=l.properties)[g]??(a[g]={errors:[]}),l=l.properties[g]):(l.items??(l.items=[]),(s=l.items)[g]??(s[g]={errors:[]}),l=l.items[g]),f&&l.errors.push(e(u)),m++}}};return i(r),n}function Zl(r){let e=[],n=r.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function oo(r){let e=[],n=[...r.issues].sort((i,t)=>(i.path??[]).length-(t.path??[]).length);for(let i of n)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${Zl(i.path)}`);return e.join(`
|
|
2
2
|
`)}var Ve=r=>(e,n,i,t)=>{let o=i?{...i,async:!1}:{async:!1},a=e._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new re;if(a.issues.length){let s=new(t?.Err??r)(a.issues.map(u=>B(u,o,N())));throw Nr(s,t?.callee),s}return a.value},jr=Ve(K),Je=r=>async(e,n,i,t)=>{let o=i?{...i,async:!0}:{async:!0},a=e._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(t?.Err??r)(a.issues.map(u=>B(u,o,N())));throw Nr(s,t?.callee),s}return a.value},Ar=Je(K),Ke=r=>(e,n,i)=>{let t=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new re;return o.issues.length?{success:!1,error:new(r??Lt)(o.issues.map(a=>B(a,t,N())))}:{success:!0,data:o.value}},ao=Ke(K),qe=r=>async(e,n,i)=>{let t=i?{...i,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new r(o.issues.map(a=>B(a,t,N())))}:{success:!0,data:o.value}},so=qe(K),Cr=r=>(e,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return Ve(r)(e,n,t)},Zf=Cr(K),Lr=r=>(e,n,i)=>Ve(r)(e,n,i),Ff=Lr(K),Zr=r=>async(e,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return Je(r)(e,n,t)},Mf=Zr(K),Fr=r=>async(e,n,i)=>Je(r)(e,n,i),Gf=Fr(K),Mr=r=>(e,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return Ke(r)(e,n,t)},Bf=Mr(K),Gr=r=>(e,n,i)=>Ke(r)(e,n,i),Wf=Gr(K),Br=r=>async(e,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return qe(r)(e,n,t)},Vf=Br(K),Wr=r=>async(e,n,i)=>qe(r)(e,n,i),Jf=Wr(K);var X={};te(X,{base64:()=>wo,base64url:()=>Vr,bigint:()=>Do,boolean:()=>Ro,browserEmail:()=>tg,cidrv4:()=>ko,cidrv6:()=>_o,cuid:()=>co,cuid2:()=>uo,date:()=>Po,datetime:()=>Eo,domain:()=>ig,duration:()=>go,e164:()=>Io,email:()=>vo,emoji:()=>bo,extendedDuration:()=>Kf,guid:()=>ho,hex:()=>og,hostname:()=>ng,html5Email:()=>Yf,httpProtocol:()=>So,idnEmail:()=>eg,integer:()=>Uo,ipv4:()=>yo,ipv6:()=>xo,ksuid:()=>mo,lowercase:()=>jo,mac:()=>$o,md5_base64:()=>sg,md5_base64url:()=>cg,md5_hex:()=>ag,nanoid:()=>fo,null:()=>Oo,number:()=>Jr,rfc5322Email:()=>Qf,sha1_base64:()=>lg,sha1_base64url:()=>dg,sha1_hex:()=>ug,sha256_base64:()=>mg,sha256_base64url:()=>fg,sha256_hex:()=>pg,sha384_base64:()=>hg,sha384_base64url:()=>vg,sha384_hex:()=>gg,sha512_base64:()=>yg,sha512_base64url:()=>xg,sha512_hex:()=>bg,string:()=>To,time:()=>zo,ulid:()=>lo,undefined:()=>No,unicodeEmail:()=>Fl,uppercase:()=>Ao,uuid:()=>De,uuid4:()=>qf,uuid6:()=>Hf,uuid7:()=>Xf,xid:()=>po});var co=/^[cC][0-9a-z]{6,}$/,uo=/^[0-9a-z]+$/,lo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,po=/^[0-9a-vA-V]{20}$/,mo=/^[A-Za-z0-9]{27}$/,fo=/^[a-zA-Z0-9_-]{21}$/,go=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kf=/^[-+]?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)?)??$/,ho=/^([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})$/,De=r=>r?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qf=De(4),Hf=De(6),Xf=De(7),vo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yf=/^[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])?)*$/,Qf=/^(([^<>()\[\]\\.,;:\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,}))$/,Fl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,eg=Fl,tg=/^[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])?)*$/,rg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bo(){return new RegExp(rg,"u")}var yo=/^(?:(?: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])$/,xo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$o=r=>{let e=ee(r??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},ko=/^((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])$/,_o=/^(([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])$/,wo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vr=/^[A-Za-z0-9_-]*$/,ng=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ig=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,So=/^https?$/,Io=/^\+[1-9]\d{6,14}$/,Ml="(?:(?:\\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])))",Po=new RegExp(`^${Ml}$`);function Gl(r){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof r.precision=="number"?r.precision===-1?`${e}`:r.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${r.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zo(r){return new RegExp(`^${Gl(r)}$`)}function Eo(r){let e=Gl({precision:r.precision}),n=["Z"];r.local&&n.push(""),r.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${n.join("|")})`;return new RegExp(`^${Ml}T(?:${i})$`)}var To=r=>{let e=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Do=/^-?\d+n?$/,Uo=/^-?\d+$/,Jr=/^-?\d+(?:\.\d+)?$/,Ro=/^(?:true|false)$/i,Oo=/^null$/i;var No=/^undefined$/i;var jo=/^[^A-Z]*$/,Ao=/^[^a-z]*$/,og=/^[0-9a-fA-F]*$/;function Mt(r,e){return new RegExp(`^[A-Za-z0-9+/]{${r}}${e}$`)}function Gt(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var ag=/^[0-9a-fA-F]{32}$/,sg=Mt(22,"=="),cg=Gt(22),ug=/^[0-9a-fA-F]{40}$/,lg=Mt(27,"="),dg=Gt(27),pg=/^[0-9a-fA-F]{64}$/,mg=Mt(43,"="),fg=Gt(43),gg=/^[0-9a-fA-F]{96}$/,hg=Mt(64,""),vg=Gt(64),bg=/^[0-9a-fA-F]{128}$/,yg=Mt(86,"=="),xg=Gt(86);var U=d("$ZodCheck",(r,e)=>{var n;r._zod??(r._zod={}),r._zod.def=e,(n=r._zod).onattach??(n.onattach=[])}),Wl={number:"number",bigint:"bigint",object:"date"},Kr=d("$ZodCheckLessThan",(r,e)=>{U.init(r,e);let n=Wl[typeof e.value];r._zod.onattach.push(i=>{let t=i._zod.bag,o=(e.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?t.maximum=e.value:t.exclusiveMaximum=e.value)}),r._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),qr=d("$ZodCheckGreaterThan",(r,e)=>{U.init(r,e);let n=Wl[typeof e.value];r._zod.onattach.push(i=>{let t=i._zod.bag,o=(e.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?t.minimum=e.value:t.exclusiveMinimum=e.value)}),r._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),Co=d("$ZodCheckMultipleOf",(r,e)=>{U.init(r,e),r._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=e.value)}),r._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):qi(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:r,continue:!e.abort})}}),Lo=d("$ZodCheckNumberFormat",(r,e)=>{U.init(r,e),e.format=e.format||"float64";let n=e.format?.includes("int"),i=n?"int":"number",[t,o]=to[e.format];r._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=t,s.maximum=o,n&&(s.pattern=Uo)}),r._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:s,inst:r});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:i,inclusive:!0,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:i,inclusive:!0,continue:!e.abort});return}}s<t&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:t,inclusive:!0,inst:r,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:r,continue:!e.abort})}}),Zo=d("$ZodCheckBigIntFormat",(r,e)=>{U.init(r,e);let[n,i]=ro[e.format];r._zod.onattach.push(t=>{let o=t._zod.bag;o.format=e.format,o.minimum=n,o.maximum=i}),r._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:r,continue:!e.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:r,continue:!e.abort})}}),Fo=d("$ZodCheckMaxSize",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.size!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<t&&(i._zod.bag.maximum=e.maximum)}),r._zod.check=i=>{let t=i.value;t.size<=e.maximum||i.issues.push({origin:At(t),code:"too_big",maximum:e.maximum,inclusive:!0,input:t,inst:r,continue:!e.abort})}}),Mo=d("$ZodCheckMinSize",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.size!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>t&&(i._zod.bag.minimum=e.minimum)}),r._zod.check=i=>{let t=i.value;t.size>=e.minimum||i.issues.push({origin:At(t),code:"too_small",minimum:e.minimum,inclusive:!0,input:t,inst:r,continue:!e.abort})}}),Go=d("$ZodCheckSizeEquals",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.size!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=e.size,t.maximum=e.size,t.size=e.size}),r._zod.check=i=>{let t=i.value,o=t.size;if(o===e.size)return;let a=o>e.size;i.issues.push({origin:At(t),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:r,continue:!e.abort})}}),Bo=d("$ZodCheckMaxLength",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.length!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<t&&(i._zod.bag.maximum=e.maximum)}),r._zod.check=i=>{let t=i.value;if(t.length<=e.maximum)return;let a=Ct(t);i.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:t,inst:r,continue:!e.abort})}}),Wo=d("$ZodCheckMinLength",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.length!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>t&&(i._zod.bag.minimum=e.minimum)}),r._zod.check=i=>{let t=i.value;if(t.length>=e.minimum)return;let a=Ct(t);i.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:t,inst:r,continue:!e.abort})}}),Vo=d("$ZodCheckLengthEquals",(r,e)=>{var n;U.init(r,e),(n=r._zod.def).when??(n.when=i=>{let t=i.value;return!fe(t)&&t.length!==void 0}),r._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=e.length,t.maximum=e.length,t.length=e.length}),r._zod.check=i=>{let t=i.value,o=t.length;if(o===e.length)return;let a=Ct(t),s=o>e.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:r,continue:!e.abort})}}),He=d("$ZodCheckStringFormat",(r,e)=>{var n,i;U.init(r,e),r._zod.onattach.push(t=>{let o=t._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(n=r._zod).check??(n.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:e.format,input:t.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:r,continue:!e.abort})}):(i=r._zod).check??(i.check=()=>{})}),Jo=d("$ZodCheckRegex",(r,e)=>{He.init(r,e),r._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:r,continue:!e.abort})}}),Ko=d("$ZodCheckLowerCase",(r,e)=>{e.pattern??(e.pattern=jo),He.init(r,e)}),qo=d("$ZodCheckUpperCase",(r,e)=>{e.pattern??(e.pattern=Ao),He.init(r,e)}),Ho=d("$ZodCheckIncludes",(r,e)=>{U.init(r,e);let n=ee(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=i,r._zod.onattach.push(t=>{let o=t._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),r._zod.check=t=>{t.value.includes(e.includes,e.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:t.value,inst:r,continue:!e.abort})}}),Xo=d("$ZodCheckStartsWith",(r,e)=>{U.init(r,e);let n=new RegExp(`^${ee(e.prefix)}.*`);e.pattern??(e.pattern=n),r._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),r._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:r,continue:!e.abort})}}),Yo=d("$ZodCheckEndsWith",(r,e)=>{U.init(r,e);let n=new RegExp(`.*${ee(e.suffix)}$`);e.pattern??(e.pattern=n),r._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),r._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:r,continue:!e.abort})}});function Bl(r,e,n){r.issues.length&&e.issues.push(...J(n,r.issues))}var Qo=d("$ZodCheckProperty",(r,e)=>{U.init(r,e),r._zod.check=n=>{let i=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>Bl(t,n,e.property));Bl(i,n,e.property)}}),ea=d("$ZodCheckMimeType",(r,e)=>{U.init(r,e);let n=new Set(e.mime);r._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),r._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:r,continue:!e.abort})}}),ta=d("$ZodCheckOverwrite",(r,e)=>{U.init(r,e),r._zod.check=n=>{n.value=e.tx(n.value)}});var Bt=class{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}let i=e.split(`
|
|
3
3
|
`).filter(a=>a),t=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,n=this?.args,t=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...n,t.join(`
|
|
4
|
-
`))}};var ra={major:4,minor:4,patch:3};var w=d("$ZodType",(r,e)=>{var n;r??(r={}),r._zod.def=e,r._zod.bag=r._zod.bag||{},r._zod.version=ra;let i=[...r._zod.def.checks??[]];r._zod.traits.has("$ZodCheck")&&i.unshift(r);for(let t of i)for(let o of t._zod.onattach)o(r);if(i.length===0)(n=r._zod).deferred??(n.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let t=(a,s,u)=>{let c=ve(a),l;for(let m of s){if(m._zod.def.when){if(no(a)||!m._zod.def.when(a))continue}else if(c)continue;let g=a.issues.length,f=m._zod.check(a);if(f instanceof Promise&&u?.async===!1)throw new re;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==g&&(c||(c=ve(a,g)))});else{if(a.issues.length===g)continue;c||(c=ve(a,g))}}return l?l.then(()=>a):a},o=(a,s,u)=>{if(ve(a))return a.aborted=!0,a;let c=t(s,i,u);if(c instanceof Promise){if(u.async===!1)throw new re;return c.then(l=>r._zod.parse(l,u))}return r._zod.parse(c,u)};r._zod.run=(a,s)=>{if(s.skipChecks)return r._zod.parse(a,s);if(s.direction==="backward"){let c=r._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(l=>o(l,a,s)):o(c,a,s)}let u=r._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new re;return u.then(c=>t(c,i,s))}return t(u,i,s)}}I(r,"~standard",()=>({validate:t=>{try{let o=ao(r,t);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return so(r,t).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ue=d("$ZodString",(r,e)=>{w.init(r,e),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??To(r._zod.bag),r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:r}),n}}),E=d("$ZodStringFormat",(r,e)=>{He.init(r,e),Ue.init(r,e)}),ia=d("$ZodGUID",(r,e)=>{e.pattern??(e.pattern=ho),E.init(r,e)}),oa=d("$ZodUUID",(r,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=De(i))}else e.pattern??(e.pattern=De());E.init(r,e)}),aa=d("$ZodEmail",(r,e)=>{e.pattern??(e.pattern=vo),E.init(r,e)}),sa=d("$ZodURL",(r,e)=>{E.init(r,e),r._zod.check=n=>{try{let i=n.value.trim();if(!e.normalize&&e.protocol?.source===So.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:r,continue:!e.abort});return}let t=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:r,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:r,continue:!e.abort})),e.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:r,continue:!e.abort})}}}),ca=d("$ZodEmoji",(r,e)=>{e.pattern??(e.pattern=bo()),E.init(r,e)}),ua=d("$ZodNanoID",(r,e)=>{e.pattern??(e.pattern=fo),E.init(r,e)}),la=d("$ZodCUID",(r,e)=>{e.pattern??(e.pattern=co),E.init(r,e)}),da=d("$ZodCUID2",(r,e)=>{e.pattern??(e.pattern=uo),E.init(r,e)}),pa=d("$ZodULID",(r,e)=>{e.pattern??(e.pattern=lo),E.init(r,e)}),ma=d("$ZodXID",(r,e)=>{e.pattern??(e.pattern=po),E.init(r,e)}),fa=d("$ZodKSUID",(r,e)=>{e.pattern??(e.pattern=mo),E.init(r,e)}),ga=d("$ZodISODateTime",(r,e)=>{e.pattern??(e.pattern=Eo(e)),E.init(r,e)}),ha=d("$ZodISODate",(r,e)=>{e.pattern??(e.pattern=Po),E.init(r,e)}),va=d("$ZodISOTime",(r,e)=>{e.pattern??(e.pattern=zo(e)),E.init(r,e)}),ba=d("$ZodISODuration",(r,e)=>{e.pattern??(e.pattern=go),E.init(r,e)}),ya=d("$ZodIPv4",(r,e)=>{e.pattern??(e.pattern=yo),E.init(r,e),r._zod.bag.format="ipv4"}),xa=d("$ZodIPv6",(r,e)=>{e.pattern??(e.pattern=xo),E.init(r,e),r._zod.bag.format="ipv6",r._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:r,continue:!e.abort})}}}),$a=d("$ZodMAC",(r,e)=>{e.pattern??(e.pattern=$o(e.delimiter)),E.init(r,e),r._zod.bag.format="mac"}),ka=d("$ZodCIDRv4",(r,e)=>{e.pattern??(e.pattern=ko),E.init(r,e)}),_a=d("$ZodCIDRv6",(r,e)=>{e.pattern??(e.pattern=_o),E.init(r,e),r._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[t,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:r,continue:!e.abort})}}});function wa(r){if(r==="")return!0;if(/\s/.test(r)||r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var Sa=d("$ZodBase64",(r,e)=>{e.pattern??(e.pattern=wo),E.init(r,e),r._zod.bag.contentEncoding="base64",r._zod.check=n=>{wa(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:r,continue:!e.abort})}});function sd(r){if(!Vr.test(r))return!1;let e=r.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return wa(n)}var Ia=d("$ZodBase64URL",(r,e)=>{e.pattern??(e.pattern=Vr),E.init(r,e),r._zod.bag.contentEncoding="base64url",r._zod.check=n=>{sd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:r,continue:!e.abort})}}),Pa=d("$ZodE164",(r,e)=>{e.pattern??(e.pattern=Io),E.init(r,e)});function cd(r,e=null){try{let n=r.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||e&&(!("alg"in t)||t.alg!==e))}catch{return!1}}var za=d("$ZodJWT",(r,e)=>{E.init(r,e),r._zod.check=n=>{cd(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:r,continue:!e.abort})}}),Ea=d("$ZodCustomStringFormat",(r,e)=>{E.init(r,e),r._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:r,continue:!e.abort})}}),en=d("$ZodNumber",(r,e)=>{w.init(r,e),r._zod.pattern=r._zod.bag.pattern??Jr,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let o=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:r,...o?{received:o}:{}}),n}}),Ta=d("$ZodNumberFormat",(r,e)=>{Lo.init(r,e),en.init(r,e)}),Wt=d("$ZodBoolean",(r,e)=>{w.init(r,e),r._zod.pattern=Ro,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:r}),n}}),tn=d("$ZodBigInt",(r,e)=>{w.init(r,e),r._zod.pattern=Do,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:r}),n}}),Da=d("$ZodBigIntFormat",(r,e)=>{Zo.init(r,e),tn.init(r,e)}),Ua=d("$ZodSymbol",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:r}),n}}),Ra=d("$ZodUndefined",(r,e)=>{w.init(r,e),r._zod.pattern=No,r._zod.values=new Set([void 0]),r._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:r}),n}}),Oa=d("$ZodNull",(r,e)=>{w.init(r,e),r._zod.pattern=Oo,r._zod.values=new Set([null]),r._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:r}),n}}),Na=d("$ZodAny",(r,e)=>{w.init(r,e),r._zod.parse=n=>n}),ja=d("$ZodUnknown",(r,e)=>{w.init(r,e),r._zod.parse=n=>n}),Aa=d("$ZodNever",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:r}),n)}),Ca=d("$ZodVoid",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:r}),n}}),La=d("$ZodDate",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...o?{received:"Invalid Date"}:{},inst:r}),n}});function Jl(r,e,n){r.issues.length&&e.issues.push(...J(n,r.issues)),e.value[n]=r.value}var Za=d("$ZodArray",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:r}),n;n.value=Array(t.length);let o=[];for(let a=0;a<t.length;a++){let s=t[a],u=e.element._zod.run({value:s,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Jl(c,n,a))):Jl(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Qr(r,e,n,i,t,o){let a=n in i;if(r.issues.length){if(t&&o&&!a)return;e.issues.push(...J(n,r.issues))}if(!a&&!t){r.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}r.value===void 0?a&&(e.value[n]=void 0):e.value[n]=r.value}function ud(r){let e=Object.keys(r.shape);for(let i of e)if(!r.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=eo(r.shape);return{...r,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function ld(r,e,n,i,t,o){let a=[],s=t.keySet,u=t.catchall._zod,c=u.def.type,l=u.optin==="optional",m=u.optout==="optional";for(let g in e){if(g==="__proto__"||s.has(g))continue;if(c==="never"){a.push(g);continue}let f=u.run({value:e[g],issues:[]},i);f instanceof Promise?r.push(f.then(x=>Qr(x,n,g,e,l,m))):Qr(f,n,g,e,l,m)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),r.length?Promise.all(r).then(()=>n):n}var dd=d("$ZodObject",(r,e)=>{if(w.init(r,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...s};return Object.defineProperty(e,"shape",{value:u}),u}})}let i=Be(()=>ud(e));I(r._zod,"propValues",()=>{let s=e.shape,u={};for(let c in s){let l=s[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(let m of l.values)u[c].add(m)}}return u});let t=Te,o=e.catchall,a;r._zod.parse=(s,u)=>{a??(a=i.value);let c=s.value;if(!t(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:r}),s;s.value={};let l=[],m=a.shape;for(let g of a.keys){let f=m[g],x=f._zod.optin==="optional",_=f._zod.optout==="optional",P=f._zod.run({value:c[g],issues:[]},u);P instanceof Promise?l.push(P.then(Tt=>Qr(Tt,s,g,c,x,_))):Qr(P,s,g,c,x,_)}return o?ld(l,c,s,u,i.value,r):l.length?Promise.all(l).then(()=>s):s}}),Fa=d("$ZodObjectJIT",(r,e)=>{dd.init(r,e);let n=r._zod.parse,i=Be(()=>ud(e)),t=g=>{let f=new Bt(["shape","payload","ctx"]),x=i.value,_=C=>{let O=Or(C);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};f.write("const input = payload.value;");let P=Object.create(null),Tt=0;for(let C of x.keys)P[C]=`key_${Tt++}`;f.write("const newResult = {};");for(let C of x.keys){let O=P[C],L=Or(C),Ul=g[C],Rl=Ul?._zod?.optin==="optional",cf=Ul?._zod?.optout==="optional";f.write(`const ${O} = ${_(C)};`),Rl&&cf?f.write(`
|
|
4
|
+
`))}};var ra={major:4,minor:4,patch:3};var w=d("$ZodType",(r,e)=>{var n;r??(r={}),r._zod.def=e,r._zod.bag=r._zod.bag||{},r._zod.version=ra;let i=[...r._zod.def.checks??[]];r._zod.traits.has("$ZodCheck")&&i.unshift(r);for(let t of i)for(let o of t._zod.onattach)o(r);if(i.length===0)(n=r._zod).deferred??(n.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let t=(a,s,u)=>{let c=ve(a),l;for(let m of s){if(m._zod.def.when){if(no(a)||!m._zod.def.when(a))continue}else if(c)continue;let g=a.issues.length,f=m._zod.check(a);if(f instanceof Promise&&u?.async===!1)throw new re;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==g&&(c||(c=ve(a,g)))});else{if(a.issues.length===g)continue;c||(c=ve(a,g))}}return l?l.then(()=>a):a},o=(a,s,u)=>{if(ve(a))return a.aborted=!0,a;let c=t(s,i,u);if(c instanceof Promise){if(u.async===!1)throw new re;return c.then(l=>r._zod.parse(l,u))}return r._zod.parse(c,u)};r._zod.run=(a,s)=>{if(s.skipChecks)return r._zod.parse(a,s);if(s.direction==="backward"){let c=r._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(l=>o(l,a,s)):o(c,a,s)}let u=r._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new re;return u.then(c=>t(c,i,s))}return t(u,i,s)}}I(r,"~standard",()=>({validate:t=>{try{let o=ao(r,t);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return so(r,t).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ue=d("$ZodString",(r,e)=>{w.init(r,e),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??To(r._zod.bag),r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:r}),n}}),T=d("$ZodStringFormat",(r,e)=>{He.init(r,e),Ue.init(r,e)}),ia=d("$ZodGUID",(r,e)=>{e.pattern??(e.pattern=ho),T.init(r,e)}),oa=d("$ZodUUID",(r,e)=>{if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=De(i))}else e.pattern??(e.pattern=De());T.init(r,e)}),aa=d("$ZodEmail",(r,e)=>{e.pattern??(e.pattern=vo),T.init(r,e)}),sa=d("$ZodURL",(r,e)=>{T.init(r,e),r._zod.check=n=>{try{let i=n.value.trim();if(!e.normalize&&e.protocol?.source===So.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:r,continue:!e.abort});return}let t=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:r,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:r,continue:!e.abort})),e.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:r,continue:!e.abort})}}}),ca=d("$ZodEmoji",(r,e)=>{e.pattern??(e.pattern=bo()),T.init(r,e)}),ua=d("$ZodNanoID",(r,e)=>{e.pattern??(e.pattern=fo),T.init(r,e)}),la=d("$ZodCUID",(r,e)=>{e.pattern??(e.pattern=co),T.init(r,e)}),da=d("$ZodCUID2",(r,e)=>{e.pattern??(e.pattern=uo),T.init(r,e)}),pa=d("$ZodULID",(r,e)=>{e.pattern??(e.pattern=lo),T.init(r,e)}),ma=d("$ZodXID",(r,e)=>{e.pattern??(e.pattern=po),T.init(r,e)}),fa=d("$ZodKSUID",(r,e)=>{e.pattern??(e.pattern=mo),T.init(r,e)}),ga=d("$ZodISODateTime",(r,e)=>{e.pattern??(e.pattern=Eo(e)),T.init(r,e)}),ha=d("$ZodISODate",(r,e)=>{e.pattern??(e.pattern=Po),T.init(r,e)}),va=d("$ZodISOTime",(r,e)=>{e.pattern??(e.pattern=zo(e)),T.init(r,e)}),ba=d("$ZodISODuration",(r,e)=>{e.pattern??(e.pattern=go),T.init(r,e)}),ya=d("$ZodIPv4",(r,e)=>{e.pattern??(e.pattern=yo),T.init(r,e),r._zod.bag.format="ipv4"}),xa=d("$ZodIPv6",(r,e)=>{e.pattern??(e.pattern=xo),T.init(r,e),r._zod.bag.format="ipv6",r._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:r,continue:!e.abort})}}}),$a=d("$ZodMAC",(r,e)=>{e.pattern??(e.pattern=$o(e.delimiter)),T.init(r,e),r._zod.bag.format="mac"}),ka=d("$ZodCIDRv4",(r,e)=>{e.pattern??(e.pattern=ko),T.init(r,e)}),_a=d("$ZodCIDRv6",(r,e)=>{e.pattern??(e.pattern=_o),T.init(r,e),r._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[t,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:r,continue:!e.abort})}}});function wa(r){if(r==="")return!0;if(/\s/.test(r)||r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var Sa=d("$ZodBase64",(r,e)=>{e.pattern??(e.pattern=wo),T.init(r,e),r._zod.bag.contentEncoding="base64",r._zod.check=n=>{wa(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:r,continue:!e.abort})}});function sd(r){if(!Vr.test(r))return!1;let e=r.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return wa(n)}var Ia=d("$ZodBase64URL",(r,e)=>{e.pattern??(e.pattern=Vr),T.init(r,e),r._zod.bag.contentEncoding="base64url",r._zod.check=n=>{sd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:r,continue:!e.abort})}}),Pa=d("$ZodE164",(r,e)=>{e.pattern??(e.pattern=Io),T.init(r,e)});function cd(r,e=null){try{let n=r.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||e&&(!("alg"in t)||t.alg!==e))}catch{return!1}}var za=d("$ZodJWT",(r,e)=>{T.init(r,e),r._zod.check=n=>{cd(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:r,continue:!e.abort})}}),Ea=d("$ZodCustomStringFormat",(r,e)=>{T.init(r,e),r._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:r,continue:!e.abort})}}),en=d("$ZodNumber",(r,e)=>{w.init(r,e),r._zod.pattern=r._zod.bag.pattern??Jr,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let o=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:r,...o?{received:o}:{}}),n}}),Ta=d("$ZodNumberFormat",(r,e)=>{Lo.init(r,e),en.init(r,e)}),Wt=d("$ZodBoolean",(r,e)=>{w.init(r,e),r._zod.pattern=Ro,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:r}),n}}),tn=d("$ZodBigInt",(r,e)=>{w.init(r,e),r._zod.pattern=Do,r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:r}),n}}),Da=d("$ZodBigIntFormat",(r,e)=>{Zo.init(r,e),tn.init(r,e)}),Ua=d("$ZodSymbol",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:r}),n}}),Ra=d("$ZodUndefined",(r,e)=>{w.init(r,e),r._zod.pattern=No,r._zod.values=new Set([void 0]),r._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:r}),n}}),Oa=d("$ZodNull",(r,e)=>{w.init(r,e),r._zod.pattern=Oo,r._zod.values=new Set([null]),r._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:r}),n}}),Na=d("$ZodAny",(r,e)=>{w.init(r,e),r._zod.parse=n=>n}),ja=d("$ZodUnknown",(r,e)=>{w.init(r,e),r._zod.parse=n=>n}),Aa=d("$ZodNever",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:r}),n)}),Ca=d("$ZodVoid",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:r}),n}}),La=d("$ZodDate",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...o?{received:"Invalid Date"}:{},inst:r}),n}});function Jl(r,e,n){r.issues.length&&e.issues.push(...J(n,r.issues)),e.value[n]=r.value}var Za=d("$ZodArray",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:r}),n;n.value=Array(t.length);let o=[];for(let a=0;a<t.length;a++){let s=t[a],u=e.element._zod.run({value:s,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Jl(c,n,a))):Jl(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Qr(r,e,n,i,t,o){let a=n in i;if(r.issues.length){if(t&&o&&!a)return;e.issues.push(...J(n,r.issues))}if(!a&&!t){r.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}r.value===void 0?a&&(e.value[n]=void 0):e.value[n]=r.value}function ud(r){let e=Object.keys(r.shape);for(let i of e)if(!r.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=eo(r.shape);return{...r,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function ld(r,e,n,i,t,o){let a=[],s=t.keySet,u=t.catchall._zod,c=u.def.type,l=u.optin==="optional",m=u.optout==="optional";for(let g in e){if(g==="__proto__"||s.has(g))continue;if(c==="never"){a.push(g);continue}let f=u.run({value:e[g],issues:[]},i);f instanceof Promise?r.push(f.then(x=>Qr(x,n,g,e,l,m))):Qr(f,n,g,e,l,m)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),r.length?Promise.all(r).then(()=>n):n}var dd=d("$ZodObject",(r,e)=>{if(w.init(r,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...s};return Object.defineProperty(e,"shape",{value:u}),u}})}let i=Be(()=>ud(e));I(r._zod,"propValues",()=>{let s=e.shape,u={};for(let c in s){let l=s[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(let m of l.values)u[c].add(m)}}return u});let t=Te,o=e.catchall,a;r._zod.parse=(s,u)=>{a??(a=i.value);let c=s.value;if(!t(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:r}),s;s.value={};let l=[],m=a.shape;for(let g of a.keys){let f=m[g],x=f._zod.optin==="optional",_=f._zod.optout==="optional",P=f._zod.run({value:c[g],issues:[]},u);P instanceof Promise?l.push(P.then(Tt=>Qr(Tt,s,g,c,x,_))):Qr(P,s,g,c,x,_)}return o?ld(l,c,s,u,i.value,r):l.length?Promise.all(l).then(()=>s):s}}),Fa=d("$ZodObjectJIT",(r,e)=>{dd.init(r,e);let n=r._zod.parse,i=Be(()=>ud(e)),t=g=>{let f=new Bt(["shape","payload","ctx"]),x=i.value,_=C=>{let O=Or(C);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};f.write("const input = payload.value;");let P=Object.create(null),Tt=0;for(let C of x.keys)P[C]=`key_${Tt++}`;f.write("const newResult = {};");for(let C of x.keys){let O=P[C],L=Or(C),Ul=g[C],Rl=Ul?._zod?.optin==="optional",cf=Ul?._zod?.optout==="optional";f.write(`const ${O} = ${_(C)};`),Rl&&cf?f.write(`
|
|
5
5
|
if (${O}.issues.length) {
|
|
6
6
|
if (${L} in input) {
|
|
7
7
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
|
|
63
63
|
`)}f.write("payload.value = newResult;"),f.write("return payload;");let F=f.compile();return(C,O)=>F(g,C,O)},o,a=Te,s=!Ee.jitless,c=s&&Xi.value,l=e.catchall,m;r._zod.parse=(g,f)=>{m??(m=i.value);let x=g.value;return a(x)?s&&c&&f?.async===!1&&f.jitless!==!0?(o||(o=t(e.shape)),g=o(g,f),l?ld([],x,g,f,m,r):g):n(g,f):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:r}),g)}});function Kl(r,e,n,i){for(let o of r)if(o.issues.length===0)return e.value=o.value,e;let t=r.filter(o=>!ve(o));return t.length===1?(e.value=t[0].value,t[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:r.map(o=>o.issues.map(a=>B(a,i,N())))}),e)}var Vt=d("$ZodUnion",(r,e)=>{w.init(r,e),I(r._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),I(r._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),I(r._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),I(r._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(t=>t._zod.pattern);return new RegExp(`^(${i.map(t=>Nt(t.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(i,t)=>{if(n)return n(i,t);let o=!1,a=[];for(let s of e.options){let u=s._zod.run({value:i.value,issues:[]},t);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(s=>Kl(s,i,r,t)):Kl(a,i,r,t)}});function ql(r,e,n,i){let t=r.filter(o=>o.issues.length===0);return t.length===1?(e.value=t[0].value,e):(t.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:r.map(o=>o.issues.map(a=>B(a,i,N())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}var Ma=d("$ZodXor",(r,e)=>{Vt.init(r,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(i,t)=>{if(n)return n(i,t);let o=!1,a=[];for(let s of e.options){let u=s._zod.run({value:i.value,issues:[]},t);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(s=>ql(s,i,r,t)):ql(a,i,r,t)}}),Ga=d("$ZodDiscriminatedUnion",(r,e)=>{e.inclusive=!1,Vt.init(r,e);let n=r._zod.parse;I(r._zod,"propValues",()=>{let t={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,u]of Object.entries(a)){t[s]||(t[s]=new Set);for(let c of u)t[s].add(c)}}return t});let i=Be(()=>{let t=e.options,o=new Map;for(let a of t){let s=a._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let u of s){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});r._zod.parse=(t,o)=>{let a=t.value;if(!Te(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:r}),t;let s=i.value.get(a?.[e.discriminator]);return s?s._zod.run(t,o):e.unionFallback||o.direction==="backward"?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(i.value.keys()),input:a,path:[e.discriminator],inst:r}),t)}}),Ba=d("$ZodIntersection",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value,o=e.left._zod.run({value:t,issues:[]},i),a=e.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,c])=>Hl(n,u,c)):Hl(n,o,a)}});function na(r,e){if(r===e)return{valid:!0,data:r};if(r instanceof Date&&e instanceof Date&&+r==+e)return{valid:!0,data:r};if(he(r)&&he(e)){let n=Object.keys(e),i=Object.keys(r).filter(o=>n.indexOf(o)!==-1),t={...r,...e};for(let o of i){let a=na(r[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};t[o]=a.data}return{valid:!0,data:t}}if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<r.length;i++){let t=r[i],o=e[i],a=na(t,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Hl(r,e,n){let i=new Map,t;for(let s of e.issues)if(s.code==="unrecognized_keys"){t??(t=s);for(let u of s.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else r.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let u of s.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else r.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&t&&r.issues.push({...t,keys:o}),ve(r))return r;let a=na(e.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return r.value=a.data,r}var rn=d("$ZodTuple",(r,e)=>{w.init(r,e);let n=e.items;r._zod.parse=(i,t)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:r,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=Xl(n,"optin"),u=Xl(n,"optout");if(!e.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:r,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:r,origin:"array"})}let c=new Array(n.length);for(let l=0;l<n.length;l++){let m=n[l]._zod.run({value:o[l],issues:[]},t);m instanceof Promise?a.push(m.then(g=>{c[l]=g})):c[l]=m}if(e.rest){let l=n.length-1,m=o.slice(n.length);for(let g of m){l++;let f=e.rest._zod.run({value:g,issues:[]},t);f instanceof Promise?a.push(f.then(x=>Yl(x,i,l))):Yl(f,i,l)}}return a.length?Promise.all(a).then(()=>Ql(c,i,n,o,u)):Ql(c,i,n,o,u)}});function Xl(r,e){for(let n=r.length-1;n>=0;n--)if(r[n]._zod[e]!=="optional")return n+1;return 0}function Yl(r,e,n){r.issues.length&&e.issues.push(...J(n,r.issues)),e.value[n]=r.value}function Ql(r,e,n,i,t){for(let o=0;o<n.length;o++){let a=r[o],s=o<i.length;if(a.issues.length){if(!s&&o>=t){e.value.length=o;break}e.issues.push(...J(o,a.issues))}e.value[o]=a.value}for(let o=e.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}var Wa=d("$ZodRecord",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;if(!he(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:r}),n;let o=[],a=e.keyType._zod.values;if(a){n.value={};let s=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let l=e.keyType._zod.run({value:c,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>B(f,i,N())),input:c,path:[c],inst:r});continue}let m=l.value,g=e.valueType._zod.run({value:t[c],issues:[]},i);g instanceof Promise?o.push(g.then(f=>{f.issues.length&&n.issues.push(...J(c,f.issues)),n.value[m]=f.value})):(g.issues.length&&n.issues.push(...J(c,g.issues)),n.value[m]=g.value)}let u;for(let c in t)s.has(c)||(u=u??[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:r,keys:u})}else{n.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let u=e.keyType._zod.run({value:s,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Jr.test(s)&&u.issues.length){let m=e.keyType._zod.run({value:Number(s),issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){e.mode==="loose"?n.value[s]=t[s]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>B(m,i,N())),input:s,path:[s],inst:r});continue}let l=e.valueType._zod.run({value:t[s],issues:[]},i);l instanceof Promise?o.push(l.then(m=>{m.issues.length&&n.issues.push(...J(s,m.issues)),n.value[u.value]=m.value})):(l.issues.length&&n.issues.push(...J(s,l.issues)),n.value[u.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Va=d("$ZodMap",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:r}),n;let o=[];n.value=new Map;for(let[a,s]of t){let u=e.keyType._zod.run({value:a,issues:[]},i),c=e.valueType._zod.run({value:s,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([l,m])=>{ed(l,m,n,a,t,r,i)})):ed(u,c,n,a,t,r,i)}return o.length?Promise.all(o).then(()=>n):n}});function ed(r,e,n,i,t,o,a){r.issues.length&&(jt.has(typeof i)?n.issues.push(...J(i,r.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:r.issues.map(s=>B(s,a,N()))})),e.issues.length&&(jt.has(typeof i)?n.issues.push(...J(i,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:e.issues.map(s=>B(s,a,N()))})),n.value.set(r.value,e.value)}var Ja=d("$ZodSet",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:r,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of t){let s=e.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(u=>td(u,n))):td(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function td(r,e){r.issues.length&&e.issues.push(...r.issues),e.value.add(r.value)}var Ka=d("$ZodEnum",(r,e)=>{w.init(r,e);let n=Ot(e.entries),i=new Set(n);r._zod.values=i,r._zod.pattern=new RegExp(`^(${n.filter(t=>jt.has(typeof t)).map(t=>typeof t=="string"?ee(t):t.toString()).join("|")})$`),r._zod.parse=(t,o)=>{let a=t.value;return i.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:r}),t}}),qa=d("$ZodLiteral",(r,e)=>{if(w.init(r,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(e.values);r._zod.values=n,r._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?ee(i):i?ee(i.toString()):String(i)).join("|")})$`),r._zod.parse=(i,t)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:r}),i}}),Ha=d("$ZodFile",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:r}),n}}),Xa=d("$ZodTransform",(r,e)=>{w.init(r,e),r._zod.optin="optional",r._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(r.constructor.name);let t=e.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(n.value=a,n.fallback=!0,n));if(t instanceof Promise)throw new re;return n.value=t,n.fallback=!0,n}});function rd(r,e){return e===void 0&&(r.issues.length||r.fallback)?{issues:[],value:void 0}:r}var nn=d("$ZodOptional",(r,e)=>{w.init(r,e),r._zod.optin="optional",r._zod.optout="optional",I(r._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),I(r._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Nt(n.source)})?$`):void 0}),r._zod.parse=(n,i)=>{if(e.innerType._zod.optin==="optional"){let t=n.value,o=e.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>rd(a,t)):rd(o,t)}return n.value===void 0?n:e.innerType._zod.run(n,i)}}),Ya=d("$ZodExactOptional",(r,e)=>{nn.init(r,e),I(r._zod,"values",()=>e.innerType._zod.values),I(r._zod,"pattern",()=>e.innerType._zod.pattern),r._zod.parse=(n,i)=>e.innerType._zod.run(n,i)}),Qa=d("$ZodNullable",(r,e)=>{w.init(r,e),I(r._zod,"optin",()=>e.innerType._zod.optin),I(r._zod,"optout",()=>e.innerType._zod.optout),I(r._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Nt(n.source)}|null)$`):void 0}),I(r._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),r._zod.parse=(n,i)=>n.value===null?n:e.innerType._zod.run(n,i)}),es=d("$ZodDefault",(r,e)=>{w.init(r,e),r._zod.optin="optional",I(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);if(n.value===void 0)return n.value=e.defaultValue,n;let t=e.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>nd(o,e)):nd(t,e)}});function nd(r,e){return r.value===void 0&&(r.value=e.defaultValue),r}var ts=d("$ZodPrefault",(r,e)=>{w.init(r,e),r._zod.optin="optional",I(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,i))}),rs=d("$ZodNonOptional",(r,e)=>{w.init(r,e),I(r._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),r._zod.parse=(n,i)=>{let t=e.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>id(o,r)):id(t,r)}});function id(r,e){return!r.issues.length&&r.value===void 0&&r.issues.push({code:"invalid_type",expected:"nonoptional",input:r.value,inst:e}),r}var ns=d("$ZodSuccess",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me("ZodSuccess");let t=e.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),is=d("$ZodCatch",(r,e)=>{w.init(r,e),r._zod.optin="optional",I(r._zod,"optout",()=>e.innerType._zod.optout),I(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let t=e.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(a=>B(a,i,N()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=t.value,t.issues.length&&(n.value=e.catchValue({...n,error:{issues:t.issues.map(o=>B(o,i,N()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),os=d("$ZodNaN",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:r,expected:"nan",code:"invalid_type"}),n)}),on=d("$ZodPipe",(r,e)=>{w.init(r,e),I(r._zod,"values",()=>e.in._zod.values),I(r._zod,"optin",()=>e.in._zod.optin),I(r._zod,"optout",()=>e.out._zod.optout),I(r._zod,"propValues",()=>e.in._zod.propValues),r._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Hr(a,e.in,i)):Hr(o,e.in,i)}let t=e.in._zod.run(n,i);return t instanceof Promise?t.then(o=>Hr(o,e.out,i)):Hr(t,e.out,i)}});function Hr(r,e,n){return r.issues.length?(r.aborted=!0,r):e._zod.run({value:r.value,issues:r.issues,fallback:r.fallback},n)}var Jt=d("$ZodCodec",(r,e)=>{w.init(r,e),I(r._zod,"values",()=>e.in._zod.values),I(r._zod,"optin",()=>e.in._zod.optin),I(r._zod,"optout",()=>e.out._zod.optout),I(r._zod,"propValues",()=>e.in._zod.propValues),r._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(n,i);return o instanceof Promise?o.then(a=>Xr(a,e,i)):Xr(o,e,i)}else{let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Xr(a,e,i)):Xr(o,e,i)}}});function Xr(r,e,n){if(r.issues.length)return r.aborted=!0,r;if((n.direction||"forward")==="forward"){let t=e.transform(r.value,r);return t instanceof Promise?t.then(o=>Yr(r,o,e.out,n)):Yr(r,t,e.out,n)}else{let t=e.reverseTransform(r.value,r);return t instanceof Promise?t.then(o=>Yr(r,o,e.in,n)):Yr(r,t,e.in,n)}}function Yr(r,e,n,i){return r.issues.length?(r.aborted=!0,r):n._zod.run({value:e,issues:r.issues},i)}var as=d("$ZodPreprocess",(r,e)=>{on.init(r,e)}),ss=d("$ZodReadonly",(r,e)=>{w.init(r,e),I(r._zod,"propValues",()=>e.innerType._zod.propValues),I(r._zod,"values",()=>e.innerType._zod.values),I(r._zod,"optin",()=>e.innerType?._zod?.optin),I(r._zod,"optout",()=>e.innerType?._zod?.optout),r._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let t=e.innerType._zod.run(n,i);return t instanceof Promise?t.then(od):od(t)}});function od(r){return r.value=Object.freeze(r.value),r}var cs=d("$ZodTemplateLiteral",(r,e)=>{w.init(r,e);let n=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,a))}else if(i===null||Qi.has(typeof i))n.push(ee(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);r._zod.pattern=new RegExp(`^${n.join("")}$`),r._zod.parse=(i,t)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:r,expected:"string",code:"invalid_type"}),i):(r._zod.pattern.lastIndex=0,r._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:r,code:"invalid_format",format:e.format??"template_literal",pattern:r._zod.pattern.source}),i)}),us=d("$ZodFunction",(r,e)=>(w.init(r,e),r._def=e,r._zod.def=e,r.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let t=r._def.input?jr(r._def.input,i):i,o=Reflect.apply(n,this,t);return r._def.output?jr(r._def.output,o):o}},r.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let t=r._def.input?await Ar(r._def.input,i):i,o=await Reflect.apply(n,this,t);return r._def.output?await Ar(r._def.output,o):o}},r._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:r}),n):(r._def.output&&r._def.output._zod.def.type==="promise"?n.value=r.implementAsync(n.value):n.value=r.implement(n.value),n),r.input=(...n)=>{let i=r.constructor;return Array.isArray(n[0])?new i({type:"function",input:new rn({type:"tuple",items:n[0],rest:n[1]}),output:r._def.output}):new i({type:"function",input:n[0],output:r._def.output})},r.output=n=>{let i=r.constructor;return new i({type:"function",input:r._def.input,output:n})},r)),ls=d("$ZodPromise",(r,e)=>{w.init(r,e),r._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>e.innerType._zod.run({value:t,issues:[]},i))}),ds=d("$ZodLazy",(r,e)=>{w.init(r,e),I(r._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),I(r._zod,"pattern",()=>r._zod.innerType?._zod?.pattern),I(r._zod,"propValues",()=>r._zod.innerType?._zod?.propValues),I(r._zod,"optin",()=>r._zod.innerType?._zod?.optin??void 0),I(r._zod,"optout",()=>r._zod.innerType?._zod?.optout??void 0),r._zod.parse=(n,i)=>r._zod.innerType._zod.run(n,i)}),ps=d("$ZodCustom",(r,e)=>{U.init(r,e),w.init(r,e),r._zod.parse=(n,i)=>n,r._zod.check=n=>{let i=n.value,t=e.fn(i);if(t instanceof Promise)return t.then(o=>ad(o,n,i,r));ad(t,n,i,r)}});function ad(r,e,n,i){if(!r){let t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),e.issues.push(We(t))}}var qt={};te(qt,{ar:()=>pd,az:()=>md,be:()=>gd,bg:()=>hd,ca:()=>vd,cs:()=>bd,da:()=>yd,de:()=>xd,el:()=>$d,en:()=>an,eo:()=>kd,es:()=>_d,fa:()=>wd,fi:()=>Sd,fr:()=>Id,frCA:()=>Pd,he:()=>zd,hr:()=>Ed,hu:()=>Td,hy:()=>Ud,id:()=>Rd,is:()=>Od,it:()=>Nd,ja:()=>jd,ka:()=>Ad,kh:()=>Cd,km:()=>sn,ko:()=>Ld,lt:()=>Fd,mk:()=>Md,ms:()=>Gd,nl:()=>Bd,no:()=>Wd,ota:()=>Vd,pl:()=>Kd,ps:()=>Jd,pt:()=>qd,ro:()=>Hd,ru:()=>Yd,sl:()=>Qd,sv:()=>ep,ta:()=>tp,th:()=>rp,tr:()=>np,ua:()=>ip,uk:()=>cn,ur:()=>op,uz:()=>ap,vi:()=>sp,yo:()=>lp,zhCN:()=>cp,zhTW:()=>up});var kg=()=>{let r={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(t){return r[t]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${h(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${t.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${p(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function pd(){return{localeError:kg()}}var _g=()=>{let r={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(t){return r[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${t.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${h(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${o}${t.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function md(){return{localeError:_g()}}function fd(r,e,n,i){let t=Math.abs(r),o=t%10,a=t%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?n:i}var wg=()=>{let r={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(t){return r[t]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${h(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);if(a){let s=Number(t.maximum),u=fd(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${t.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);if(a){let s=Number(t.minimum),u=fd(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${t.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function gd(){return{localeError:wg()}}var Sg=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(t){return r[t]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${h(t.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${t.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${t.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u043E\u0432\u0435":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function hd(){return{localeError:Sg()}}var Ig=()=>{let r={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(t){return r[t]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${h(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${p(t.values," o ")}`;case"too_big":{let o=t.inclusive?"com a m\xE0xim":"menys de",a=e(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${o} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${o} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function vd(){return{localeError:Ig()}}var Pg=()=>{let r={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(t){return r[t]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${t.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${h(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${o}${t.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${o}${t.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${p(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function bd(){return{localeError:Pg()}}var zg=()=>{let r={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(t){return r[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig v\xE6rdi: forventede ${h(t.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin),s=i[t.origin]??t.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin),s=i[t.origin]??t.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${t.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${t.origin}`;default:return"Ugyldigt input"}}};function yd(){return{localeError:zg()}}var Eg=()=>{let r={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(t){return r[t]??null}let n={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${h(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${o}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${o}${t.maximum.toString()} ist`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${o}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${o}${t.minimum.toString()} ist`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function xd(){return{localeError:Eg()}}var Tg=()=>{let r={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(t){return r[t]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return typeof t.expected=="string"&&/^[A-Z]/.test(t.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${t.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return t.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${h(t.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${t.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${t.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??t.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${t.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${t.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${t.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${t.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${t.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function $d(){return{localeError:Tg()}}var Dg=()=>{let r={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(t){return r[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC 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"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${h(t.values[0])}`:`Invalid option: expected one of ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Too big: expected ${t.origin??"value"} to have ${o}${t.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Too small: expected ${t.origin} to have ${o}${t.minimum.toString()} ${a.unit}`:`Too small: expected ${t.origin} to be ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return t.options&&Array.isArray(t.options)&&t.options.length>0?`Invalid discriminator value. Expected ${t.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function an(){return{localeError:Dg()}}var Ug=()=>{let r={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(t){return r[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${t.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendi\u011Dis ${h(t.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${o}${t.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Tro malgranda: atendi\u011Dis ke ${t.origin} havu ${o}${t.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${t.origin} estu ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} \u015Dlosilo${t.keys.length>1?"j":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function kd(){return{localeError:Ug()}}var Rg=()=>{let r={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(t){return r[t]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${t.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${h(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin),s=i[t.origin]??t.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${t.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin),s=i[t.origin]??t.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${t.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[t.origin]??t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[t.origin]??t.origin}`;default:return"Entrada inv\xE1lida"}}};function _d(){return{localeError:Rg()}}var Og=()=>{let r={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(t){return r[t]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${h(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${p(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${p(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function wd(){return{localeError:Og()}}var Ng=()=>{let r={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(t){return r[t]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${h(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${p(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Sd(){return{localeError:Ng()}}var jg=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(t){return r[t]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : instanceof ${t.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${h(t.values[0])} attendu`:`Option invalide : une valeur parmi ${p(t.values,"|")} attendue`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Trop grand : ${i[t.origin]??"valeur"} doit ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[t.origin]??"valeur"} doit \xEAtre ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Trop petit : ${i[t.origin]??"valeur"} doit ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${i[t.origin]??"valeur"} doit \xEAtre ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${p(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Id(){return{localeError:jg()}}var Ag=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(t){return r[t]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : attendu instanceof ${t.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${h(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"\u2264":"<",a=e(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${o}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"\u2265":">",a=e(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${o}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${p(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Pd(){return{localeError:Ag()}}var Cg=()=>{let r={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?r[c]:void 0,i=c=>{let l=n(c);return l?l.label:c??r.unknown.label},t=c=>`\u05D4${i(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?e[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let l=c.expected,m=u[l??""]??i(l),g=v(c.input),f=u[g]??r[g]?.label??g;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${h(c.values[0])}`;let l=c.values.map(f=>h(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let m=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let l=a(c.origin),m=t(c.origin??"value");if(c.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let x=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(c.origin==="array"||c.origin==="set"){let x=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=c.inclusive?`${c.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let g=c.inclusive?"<=":"<",f=o(c.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${m} ${f} ${g}${c.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${f} ${g}${c.maximum.toString()}`}case"too_small":{let l=a(c.origin),m=t(c.origin??"value");if(c.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let x=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(c.origin==="array"||c.origin==="set"){let x=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let P=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let _=c.inclusive?`${c.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let g=c.inclusive?">=":">",f=o(c.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${m} ${f} ${g}${c.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${f} ${g}${c.minimum.toString()}`}case"invalid_format":{let l=c;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let m=s[l.format],g=m?.label??l.format,x=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${p(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function zd(){return{localeError:Cg()}}var Lg=()=>{let r={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(t){return r[t]??null}let n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${t.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return t.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${h(t.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin),s=i[t.origin]??t.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${t.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin),s=i[t.origin]??t.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${t.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${p(t.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function Ed(){return{localeError:Lg()}}var Zg=()=>{let r={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(t){return r[t]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${t.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${h(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${t.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${o}${t.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Td(){return{localeError:Zg()}}function Dd(r,e,n){return Math.abs(r)===1?e:n}function Xe(r){if(!r)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=r[r.length-1];return r+(e.includes(n)?"\u0576":"\u0568")}var Fg=()=>{let r={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(t){return r[t]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${t.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return t.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${h(t.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);if(a){let s=Number(t.maximum),u=Dd(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Xe(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${t.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Xe(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);if(a){let s=Number(t.minimum),u=Dd(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Xe(t.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${t.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Xe(t.origin)} \u056C\u056B\u0576\u056B ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??t.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${t.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${t.keys.length>1?"\u0576\u0565\u0580":""}. ${p(t.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Xe(t.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Xe(t.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Ud(){return{localeError:Fg()}}var Mg=()=>{let r={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(t){return r[t]??null}let n={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"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${h(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${o}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${o}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function Rd(){return{localeError:Mg()}}var Gg=()=>{let r={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(t){return r[t]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${t.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${h(t.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} hafi ${o}${t.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} s\xE9 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} hafi ${o}${t.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} s\xE9 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??t.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${p(t.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${t.origin}`;default:return"Rangt gildi"}}};function Od(){return{localeError:Gg()}}var Bg=()=>{let r={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(t){return r[t]??null}let n={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"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${h(t.values[0])}`:`Opzione non valida: atteso uno tra ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${o}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${o}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${p(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function Nd(){return{localeError:Bg()}}var Wg=()=>{let r={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(t){return r[t]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${h(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${p(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(t.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(t.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${p(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function jd(){return{localeError:Wg()}}var Vg=()=>{let r={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(t){return r[t]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${t.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return t.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${h(t.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${p(t.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${t.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${t.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${t.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${t.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Ad(){return{localeError:Vg()}}var Jg=()=>{let r={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(t){return r[t]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${h(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${t.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${o} ${t.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${p(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function sn(){return{localeError:Jg()}}function Cd(){return sn()}var Kg=()=>{let r={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(t){return r[t]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${h(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${p(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(t.origin),u=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${u} ${o}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${o}${a}`}case"too_small":{let o=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(t.origin),u=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${u} ${o}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${p(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Ld(){return{localeError:Kg()}}var Kt=r=>r.charAt(0).toUpperCase()+r.slice(1);function Zd(r){let e=Math.abs(r),n=e%10,i=e%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var qg=()=>{let r={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(t,o,a,s){let u=r[t]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${t.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return t.values.length===1?`Privalo b\u016Bti ${h(t.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${p(t.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[t.origin]??t.origin,a=e(t.origin,Zd(Number(t.maximum)),t.inclusive??!1,"smaller");if(a?.verb)return`${Kt(o??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.maximum.toString()} ${a.unit??"element\u0173"}`;let s=t.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Kt(o??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[t.origin]??t.origin,a=e(t.origin,Zd(Number(t.minimum)),t.inclusive??!1,"bigger");if(a?.verb)return`${Kt(o??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.minimum.toString()} ${a.unit??"element\u0173"}`;let s=t.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Kt(o??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??t.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${p(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[t.origin]??t.origin;return`${Kt(o??t.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Fd(){return{localeError:qg()}}var Hg=()=>{let r={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(t){return r[t]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${h(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${t.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Md(){return{localeError:Hg()}}var Xg=()=>{let r={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(t){return r[t]??null}let n={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"},i={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${h(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${p(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Gd(){return{localeError:Xg()}}var Yg=()=>{let r={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(t){return r[t]??null}let n={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"},i={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${h(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${t.origin??"waarde"} ${o}${t.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${t.origin??"waarde"} ${o}${t.maximum.toString()} is`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${t.origin} ${o}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${t.origin} ${o}${t.minimum.toString()} is`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Bd(){return{localeError:Yg()}}var Qg=()=>{let r={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(t){return r[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${h(t.values[0])}`:`Ugyldig valg: forventet en av ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${o}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`For lite(n): forventet ${t.origin} til \xE5 ha ${o}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Wd(){return{localeError:Qg()}}var eh=()=>{let r={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(t){return r[t]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`F\xE2sit giren: umulan instanceof ${t.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${h(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${o}${t.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${o}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${o}${t.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${o}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=t;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Vd(){return{localeError:eh()}}var th=()=>{let r={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(t){return r[t]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${h(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${p(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Jd(){return{localeError:th()}}var rh=()=>{let r={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(t){return r[t]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${h(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${t.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${t.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Kd(){return{localeError:rh()}}var nh=()=>{let r={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(t){return r[t]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Tipo inv\xE1lido: esperado instanceof ${t.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${h(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${o}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${o}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function qd(){return{localeError:nh()}}var ih=()=>{let r={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(t){return r[t]??null}let n={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return t.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${h(t.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} s\u0103 fie ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Prea mic: a\u0219teptat ca ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${t.origin} s\u0103 fie ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??t.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${p(t.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${t.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${t.origin}`;default:return"Intrare invalid\u0103"}}};function Hd(){return{localeError:ih()}}function Xd(r,e,n,i){let t=Math.abs(r),o=t%10,a=t%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?n:i}var oh=()=>{let r={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(t){return r[t]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${h(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);if(a){let s=Number(t.maximum),u=Xd(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${t.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);if(a){let s=Number(t.minimum),u=Xd(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${t.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Yd(){return{localeError:oh()}}var ah=()=>{let r={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(t){return r[t]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${t.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${h(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${o}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${o}${t.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${p(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Qd(){return{localeError:ah()}}var sh=()=>{let r={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(t){return r[t]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${t.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${h(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function ep(){return{localeError:sh()}}var ch=()=>{let r={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(t){return r[t]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${t.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${o}${t.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${o}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function tp(){return{localeError:ch()}}var uh=()=>{let r={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(t){return r[t]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${h(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(t.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(t.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${p(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function rp(){return{localeError:uh()}}var lh=()=>{let r={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(t){return r[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${t.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${h(t.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${o}${t.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??t.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${t.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${t.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function np(){return{localeError:lh()}}var dh=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(t){return r[t]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${h(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function cn(){return{localeError:dh()}}function ip(){return cn()}var ph=()=>{let r={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(t){return r[t]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${h(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${p(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${o}${t.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${o}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${p(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function op(){return{localeError:ph()}}var mh=()=>{let r={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(t){return r[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return t.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${h(t.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Juda katta: kutilgan ${t.origin??"qiymat"} ${o}${t.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Juda kichik: kutilgan ${t.origin} ${o}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??t.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${t.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${t.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function ap(){return{localeError:mh()}}var fh=()=>{let r={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(t){return r[t]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${h(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${p(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function sp(){return{localeError:fh()}}var gh=()=>{let r={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(t){return r[t]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${h(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${o}${t.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function cp(){return{localeError:gh()}}var hh=()=>{let r={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(t){return r[t]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${t.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${h(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${o}${t.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${o}${t.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${p(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function up(){return{localeError:hh()}}var vh=()=>{let r={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(t){return r[t]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${t.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return t.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${h(t.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${p(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=e(t.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin??"iye"} ${a.verb} ${o}${t.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${t.maximum}`}case"too_small":{let o=t.inclusive?">=":">",a=e(t.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin} ${a.verb} ${o}${t.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${t.minimum}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??t.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${t.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${p(t.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function lp(){return{localeError:vh()}}var dp,ms=Symbol("ZodOutput"),fs=Symbol("ZodInput"),un=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let i=n[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let t={...i,...this._map.get(e)};return Object.keys(t).length?t:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ln(){return new un}(dp=globalThis).__zod_globalRegistry??(dp.__zod_globalRegistry=ln());var Z=globalThis.__zod_globalRegistry;function gs(r,e){return new r({type:"string",...y(e)})}function hs(r,e){return new r({type:"string",coerce:!0,...y(e)})}function dn(r,e){return new r({type:"string",format:"email",check:"string_format",abort:!1,...y(e)})}function Ht(r,e){return new r({type:"string",format:"guid",check:"string_format",abort:!1,...y(e)})}function pn(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,...y(e)})}function mn(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(e)})}function fn(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(e)})}function gn(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(e)})}function Xt(r,e){return new r({type:"string",format:"url",check:"string_format",abort:!1,...y(e)})}function hn(r,e){return new r({type:"string",format:"emoji",check:"string_format",abort:!1,...y(e)})}function vn(r,e){return new r({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(e)})}function bn(r,e){return new r({type:"string",format:"cuid",check:"string_format",abort:!1,...y(e)})}function yn(r,e){return new r({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(e)})}function xn(r,e){return new r({type:"string",format:"ulid",check:"string_format",abort:!1,...y(e)})}function $n(r,e){return new r({type:"string",format:"xid",check:"string_format",abort:!1,...y(e)})}function kn(r,e){return new r({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(e)})}function _n(r,e){return new r({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(e)})}function wn(r,e){return new r({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(e)})}function vs(r,e){return new r({type:"string",format:"mac",check:"string_format",abort:!1,...y(e)})}function Sn(r,e){return new r({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(e)})}function In(r,e){return new r({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(e)})}function Pn(r,e){return new r({type:"string",format:"base64",check:"string_format",abort:!1,...y(e)})}function zn(r,e){return new r({type:"string",format:"base64url",check:"string_format",abort:!1,...y(e)})}function En(r,e){return new r({type:"string",format:"e164",check:"string_format",abort:!1,...y(e)})}function Tn(r,e){return new r({type:"string",format:"jwt",check:"string_format",abort:!1,...y(e)})}var bs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ys(r,e){return new r({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(e)})}function xs(r,e){return new r({type:"string",format:"date",check:"string_format",...y(e)})}function $s(r,e){return new r({type:"string",format:"time",check:"string_format",precision:null,...y(e)})}function ks(r,e){return new r({type:"string",format:"duration",check:"string_format",...y(e)})}function _s(r,e){return new r({type:"number",checks:[],...y(e)})}function ws(r,e){return new r({type:"number",coerce:!0,checks:[],...y(e)})}function Ss(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"safeint",...y(e)})}function Is(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float32",...y(e)})}function Ps(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float64",...y(e)})}function zs(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"int32",...y(e)})}function Es(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"uint32",...y(e)})}function Ts(r,e){return new r({type:"boolean",...y(e)})}function Ds(r,e){return new r({type:"boolean",coerce:!0,...y(e)})}function Us(r,e){return new r({type:"bigint",...y(e)})}function Rs(r,e){return new r({type:"bigint",coerce:!0,...y(e)})}function Os(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(e)})}function Ns(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(e)})}function js(r,e){return new r({type:"symbol",...y(e)})}function As(r,e){return new r({type:"undefined",...y(e)})}function Cs(r,e){return new r({type:"null",...y(e)})}function Ls(r){return new r({type:"any"})}function Zs(r){return new r({type:"unknown"})}function Fs(r,e){return new r({type:"never",...y(e)})}function Ms(r,e){return new r({type:"void",...y(e)})}function Gs(r,e){return new r({type:"date",...y(e)})}function Bs(r,e){return new r({type:"date",coerce:!0,...y(e)})}function Ws(r,e){return new r({type:"nan",...y(e)})}function ie(r,e){return new Kr({check:"less_than",...y(e),value:r,inclusive:!1})}function Y(r,e){return new Kr({check:"less_than",...y(e),value:r,inclusive:!0})}function oe(r,e){return new qr({check:"greater_than",...y(e),value:r,inclusive:!1})}function W(r,e){return new qr({check:"greater_than",...y(e),value:r,inclusive:!0})}function Dn(r){return oe(0,r)}function Un(r){return ie(0,r)}function Rn(r){return Y(0,r)}function On(r){return W(0,r)}function be(r,e){return new Co({check:"multiple_of",...y(e),value:r})}function ye(r,e){return new Fo({check:"max_size",...y(e),maximum:r})}function ae(r,e){return new Mo({check:"min_size",...y(e),minimum:r})}function Re(r,e){return new Go({check:"size_equals",...y(e),size:r})}function Oe(r,e){return new Bo({check:"max_length",...y(e),maximum:r})}function ue(r,e){return new Wo({check:"min_length",...y(e),minimum:r})}function Ne(r,e){return new Vo({check:"length_equals",...y(e),length:r})}function Ye(r,e){return new Jo({check:"string_format",format:"regex",...y(e),pattern:r})}function Qe(r){return new Ko({check:"string_format",format:"lowercase",...y(r)})}function et(r){return new qo({check:"string_format",format:"uppercase",...y(r)})}function tt(r,e){return new Ho({check:"string_format",format:"includes",...y(e),includes:r})}function rt(r,e){return new Xo({check:"string_format",format:"starts_with",...y(e),prefix:r})}function nt(r,e){return new Yo({check:"string_format",format:"ends_with",...y(e),suffix:r})}function Nn(r,e,n){return new Qo({check:"property",property:r,schema:e,...y(n)})}function it(r,e){return new ea({check:"mime_type",mime:r,...y(e)})}function ne(r){return new ta({check:"overwrite",tx:r})}function ot(r){return ne(e=>e.normalize(r))}function at(){return ne(r=>r.trim())}function st(){return ne(r=>r.toLowerCase())}function ct(){return ne(r=>r.toUpperCase())}function ut(){return ne(r=>Hi(r))}function Vs(r,e,n){return new r({type:"array",element:e,...y(n)})}function yh(r,e,n){return new r({type:"union",options:e,...y(n)})}function xh(r,e,n){return new r({type:"union",options:e,inclusive:!1,...y(n)})}function $h(r,e,n,i){return new r({type:"union",options:n,discriminator:e,...y(i)})}function kh(r,e,n){return new r({type:"intersection",left:e,right:n})}function _h(r,e,n,i){let t=n instanceof w,o=t?i:n,a=t?n:null;return new r({type:"tuple",items:e,rest:a,...y(o)})}function wh(r,e,n,i){return new r({type:"record",keyType:e,valueType:n,...y(i)})}function Sh(r,e,n,i){return new r({type:"map",keyType:e,valueType:n,...y(i)})}function Ih(r,e,n){return new r({type:"set",valueType:e,...y(n)})}function Ph(r,e,n){let i=Array.isArray(e)?Object.fromEntries(e.map(t=>[t,t])):e;return new r({type:"enum",entries:i,...y(n)})}function zh(r,e,n){return new r({type:"enum",entries:e,...y(n)})}function Eh(r,e,n){return new r({type:"literal",values:Array.isArray(e)?e:[e],...y(n)})}function Js(r,e){return new r({type:"file",...y(e)})}function Th(r,e){return new r({type:"transform",transform:e})}function Dh(r,e){return new r({type:"optional",innerType:e})}function Uh(r,e){return new r({type:"nullable",innerType:e})}function Rh(r,e,n){return new r({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Yi(n)}})}function Oh(r,e,n){return new r({type:"nonoptional",innerType:e,...y(n)})}function Nh(r,e){return new r({type:"success",innerType:e})}function jh(r,e,n){return new r({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}function Ah(r,e,n){return new r({type:"pipe",in:e,out:n})}function Ch(r,e){return new r({type:"readonly",innerType:e})}function Lh(r,e,n){return new r({type:"template_literal",parts:e,...y(n)})}function Zh(r,e){return new r({type:"lazy",getter:e})}function Fh(r,e){return new r({type:"promise",innerType:e})}function Ks(r,e,n){let i=y(n);return i.abort??(i.abort=!0),new r({type:"custom",check:"custom",fn:e,...i})}function qs(r,e,n){return new r({type:"custom",check:"custom",fn:e,...y(n)})}function Hs(r,e){let n=pp(i=>(i.addIssue=t=>{if(typeof t=="string")i.issues.push(We(t,i.value,n._zod.def));else{let o=t;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(We(o))}},r(i.value,i)),e);return n}function pp(r,e){let n=new U({check:"custom",...y(e)});return n._zod.check=r,n}function Xs(r){let e=new U({check:"describe"});return e._zod.onattach=[n=>{let i=Z.get(n)??{};Z.add(n,{...i,description:r})}],e._zod.check=()=>{},e}function Ys(r){let e=new U({check:"meta"});return e._zod.onattach=[n=>{let i=Z.get(n)??{};Z.add(n,{...i,...r})}],e._zod.check=()=>{},e}function Qs(r,e){let n=y(e),i=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),t=t.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),a=new Set(t),s=r.Codec??Jt,u=r.Boolean??Wt,c=r.String??Ue,l=new c({type:"string",error:n.error}),m=new u({type:"boolean",error:n.error}),g=new s({type:"pipe",in:l,out:m,transform:((f,x)=>{let _=f;return n.case!=="sensitive"&&(_=_.toLowerCase()),o.has(_)?!0:a.has(_)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:x.value,inst:g,continue:!1}),{})}),reverseTransform:((f,x)=>f===!0?i[0]||"true":t[0]||"false"),error:n.error});return g}function lt(r,e,n,i={}){let t=y(i),o={...y(i),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:s=>n.test(s),...t};return n instanceof RegExp&&(o.pattern=n),new r(o)}function xe(r){let e=r?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:r.processors??{},metadataRegistry:r?.metadata??Z,target:e,unrepresentable:r?.unrepresentable??"throw",override:r?.override??(()=>{}),io:r?.io??"output",counter:0,seen:new Map,cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0}}function z(r,e,n={path:[],schemaPath:[]}){var i;let t=r._zod.def,o=e.seen.get(r);if(o)return o.count++,n.schemaPath.includes(r)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(r,a);let s=r._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...n,schemaPath:[...n.schemaPath,r],path:n.path};if(r._zod.processJSONSchema)r._zod.processJSONSchema(e,a.schema,l);else{let g=a.schema,f=e.processors[t.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);f(r,e,g,l)}let m=r._zod.parent;m&&(a.ref||(a.ref=m),z(m,e,l),e.seen.get(m).isParent=!0)}let u=e.metadataRegistry.get(r);return u&&Object.assign(a.schema,u),e.io==="input"&&V(r)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(r).schema}function $e(r,e){let n=r.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of r.seen.entries()){let s=r.metadataRegistry.get(a[0])?.id;if(s){let u=i.get(s);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let t=a=>{let s=r.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let m=r.external.registry.get(a[0])?.id,g=r.external.uri??(x=>x);if(m)return{ref:g(m)};let f=a[1].defId??a[1].schema.id??`schema${r.counter++}`;return a[1].defId=f,{defId:f,ref:`${g("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let c=`#/${s}/`,l=a[1].schema.id??`__schema${r.counter++}`;return{defId:l,ref:c+l}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:u,defId:c}=t(a);s.def={...s.schema},c&&(s.defId=c);let l=s.schema;for(let m in l)delete l[m];l.$ref=u};if(r.cycles==="throw")for(let a of r.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
64
64
|
|
|
65
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of r.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(r.external){let c=r.external.registry.get(a[0])?.id;if(e!==a[0]&&c){o(a);continue}}if(r.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&r.reused==="ref"){o(a);continue}}}function ke(r,e){let n=r.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let u=r.seen.get(s);if(u.ref===null)return;let c=u.def??u.schema,l={...c},m=u.ref;if(u.ref=null,m){i(m);let f=r.seen.get(m),x=f.schema;if(x.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(x)):Object.assign(c,x),Object.assign(c,l),s._zod.parent===m)for(let P in c)P==="$ref"||P==="allOf"||P in l||delete c[P];if(x.$ref&&f.def)for(let P in c)P==="$ref"||P==="allOf"||P in f.def&&JSON.stringify(c[P])===JSON.stringify(f.def[P])&&delete c[P]}let g=s._zod.parent;if(g&&g!==m){i(g);let f=r.seen.get(g);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let x in c)x==="$ref"||x==="allOf"||x in f.def&&JSON.stringify(c[x])===JSON.stringify(f.def[x])&&delete c[x]}r.override({zodSchema:s,jsonSchema:c,path:u.path??[]})};for(let s of[...r.seen.entries()].reverse())i(s[0]);let t={};if(r.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":r.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":r.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":r.target,r.external?.uri){let s=r.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");t.$id=r.external.uri(s)}Object.assign(t,n.def??n.schema);let o=r.metadataRegistry.get(e)?.id;o!==void 0&&t.id===o&&delete t.id;let a=r.external?.defs??{};for(let s of r.seen.entries()){let u=s[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}r.external||Object.keys(a).length>0&&(r.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:dt(e,"input",r.processors),output:dt(e,"output",r.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function V(r,e){let n=e??{seen:new Set};if(n.seen.has(r))return!1;n.seen.add(r);let i=r._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return V(i.element,n);if(i.type==="set")return V(i.valueType,n);if(i.type==="lazy")return V(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return V(i.innerType,n);if(i.type==="intersection")return V(i.left,n)||V(i.right,n);if(i.type==="record"||i.type==="map")return V(i.keyType,n)||V(i.valueType,n);if(i.type==="pipe")return r._zod.traits.has("$ZodCodec")?!0:V(i.in,n)||V(i.out,n);if(i.type==="object"){for(let t in i.shape)if(V(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(V(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(V(t,n))return!0;return!!(i.rest&&V(i.rest,n))}return!1}var ec=(r,e={})=>n=>{let i=xe({...n,processors:e});return z(r,i),$e(i,r),ke(i,r)},dt=(r,e,n={})=>i=>{let{libraryOptions:t,target:o}=i??{},a=xe({...t??{},target:o,io:e,processors:n});return z(r,a),$e(a,r),ke(a,r)};var Mh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tc=(r,e,n,i)=>{let t=n;t.type="string";let{minimum:o,maximum:a,format:s,patterns:u,contentEncoding:c}=r._zod.bag;if(typeof o=="number"&&(t.minLength=o),typeof a=="number"&&(t.maxLength=a),s&&(t.format=Mh[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),c&&(t.contentEncoding=c),u&&u.size>0){let l=[...u];l.length===1?t.pattern=l[0].source:l.length>1&&(t.allOf=[...l.map(m=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},rc=(r,e,n,i)=>{let t=n,{minimum:o,maximum:a,format:s,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=r._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number";let m=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),g=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=e.target==="draft-04"||e.target==="openapi-3.0";m?f?(t.minimum=l,t.exclusiveMinimum=!0):t.exclusiveMinimum=l:typeof o=="number"&&(t.minimum=o),g?f?(t.maximum=c,t.exclusiveMaximum=!0):t.exclusiveMaximum=c:typeof a=="number"&&(t.maximum=a),typeof u=="number"&&(t.multipleOf=u)},nc=(r,e,n,i)=>{n.type="boolean"},ic=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},oc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},ac=(r,e,n,i)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},sc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},uc=(r,e,n,i)=>{n.not={}},lc=(r,e,n,i)=>{},dc=(r,e,n,i)=>{},pc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},mc=(r,e,n,i)=>{let t=r._zod.def,o=Ot(t.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},fc=(r,e,n,i)=>{let t=r._zod.def,o=[];for(let a of t.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},gc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},hc=(r,e,n,i)=>{let t=n,o=r._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=o.source},vc=(r,e,n,i)=>{let t=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=r._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),u?u.length===1?(o.contentMediaType=u[0],Object.assign(t,o)):(Object.assign(t,o),t.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(t,o)},bc=(r,e,n,i)=>{n.type="boolean"},yc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},xc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},$c=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_c=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},wc=(r,e,n,i)=>{let t=n,o=r._zod.def,{minimum:a,maximum:s}=r._zod.bag;typeof a=="number"&&(t.minItems=a),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=z(o.element,e,{...i,path:[...i.path,"items"]})},Sc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="object",t.properties={};let a=o.shape;for(let c in a)t.properties[c]=z(a[c],e,{...i,path:[...i.path,"properties",c]});let s=new Set(Object.keys(a)),u=new Set([...s].filter(c=>{let l=o.shape[c]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(t.required=Array.from(u)),o.catchall?._zod.def.type==="never"?t.additionalProperties=!1:o.catchall?o.catchall&&(t.additionalProperties=z(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(t.additionalProperties=!1)},An=(r,e,n,i)=>{let t=r._zod.def,o=t.inclusive===!1,a=t.options.map((s,u)=>z(s,e,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},Ic=(r,e,n,i)=>{let t=r._zod.def,o=z(t.left,e,{...i,path:[...i.path,"allOf",0]}),a=z(t.right,e,{...i,path:[...i.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,u=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=u},Pc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,f)=>z(g,e,{...i,path:[...i.path,a,f]})),c=o.rest?z(o.rest,e,{...i,path:[...i.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(t.prefixItems=u,c&&(t.items=c)):e.target==="openapi-3.0"?(t.items={anyOf:u},c&&t.items.anyOf.push(c),t.minItems=u.length,c||(t.maxItems=u.length)):(t.items=u,c&&(t.additionalItems=c));let{minimum:l,maximum:m}=r._zod.bag;typeof l=="number"&&(t.minItems=l),typeof m=="number"&&(t.maxItems=m)},zc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=z(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(let m of u)t.patternProperties[m.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(t.propertyNames=z(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=z(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=a._zod.values;if(c){let l=[...c].filter(m=>typeof m=="string"||typeof m=="number");l.length>0&&(t.required=l)}},Ec=(r,e,n,i)=>{let t=r._zod.def,o=z(t.innerType,e,i),a=e.seen.get(r);e.target==="openapi-3.0"?(a.ref=t.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Tc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Dc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Uc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Rc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Oc=(r,e,n,i)=>{let t=r._zod.def,o=t.in._zod.traits.has("$ZodTransform"),a=e.io==="input"?o?t.out:t.in:t.out;z(a,e,i);let s=e.seen.get(r);s.ref=a},Nc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,n.readOnly=!0},jc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Cn=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Ac=(r,e,n,i)=>{let t=r._zod.innerType;z(t,e,i);let o=e.seen.get(r);o.ref=t},jn={string:tc,number:rc,boolean:nc,bigint:ic,symbol:oc,null:ac,undefined:sc,void:cc,never:uc,any:lc,unknown:dc,date:pc,enum:mc,literal:fc,nan:gc,template_literal:hc,file:vc,success:bc,custom:yc,function:xc,transform:$c,map:kc,set:_c,array:wc,object:Sc,union:An,intersection:Ic,tuple:Pc,record:zc,nullable:Ec,nonoptional:Tc,default:Dc,prefault:Uc,catch:Rc,pipe:Oc,readonly:Nc,promise:jc,optional:Cn,lazy:Ac};function Ln(r,e){if("_idmap"in r){let i=r,t=xe({...e,processors:jn}),o={};for(let u of i._idmap.entries()){let[c,l]=u;z(l,t)}let a={},s={registry:i,uri:e?.uri,defs:o};t.external=s;for(let u of i._idmap.entries()){let[c,l]=u;$e(t,l),a[c]=ke(t,l)}if(Object.keys(o).length>0){let u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=xe({...e,processors:jn});return z(r,n),$e(n,r),ke(n,r)}var Zn=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=xe({processors:jn,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return z(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),$e(this.ctx,e);let i=ke(this.ctx,e),{"~standard":t,...o}=i;return o}};var mp={};var Yt={};te(Yt,{ZodAny:()=>su,ZodArray:()=>du,ZodBase64:()=>si,ZodBase64URL:()=>ci,ZodBigInt:()=>yt,ZodBigIntFormat:()=>di,ZodBoolean:()=>bt,ZodCIDRv4:()=>oi,ZodCIDRv6:()=>ai,ZodCUID:()=>Yn,ZodCUID2:()=>Qn,ZodCatch:()=>Ru,ZodCodec:()=>lr,ZodCustom:()=>dr,ZodCustomStringFormat:()=>ht,ZodDate:()=>or,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>mu,ZodE164:()=>ui,ZodEmail:()=>qn,ZodEmoji:()=>Hn,ZodEnum:()=>ft,ZodExactOptional:()=>wu,ZodFile:()=>ku,ZodFunction:()=>Gu,ZodGUID:()=>er,ZodIPv4:()=>ni,ZodIPv6:()=>ii,ZodIntersection:()=>fu,ZodJWT:()=>li,ZodKSUID:()=>ri,ZodLazy:()=>Zu,ZodLiteral:()=>$u,ZodMAC:()=>eu,ZodMap:()=>yu,ZodNaN:()=>Nu,ZodNanoID:()=>Xn,ZodNever:()=>uu,ZodNonOptional:()=>vi,ZodNull:()=>ou,ZodNullable:()=>Iu,ZodNumber:()=>vt,ZodNumberFormat:()=>Ae,ZodObject:()=>sr,ZodOptional:()=>hi,ZodPipe:()=>ur,ZodPrefault:()=>Eu,ZodPreprocess:()=>ju,ZodPromise:()=>Mu,ZodReadonly:()=>Au,ZodRecord:()=>mt,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>T,ZodSuccess:()=>Uu,ZodSymbol:()=>nu,ZodTemplateLiteral:()=>Lu,ZodTransform:()=>_u,ZodTuple:()=>hu,ZodType:()=>S,ZodULID:()=>ei,ZodURL:()=>ir,ZodUUID:()=>se,ZodUndefined:()=>iu,ZodUnion:()=>cr,ZodUnknown:()=>cu,ZodVoid:()=>lu,ZodXID:()=>ti,ZodXor:()=>pu,_ZodString:()=>Kn,_default:()=>zu,_function:()=>km,any:()=>Qp,array:()=>ar,base64:()=>jp,base64url:()=>Ap,bigint:()=>Kp,boolean:()=>ru,catch:()=>Ou,check:()=>_m,cidrv4:()=>Op,cidrv6:()=>Np,codec:()=>bm,cuid:()=>Ip,cuid2:()=>Pp,custom:()=>wm,date:()=>tm,describe:()=>Sm,discriminatedUnion:()=>sm,e164:()=>Cp,email:()=>hp,emoji:()=>wp,enum:()=>fi,exactOptional:()=>Su,file:()=>fm,float32:()=>Bp,float64:()=>Wp,function:()=>km,guid:()=>vp,hash:()=>Gp,hex:()=>Mp,hostname:()=>Fp,httpUrl:()=>_p,instanceof:()=>Pm,int:()=>Vn,int32:()=>Vp,int64:()=>qp,intersection:()=>gu,invertCodec:()=>ym,ipv4:()=>Dp,ipv6:()=>Rp,json:()=>Em,jwt:()=>Lp,keyof:()=>rm,ksuid:()=>Tp,lazy:()=>Fu,literal:()=>mm,looseObject:()=>om,looseRecord:()=>um,mac:()=>Up,map:()=>lm,meta:()=>Im,nan:()=>vm,nanoid:()=>Sp,nativeEnum:()=>pm,never:()=>pi,nonoptional:()=>Du,null:()=>au,nullable:()=>rr,nullish:()=>gm,number:()=>tu,object:()=>nm,optional:()=>tr,partialRecord:()=>cm,pipe:()=>Jn,prefault:()=>Tu,preprocess:()=>Tm,promise:()=>$m,readonly:()=>Cu,record:()=>bu,refine:()=>Bu,set:()=>dm,strictObject:()=>im,string:()=>Qt,stringFormat:()=>Zp,stringbool:()=>zm,success:()=>hm,superRefine:()=>Wu,symbol:()=>Xp,templateLiteral:()=>xm,transform:()=>gi,tuple:()=>vu,uint32:()=>Jp,uint64:()=>Hp,ulid:()=>zp,undefined:()=>Yp,union:()=>mi,unknown:()=>je,url:()=>kp,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>$p,void:()=>em,xid:()=>Ep,xor:()=>am});var Fn={};te(Fn,{endsWith:()=>nt,gt:()=>oe,gte:()=>W,includes:()=>tt,length:()=>Ne,lowercase:()=>Qe,lt:()=>ie,lte:()=>Y,maxLength:()=>Oe,maxSize:()=>ye,mime:()=>it,minLength:()=>ue,minSize:()=>ae,multipleOf:()=>be,negative:()=>Un,nonnegative:()=>On,nonpositive:()=>Rn,normalize:()=>ot,overwrite:()=>ne,positive:()=>Dn,property:()=>Nn,regex:()=>Ye,size:()=>Re,slugify:()=>ut,startsWith:()=>rt,toLowerCase:()=>st,toUpperCase:()=>ct,trim:()=>at,uppercase:()=>et});var pt={};te(pt,{ZodISODate:()=>Gn,ZodISODateTime:()=>Mn,ZodISODuration:()=>Wn,ZodISOTime:()=>Bn,date:()=>Lc,datetime:()=>Cc,duration:()=>Fc,time:()=>Zc});var Mn=d("ZodISODateTime",(r,e)=>{ga.init(r,e),T.init(r,e)});function Cc(r){return ys(Mn,r)}var Gn=d("ZodISODate",(r,e)=>{ha.init(r,e),T.init(r,e)});function Lc(r){return xs(Gn,r)}var Bn=d("ZodISOTime",(r,e)=>{va.init(r,e),T.init(r,e)});function Zc(r){return $s(Bn,r)}var Wn=d("ZodISODuration",(r,e)=>{ba.init(r,e),T.init(r,e)});function Fc(r){return ks(Wn,r)}var fp=(r,e)=>{Lt.init(r,e),r.name="ZodError",Object.defineProperties(r,{format:{value:n=>Ft(r,n)},flatten:{value:n=>Zt(r,n)},addIssue:{value:n=>{r.issues.push(n),r.message=JSON.stringify(r.issues,Ge,2)}},addIssues:{value:n=>{r.issues.push(...n),r.message=JSON.stringify(r.issues,Ge,2)}},isEmpty:{get(){return r.issues.length===0}}})},Bh=d("ZodError",fp),q=d("ZodError",fp,{Parent:Error});var Mc=Ve(q),Gc=Je(q),Bc=Ke(q),Wc=qe(q),Vc=Cr(q),Jc=Lr(q),Kc=Zr(q),qc=Fr(q),Hc=Mr(q),Xc=Gr(q),Yc=Br(q),Qc=Wr(q);var gp=new WeakMap;function nr(r,e,n){let i=Object.getPrototypeOf(r),t=gp.get(i);if(t||(t=new Set,gp.set(i,t)),!t.has(e)){t.add(e);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var S=d("ZodType",(r,e)=>(w.init(r,e),Object.assign(r["~standard"],{jsonSchema:{input:dt(r,"input"),output:dt(r,"output")}}),r.toJSONSchema=ec(r,{}),r.def=e,r.type=e.type,Object.defineProperty(r,"_def",{value:e}),r.parse=(n,i)=>Mc(r,n,i,{callee:r.parse}),r.safeParse=(n,i)=>Bc(r,n,i),r.parseAsync=async(n,i)=>Gc(r,n,i,{callee:r.parseAsync}),r.safeParseAsync=async(n,i)=>Wc(r,n,i),r.spa=r.safeParseAsync,r.encode=(n,i)=>Vc(r,n,i),r.decode=(n,i)=>Jc(r,n,i),r.encodeAsync=async(n,i)=>Kc(r,n,i),r.decodeAsync=async(n,i)=>qc(r,n,i),r.safeEncode=(n,i)=>Hc(r,n,i),r.safeDecode=(n,i)=>Xc(r,n,i),r.safeEncodeAsync=async(n,i)=>Yc(r,n,i),r.safeDecodeAsync=async(n,i)=>Qc(r,n,i),nr(r,"ZodType",{check(...n){let i=this.def;return this.clone(b.mergeDefs(i,{checks:[...i.checks??[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return G(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Bu(n,i))},superRefine(n,i){return this.check(Wu(n,i))},overwrite(n){return this.check(ne(n))},optional(){return tr(this)},exactOptional(){return Su(this)},nullable(){return rr(this)},nullish(){return tr(rr(this))},nonoptional(n){return Du(this,n)},array(){return ar(this)},or(n){return mi([this,n])},and(n){return gu(this,n)},transform(n){return Jn(this,gi(n))},default(n){return zu(this,n)},prefault(n){return Tu(this,n)},catch(n){return Ou(this,n)},pipe(n){return Jn(this,n)},readonly(){return Cu(this)},describe(n){let i=this.clone();return Z.add(i,{description:n}),i},meta(...n){if(n.length===0)return Z.get(this);let i=this.clone();return Z.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(r,"description",{get(){return Z.get(r)?.description},configurable:!0}),r)),Kn=d("_ZodString",(r,e)=>{Ue.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>tc(r,i,t,o);let n=r._zod.bag;r.format=n.format??null,r.minLength=n.minimum??null,r.maxLength=n.maximum??null,nr(r,"_ZodString",{regex(...i){return this.check(Ye(...i))},includes(...i){return this.check(tt(...i))},startsWith(...i){return this.check(rt(...i))},endsWith(...i){return this.check(nt(...i))},min(...i){return this.check(ue(...i))},max(...i){return this.check(Oe(...i))},length(...i){return this.check(Ne(...i))},nonempty(...i){return this.check(ue(1,...i))},lowercase(i){return this.check(Qe(i))},uppercase(i){return this.check(et(i))},trim(){return this.check(at())},normalize(...i){return this.check(ot(...i))},toLowerCase(){return this.check(st())},toUpperCase(){return this.check(ct())},slugify(){return this.check(ut())}})}),gt=d("ZodString",(r,e)=>{Ue.init(r,e),Kn.init(r,e),r.email=n=>r.check(dn(qn,n)),r.url=n=>r.check(Xt(ir,n)),r.jwt=n=>r.check(Tn(li,n)),r.emoji=n=>r.check(hn(Hn,n)),r.guid=n=>r.check(Ht(er,n)),r.uuid=n=>r.check(pn(se,n)),r.uuidv4=n=>r.check(mn(se,n)),r.uuidv6=n=>r.check(fn(se,n)),r.uuidv7=n=>r.check(gn(se,n)),r.nanoid=n=>r.check(vn(Xn,n)),r.guid=n=>r.check(Ht(er,n)),r.cuid=n=>r.check(bn(Yn,n)),r.cuid2=n=>r.check(yn(Qn,n)),r.ulid=n=>r.check(xn(ei,n)),r.base64=n=>r.check(Pn(si,n)),r.base64url=n=>r.check(zn(ci,n)),r.xid=n=>r.check($n(ti,n)),r.ksuid=n=>r.check(kn(ri,n)),r.ipv4=n=>r.check(_n(ni,n)),r.ipv6=n=>r.check(wn(ii,n)),r.cidrv4=n=>r.check(Sn(oi,n)),r.cidrv6=n=>r.check(In(ai,n)),r.e164=n=>r.check(En(ui,n)),r.datetime=n=>r.check(Cc(n)),r.date=n=>r.check(Lc(n)),r.time=n=>r.check(Zc(n)),r.duration=n=>r.check(Fc(n))});function Qt(r){return gs(gt,r)}var T=d("ZodStringFormat",(r,e)=>{E.init(r,e),Kn.init(r,e)}),qn=d("ZodEmail",(r,e)=>{aa.init(r,e),T.init(r,e)});function hp(r){return dn(qn,r)}var er=d("ZodGUID",(r,e)=>{ia.init(r,e),T.init(r,e)});function vp(r){return Ht(er,r)}var se=d("ZodUUID",(r,e)=>{oa.init(r,e),T.init(r,e)});function bp(r){return pn(se,r)}function yp(r){return mn(se,r)}function xp(r){return fn(se,r)}function $p(r){return gn(se,r)}var ir=d("ZodURL",(r,e)=>{sa.init(r,e),T.init(r,e)});function kp(r){return Xt(ir,r)}function _p(r){return Xt(ir,{protocol:X.httpProtocol,hostname:X.domain,...b.normalizeParams(r)})}var Hn=d("ZodEmoji",(r,e)=>{ca.init(r,e),T.init(r,e)});function wp(r){return hn(Hn,r)}var Xn=d("ZodNanoID",(r,e)=>{ua.init(r,e),T.init(r,e)});function Sp(r){return vn(Xn,r)}var Yn=d("ZodCUID",(r,e)=>{la.init(r,e),T.init(r,e)});function Ip(r){return bn(Yn,r)}var Qn=d("ZodCUID2",(r,e)=>{da.init(r,e),T.init(r,e)});function Pp(r){return yn(Qn,r)}var ei=d("ZodULID",(r,e)=>{pa.init(r,e),T.init(r,e)});function zp(r){return xn(ei,r)}var ti=d("ZodXID",(r,e)=>{ma.init(r,e),T.init(r,e)});function Ep(r){return $n(ti,r)}var ri=d("ZodKSUID",(r,e)=>{fa.init(r,e),T.init(r,e)});function Tp(r){return kn(ri,r)}var ni=d("ZodIPv4",(r,e)=>{ya.init(r,e),T.init(r,e)});function Dp(r){return _n(ni,r)}var eu=d("ZodMAC",(r,e)=>{$a.init(r,e),T.init(r,e)});function Up(r){return vs(eu,r)}var ii=d("ZodIPv6",(r,e)=>{xa.init(r,e),T.init(r,e)});function Rp(r){return wn(ii,r)}var oi=d("ZodCIDRv4",(r,e)=>{ka.init(r,e),T.init(r,e)});function Op(r){return Sn(oi,r)}var ai=d("ZodCIDRv6",(r,e)=>{_a.init(r,e),T.init(r,e)});function Np(r){return In(ai,r)}var si=d("ZodBase64",(r,e)=>{Sa.init(r,e),T.init(r,e)});function jp(r){return Pn(si,r)}var ci=d("ZodBase64URL",(r,e)=>{Ia.init(r,e),T.init(r,e)});function Ap(r){return zn(ci,r)}var ui=d("ZodE164",(r,e)=>{Pa.init(r,e),T.init(r,e)});function Cp(r){return En(ui,r)}var li=d("ZodJWT",(r,e)=>{za.init(r,e),T.init(r,e)});function Lp(r){return Tn(li,r)}var ht=d("ZodCustomStringFormat",(r,e)=>{Ea.init(r,e),T.init(r,e)});function Zp(r,e,n={}){return lt(ht,r,e,n)}function Fp(r){return lt(ht,"hostname",X.hostname,r)}function Mp(r){return lt(ht,"hex",X.hex,r)}function Gp(r,e){let n=e?.enc??"hex",i=`${r}_${n}`,t=X[i];if(!t)throw new Error(`Unrecognized hash format: ${i}`);return lt(ht,i,t,e)}var vt=d("ZodNumber",(r,e)=>{en.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>rc(r,i,t,o),nr(r,"ZodNumber",{gt(i,t){return this.check(oe(i,t))},gte(i,t){return this.check(W(i,t))},min(i,t){return this.check(W(i,t))},lt(i,t){return this.check(ie(i,t))},lte(i,t){return this.check(Y(i,t))},max(i,t){return this.check(Y(i,t))},int(i){return this.check(Vn(i))},safe(i){return this.check(Vn(i))},positive(i){return this.check(oe(0,i))},nonnegative(i){return this.check(W(0,i))},negative(i){return this.check(ie(0,i))},nonpositive(i){return this.check(Y(0,i))},multipleOf(i,t){return this.check(be(i,t))},step(i,t){return this.check(be(i,t))},finite(){return this}});let n=r._zod.bag;r.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),r.isFinite=!0,r.format=n.format??null});function tu(r){return _s(vt,r)}var Ae=d("ZodNumberFormat",(r,e)=>{Ta.init(r,e),vt.init(r,e)});function Vn(r){return Ss(Ae,r)}function Bp(r){return Is(Ae,r)}function Wp(r){return Ps(Ae,r)}function Vp(r){return zs(Ae,r)}function Jp(r){return Es(Ae,r)}var bt=d("ZodBoolean",(r,e)=>{Wt.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>nc(r,n,i,t)});function ru(r){return Ts(bt,r)}var yt=d("ZodBigInt",(r,e)=>{tn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>ic(r,i,t,o),r.gte=(i,t)=>r.check(W(i,t)),r.min=(i,t)=>r.check(W(i,t)),r.gt=(i,t)=>r.check(oe(i,t)),r.gte=(i,t)=>r.check(W(i,t)),r.min=(i,t)=>r.check(W(i,t)),r.lt=(i,t)=>r.check(ie(i,t)),r.lte=(i,t)=>r.check(Y(i,t)),r.max=(i,t)=>r.check(Y(i,t)),r.positive=i=>r.check(oe(BigInt(0),i)),r.negative=i=>r.check(ie(BigInt(0),i)),r.nonpositive=i=>r.check(Y(BigInt(0),i)),r.nonnegative=i=>r.check(W(BigInt(0),i)),r.multipleOf=(i,t)=>r.check(be(i,t));let n=r._zod.bag;r.minValue=n.minimum??null,r.maxValue=n.maximum??null,r.format=n.format??null});function Kp(r){return Us(yt,r)}var di=d("ZodBigIntFormat",(r,e)=>{Da.init(r,e),yt.init(r,e)});function qp(r){return Os(di,r)}function Hp(r){return Ns(di,r)}var nu=d("ZodSymbol",(r,e)=>{Ua.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>oc(r,n,i,t)});function Xp(r){return js(nu,r)}var iu=d("ZodUndefined",(r,e)=>{Ra.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>sc(r,n,i,t)});function Yp(r){return As(iu,r)}var ou=d("ZodNull",(r,e)=>{Oa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>ac(r,n,i,t)});function au(r){return Cs(ou,r)}var su=d("ZodAny",(r,e)=>{Na.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>lc(r,n,i,t)});function Qp(){return Ls(su)}var cu=d("ZodUnknown",(r,e)=>{ja.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>dc(r,n,i,t)});function je(){return Zs(cu)}var uu=d("ZodNever",(r,e)=>{Aa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>uc(r,n,i,t)});function pi(r){return Fs(uu,r)}var lu=d("ZodVoid",(r,e)=>{Ca.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>cc(r,n,i,t)});function em(r){return Ms(lu,r)}var or=d("ZodDate",(r,e)=>{La.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>pc(r,i,t,o),r.min=(i,t)=>r.check(W(i,t)),r.max=(i,t)=>r.check(Y(i,t));let n=r._zod.bag;r.minDate=n.minimum?new Date(n.minimum):null,r.maxDate=n.maximum?new Date(n.maximum):null});function tm(r){return Gs(or,r)}var du=d("ZodArray",(r,e)=>{Za.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>wc(r,n,i,t),r.element=e.element,nr(r,"ZodArray",{min(n,i){return this.check(ue(n,i))},nonempty(n){return this.check(ue(1,n))},max(n,i){return this.check(Oe(n,i))},length(n,i){return this.check(Ne(n,i))},unwrap(){return this.element}})});function ar(r,e){return Vs(du,r,e)}function rm(r){let e=r._zod.def.shape;return fi(Object.keys(e))}var sr=d("ZodObject",(r,e)=>{Fa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Sc(r,n,i,t),b.defineLazy(r,"shape",()=>e.shape),nr(r,"ZodObject",{keyof(){return fi(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:je()})},loose(){return this.clone({...this._zod.def,catchall:je()})},strict(){return this.clone({...this._zod.def,catchall:pi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return b.extend(this,n)},safeExtend(n){return b.safeExtend(this,n)},merge(n){return b.merge(this,n)},pick(n){return b.pick(this,n)},omit(n){return b.omit(this,n)},partial(...n){return b.partial(hi,this,n[0])},required(...n){return b.required(vi,this,n[0])}})});function nm(r,e){let n={type:"object",shape:r??{},...b.normalizeParams(e)};return new sr(n)}function im(r,e){return new sr({type:"object",shape:r,catchall:pi(),...b.normalizeParams(e)})}function om(r,e){return new sr({type:"object",shape:r,catchall:je(),...b.normalizeParams(e)})}var cr=d("ZodUnion",(r,e)=>{Vt.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>An(r,n,i,t),r.options=e.options});function mi(r,e){return new cr({type:"union",options:r,...b.normalizeParams(e)})}var pu=d("ZodXor",(r,e)=>{cr.init(r,e),Ma.init(r,e),r._zod.processJSONSchema=(n,i,t)=>An(r,n,i,t),r.options=e.options});function am(r,e){return new pu({type:"union",options:r,inclusive:!1,...b.normalizeParams(e)})}var mu=d("ZodDiscriminatedUnion",(r,e)=>{cr.init(r,e),Ga.init(r,e)});function sm(r,e,n){return new mu({type:"union",options:e,discriminator:r,...b.normalizeParams(n)})}var fu=d("ZodIntersection",(r,e)=>{Ba.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ic(r,n,i,t)});function gu(r,e){return new fu({type:"intersection",left:r,right:e})}var hu=d("ZodTuple",(r,e)=>{rn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Pc(r,n,i,t),r.rest=n=>r.clone({...r._zod.def,rest:n})});function vu(r,e,n){let i=e instanceof w,t=i?n:e,o=i?e:null;return new hu({type:"tuple",items:r,rest:o,...b.normalizeParams(t)})}var mt=d("ZodRecord",(r,e)=>{Wa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>zc(r,n,i,t),r.keyType=e.keyType,r.valueType=e.valueType});function bu(r,e,n){return!e||!e._zod?new mt({type:"record",keyType:Qt(),valueType:r,...b.normalizeParams(e)}):new mt({type:"record",keyType:r,valueType:e,...b.normalizeParams(n)})}function cm(r,e,n){let i=G(r);return i._zod.values=void 0,new mt({type:"record",keyType:i,valueType:e,...b.normalizeParams(n)})}function um(r,e,n){return new mt({type:"record",keyType:r,valueType:e,mode:"loose",...b.normalizeParams(n)})}var yu=d("ZodMap",(r,e)=>{Va.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>kc(r,n,i,t),r.keyType=e.keyType,r.valueType=e.valueType,r.min=(...n)=>r.check(ae(...n)),r.nonempty=n=>r.check(ae(1,n)),r.max=(...n)=>r.check(ye(...n)),r.size=(...n)=>r.check(Re(...n))});function lm(r,e,n){return new yu({type:"map",keyType:r,valueType:e,...b.normalizeParams(n)})}var xu=d("ZodSet",(r,e)=>{Ja.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>_c(r,n,i,t),r.min=(...n)=>r.check(ae(...n)),r.nonempty=n=>r.check(ae(1,n)),r.max=(...n)=>r.check(ye(...n)),r.size=(...n)=>r.check(Re(...n))});function dm(r,e){return new xu({type:"set",valueType:r,...b.normalizeParams(e)})}var ft=d("ZodEnum",(r,e)=>{Ka.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>mc(r,i,t,o),r.enum=e.entries,r.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));r.extract=(i,t)=>{let o={};for(let a of i)if(n.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ft({...e,checks:[],...b.normalizeParams(t),entries:o})},r.exclude=(i,t)=>{let o={...e.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new ft({...e,checks:[],...b.normalizeParams(t),entries:o})}});function fi(r,e){let n=Array.isArray(r)?Object.fromEntries(r.map(i=>[i,i])):r;return new ft({type:"enum",entries:n,...b.normalizeParams(e)})}function pm(r,e){return new ft({type:"enum",entries:r,...b.normalizeParams(e)})}var $u=d("ZodLiteral",(r,e)=>{qa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>fc(r,n,i,t),r.values=new Set(e.values),Object.defineProperty(r,"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 mm(r,e){return new $u({type:"literal",values:Array.isArray(r)?r:[r],...b.normalizeParams(e)})}var ku=d("ZodFile",(r,e)=>{Ha.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>vc(r,n,i,t),r.min=(n,i)=>r.check(ae(n,i)),r.max=(n,i)=>r.check(ye(n,i)),r.mime=(n,i)=>r.check(it(Array.isArray(n)?n:[n],i))});function fm(r){return Js(ku,r)}var _u=d("ZodTransform",(r,e)=>{Xa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>$c(r,n,i,t),r._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(r.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(b.issue(o,n.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),n.issues.push(b.issue(a))}};let t=e.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=t,n.fallback=!0,n)}});function gi(r){return new _u({type:"transform",transform:r})}var hi=d("ZodOptional",(r,e)=>{nn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Cn(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function tr(r){return new hi({type:"optional",innerType:r})}var wu=d("ZodExactOptional",(r,e)=>{Ya.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Cn(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Su(r){return new wu({type:"optional",innerType:r})}var Iu=d("ZodNullable",(r,e)=>{Qa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ec(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function rr(r){return new Iu({type:"nullable",innerType:r})}function gm(r){return tr(rr(r))}var Pu=d("ZodDefault",(r,e)=>{es.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Dc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});function zu(r,e){return new Pu({type:"default",innerType:r,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var Eu=d("ZodPrefault",(r,e)=>{ts.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Uc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Tu(r,e){return new Eu({type:"prefault",innerType:r,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var vi=d("ZodNonOptional",(r,e)=>{rs.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Tc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Du(r,e){return new vi({type:"nonoptional",innerType:r,...b.normalizeParams(e)})}var Uu=d("ZodSuccess",(r,e)=>{ns.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>bc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function hm(r){return new Uu({type:"success",innerType:r})}var Ru=d("ZodCatch",(r,e)=>{is.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Rc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});function Ou(r,e){return new Ru({type:"catch",innerType:r,catchValue:typeof e=="function"?e:()=>e})}var Nu=d("ZodNaN",(r,e)=>{os.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>gc(r,n,i,t)});function vm(r){return Ws(Nu,r)}var ur=d("ZodPipe",(r,e)=>{on.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Oc(r,n,i,t),r.in=e.in,r.out=e.out});function Jn(r,e){return new ur({type:"pipe",in:r,out:e})}var lr=d("ZodCodec",(r,e)=>{ur.init(r,e),Jt.init(r,e)});function bm(r,e,n){return new lr({type:"pipe",in:r,out:e,transform:n.decode,reverseTransform:n.encode})}function ym(r){let e=r._zod.def;return new lr({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var ju=d("ZodPreprocess",(r,e)=>{ur.init(r,e),as.init(r,e)}),Au=d("ZodReadonly",(r,e)=>{ss.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Nc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Cu(r){return new Au({type:"readonly",innerType:r})}var Lu=d("ZodTemplateLiteral",(r,e)=>{cs.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>hc(r,n,i,t)});function xm(r,e){return new Lu({type:"template_literal",parts:r,...b.normalizeParams(e)})}var Zu=d("ZodLazy",(r,e)=>{ds.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ac(r,n,i,t),r.unwrap=()=>r._zod.def.getter()});function Fu(r){return new Zu({type:"lazy",getter:r})}var Mu=d("ZodPromise",(r,e)=>{ls.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>jc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function $m(r){return new Mu({type:"promise",innerType:r})}var Gu=d("ZodFunction",(r,e)=>{us.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>xc(r,n,i,t)});function km(r){return new Gu({type:"function",input:Array.isArray(r?.input)?vu(r?.input):r?.input??ar(je()),output:r?.output??je()})}var dr=d("ZodCustom",(r,e)=>{ps.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>yc(r,n,i,t)});function _m(r){let e=new U({check:"custom"});return e._zod.check=r,e}function wm(r,e){return Ks(dr,r??(()=>!0),e)}function Bu(r,e={}){return qs(dr,r,e)}function Wu(r,e){return Hs(r,e)}var Sm=Xs,Im=Ys;function Pm(r,e={}){let n=new dr({type:"custom",check:"custom",fn:i=>i instanceof r,abort:!0,...b.normalizeParams(e)});return n._zod.bag.Class=r,n._zod.check=i=>{i.value instanceof r||i.issues.push({code:"invalid_type",expected:r.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var zm=(...r)=>Qs({Codec:lr,Boolean:bt,String:gt},...r);function Em(r){let e=Fu(()=>mi([Qt(r),tu(),ru(),au(),ar(e),bu(Qt(),e)]));return e}function Tm(r,e){return new ju({type:"pipe",in:gi(r),out:e})}var Vh={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 Jh(r){N({customError:r})}function Kh(){return N().customError}var Vu;Vu||(Vu={});var $={...Yt,...Fn,iso:pt},qh=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Hh(r,e){let n=r.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function Xh(r,e){if(!r.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=r.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!e.defs[t])throw new Error(`Reference not found: ${r}`);return e.defs[t]}throw new Error(`Reference not found: ${r}`)}function Dm(r,e){if(r.not!==void 0){if(typeof r.not=="object"&&Object.keys(r.not).length===0)return $.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(r.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(r.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(r.if!==void 0||r.then!==void 0||r.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(r.dependentSchemas!==void 0||r.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let t=r.$ref;if(e.refs.has(t))return e.refs.get(t);if(e.processing.has(t))return $.lazy(()=>{if(!e.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return e.refs.get(t)});e.processing.add(t);let o=Xh(t,e),a=M(o,e);return e.refs.set(t,a),e.processing.delete(t),a}if(r.enum!==void 0){let t=r.enum;if(e.version==="openapi-3.0"&&r.nullable===!0&&t.length===1&&t[0]===null)return $.null();if(t.length===0)return $.never();if(t.length===1)return $.literal(t[0]);if(t.every(a=>typeof a=="string"))return $.enum(t);let o=t.map(a=>$.literal(a));return o.length<2?o[0]:$.union([o[0],o[1],...o.slice(2)])}if(r.const!==void 0)return $.literal(r.const);let n=r.type;if(Array.isArray(n)){let t=n.map(o=>{let a={...r,type:o};return Dm(a,e)});return t.length===0?$.never():t.length===1?t[0]:$.union(t)}if(!n)return $.any();let i;switch(n){case"string":{let t=$.string();if(r.format){let o=r.format;o==="email"?t=t.check($.email()):o==="uri"||o==="uri-reference"?t=t.check($.url()):o==="uuid"||o==="guid"?t=t.check($.uuid()):o==="date-time"?t=t.check($.iso.datetime()):o==="date"?t=t.check($.iso.date()):o==="time"?t=t.check($.iso.time()):o==="duration"?t=t.check($.iso.duration()):o==="ipv4"?t=t.check($.ipv4()):o==="ipv6"?t=t.check($.ipv6()):o==="mac"?t=t.check($.mac()):o==="cidr"?t=t.check($.cidrv4()):o==="cidr-v6"?t=t.check($.cidrv6()):o==="base64"?t=t.check($.base64()):o==="base64url"?t=t.check($.base64url()):o==="e164"?t=t.check($.e164()):o==="jwt"?t=t.check($.jwt()):o==="emoji"?t=t.check($.emoji()):o==="nanoid"?t=t.check($.nanoid()):o==="cuid"?t=t.check($.cuid()):o==="cuid2"?t=t.check($.cuid2()):o==="ulid"?t=t.check($.ulid()):o==="xid"?t=t.check($.xid()):o==="ksuid"&&(t=t.check($.ksuid()))}typeof r.minLength=="number"&&(t=t.min(r.minLength)),typeof r.maxLength=="number"&&(t=t.max(r.maxLength)),r.pattern&&(t=t.regex(new RegExp(r.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?$.number().int():$.number();typeof r.minimum=="number"&&(t=t.min(r.minimum)),typeof r.maximum=="number"&&(t=t.max(r.maximum)),typeof r.exclusiveMinimum=="number"?t=t.gt(r.exclusiveMinimum):r.exclusiveMinimum===!0&&typeof r.minimum=="number"&&(t=t.gt(r.minimum)),typeof r.exclusiveMaximum=="number"?t=t.lt(r.exclusiveMaximum):r.exclusiveMaximum===!0&&typeof r.maximum=="number"&&(t=t.lt(r.maximum)),typeof r.multipleOf=="number"&&(t=t.multipleOf(r.multipleOf)),i=t;break}case"boolean":{i=$.boolean();break}case"null":{i=$.null();break}case"object":{let t={},o=r.properties||{},a=new Set(r.required||[]);for(let[u,c]of Object.entries(o)){let l=M(c,e);t[u]=a.has(u)?l:l.optional()}if(r.propertyNames){let u=M(r.propertyNames,e),c=r.additionalProperties&&typeof r.additionalProperties=="object"?M(r.additionalProperties,e):$.any();if(Object.keys(t).length===0){i=$.record(u,c);break}let l=$.object(t).passthrough(),m=$.looseRecord(u,c);i=$.intersection(l,m);break}if(r.patternProperties){let u=r.patternProperties,c=Object.keys(u),l=[];for(let g of c){let f=M(u[g],e),x=$.string().regex(new RegExp(g));l.push($.looseRecord(x,f))}let m=[];if(Object.keys(t).length>0&&m.push($.object(t).passthrough()),m.push(...l),m.length===0)i=$.object({}).passthrough();else if(m.length===1)i=m[0];else{let g=$.intersection(m[0],m[1]);for(let f=2;f<m.length;f++)g=$.intersection(g,m[f]);i=g}break}let s=$.object(t);r.additionalProperties===!1?i=s.strict():typeof r.additionalProperties=="object"?i=s.catchall(M(r.additionalProperties,e)):i=s.passthrough();break}case"array":{let t=r.prefixItems,o=r.items;if(t&&Array.isArray(t)){let a=t.map(u=>M(u,e)),s=o&&typeof o=="object"&&!Array.isArray(o)?M(o,e):void 0;s?i=$.tuple(a).rest(s):i=$.tuple(a),typeof r.minItems=="number"&&(i=i.check($.minLength(r.minItems))),typeof r.maxItems=="number"&&(i=i.check($.maxLength(r.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>M(u,e)),s=r.additionalItems&&typeof r.additionalItems=="object"?M(r.additionalItems,e):void 0;s?i=$.tuple(a).rest(s):i=$.tuple(a),typeof r.minItems=="number"&&(i=i.check($.minLength(r.minItems))),typeof r.maxItems=="number"&&(i=i.check($.maxLength(r.maxItems)))}else if(o!==void 0){let a=M(o,e),s=$.array(a);typeof r.minItems=="number"&&(s=s.min(r.minItems)),typeof r.maxItems=="number"&&(s=s.max(r.maxItems)),i=s}else i=$.array($.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function M(r,e){if(typeof r=="boolean")return r?$.any():$.never();let n=Dm(r,e),i=r.type||r.enum!==void 0||r.const!==void 0;if(r.anyOf&&Array.isArray(r.anyOf)){let s=r.anyOf.map(c=>M(c,e)),u=$.union(s);n=i?$.intersection(n,u):u}if(r.oneOf&&Array.isArray(r.oneOf)){let s=r.oneOf.map(c=>M(c,e)),u=$.xor(s);n=i?$.intersection(n,u):u}if(r.allOf&&Array.isArray(r.allOf))if(r.allOf.length===0)n=i?n:$.any();else{let s=i?n:M(r.allOf[0],e),u=i?0:1;for(let c=u;c<r.allOf.length;c++)s=$.intersection(s,M(r.allOf[c],e));n=s}r.nullable===!0&&e.version==="openapi-3.0"&&(n=$.nullable(n)),r.readOnly===!0&&(n=$.readonly(n)),r.default!==void 0&&(n=n.default(r.default));let t={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in r&&(t[s]=r[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in r&&(t[s]=r[s]);for(let s of Object.keys(r))qh.has(s)||(t[s]=r[s]);return Object.keys(t).length>0&&e.registry.add(n,t),r.description&&(n=n.describe(r.description)),n}function Um(r,e){if(typeof r=="boolean")return r?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(r))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Hh(n,e?.defaultTarget),t=n.$defs||n.definitions||{},o={version:i,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??Z};return M(n,o)}var Ju={};te(Ju,{bigint:()=>tv,boolean:()=>ev,date:()=>rv,number:()=>Qh,string:()=>Yh});function Yh(r){return hs(gt,r)}function Qh(r){return ws(vt,r)}function ev(r){return Ds(bt,r)}function tv(r){return Rs(yt,r)}function rv(r){return Bs(or,r)}N(an());var Rm=k.object({user:k.object({id:k.string(),name:k.string()}).nullable(),organization:k.object({id:k.string(),name:k.string()}),permissions:k.array(k.string())});var nv=["ActionNotFound","AuthenticationRequired","BadGateway","BadRequest","Conflict","FileAlreadyExists","FileIsDirectory","FileNotDirectory","FileNotFound","FilesystemUnavailable","InternalError","InvalidArgument","InvalidConfiguration","InvalidRequest","InvalidResponse","InvalidServiceCommand","MethodNotAllowed","NotebookInitializationFailed","NotebookUnavailable","NotFound","PayloadTooLarge","PermissionDenied","RateLimited","RequestFailed","RuntimeOperationFailed","ServiceNotFound","ServiceUnavailable","UnprocessableEntity","ValidationFailed","WorkspaceUnavailable"],D=class extends Error{constructor(e,n){super(e),this.name=new.target.name,this.cause=n}},j=class r extends D{constructor(e,n){super(e,n.cause),this.source=n.source,this.status=n.status,this.code=n.code,this.details=n.details}static is(e,n){return e instanceof r&&(n===void 0||e.code===n)}static isValidation(e){return r.is(e,"ValidationFailed")&&sv(e.details)!==void 0}is(e){return this.code===e}},R=class r extends D{constructor(n,i,t,o){super(n,t);this.code=i;this.response=o}static is(n,i){return n instanceof r&&(i===void 0||n.code===i)}is(n){return this.code===n}};function $t(r,e,n){let i=Ku(e),t=ov(i?.status),o=Om(i?.code),a=Om(i?.message);if(t===void 0||!iv(o)||a===void 0)throw new R("PHPSandbox returned an invalid error response.","InvalidResponse",n??e);return new j(a,{source:r,status:t,code:o,details:i?.details,cause:n})}function iv(r){return typeof r=="string"&&nv.includes(r)}function ov(r){return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}function Om(r){return typeof r=="string"&&r.trim()!==""?r.trim():void 0}function Ku(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)?r:void 0}function av(r){let e=Ku(r);if(e===void 0)return;let n=Object.entries(e);if(n.every(([,i])=>Array.isArray(i)&&i.every(t=>typeof t=="string")))return Object.fromEntries(n)}function sv(r){let e=Ku(r),n=av(e?.errors);return n===void 0?void 0:{errors:n}}var xt=class extends Error{constructor(n,i){super(n);this.time=i}},pr=class r extends R{constructor(n,i,t){super(n,"SendTimeout",t);this.time=i}static fromPromiseTimeoutError(n){return new r(n.message,n.time,n)}};var P$=k.enum(["cloudflare-containers","ssh-server","laravel-cloud"]),cv=k.enum(["pending","queued","building","deploying","healthy","failed","stopped","deleting","deleted","delete_failed"]),z$=k.enum(["pending","queued","running","succeeded","failed","cancelled"]),E$=k.enum(["created","ready","deleted"]),T$=k.enum(["nano","small","medium","large","lite","basic","standard-1","standard-2"]),D$=k.enum(["ENAM","WNAM","EEUR","WEUR","APAC","SAM","ME","OC","AFR"]),U$=k.enum(["eu","fedramp"]),R$=k.enum(["none","password"]),uv=k.enum(["build","runtime"]),lv=k.enum(["build","publish","runtime"]),dv=k.preprocess(r=>Array.isArray(r)&&r.length===0?{}:r,k.record(k.string(),k.unknown())),Nm=k.object({id:k.union([k.number(),k.string()]).optional(),sequence:k.number(),type:k.string(),payload:dv,createdAt:k.string().nullable()}).passthrough(),qu=k.object({sequence:k.number(),stream:uv,content:k.string(),createdAt:k.string().nullable()}).passthrough(),jm=k.object({name:k.string(),status:k.enum(["running","completed","failed"]).optional(),data:k.record(k.string(),k.unknown()).optional()}).strict(),Am=k.object({stream:lv,content:k.string()}).strict(),Hu=k.object({success:k.boolean(),publicationId:k.string(),url:k.string().url(),buildId:k.string(),releaseId:k.string(),status:cv}).strict(),pv=jm.extend({type:k.literal("phase")}).strict(),mv=Am.extend({type:k.literal("log")}).strict(),fv=Hu.extend({type:k.literal("result")}).strict(),gv=k.discriminatedUnion("type",[pv,mv,fv]),hv=k.object({message:k.string().optional()}).passthrough(),Cm=k.enum(["phase","log","done","result","error"]),vv=k.object({event:k.literal("phase"),data:jm}).strict(),bv=k.object({event:k.literal("log"),data:Am}).strict(),yv=k.object({event:k.literal("done"),data:Hu}).strict(),xv=k.object({event:k.literal("result"),data:Hu}).strict(),$v=k.object({event:k.literal("error"),data:hv}).strict(),Lm=k.discriminatedUnion("event",[vv,bv,yv,xv,$v]).transform(r=>{if(r.event==="error")throw new Error(r.data.message??"Publish failed");let e=r.event==="done"?"result":r.event;return gv.parse({type:e,...r.data})});async function*bi(r,e={}){if(r instanceof Response&&(!r.ok||!r.body))throw await r.body?.cancel().catch(()=>{}),new D(`Publishing stream is unavailable (HTTP ${r.status}).`);let i=(r instanceof Response?r.body:r).getReader(),t=new TextDecoder,o="",a="message",s=[],u=!1,c=!1;function l(){let g=a,f=s;if(a="message",s=[],!f.length||!Cm.safeParse(g).success)return null;let x=f.join(`
|
|
66
|
-
`),_;try{_=JSON.parse(x)}catch{_=x}let P=Lm.parse({event:g,data:_});return P.type==="result"&&(c=!0),P}function m(g){if(g==="")return l();if(g.startsWith(":"))return null;let f=g.indexOf(":"),x=f<0?g:g.slice(0,f),_=f<0?"":g.slice(f+1);return _.startsWith(" ")&&(_=_.slice(1)),x==="event"&&(a=_),x==="data"&&s.push(_),null}try{for(;;){let{done:g,value:f}=await i.read();o+=g?t.decode():t.decode(f,{stream:!0});let x;for(;(x=/\r\n|\r|\n/.exec(o))&&!(!g&&x[0]==="\r"&&x.index===o.length-1);){let _=m(o.slice(0,x.index));o=o.slice(x.index+x[0].length),_&&(yield _)}if(g){if(u=!0,o){let P=m(o);P&&(yield P)}let _=l();if(_&&(yield _),e.requireResult!==!1&&!c)throw new
|
|
67
|
-
`);i=a.pop()??"";for(let s of a){let u=s.trim();u!==""&&o.enqueue(e.parse(JSON.parse(u)))}},flush(t){i+=n.decode();let o=i.trim();o!==""&&t.enqueue(e.parse(JSON.parse(o)))}}))}var wt=class{constructor(e,n){this.notebookId=e;this.client=n;this.resources=new we(n,`${this.path}/publication/resources`)}get path(){return`/notebook/${encodeURIComponent(this.notebookId)}`}async current(){try{let e=await this.client.get(`${this.path}/publication`);return new Se(e.data,this.client,this.notebookId)}catch(e){if(j.is(e)&&e.status===404)return null;throw e}}async readiness(){return(await this.client.get(`${this.path}/publication/readiness`)).data}async configuration(){return(await this.client.get(`${this.path}/publication/configuration`)).data}async updateConfiguration(e){return(await this.client.patch(`${this.path}/publication/configuration`,e)).data}async prepare(e){return(await this.client.post(`${this.path}/publication/plan`,e)).data}async publish(e){let n=(await this.client.post(`${this.path}/publication`,e)).data;return"confirmationRequired"in n||this.startApplicationRuns(n),n}async application(e){return(await this.client.get(`${this.path}/publication/application/${encodeURIComponent(e)}`)).data}async retryApplication(e){let n=(await this.client.post(`${this.path}/publication/application/${encodeURIComponent(e)}/retry`,{})).data;return this.startApplicationRuns(n),n}async destroyApplication(e,n={}){let i=n.deleteResources?"?deleteResources=1":"";await this.client.delete(`${this.path}/publication/application/${encodeURIComponent(e)}${i}`)}startApplicationRuns(e){for(let n of e.apps)(e.selectedAppIds??[]).includes(n.appId)&&["pending","queued","building","deploying"].includes(n.publication.status)&&new _e(new Se(n.publication,this.client,this.notebookId),this.client).start()}async catalog(e,n){let i=new URLSearchParams({provider:e});return n!==void 0&&i.set("serverId",n),(await this.client.get(`${this.path}/publication/catalog?${i}`)).data}};function Fm(r={},e=null){let n={...r},i={database:e?.databaseId,cache:e?.cacheId,storage:e?.storageId},t=["database","cache","storage"];for(let o of t){let a=i[o];r[o]?.mode==="create"&&a&&(n[o]={mode:"reuse",id:a})}return n}var Mm="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var A=(r=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+=Mm[n[r]&63];return e};var el=(t=>(t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink",t))(el||{}),tl=(i=>(i[i.UPDATED=2]="UPDATED",i[i.ADDED=4]="ADDED",i[i.DELETED=8]="DELETED",i))(tl||{}),rl=(i=>(i[i.UPDATED=1]="UPDATED",i[i.ADDED=2]="ADDED",i[i.DELETED=3]="DELETED",i))(rl||{}),Qu=class{constructor(e,n){this.disposable=e;this.onDispose=n;this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposable.dispose(),this.onDispose())}},yi=class{constructor(e,n=i=>e.onDidConnect(i)){this.okra=e;this.watches=new Map;this.registerReconnectHandler(n)}registerReconnectHandler(e){e!==null&&e(()=>{for(let{path:n,options:i}of this.watches.values())this.okra.invoke("fs.watch",{path:n,options:i}).catch(()=>{})})}async write(e,n,i={}){let t={overwrite:!0,create:!0,unlock:!1,atomic:!1,...i},o=typeof n=="string"?new TextEncoder().encode(n):n;if(this.okra.runtimeTransport==="rest"){let u=o instanceof Uint8Array?o:await Sv(o);await this.okra.invoke("fs.writeFile",{path:e,contents:u,options:t}).catch(c=>this.handleError(c));return}let a=A(),s=this.okra.invoke("fs.writeStream",{id:a,path:e,options:t});s.catch(()=>{});try{for await(let c of wv(o))if(!await this.okra.invoke("fs.writeChunk",{id:a,contents:c}))throw new Error(`File write stream ${a} is not available`);if(!await this.okra.invoke("fs.endWrite",{id:a}))throw new Error(`File write stream ${a} could not be completed`);await s}catch(u){throw await this.okra.invoke("fs.abortWrite",{id:a}).catch(()=>!1),await s.catch(()=>!1),u}}async read(e){try{let n=await this.okra.invoke("fs.readFile",{path:e});return n instanceof Uint8Array?n:new TextEncoder().encode(n)}catch(n){this.handleError(n)}}async readText(e){return new TextDecoder().decode(await this.read(e))}async readLines(e,n){try{let i=await this.okra.invoke("fs.readFile",{path:e,lineRange:{lineStart:n.start,lineEnd:n.end}});if(typeof i=="string"||i instanceof Uint8Array)throw new Error(`Unexpected ranged file response for ${e}`);return{start:i.lineStart,end:i.lineEnd,content:i.content,...i.error===null?{}:{warning:i.error}}}catch(i){this.handleError(i)}}readStream(e){if(this.okra.runtimeTransport==="rest")return new ReadableStream({start:async o=>{try{o.enqueue(await this.read(e)),o.close()}catch(a){o.error(a)}}});let n=A(),i=null,t=!1;return new ReadableStream({start:o=>{i=this.okra.listen(`fs.read.${n}`,a=>{o.enqueue(a.data)}),this.okra.invoke("fs.readStream",{id:n,path:e}).then(()=>{t||(t=!0,i?.dispose(),o.close())}).catch(a=>{t||(t=!0,i?.dispose(),o.error(a))})},cancel:async()=>{t||(t=!0,i?.dispose(),await this.okra.invoke("fs.cancelRead",{id:n}).catch(()=>!1))}})}follow(e,n={}){if(this.okra.runtimeTransport==="rest")return new ReadableStream({start(c){c.error(new D("Following files requires the realtime transport."))}});let i=A(),t=null,o=null,a=!1,s=!1,u=async()=>{s||(s=!0,t?.dispose(),t=null,o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,a&&await this.okra.invoke("fs.cancelFollow",{id:i}).catch(()=>!1))};return new ReadableStream({start:c=>{if(t=this.okra.listen(`fs.follow.${i}`,l=>{s||c.enqueue(l.data)}),n.signal){if(o=()=>{u().finally(()=>c.error(n.signal?.reason??new Error("Aborted")))},n.signal.aborted){o();return}n.signal.addEventListener("abort",o,{once:!0})}a=!0,this.okra.invoke("fs.follow",{id:i,path:e,lines:n.lines??10}).then(()=>{s||(s=!0,t?.dispose(),o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,c.close())}).catch(l=>{s||(s=!0,t?.dispose(),o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,c.error(l))})},cancel:u})}find(e,n={useIgnoreFiles:!1,followSymlinks:!1,useGlobalIgnoreFiles:!1,useParentIgnoreFiles:!1}){return this.okra.invoke("fs.find",{query:e,options:{includes:[],excludes:["**/storage","**/vendor","**/node_modules","**/.git","**/.svn","**/.hg","**/CVS","**/.DS_Store","**/Thumbs.db","**/*.crswap"],useIgnoreFiles:!1,followSymlinks:!1,useGlobalIgnoreFiles:!1,useParentIgnoreFiles:!1,...n}})}search(e,n,i){e.id||(e.id=A());let t={maxResults:5,afterContext:2,beforeContext:2,includes:[],excludes:["**/.git","**/.svn","**/.hg","**/CVS","**/.DS_Store","**/Thumbs.db","**/*.crswap","**/node_modules","**/vendor","**/bower_components","**/*.code-search"],useIgnoreFiles:!0,followSymlinks:!0,useGlobalIgnoreFiles:!0,useParentIgnoreFiles:!0,encoding:"utf-8",previewOptions:{matchLines:5,charsPerLine:1e3}},o=e.id,a=async u=>{u===!1&&s.dispose(),i&&await Promise.resolve(i(u))===!1&&s.dispose()},s=this.okra.listen(`fs.text.search.${o}`,a);return this.okra.invoke("fs.textSearch",{query:e,options:{...t,...n}}).finally(()=>s.dispose())}tail(e,n={}){return this.okra.invoke("fs.tail",{path:e,lines:n.lines??10}).then(({content:i})=>i).catch(i=>this.handleError(i))}stat(e){return this.okra.invoke("fs.stat",{path:e}).catch(n=>this.handleError(n))}move(e,n,i={}){return this.okra.invoke("fs.rename",{from:e,to:n,options:{overwrite:!1,...i}}).catch(t=>this.handleError(t))}remove(e,n={}){return this.okra.invoke("fs.delete",{path:e,options:{recursive:!1,useTrash:!1,atomic:!1,...n}}).catch(i=>this.handleError(i))}copy(e,n,i={}){return this.okra.invoke("fs.copy",{source:e,destination:n,options:{overwrite:!1,...i}}).catch(t=>this.handleError(t))}list(e,n={}){return this.okra.invoke("fs.readDirectory",{path:e,include:n.include??[],exclude:n.exclude??[]}).catch(i=>this.handleError(i))}createDirectory(e){return this.okra.invoke("fs.createDirectory",{path:e}).catch(n=>this.handleError(n))}watch(e,n,i){let t=this.okra.listen(`fs.watch.${e}`,i),o={dispose:()=>{t.dispose(),this.okra.invoke("fs.unwatch",{path:e}).catch(()=>{})}},a=new Qu(o,()=>{this.watches.get(e)?.onDidChange===i&&this.watches.delete(e)});return this.watches.set(e,{options:n,path:e,onDidChange:i}),this.okra.invoke("fs.watch",{path:e,options:n}).then(()=>a).catch(s=>{throw a.dispose(),s})}exists(e){return this.stat(e).then(()=>!0).catch(()=>!1)}async download(e={}){let n=A(),i=!!e.onChunk,t=[],o=this.okra.listen(`fs.download.${n}`,i?e.onChunk:a=>{t.push(a)});return this.okra.invoke("fs.download",{id:n,exclude:e.exclude,include:e.include}).then(()=>new Blob(t,{type:"application/octet-stream"})).finally(()=>o.dispose())}tree(e="/"){return this.okra.invoke("fs.tree",{path:e})}handleError(e){throw e}};async function*wv(r){if(r instanceof Uint8Array){yield r;return}yield*r}async function Sv(r){let e=[],n=0;for await(let o of r)e.push(o),n+=o.byteLength;let i=new Uint8Array(n),t=0;for(let o of e)i.set(o,t),t+=o.byteLength;return i}var Gm=(r,e)=>{let n;return Promise.race([r,new Promise((i,t)=>n=setTimeout(t,e,new xt("Timeout before promise can resolve",e)))]).finally(()=>clearTimeout(n))},xi=r=>{let e=null;return()=>e||(e=r())};var Iv=8,Pv=/[\x00-\x1f\x7f]/,mr=class{constructor(e){this.okra=e}list(){return this.okra.invoke("terminal.list")}async create(e={}){let n=e.id??A(),i=this.processHandle(n,e.abortSignal),t=typeof e.command=="string"&&e.args?.length?[e.command,...e.args]:e.command,{abortSignal:o,args:a,...s}=e;try{let u=await this.okra.invoke("terminal.create",{...s,id:n,kind:e.kind??"bash",size:e.size??[80,24],command:t},{abortSignal:o});return{...i.process,...u}}catch(u){throw i.dispose(),u}}async attach(e,n){let i=this.processHandle(e,n?.abortSignal);try{let t=await this.okra.invoke("terminal.attach",{id:e,replayHistory:n?.replayHistory},{abortSignal:n?.abortSignal});return t?{...i.process,...t}:(i.dispose(),!1)}catch(t){throw i.dispose(),t}}processHandle(e,n){let i=new Set,t,o=()=>{t&&(n?.removeEventListener("abort",t),t=void 0);for(let F of i)F.dispose();i.clear()},a="",s,u=()=>{if(s&&(clearTimeout(s),s=void 0),a==="")return;let F=a;a="",this.okra.send("terminal.input",{id:e,input:F})},c=()=>{s||(s=setTimeout(u,Iv))},l=F=>{let C=typeof F=="string"?F:new TextDecoder().decode(F);if(a+=C,Pv.test(C)){u();return}c()},m=()=>{u(),o()},g=new WritableStream({write:l,close:m,abort:m}),f=null,x=new ReadableStream({start:F=>{f=F,i.add(this.okra.listen(`terminal.output.${e}`,C=>{f?.enqueue(C.output)}))},cancel:()=>{f=null,m()}}),_=new Promise(F=>{i.add(this.okra.listen(`terminal.close.${e}`,C=>{if(f)try{f.close()}catch{}m(),F(C.exitCode)}))}),P=xi(()=>(m(),this.okra.invoke("terminal.close",{id:e}))),Tt=F=>this.okra.invoke("terminal.resize",{id:e,width:F.cols,height:F.rows});return n&&!n.aborted&&(t=()=>{P()},n.addEventListener("abort",t,{once:!0})),{process:{wait:()=>_,input:g,output:x,kill:P,resize:Tt},dispose:m}}};var fr=class{constructor(e){this.okra=e}message(e,n){return this.okra.invoke("lsp.message",{id:e,message:n})}listen(e,n,i){return this.okra.listen(`${n}.${e}`,t=>i(t))}onClose(e,n){return this.listen(e,"lsp.closed",i=>n(i.code,i.reason))}onError(e,n){return this.listen(e,"lsp.error",i=>n(i.message))}onClientDisconnect(e){return this.okra.onDidDisconnect(()=>e(1e3,"OKRA DISCONNECTED"))}onResponse(e,n){return this.listen(e,"lsp.response",i=>n(JSON.stringify(i)))}close(e){return this.okra.invoke("lsp.close",{id:e})}start(e){return this.okra.invoke("lsp.start",{id:e})}connection(e){return gr.create(e,this)}whenSocketConnected(){return this.okra.connected()}},gr=class r{constructor(e,n){this.id=e;this.lsp=n}send(e){return this.lsp.message(this.id,e)}onMessage(e){return this.lsp.onResponse(this.id,e)}onError(e){return this.lsp.onError(this.id,e)}onClose(e){return this.lsp.onClose(this.id,e)}dispose(){return this.lsp.close(this.id)}start(){return this.lsp.start(this.id)}onClientDisconnect(e){return this.lsp.onClientDisconnect(e)}whenSocketConnected(){return this.lsp.whenSocketConnected()}static create(e,n){return new r(e,n)}};function zv(r,e=[],n){let i=Array.isArray(e)?e:[],t=Array.isArray(e)?n:e;return{command:Array.isArray(r)?r:i.length>0?[r,...i]:r,opts:{tty:!1,...t}}}var de=class{constructor(){this.controller=null;this.closed=!1;this.stream=new ReadableStream({start:e=>{this.controller=e},cancel:()=>{this.closed=!0,this.controller=null}})}enqueue(e){this.closed||this.controller?.enqueue(e)}close(){this.closed||(this.closed=!0,this.controller?.close(),this.controller=null)}fail(e){this.closed||(this.closed=!0,this.controller?.error(e),this.controller=null)}},nl=class{constructor(e,n,i,t){this.id=e;this.okra=n;let o=new de,a=new de,s=new de;this.output=o.stream,this.stdout=a.stream,this.stderr=s.stream,this.stdin=new WritableStream({write:async x=>{let _=typeof x=="string"?x:new TextDecoder().decode(x);if(!await this.okra.invoke("shell.input",{id:this.id,input:_}))throw new Error(`Process ${this.id} is not accepting input`)}});let u=new TextEncoder,c=this.okra.listen(`shell.output.${this.id}`,x=>{let _=u.encode(x.output),P=x.source??"output";o.enqueue({source:P,data:_}),P==="stderr"?s.enqueue(_):a.enqueue(_)}),l=()=>{c?.dispose(),c=null,o.close(),a.close(),s.close()},m=x=>{c?.dispose(),c=null,o.fail(x),a.fail(x),s.fail(x)},{abortSignal:g,...f}=t;this.completion=this.okra.invoke("shell.exec",{command:i,opts:{...f,id:this.id}},{abortSignal:g}).then(x=>(l(),x)).catch(x=>{throw m(x),x})}wait(){return this.completion}async kill(){await this.okra.invoke("shell.kill",{id:this.id})}},hr=class{constructor(e){this.okra=e}run(e,n=[],i){let t=zv(e,n,i),o=t.opts?.id??A();return new nl(o,this.okra,t.command,{...t.opts,id:o})}};var il=class{constructor(e,n){this.client=e;this.notebookId=n}async set(e){return(await this.client.put(`/notebook/${this.notebookId}/composer/credentials`,e)).data}async remove(e,n){let i=new URLSearchParams({type:e});n&&i.set("url",n),await this.client.delete(`/notebook/${this.notebookId}/composer/credentials?${i.toString()}`)}},ol=class{constructor(e,n,i,t,o){this.id=e;this.okra=n;let a=new de,s=new de,u=new de;this.output=a.stream,this.stdout=s.stream,this.stderr=u.stream;let c=new TextEncoder,l=this.okra.listen(`composer.output.${this.id}`,f=>{let x=c.encode(f.output),_=f.source??"output";a.enqueue({source:_,data:x}),_==="stderr"?u.enqueue(x):s.enqueue(x)}),m=()=>{l?.dispose(),l=null,a.close(),s.close(),u.close()},g=f=>{l?.dispose(),l=null,a.fail(f),s.fail(f),u.fail(f)};this.completion=this.okra.invoke("composer.invoke",{id:e,command:i,args:t,options:o}).then(f=>(m(),f)).catch(f=>{throw g(f),f})}wait(){return this.completion}async kill(){await this.okra.invoke("composer.kill",{id:this.id})}},vr=class{constructor(e,n){this.okra=e;this.credentials=new il(n,e.data.id)}run(e,n={},i={}){return new ol(A(),this.okra,e,n,i)}packages(){return this.okra.invoke("composer.packages")}};var $i=class{constructor(e){this.okra=e;this.references=new Map;this.synchronization=Promise.resolve();e.runtimeTransport==="realtime"&&e.onDidConnect(()=>{this.references.size>0&&this.synchronize()})}async acquire(e){this.references.set(e,(this.references.get(e)??0)+1);try{await this.synchronize()}catch(i){throw this.removeReference(e),i}let n=!1;return async()=>{n||(n=!0,this.removeReference(e),await this.synchronize())}}removeReference(e){let n=this.references.get(e)??0;n<=1?this.references.delete(e):this.references.set(e,n-1)}synchronize(){return this.synchronization=this.synchronization.catch(()=>{}).then(async()=>{let e=Array.from(this.references.keys());e.length===0?await this.okra.invoke("container.stop-telemetry"):await this.okra.invoke("container.stream-telemetry",{features:e})}),this.synchronization}};function St(r,e,n,i,t,o={}){let a=null,s=null,u=!1,c=null,l=async()=>{u||(u=!0,a?.dispose(),a=null,c&&o.signal&&o.signal.removeEventListener("abort",c),c=null,await s?.(),s=null)};return new ReadableStream({start(m){if(a=r.listen(i,g=>{u||m.enqueue(t(g))}),o.signal){if(c=()=>{l().finally(()=>m.error(o.signal?.reason??new Error("Aborted")))},o.signal.aborted){c();return}o.signal.addEventListener("abort",c,{once:!0})}e.acquire(n).then(async g=>{if(u){await g();return}s=g}).catch(g=>{u||(u=!0,a?.dispose(),c&&o.signal&&o.signal.removeEventListener("abort",c),c=null,m.error(g))})},cancel:l})}var br=class{constructor(e,n){this.okra=e;this.telemetry=n}follow(e={}){return St(this.okra,this.telemetry,"logs","notebook.log",n=>({timestamp:new Date().toISOString(),source:"runtime",message:n}),e)}};var yr=class{constructor(e,n){this.okra=e;this.telemetry=n}current(){return this.okra.invoke("container.stats")}watch(e={}){return St(this.okra,this.telemetry,"stats","container.stats",n=>n,e)}};var xr=class{constructor(e,n){this.okra=e;this.telemetry=n}list(){return this.okra.invoke("container.opened-ports")}resolve(e){return this.okra.invoke("container.resolve-port",{port:e})}watch(e={}){return St(this.okra,this.telemetry,"ports","container.ports",n=>n,e)}};var al=class{constructor(e){this.metrics=e}current(){return this.metrics.current()}watch(e={}){return this.metrics.watch(e)}},sl=class{constructor(e){this.logs=e}follow(e={}){return this.logs.follow(e)}},cl=class{constructor(e){this.ports=e}list(){return this.ports.list()}resolve(e){return this.ports.resolve(e)}watch(e={}){return this.ports.watch(e)}},$r=class{constructor(e){this.notebook=e;let n=new $i(e);this.metrics=new al(new yr(e,n)),this.logs=new sl(new br(e,n)),this.ports=new cl(new xr(e,n))}setPhpVersion(e){return this.notebook.invoke("container.set-php",{version:e})}};var kr=class{constructor(e){this.okra=e}eval(e,n="",i={prependWith:"",appendWith:""}){return this.okra.invoke("repl.eval",{code:e,args:n,repl:i})}write(e){return this.okra.invoke("repl.write",{input:e})}stop(){return this.okra.invoke("repl.stop")}resize(e,n){return this.okra.invoke("repl.resize",{cols:e,rows:n})}listen(e,n){return this.okra.listen(e,n)}onOutput(e){return this.okra.listen("repl.output",e)}};var ul=["redis"],Bm=["start","nginx",...ul],_r=class{constructor(e){this.okra=e}list(){return this.okra.invoke("service.list")}run(e,n){return this.okra.invoke("service.run",{name:e,command:n})}stop(e){return this.okra.invoke("service.stop",{name:e})}logs(e,n={}){return n.follow?this.followLogs(e,n):this.okra.invoke("service.logs",{name:e,tail:n.tail}).then(i=>{if(!("output"in i))throw new Error(`Unexpected service.logs response for ${e}`);return i.output})}followLogs(e,n){let i=n.id||A(),t=new Set,o=null,a=!1,s=()=>{for(let m of t)m.dispose();t.clear()},u=()=>{if(!a&&(a=!0,s(),o))try{o.close()}catch{}},c=m=>{a||(a=!0,s(),o&&o.error(m))},l=xi(()=>(u(),this.okra.invoke("service.stop-logs",{id:i})));return new ReadableStream({start:m=>{o=m,t.add(this.okra.listen(`service.log.${i}`,g=>{o?.enqueue(g.output)})),this.okra.invoke("service.logs",{name:e,tail:n.tail,follow:!0,id:i}).catch(g=>{c(g)})},cancel:()=>l().then(()=>{})})}};var wr=class{constructor(e){this.okra=e}get(){return this.okra.invoke("config.get")}update(e){return this.okra.invoke("config.update",{config:e})}setPorts(e){return this.okra.invoke("config.set-ports",{ports:e})}};function Wm(r){let e=r.length,n=0,i=0;for(;i<e;){let t=r.charCodeAt(i++);if((t&4294967168)===0){n++;continue}else if((t&4294965248)===0)n+=2;else{if(t>=55296&&t<=56319&&i<e){let o=r.charCodeAt(i);(o&64512)===56320&&(++i,t=((t&1023)<<10)+(o&1023)+65536)}(t&4294901760)===0?n+=3:n+=4}}return n}function Ev(r,e,n){let i=r.length,t=n,o=0;for(;o<i;){let a=r.charCodeAt(o++);if((a&4294967168)===0){e[t++]=a;continue}else if((a&4294965248)===0)e[t++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&o<i){let s=r.charCodeAt(o);(s&64512)===56320&&(++o,a=((a&1023)<<10)+(s&1023)+65536)}(a&4294901760)===0?(e[t++]=a>>12&15|224,e[t++]=a>>6&63|128):(e[t++]=a>>18&7|240,e[t++]=a>>12&63|128,e[t++]=a>>6&63|128)}e[t++]=a&63|128}}var Tv=new TextEncoder,Dv=50;function Uv(r,e,n){Tv.encodeInto(r,e.subarray(n))}function Vm(r,e,n){r.length>Dv?Uv(r,e,n):Ev(r,e,n)}var Rv=4096;function ll(r,e,n){let i=e,t=i+n,o=[],a="";for(;i<t;){let s=r[i++];if((s&128)===0)o.push(s);else if((s&224)===192){let u=r[i++]&63;o.push((s&31)<<6|u)}else if((s&240)===224){let u=r[i++]&63,c=r[i++]&63;o.push((s&31)<<12|u<<6|c)}else if((s&248)===240){let u=r[i++]&63,c=r[i++]&63,l=r[i++]&63,m=(s&7)<<18|u<<12|c<<6|l;m>65535&&(m-=65536,o.push(m>>>10&1023|55296),m=56320|m&1023),o.push(m)}else o.push(s);o.length>=Rv&&(a+=String.fromCharCode(...o),o.length=0)}return o.length>0&&(a+=String.fromCharCode(...o)),a}var Ov=new TextDecoder,Nv=200;function jv(r,e,n){let i=r.subarray(e,e+n);return Ov.decode(i)}function Jm(r,e,n){return n>Nv?jv(r,e,n):ll(r,e,n)}var Ce=class{constructor(e,n){this.type=e,this.data=n}};var H=class r extends Error{constructor(e){super(e);let n=Object.create(r.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:r.name})}};function Km(r,e,n){let i=n/4294967296,t=n;r.setUint32(e,i),r.setUint32(e+4,t)}function ki(r,e,n){let i=Math.floor(n/4294967296),t=n;r.setUint32(e,i),r.setUint32(e+4,t)}function _i(r,e){let n=r.getInt32(e),i=r.getUint32(e+4);return n*4294967296+i}function qm(r,e){let n=r.getUint32(e),i=r.getUint32(e+4);return n*4294967296+i}var Av=-1,Cv=4294967296-1,Lv=17179869184-1;function Zv({sec:r,nsec:e}){if(r>=0&&e>=0&&r<=Lv)if(e===0&&r<=Cv){let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,r),n}else{let n=r/4294967296,i=r&4294967295,t=new Uint8Array(8),o=new DataView(t.buffer);return o.setUint32(0,e<<2|n&3),o.setUint32(4,i),t}else{let n=new Uint8Array(12),i=new DataView(n.buffer);return i.setUint32(0,e),ki(i,4,r),n}}function Fv(r){let e=r.getTime(),n=Math.floor(e/1e3),i=(e-n*1e3)*1e6,t=Math.floor(i/1e9);return{sec:n+t,nsec:i-t*1e9}}function Mv(r){if(r instanceof Date){let e=Fv(r);return Zv(e)}else return null}function Gv(r){let e=new DataView(r.buffer,r.byteOffset,r.byteLength);switch(r.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let n=e.getUint32(0),i=e.getUint32(4),t=(n&3)*4294967296+i,o=n>>>2;return{sec:t,nsec:o}}case 12:{let n=_i(e,4),i=e.getUint32(0);return{sec:n,nsec:i}}default:throw new H(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${r.length}`)}}function Bv(r){let e=Gv(r);return new Date(e.sec*1e3+e.nsec/1e6)}var Hm={type:Av,encode:Mv,decode:Bv};var Ie=class{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Hm)}register({type:e,encode:n,decode:i}){if(e>=0)this.encoders[e]=n,this.decoders[e]=i;else{let t=-1-e;this.builtInEncoders[t]=n,this.builtInDecoders[t]=i}}tryToEncode(e,n){for(let i=0;i<this.builtInEncoders.length;i++){let t=this.builtInEncoders[i];if(t!=null){let o=t(e,n);if(o!=null){let a=-1-i;return new Ce(a,o)}}}for(let i=0;i<this.encoders.length;i++){let t=this.encoders[i];if(t!=null){let o=t(e,n);if(o!=null){let a=i;return new Ce(a,o)}}}return e instanceof Ce?e:null}decode(e,n,i){let t=n<0?this.builtInDecoders[-1-n]:this.decoders[n];return t?t(e,n,i):new Ce(n,e)}};Ie.defaultCodec=new Ie;function Wv(r){return r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer}function Sr(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Wv(r)?new Uint8Array(r):Uint8Array.from(r)}var Vv=100,Jv=2048,wi=class r{constructor(e){this.entered=!1,this.extensionCodec=e?.extensionCodec??Ie.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Vv,this.initialBufferSize=e?.initialBufferSize??Jv,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,n){if(n>this.maxDepth)throw new Error(`Too deep objects in depth ${n}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,n)}ensureBufferSizeToWrite(e){let n=this.pos+e;this.view.byteLength<n&&this.resizeBuffer(n*2)}resizeBuffer(e){let n=new ArrayBuffer(e),i=new Uint8Array(n),t=new DataView(n);i.set(this.bytes),this.view=t,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let i=Wm(e);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),Vm(e,this.bytes,this.pos),this.pos+=i}encodeObject(e,n){let i=this.extensionCodec.tryToEncode(e,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(e))this.encodeArray(e,n);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,n);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let n=e.byteLength;if(n<256)this.writeU8(196),this.writeU8(n);else if(n<65536)this.writeU8(197),this.writeU16(n);else if(n<4294967296)this.writeU8(198),this.writeU32(n);else throw new Error(`Too large binary: ${n}`);let i=Sr(e);this.writeU8a(i)}encodeArray(e,n){let i=e.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else if(i<4294967296)this.writeU8(221),this.writeU32(i);else throw new Error(`Too large array: ${i}`);for(let t of e)this.doEncode(t,n+1)}countWithoutUndefined(e,n){let i=0;for(let t of n)e[t]!==void 0&&i++;return i}encodeMap(e,n){let i=Object.keys(e);this.sortKeys&&i.sort();let t=this.ignoreUndefined?this.countWithoutUndefined(e,i):i.length;if(t<16)this.writeU8(128+t);else if(t<65536)this.writeU8(222),this.writeU16(t);else if(t<4294967296)this.writeU8(223),this.writeU32(t);else throw new Error(`Too large map object: ${t}`);for(let o of i){let a=e[o];this.ignoreUndefined&&a===void 0||(this.encodeString(o),this.doEncode(a,n+1))}}encodeExtension(e){if(typeof e.data=="function"){let i=e.data(this.pos+6),t=i.length;if(t>=4294967296)throw new Error(`Too large extension object: ${t}`);this.writeU8(201),this.writeU32(t),this.writeI8(e.type),this.writeU8a(i);return}let n=e.data.length;if(n===1)this.writeU8(212);else if(n===2)this.writeU8(213);else if(n===4)this.writeU8(214);else if(n===8)this.writeU8(215);else if(n===16)this.writeU8(216);else if(n<256)this.writeU8(199),this.writeU8(n);else if(n<65536)this.writeU8(200),this.writeU16(n);else if(n<4294967296)this.writeU8(201),this.writeU32(n);else throw new Error(`Too large extension object: ${n}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let n=e.length;this.ensureBufferSizeToWrite(n),this.bytes.set(e,this.pos),this.pos+=n}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Km(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),ki(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function dl(r,e){return new wi(e).encodeSharedRef(r)}function Si(r){return`${r<0?"-":""}0x${Math.abs(r).toString(16).padStart(2,"0")}`}var Kv=16,qv=16,Ii=class{constructor(e=Kv,n=qv){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=n,this.caches=[];for(let i=0;i<this.maxKeyLength;i++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,n,i){let t=this.caches[i-1];e:for(let o of t){let a=o.bytes;for(let s=0;s<i;s++)if(a[s]!==e[n+s])continue e;return o.str}return null}store(e,n){let i=this.caches[e.length-1],t={bytes:e,str:n};i.length>=this.maxLengthPerKey?i[Math.random()*i.length|0]=t:i.push(t)}decode(e,n,i){let t=this.find(e,n,i);if(t!=null)return this.hit++,t;this.miss++;let o=ll(e,n,i),a=Uint8Array.prototype.slice.call(e,n,n+i);return this.store(a,o),o}};var pl="array",zr="map_key",Ym="map_value",Hv=r=>{if(typeof r=="string"||typeof r=="number")return r;throw new H("The type of key must be string or number but "+typeof r)},ml=class{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let n=this.getUninitializedStateFromPool();n.type=pl,n.position=0,n.size=e,n.array=new Array(e)}pushMapState(e){let n=this.getUninitializedStateFromPool();n.type=zr,n.readCount=0,n.size=e,n.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===pl){let i=e;i.size=0,i.array=void 0,i.position=0,i.type=void 0}if(e.type===zr||e.type===Ym){let i=e;i.size=0,i.map=void 0,i.readCount=0,i.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},Pr=-1,fl=new DataView(new ArrayBuffer(0)),Xv=new Uint8Array(fl.buffer);try{fl.getInt8(0)}catch(r){if(!(r instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Xm=new RangeError("Insufficient data"),Yv=new Ii,Pi=class r{constructor(e){this.totalPos=0,this.pos=0,this.view=fl,this.bytes=Xv,this.headByte=Pr,this.stack=new ml,this.entered=!1,this.extensionCodec=e?.extensionCodec??Ie.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:Yv,this.mapKeyConverter=e?.mapKeyConverter??Hv}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=Pr,this.stack.reset()}setBuffer(e){let n=Sr(e);this.bytes=n,this.view=new DataView(n.buffer,n.byteOffset,n.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Pr&&!this.hasRemaining(1))this.setBuffer(e);else{let n=this.bytes.subarray(this.pos),i=Sr(e),t=new Uint8Array(n.length+i.length);t.set(n),t.set(i,n.length),this.setBuffer(t)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:n,pos:i}=this;return new RangeError(`Extra ${n.byteLength-i} of ${n.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let n=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return n}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let n=!1,i;for await(let s of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{i=this.doDecodeSync(),n=!0}catch(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return i}let{headByte:t,pos:o,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${Si(t)} at ${a} (${o} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,n){if(this.entered){yield*this.clone().decodeMultiAsync(e,n);return}try{this.entered=!0;let i=n,t=-1;for await(let o of e){if(n&&t===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),i&&(t=this.readArraySize(),i=!1,this.complete());try{for(;yield this.doDecodeSync(),--t!==0;);}catch(a){if(!(a instanceof RangeError))throw a}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),n;if(e>=224)n=e-256;else if(e<192)if(e<128)n=e;else if(e<144){let t=e-128;if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e<160){let t=e-144;if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else{let t=e-160;n=this.decodeString(t,0)}else if(e===192)n=null;else if(e===194)n=!1;else if(e===195)n=!0;else if(e===202)n=this.readF32();else if(e===203)n=this.readF64();else if(e===204)n=this.readU8();else if(e===205)n=this.readU16();else if(e===206)n=this.readU32();else if(e===207)this.useBigInt64?n=this.readU64AsBigInt():n=this.readU64();else if(e===208)n=this.readI8();else if(e===209)n=this.readI16();else if(e===210)n=this.readI32();else if(e===211)this.useBigInt64?n=this.readI64AsBigInt():n=this.readI64();else if(e===217){let t=this.lookU8();n=this.decodeString(t,1)}else if(e===218){let t=this.lookU16();n=this.decodeString(t,2)}else if(e===219){let t=this.lookU32();n=this.decodeString(t,4)}else if(e===220){let t=this.readU16();if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else if(e===221){let t=this.readU32();if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else if(e===222){let t=this.readU16();if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e===223){let t=this.readU32();if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e===196){let t=this.lookU8();n=this.decodeBinary(t,1)}else if(e===197){let t=this.lookU16();n=this.decodeBinary(t,2)}else if(e===198){let t=this.lookU32();n=this.decodeBinary(t,4)}else if(e===212)n=this.decodeExtension(1,0);else if(e===213)n=this.decodeExtension(2,0);else if(e===214)n=this.decodeExtension(4,0);else if(e===215)n=this.decodeExtension(8,0);else if(e===216)n=this.decodeExtension(16,0);else if(e===199){let t=this.lookU8();n=this.decodeExtension(t,1)}else if(e===200){let t=this.lookU16();n=this.decodeExtension(t,2)}else if(e===201){let t=this.lookU32();n=this.decodeExtension(t,4)}else throw new H(`Unrecognized type byte: ${Si(e)}`);this.complete();let i=this.stack;for(;i.length>0;){let t=i.top();if(t.type===pl)if(t.array[t.position]=n,t.position++,t.position===t.size)n=t.array,i.release(t);else continue e;else if(t.type===zr){if(n==="__proto__")throw new H("The key __proto__ is not allowed");t.key=this.mapKeyConverter(n),t.type=Ym;continue e}else if(t.map[t.key]=n,t.readCount++,t.readCount===t.size)n=t.map,i.release(t);else{t.key=null,t.type=zr;continue e}}return n}}readHeadByte(){return this.headByte===Pr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Pr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new H(`Unrecognized array type byte: ${Si(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new H(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new H(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,n){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,n):this.decodeBinary(e,n)}decodeUtf8String(e,n){if(e>this.maxStrLength)throw new H(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+n+e)throw Xm;let i=this.pos+n,t;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?t=this.keyDecoder.decode(this.bytes,i,e):t=Jm(this.bytes,i,e),this.pos+=n+e,t}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===zr:!1}decodeBinary(e,n){if(e>this.maxBinLength)throw new H(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+n))throw Xm;let i=this.pos+n,t=this.bytes.subarray(i,i+e);return this.pos+=n+e,t}decodeExtension(e,n){if(e>this.maxExtLength)throw new H(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let i=this.view.getInt8(this.pos+n),t=this.decodeBinary(e,n+1);return this.extensionCodec.decode(t,i,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=qm(this.view,this.pos);return this.pos+=8,e}readI64(){let e=_i(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function gl(r,e){return new Pi(e).decode(r)}var zi=class{constructor(e){this.error=e}},Qv=r=>new Promise(e=>{setTimeout(e,r)}),eb=(r,e)=>{let n=e.randomize?Math.random()+1:1,i=Math.max(e.minTimeout,1)*Math.pow(e.factor,r-1);return Math.round(Math.min(n*i,e.maxTimeout))};async function Qm(r,e={}){let n={retries:e.retries??10,minTimeout:e.minTimeout??1e3,maxTimeout:e.maxTimeout??1/0,factor:e.factor??2,randomize:e.randomize??!0},i=o=>{throw new zi(o??new Error("Aborted"))},t;for(let o=1;o<=n.retries+1;o++)try{return await r(i,o)}catch(a){if(a instanceof zi)throw a.error;if(t=a,o>n.retries)throw a;await e.onRetry?.(a,o),await Qv(eb(o,n))}throw t}var bl={};te(bl,{default:()=>vl});var hl=function(r,e){return hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var t in i)i.hasOwnProperty(t)&&(n[t]=i[t])},hl(r,e)};function ef(r,e){hl(r,e);function n(){this.constructor=r}r.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function tb(r){var e=typeof Symbol=="function"&&r[Symbol.iterator],n=0;return e?e.call(r):{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}}}function rb(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),t,o=[],a;try{for(;(e===void 0||e-- >0)&&!(t=i.next()).done;)o.push(t.value)}catch(s){a={error:s}}finally{try{t&&!t.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function nb(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(rb(arguments[e]));return r}var tf=(function(){function r(e,n){this.target=n,this.type=e}return r})(),ib=(function(r){ef(e,r);function e(n,i){var t=r.call(this,"error",i)||this;return t.message=n.message,t.error=n,t}return e})(tf),ob=(function(r){ef(e,r);function e(n,i,t){n===void 0&&(n=1e3),i===void 0&&(i="");var o=r.call(this,"close",t)||this;return o.wasClean=!0,o.code=n,o.reason=i,o}return e})(tf);var ab=function(){if(typeof WebSocket<"u")return WebSocket},sb=function(r){return typeof r<"u"&&!!r&&r.CLOSING===2},Le={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},cb=(function(){function r(e,n,i){var t=this;i===void 0&&(i={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){t._debug("open event");var a=t._options.minUptime,s=a===void 0?Le.minUptime:a;clearTimeout(t._connectTimeout),t._uptimeTimeout=setTimeout(function(){return t._acceptOpen()},s),t._ws.binaryType=t._binaryType,t._messageQueue.forEach(function(u){return t._ws.send(u)}),t._messageQueue=[],t.onopen&&t.onopen(o),t._listeners.open.forEach(function(u){return t._callEventListener(o,u)})},this._handleMessage=function(o){t._debug("message event"),t.onmessage&&t.onmessage(o),t._listeners.message.forEach(function(a){return t._callEventListener(o,a)})},this._handleError=function(o){t._debug("error event",o.message),t._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),t.onerror&&t.onerror(o),t._debug("exec error listeners"),t._listeners.error.forEach(function(a){return t._callEventListener(o,a)}),t._connect()},this._handleClose=function(o){t._debug("close event"),t._clearTimeouts(),t._shouldReconnect&&t._connect(),t.onclose&&t.onclose(o),t._listeners.close.forEach(function(a){return t._callEventListener(o,a)})},this._url=e,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(r,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(r,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CONNECTING",{get:function(){return r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"OPEN",{get:function(){return r.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSING",{get:function(){return r.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSED",{get:function(){return r.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(n,i){return typeof i=="string"?n+=i.length:i instanceof Blob?n+=i.size:n+=i.byteLength,n},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?r.CLOSED:r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),r.prototype.close=function(e,n){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,n)},r.prototype.reconnect=function(e,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,n),this._connect())},r.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var n=this._options.maxEnqueuedMessages,i=n===void 0?Le.maxEnqueuedMessages:n;this._messageQueue.length<i&&(this._debug("enqueue",e),this._messageQueue.push(e))}},r.prototype.addEventListener=function(e,n){this._listeners[e]&&this._listeners[e].push(n)},r.prototype.dispatchEvent=function(e){var n,i,t=this._listeners[e.type];if(t)try{for(var o=tb(t),a=o.next();!a.done;a=o.next()){var s=a.value;this._callEventListener(e,s)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!0},r.prototype.removeEventListener=function(e,n){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(i){return i!==n}))},r.prototype._debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._options.debug&&console.log.apply(console,nb(["RWS>"],e))},r.prototype._getNextDelay=function(){var e=this._options,n=e.reconnectionDelayGrowFactor,i=n===void 0?Le.reconnectionDelayGrowFactor:n,t=e.minReconnectionDelay,o=t===void 0?Le.minReconnectionDelay:t,a=e.maxReconnectionDelay,s=a===void 0?Le.maxReconnectionDelay:a,u=0;return this._retryCount>0&&(u=o*Math.pow(i,this._retryCount-1),u>s&&(u=s)),this._debug("next delay",u),u},r.prototype._wait=function(){var e=this;return new Promise(function(n){setTimeout(n,e._getNextDelay())})},r.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var n=e();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")},r.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var n=this._options,i=n.maxRetries,t=i===void 0?Le.maxRetries:i,o=n.connectionTimeout,a=o===void 0?Le.connectionTimeout:o,s=n.WebSocket,u=s===void 0?ab():s;if(this._retryCount>=t){this._debug("max retries reached",this._retryCount,">=",t);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!sb(u))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(c){e._closeCalled||(e._debug("connect",{url:c,protocols:e._protocols}),e._ws=e._protocols?new u(c,e._protocols):new u(c),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},r.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new ib(Error("TIMEOUT"),this))},r.prototype._disconnect=function(e,n){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,n),this._handleClose(new ob(e,n,this))}catch{}}},r.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},r.prototype._callEventListener=function(e,n){"handleEvent"in n?n.handleEvent(e):n(e)},r.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},r.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},r.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},r})(),vl=cb;var ub=r=>{if(typeof r=="number")return{0:"CONNECTING",1:"OPEN",2:"CLOSING",3:"CLOSED"}[r]??`STATE_${r}`},lb=r=>{try{let e=new URL(r);return`${e.origin}${e.pathname}`}catch{return r}},rf=r=>{if(r instanceof Error)return r.message?`${r.name}: ${r.message}`:r.name;if(typeof r=="string")return r;if(!r||typeof r!="object")return;let e=r,n=typeof e.message=="string"&&e.message?e.message:typeof e.reason=="string"&&e.reason?e.reason:void 0;if(!n)return;let i=typeof e.name=="string"&&e.name?e.name:void 0;return i?`${i}: ${n}`:n},Ei=r=>{if(r instanceof Error)return r.message?`${r.name}: ${r.message}`:r.name;if(typeof r=="string")return r;if(!r||typeof r!="object")return String(r);let e=r,n=[],i=rf(e);i&&n.push(i);let t=rf(e.error);t&&t!==i&&n.push(`error=${t}`),typeof e.type=="string"&&e.type&&n.push(`type=${e.type}`),typeof e.code=="number"&&n.push(`code=${e.code}`),typeof e.reason=="string"&&e.reason&&e.reason!==i&&n.push(`reason=${e.reason}`),typeof e.wasClean=="boolean"&&n.push(`wasClean=${e.wasClean}`);let o=e.target??e.currentTarget;if(o&&typeof o=="object"){typeof o.url=="string"&&o.url&&n.push(`url=${lb(o.url)}`);let a=ub(o.readyState);a&&n.push(`readyState=${a}`)}return n.length>0?n.join(" | "):"Unknown websocket event"};var It=null;typeof WebSocket<"u"?It=WebSocket:typeof MozWebSocket<"u"?It=MozWebSocket:typeof global<"u"?It=global.WebSocket||global.MozWebSocket:typeof window<"u"?It=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(It=self.WebSocket||self.MozWebSocket);var nf=It;var Ti=class{constructor(){this.disposables=new Map}add(e,n){this.disposables.has(e)&&(console.warn(`Disposable with key "${e}" already exists. Disposing the old one.`),this.disposables.get(e)?.dispose()),typeof n=="function"&&(n=n()),this.disposables.set(e,n)}dispose(){this.disposables.forEach(e=>e.dispose()),this.disposables.clear()}};var db=new Set(["url","action","event","responseEvent","errorEvent","hasData","code","attempt","maxRetries","timeout","errorCount","byteLength"]),pb=vl??bl;var yl=class extends R{constructor(e="WebSocket connection timeout"){super(e,"ConnectionTimeout")}},Pt=class extends R{constructor(n,i){super(n,"ConnectionFailed",i);this.originalError=i}},Ze=class extends R{constructor(n,i){super(n,"InvalidResponse",i);this.data=i}},Fe=class extends Error{constructor(e){super(e),this.name="InvalidConfigurationError"}},Pe,xl,$l,Di=class{constructor(e,n,i={}){this.eventEmitter=n;this.options=i;Dt(this,Pe);this.clientId="";this.closed=!1;this.disposables=new Ti;this.connectPromise=null;this.terminalError=null;this.pingIntervalStarted=!1;this.incomingMessageChain=Promise.resolve();this.validateConfiguration(i),this.url=typeof e=="string"?new URL(e):null;let t=typeof e=="string"?new URL(e).toString():async()=>new URL(await e()).toString();this.PING_INTERVAL=i.pingInterval??3e4,this.CONNECT_WAIT_TIMEOUT=i.connectWaitTimeout??3e4,this.rws=new pb(t,[],{WebSocket:i.webSocket??globalThis.WebSocket??nf,connectionTimeout:i.connectionTimeout,maxReconnectionDelay:2e3,minReconnectionDelay:200,maxEnqueuedMessages:0,maxRetries:i.maxRetries??50,startClosed:!0}),this.log("debug","Transport initialized",{url:this.url===null?"dynamic":fb(this.url),options:i}),this.registerWatchers()}validateConfiguration(e){if(e.pingInterval!==void 0&&(e.pingInterval<1e3||e.pingInterval>3e5))throw new Fe("pingInterval must be between 1000ms and 300000ms");if(e.connectionTimeout!==void 0&&(e.connectionTimeout<100||e.connectionTimeout>3e4))throw new Fe("connectionTimeout must be between 100ms and 30000ms");if(e.connectWaitTimeout!==void 0&&(e.connectWaitTimeout<1e3||e.connectWaitTimeout>3e5))throw new Fe("connectWaitTimeout must be between 1000ms and 300000ms");if(e.maxRetries!==void 0&&(e.maxRetries<0||e.maxRetries>100))throw new Fe("maxRetries must be between 0 and 100")}log(e,n,i){if(this.options.debug){let t=new Date().toISOString(),o=mb(i),a=o?`
|
|
68
|
-
${JSON.stringify(o,null,2)}`:"";console[e](`[Transport ${t}] ${n}${a}`)}}connect(){return this.terminalError?Promise.reject(this.terminalError):pe(this,Pe,xl).call(this)}id(){return this.clientId}registerWatchers(){let e=n=>{this.incomingMessageChain=this.incomingMessageChain.catch(()=>{}).then(()=>this.processIncomingMessage(n)).catch(i=>{this.log("error","Failed to process queued WebSocket frame",{error:i instanceof Error?i.message:String(i)}),this.eventEmitter.emit("transport.error",{type:"message_handle_error",error:i,rawMessage:n.data,timestamp:Date.now()})})};this.rws.addEventListener("message",e),this.disposables.add("message",{dispose:()=>{this.rws.removeEventListener("message",e)}})}async processIncomingMessage(e){let n;try{n=await this.toArrayBuffer(e.data)}catch(t){this.log("error","Unexpected WebSocket message type",{error:t instanceof Error?t.message:String(t),messageType:typeof e.data}),this.eventEmitter.emit("transport.error",{type:"message_type_error",error:t,rawMessage:e.data,timestamp:Date.now()});return}if(n.byteLength===0){this.log("warn","Ignoring empty WebSocket frame");return}let i;try{i=gl(n)}catch(t){this.log("error","Failed to decode WebSocket frame",{error:t instanceof Error?t.message:String(t),byteLength:n.byteLength}),this.eventEmitter.emit("transport.error",{type:"message_decode_error",error:t,rawMessage:n,timestamp:Date.now()});return}try{await this.handleRawMessage(i)}catch(t){this.log("error","Failed to process WebSocket frame",{error:t instanceof Error?t.message:String(t),byteLength:n.byteLength}),this.eventEmitter.emit("transport.error",{type:"message_handle_error",error:t,rawMessage:n,timestamp:Date.now()})}}async toArrayBuffer(e){if(e instanceof Blob)return e.arrayBuffer();if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice().buffer;throw new Error("Unexpected message type: "+typeof e)}async handleRawMessage(e){if(this.closed){this.log("debug","Ignoring message received after transport was closed");return}if(typeof e!="object"||e===null){this.log("debug","Received invalid message format",{ev:e});return}try{let{data:n,event:i,as:t}=e;if(!i||typeof i!="string")throw new Ze("Message missing event field",e);if(this.log("debug","Processing message",{event:i,hasData:!!n}),i==="App.Actions.GetClientId"){this.clientId=n.id,this.log("info","Client ID received",{clientId:this.clientId});return}if(i==="Events.BootError"){let o=n,a=new j(o?.message||"Notebook is no longer available",{source:"runtime",status:503,code:"NotebookUnavailable",details:o||{}});this.log("error","Boot error received",{data:n}),this.terminate(a,4e3,a.message);return}if(i==="response"){let{responseEvent:o,data:a}=n;if(!o)throw new Ze("Response message missing responseEvent",e);this.log("debug","Response message received",{responseEvent:o}),await this.handleMessage(o,a);return}if(i==="error"){let{errorEvent:o,data:a}=n;if(!o)throw new Ze("Error message missing errorEvent",e);this.log("debug","Error message received",{errorEvent:o,errorData:a}),await this.handleMessage(o,a);return}await this.handleMessage(i,n,t)}catch(n){n instanceof Ze?this.log("error","Invalid message format",{error:n.message,data:n.data}):this.log("error","Failed to parse message",{ev:e,error:n instanceof Error?n.message:String(n)}),this.eventEmitter.emit("transport.error",{type:"message_parse_error",error:n,rawMessage:e,timestamp:Date.now()})}}async handleMessage(e,n,i){if(e==="App.Actions.GetClientId"){this.clientId=n.id,this.eventEmitter.emit(e,this.clientId);return}e&&this.eventEmitter.emit(i||e,n)}listen(e,n,i){return this.eventEmitter.listen(e,n)}onDidBootError(e){return this.eventEmitter.listen("transport.boot_error",n=>{n&&typeof n=="object"&&"error"in n&&j.is(n.error,"NotebookUnavailable")&&e(n.error)})}removeListener(e,n){this.eventEmitter.removeListener(e,n)}listenOnce(e,n,i){return this.eventEmitter.once(e,n,i)}emit(e,...n){this.eventEmitter.emit(e,n.length>1?n:n[0])}get isConnected(){return this.status==="OPEN"}get isConnecting(){return this.status==="CONNECTING"}get isDisconnected(){return this.status==="CLOSED"}get isClosed(){return this.closed}getTerminalError(){return this.terminalError}get status(){return{0:"CONNECTING",1:"OPEN",2:"CLOSING",3:"CLOSED"}[this.rws.readyState]}async call(e,n={},i={}){if(this.terminalError)throw this.terminalError;let t=i.responseEvent||`${e}_${A()}_response`,o=`${t}_error`,a,s,u=()=>{a&&(this.rws.removeEventListener("close",a),this.rws.removeEventListener("error",a)),s&&(i.abortSignal?.removeEventListener("abort",s),s=void 0),this.eventEmitter.removeListener(t),this.eventEmitter.removeListener(o)},c=(g,f)=>{if(this.terminalError){f(this.terminalError);return}let x=new DOMException("Request aborted","AbortError");if(i.abortSignal?.aborted){f(x);return}if(i.abortSignal&&(s=()=>{f(x)},i.abortSignal.addEventListener("abort",s,{once:!0})),!this.isConnected||this.isClosed){f(new Pt(`Connection is not open while sending ${e}. Current status: ${this.status}`));return}this.listenOnce(t,_=>{this.log("debug","Message response received",{action:e}),g(_)}),this.listenOnce(o,_=>{this.log("error","Message error received",{action:e,error:_}),f($t("runtime",_))}),a=_=>{if(_.code===1008&&(_.reason||"").includes("rate limit")){f(new j(_.reason||"Rate limit exceeded",{source:"runtime",status:429,code:"RateLimited",cause:_}));return}let P=Ei(_);f(this.terminalError||new Pt(`Connection lost to the notebook during request: ${P}`,_))},this.rws.addEventListener("close",a),this.rws.addEventListener("error",a);try{this.rws.send(this.pack({action:e,data:n,errorEvent:o,responseEvent:t})),this.log("debug","Message sent",{action:e,data:n})}catch(_){this.log("error","Failed to send message",{action:e,error:_}),f(new Pt(`Failed to send runtime action ${e}.`,_))}},l=async()=>{if(i.abortSignal?.aborted)throw new DOMException("Request aborted","AbortError");if(await pe(this,Pe,xl).call(this),i.abortSignal?.aborted)throw new DOMException("Request aborted","AbortError");let g=new Promise(c).finally(u);return i.timeout?Gm(g,i.timeout).catch(f=>{throw f instanceof xt?pr.fromPromiseTimeoutError(f):f}).finally(u):g},m=i.retries===!1?0:i.retries??0;return this.sendWithRetry(async()=>await l(),m)}send(e,n={}){if(this.terminalError)throw this.terminalError;if(!this.isConnected||this.isClosed)return this.log("debug","Connection not available, dropping one-way message",{action:e}),!1;try{return this.rws.send(this.pack({action:e,data:n})),this.log("debug","One-way message sent",{action:e,data:n}),!0}catch(i){return this.log("error","Failed to send one-way message",{action:e,error:i}),!1}}pack(e){return new Blob([dl(e)])}sendWithRetry(e,n){return Qm(async(i,t)=>{try{return await e()}catch(o){if(o instanceof j||o instanceof Fe||o instanceof Ze||o instanceof DOMException){this.log("debug","Non-retryable error, bailing",{error:o.message,attempt:t}),i(o);return}throw o instanceof pr&&(this.reconnect(),this.log("warn","Send operation timed out, connection reset",{attempt:t,timeout:o.time})),this.log("debug","Retrying send operation",{attempt:t,error:o instanceof Error?o.message:String(o)}),o}},{retries:n,onRetry:(i,t)=>{this.log("warn","Send operation retry",{attempt:t,maxRetries:n,error:i instanceof Error?i.message:String(i)})},minTimeout:1e3,factor:2,maxTimeout:3e4,randomize:!0})}invoke(e,n={},i={}){return i.responseEvent||(i.responseEvent=`${e}_${A()}`),this.call("invoke",{action:e,data:n},i)}reconnect(){if(this.terminalError)throw this.terminalError;if(this.closed)throw new Error("Cannot reconnect a closed transport. The transport has been permanently closed.");this.log("info","Reconnecting transport"),this.connectPromise=null,this.rws.reconnect()}disconnect(){this.closed||this.close()}terminate(e,n=4e3,i=e.message){this.terminalError=e,j.is(e,"NotebookUnavailable")&&this.eventEmitter.emit("transport.boot_error",{error:e,timestamp:Date.now()}),this.close(n,i)}close(e,n){if(!this.closed){this.log("info","Closing transport connection",{code:e,reason:n}),this.connectPromise=null,this.disposables.dispose();try{this.rws.close(e,n)}catch(i){this.log("error","Error closing WebSocket",{error:i instanceof Error?i.message:String(i)})}this.eventEmitter.emit("transport.closed",{code:e,reason:n,timestamp:Date.now()}),this.eventEmitter.removeListener("*"),this.closed=!0,this.log("info","Transport connection closed successfully")}}onDidConnect(e){this.rws.addEventListener("open",e);let n={dispose:()=>{this.rws.removeEventListener("open",e)}};return this.disposables.add(`connect_${A()}`,n),n}onDidClose(e){this.rws.addEventListener("close",e);let n={dispose:()=>{this.rws.removeEventListener("close",e)}};return this.disposables.add(`close_${A()}`,n),n}};Pe=new WeakSet,xl=function(){return this.terminalError?Promise.reject(this.terminalError):this.isConnected?Promise.resolve():this.connectPromise?this.connectPromise:(this.connectPromise=new Promise((e,n)=>{if(this.isConnected){e(),pe(this,Pe,$l).call(this);return}let i,t=0,o=()=>{this.rws.removeEventListener("open",a),this.rws.removeEventListener("error",s),this.rws.removeEventListener("close",u),clearTimeout(i)},a=()=>{o(),this.connectPromise=null,e(),pe(this,Pe,$l).call(this)},s=c=>{t+=1,this.log("warn","WebSocket emitted an error while connecting; waiting for reconnect/open",{errorCount:t,error:Ei(c)})},u=c=>{let l=Ei(c);if(c.code===1008||c.code===4e3){o(),this.connectPromise=null,n(new Pt(`WebSocket connection failed: ${l}`,c));return}this.log("warn","WebSocket closed before opening; waiting for reconnect/open",{error:l})};this.rws.addEventListener("open",a),this.rws.addEventListener("error",s),this.rws.addEventListener("close",u),this.rws.readyState===3&&this.rws.reconnect(),i=setTimeout(()=>{o(),this.connectPromise=null,n(new yl(`WebSocket connection timeout after ${this.CONNECT_WAIT_TIMEOUT}ms`))},this.CONNECT_WAIT_TIMEOUT)}),this.connectPromise)},$l=function(){this.pingIntervalStarted||this.closed||(this.pingIntervalStarted=!0,this.disposables.add("pingInterval",()=>{let e=setInterval(async()=>{try{this.log("debug","Sending periodic ping"),await this.invoke("ping"),this.log("debug","Ping successful")}catch(n){this.log("error","Ping failed",{error:n instanceof Error?n.message:String(n)})}},this.PING_INTERVAL);return{dispose:()=>{clearInterval(e),this.pingIntervalStarted=!1}}}))};function mb(r){if(r===null||typeof r!="object")return null;let e=Object.entries(r).filter(([n,i])=>db.has(n)&&["string","number","boolean"].includes(typeof i));return e.length>0?Object.fromEntries(e):null}function fb(r){let e=new URL(r);return e.search="",e.hash="",e.toString()}function Ui(r){return{all:r=r||new Map,on:function(e,n){var i=r.get(e);i?i.push(n):r.set(e,[n])},off:function(e,n){var i=r.get(e);i&&(n?i.splice(i.indexOf(n)>>>0,1):r.set(e,[]))},emit:function(e,n){var i=r.get(e);i&&i.slice().map(function(t){t(n)}),(i=r.get("*"))&&i.slice().map(function(t){t(e,n)})}}}var gb=typeof Ui=="function"?Ui:Ui.default;function hb(r){let e=gb(r);return Object.assign(e,{once:(i,t)=>{let o=a=>{e.off(i,o),t(a)};return e.on(i,o),{dispose:()=>{e.off(i,o)}}}})}var Er=class r{constructor(){this.emitter=hb()}listen(e,n){let i=()=>{this.removeListener(e,n)};return this.emitter.on(e,n),{dispose:i}}emit(e,...n){this.emitter.emit(e,n[0])}once(e,n){return this.emitter.once(e,n)}static make(){return new r}static refresh(){return new r}removeListener(e,n){if(e===void 0){this.emitter.all.clear();return}this.emitter.off(e,n)}static createInstance(){return new r}inspect(){return this.emitter.all}};var Dr=class{constructor(e,n){this.okra=e;this.client=n;this.targets=new kl(e.data.id,n)}checkpoint(e,n,i="main",t=!1){return this.okra.invoke("git.checkpoint",{author:e,message:n,branch:i,allowEmpty:t})}checkout(e,n=!0){return this.okra.invoke("git.checkout",{branch:e,create:n})}log(e="main"){return this.okra.invoke("git.log",{ref:e})}diff(e){return this.okra.invoke("git.diff",this.normalizeRemoteInput(e))}merge(e){return this.okra.invoke("git.merge",this.normalizeRemoteInput(e))}conflicts(){return this.okra.invoke("git.conflicts",{})}abortMerge(){return this.okra.invoke("git.resolve",{action:"abort"})}continueMerge(e,n){return this.okra.invoke("git.resolve",{action:"continue",author:e,message:n})}review(){return this.okra.invoke("git.review",{})}stage(e={all:!0}){return this.okra.invoke("git.stage",e)}unstage(e={all:!0}){return this.okra.invoke("git.unstage",e)}revert(e){return this.okra.invoke("git.revert",e)}async credentials(){return(await this.client.post(`/notebook/${this.okra.data.id}/git/credentials`)).data}restore(e){return this.okra.invoke("git.restore",{ref:e})}status(){return this.okra.invoke("git.status",{})}normalizeRemoteInput(e){if(e.notebookId===void 0)return e;let n=e.notebookId.trim();if(!n)throw new Error("'notebookId' cannot be empty.");if(e.url?.trim())throw new Error("Pass either 'url' or 'notebookId', not both.");if(e.target?.trim())throw new Error("Pass either 'target' or 'notebookId', not both.");let{notebookId:i,...t}=e;return{...t,url:this.gitUrlForNotebook(n)}}gitUrlForNotebook(e){let n=new URL(this.okra.data.gitUrl);return n.username="",n.password="",n.pathname=`/${encodeURIComponent(e)}.git`,n.search="",n.hash="",n.toString()}},kl=class{constructor(e,n){this.notebookId=e;this.client=n}async create(e){let n=await this.client.post(`/notebook/${this.notebookId}/git/targets`,of({...e}));return new Tr(n.data,this.notebookId,this.client)}async list(){return(await this.client.get(`/notebook/${this.notebookId}/git/targets`)).data.map(n=>new Tr(n,this.notebookId,this.client))}async get(e){let n=await this.client.get(`/notebook/${this.notebookId}/git/targets/${encodeURIComponent(vb(e))}`);return new Tr(n.data,this.notebookId,this.client)}},Tr=class r{constructor(e,n,i){this.data=e;this.notebookId=n;this.client=i}get id(){return this.data.id}async sync(e={}){let n=await this.client.post(`/notebook/${this.notebookId}/git/targets/${encodeURIComponent(this.id)}/sync`,of({...e}));return new r(n.data,this.notebookId,this.client)}};function vb(r){return typeof r=="string"?r:r.id}function of(r){return Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0))}var Ri=class{constructor(e){this.client=e}async list(e={}){let n=e.page===void 0?"":`?${new URLSearchParams({page:String(e.page)}).toString()}`;return this.client.get(`/servers${n}`)}async create(e){let n=await this.client.post("/servers",e);return new Oi(n.data,this.client)}async get(e){let n=await this.client.get(`/servers/${e}`);return new Oi(n.data,this.client)}},Oi=class{constructor(e,n){this.data=e;this.client=n}async installation(){return(await this.client.get(`/servers/${encodeURIComponent(this.data.id)}/installation`)).data}async members(e={}){let n=e.page===void 0?"":`?${new URLSearchParams({page:String(e.page)}).toString()}`;return this.client.get(`/servers/${encodeURIComponent(this.data.id)}/members${n}`)}async share(e){return(await this.client.post(`/servers/${encodeURIComponent(this.data.id)}/members`,{email:e})).data}async shareWithOrganization(e){return(await this.client.post(`/servers/${encodeURIComponent(this.data.id)}/members`,{organizationId:e})).data}async revokeAccess(e){await this.client.delete(`/servers/${encodeURIComponent(this.data.id)}/members/${encodeURIComponent(String(e))}`)}refresh(){return this.client.servers.get(this.data.id)}async delete(){await this.client.delete(`/servers/${this.data.id}`)}async waitReady(e){let n=e?.timeout??3e5,i=e?.interval??3e3,t=Date.now()+n;for(;Date.now()<t;){let o=await this.refresh();if(o.data.status==="connected")return o;if(o.data.status==="failed")throw new Error(`Server provisioning failed: ${o.data.id}`);await new Promise(a=>setTimeout(a,i))}throw new Error(`Server did not become ready within ${n}ms`)}};function zt(r,e){return new Request(r,{...e,redirect:"manual"})}var af={"runtime.ready":{method:"GET",path:"/runtime"},"config.get":{method:"GET",path:"/runtime/config"},"config.update":{method:"PATCH",path:"/runtime/config"},"config.set-ports":{method:"PUT",path:"/runtime/config/ports"},"container.restart":{method:"POST",path:"/runtime/container/restart"},"container.stop":{method:"POST",path:"/runtime/container/stop"},"container.set-php":{method:"PUT",path:"/runtime/container/php"},"container.opened-ports":{method:"GET",path:"/runtime/container/ports"},"container.resolve-port":{method:"POST",path:"/runtime/container/ports/resolve"},"container.stats":{method:"GET",path:"/runtime/container/stats"},"terminal.list":{method:"GET",path:"/runtime/terminals"},"shell.exec":{method:"POST",path:"/runtime/executions"},"fs.readFile":{method:"GET",path:"/runtime/files/content"},"fs.writeFile":{method:"PUT",path:"/runtime/files/content"},"fs.createDirectory":{method:"PUT",path:"/runtime/directories"},"fs.readDirectory":{method:"POST",path:"/runtime/directories/read"},"fs.stat":{method:"POST",path:"/runtime/files/stat"},"fs.rename":{method:"POST",path:"/runtime/files/rename"},"fs.copy":{method:"POST",path:"/runtime/files/copy"},"fs.delete":{method:"DELETE",path:"/runtime/files"},"fs.tail":{method:"POST",path:"/runtime/files/tail"},"fs.find":{method:"POST",path:"/runtime/files/find"},"fs.textSearch":{method:"POST",path:"/runtime/files/search"},"fs.tree":{method:"POST",path:"/runtime/files/tree"},"service.list":{method:"GET",path:"/runtime/services"},"service.run":{method:"POST",path:"/runtime/services/run"},"service.stop":{method:"POST",path:"/runtime/services/stop"},"service.logs":{method:"POST",path:"/runtime/services/logs"},"composer.invoke":{method:"POST",path:"/runtime/composer/executions"},"composer.packages":{method:"GET",path:"/runtime/composer/packages"},"git.checkpoint":{method:"POST",path:"/runtime/git/checkpoints"},"git.checkout":{method:"POST",path:"/runtime/git/checkouts"},"git.log":{method:"POST",path:"/runtime/git/log"},"git.sync":{method:"POST",path:"/runtime/git/sync"},"git.diff":{method:"POST",path:"/runtime/git/diff"},"git.merge":{method:"POST",path:"/runtime/git/merge"},"git.conflicts":{method:"GET",path:"/runtime/git/conflicts"},"git.resolve":{method:"POST",path:"/runtime/git/conflicts/resolve"},"git.restore":{method:"POST",path:"/runtime/git/restore"},"git.status":{method:"GET",path:"/runtime/git/status"},"git.review":{method:"GET",path:"/runtime/git/review"},"git.stage":{method:"POST",path:"/runtime/git/stage"},"git.unstage":{method:"POST",path:"/runtime/git/unstage"},"git.revert":{method:"POST",path:"/runtime/git/revert"}},Ai=class{constructor(e,n,i){this.fetch=n;this.refresh=i;this.refreshPromise=null;this.notebookId=e.id,this.configure(e.runtimeUrl)}configure(e){let n=new URL(e),i=n.searchParams.get("ticket")??"";if(i==="")throw new D("The notebook connection does not contain a runtime ticket.");this.ticket=i,n.protocol==="wss:"?n.protocol="https:":n.protocol==="ws:"&&(n.protocol="http:"),n.pathname=`/api/v1/notebooks/${encodeURIComponent(this.notebookId)}`,n.searchParams.delete("ticket"),n.hash="",this.actionUrl=n}ready(){return this.invokeRaw("runtime.ready",{},{})}supports(e){return e in af}invoke(e,n={},i={}){return this.invokeRaw(e,n??{},i)}send(){throw new D("Fire-and-forget actions require the realtime transport.")}async invokeRaw(e,n,i){let t=$b(i);try{for(let o=0;o<2;o+=1){let a=await bb(this.fetch,this.request(e,n,t.signal));if(a.status===401&&o===0&&this.refresh!==void 0){await this.refreshAuthorization();continue}let s=await yb(a);if(!a.ok||s.error!==void 0)throw $t("runtime",s.error,a);return s.data}throw new j(`Runtime action ${e} could not be authorized.`,{source:"runtime",status:401,code:"AuthenticationRequired"})}finally{t.dispose()}}request(e,n,i){let t=af[e];if(t===void 0)throw new D(`Runtime action ${e} requires the realtime transport.`);let o=new URL(this.actionUrl);o.pathname+=t.path;let a={Accept:"application/json, application/octet-stream",Authorization:`Bearer ${this.ticket}`},s=xb(e,n,o,a);return zt(o,{method:t.method,headers:a,body:t.method==="GET"?void 0:s,signal:i})}async refreshAuthorization(){this.refreshPromise===null&&(this.refreshPromise=this.refresh().then(e=>this.configure(e)));try{await this.refreshPromise}finally{this.refreshPromise=null}}};async function bb(r,e){try{return await r(e)}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?n:new R("Unable to reach the PHPSandbox runtime.","ConnectionFailed",n)}}async function yb(r){if(r.ok&&r.headers.get("content-type")?.toLowerCase().startsWith("application/octet-stream"))return{data:new Uint8Array(await r.arrayBuffer())};let e=await r.text();if(e===""){if(r.ok)throw new R("PHPSandbox runtime returned an empty response.","InvalidResponse",r);return{}}try{return JSON.parse(e)}catch(n){throw new R("PHPSandbox runtime returned an invalid JSON response.","InvalidResponse",n)}}function xb(r,e,n,i){let t=Ni(e);if(r==="fs.readFile"){ji(n,"path",t.path);let o=Ni(t.lineRange);(o.lineStart!==void 0||o.lineEnd!==void 0)&&(ji(n,"lineStart",o.lineStart),ji(n,"lineEnd",o.lineEnd));return}if(r==="fs.writeFile"){ji(n,"path",t.path);let o=Ni(t.options);_l(n,"overwrite",o.overwrite),_l(n,"create",o.create),_l(n,"unlock",o.unlock);let a=Ni(o.atomic);if(typeof a.postfix=="string"&&a.postfix!==""&&n.searchParams.set("atomicPostfix",a.postfix),!ArrayBuffer.isView(t.contents))throw new TypeError("Runtime file contents must be binary data.");return i["Content-Type"]="application/octet-stream",Uint8Array.from(new Uint8Array(t.contents.buffer,t.contents.byteOffset,t.contents.byteLength)).buffer}return i["Content-Type"]="application/json",JSON.stringify(e)}function Ni(r){return r!==null&&typeof r=="object"?r:{}}function ji(r,e,n){if(typeof n!="string"&&typeof n!="number"||String(n)==="")throw new TypeError(`Runtime file ${e} is required.`);r.searchParams.set(e,String(n))}function _l(r,e,n){r.searchParams.set(e,n===!0?"true":"false")}function $b(r){if(r.timeout===void 0&&r.abortSignal===void 0)return{signal:new AbortController().signal,dispose:()=>{}};let e=new AbortController,n=()=>e.abort(r.abortSignal?.reason);r.abortSignal?.addEventListener("abort",n,{once:!0}),r.abortSignal?.aborted&&n();let i=r.timeout===void 0?void 0:setTimeout(()=>e.abort(),r.timeout);return{signal:e.signal,dispose:()=>{r.abortSignal?.removeEventListener("abort",n),i!==void 0&&clearTimeout(i)}}}var Ci=class{constructor(e,n){this.client=e;this.notebookId=n}async configure(e){return(await this.client.put(this.path("/configuration"),e)).data}async configuration(){return(await this.client.get(this.path("/configuration"))).data}async submit(e){return(await this.client.post(this.path(),e)).data}async list(e={}){let n=new URLSearchParams;for(let[i,t]of Object.entries(e))t!==void 0&&n.set(i,String(t));return this.client.get(`${this.path()}${n.size===0?"":`?${n.toString()}`}`)}async get(e){return(await this.client.get(this.path(`/${encodeURIComponent(e)}`))).data}async update(e,n){return(await this.client.patch(this.path(`/${encodeURIComponent(e)}`),n)).data}path(e=""){return`/notebook/${this.notebookId}/feedback${e}`}};var Li=class{constructor(e){this.client=e}async link(e){let n=await this.client.post("/integrations",e);return new Me(n.data,this.client)}async list(){return(await this.client.get("/integrations")).data.map(n=>new Me(n,this.client))}async get(e){let n=await this.client.get(`/integrations/${encodeURIComponent(Zi(e))}`);return new Me(n.data,this.client)}},Me=class r{constructor(e,n){this.data=e;this.client=n}get id(){return this.data.id}get provider(){return this.data.provider}get label(){return this.data.label}async update(e){let n=await this.client.patch(`/integrations/${encodeURIComponent(this.id)}`,e);return new r(n.data,this.client)}async unlink(){await this.client.delete(`/integrations/${encodeURIComponent(this.id)}`)}};function Zi(r){return typeof r=="string"?r:r.id}var Fi=class{constructor(e,n){this.notebookId=e;this.client=n}async attach(e){let n=await this.client.post(this.path(),{...e,integration:Zi(e.integration)});return new Ur(n.data,this.notebookId,this.client)}async list(){return(await this.client.get(this.path())).data.map(n=>new Ur(n,this.notebookId,this.client))}async get(e){let n=await this.client.get(this.bindingPath(e));return new Ur(n.data,this.notebookId,this.client)}path(){return`/notebook/${this.notebookId}/integrations`}bindingPath(e){return`${this.path()}/${encodeURIComponent(kb(e))}`}},Ur=class r{constructor(e,n,i){this.data=e;this.notebookId=n;this.client=i}get id(){return this.data.id}get integration(){return new Me(this.data.integration,this.client)}get effects(){return this.data.effects}async update(e){let n=await this.client.patch(this.path(),{...e,integration:e.integration===void 0?void 0:Zi(e.integration)});return new r(n.data,this.notebookId,this.client)}async detach(){await this.client.delete(this.path())}path(){return`/notebook/${this.notebookId}/integrations/${encodeURIComponent(this.id)}`}};function kb(r){return typeof r=="string"?r:r.id}function _b(r){return Array.isArray(r)?r:Object.entries(r).map(([e,n])=>({name:e,...typeof n=="string"?{value:n}:n}))}var Sl=class{constructor(e){this.client=e}async list(e={}){return this.client.get(`/notebook${sf({page:e.page,per_page:e.perPage})}`)}async inspectImport(e){return(await this.client.post("/notebook/imports/inspect",e)).data}async create(e,n={}){let i=await this.client.post("/notebook",{template:e,...n});return new Et(i.data,this.client)}async get(e){let n=await this.client.get(`/notebook/${e}`);return new Et(n.data,this.client)}open(e){return new Et(e,this.client)}};function wb(r){let e=new URL(r),n=e.pathname.replace(/\/+$/,"");return e.pathname=n===""||n==="/"?"/v1/":`${n}/`,e.search="",e.hash="",e.toString()}var Mi=class{constructor(e,n="https://api.phpsandbox.io/v1",i={},t="realtime"){this.fetch=globalThis.fetch;this.publications=new _t(this),this.notebook=new Sl(this),this.servers=new Ri(this),this.integrations=new Li(this),this.options={...i},this.runtimeTransportValue=t,this.baseUrl=wb(n),i.fetch&&(this.fetch=i.fetch),this.headers={Accept:"application/json",Authorization:`Bearer ${e}`,"Content-Type":"application/json"}}get runtimeTransport(){return this.runtimeTransportValue}get(e){return this.requireData(this.makeRequest("GET",e))}post(e,n){return this.requireData(this.makeRequest("POST",e,{body:n===void 0?void 0:JSON.stringify(n)}))}delete(e){return this.makeRequest("DELETE",e)}put(e,n){return this.requireData(this.makeRequest("PUT",e,{body:n===void 0?void 0:JSON.stringify(n)}))}patch(e,n){return this.requireData(this.makeRequest("PATCH",e,{body:n===void 0?void 0:JSON.stringify(n)}))}async stream(e){let n=await this.fetchResponse(zt(new URL(e.replace(/^\//,""),this.baseUrl),{method:"GET",headers:this.headers}));if(!n.ok)throw await wl(n);if(!n.body)throw new R("PHPSandbox API response body is not readable.","InvalidResponse",n);return n.body}async sse(e,n){let i=await this.fetchResponse(zt(e,{method:"GET",headers:{...this.headers,Accept:"text/event-stream"},...n===void 0?{}:{signal:n}}));if(!i.ok)throw await wl(i);if(!i.body)throw new R("PHPSandbox API SSE response body is not readable.","InvalidResponse",i);return i.body}async requireData(e){let n=await e;if(n.data===void 0)throw new R("PHPSandbox API returned no data for a data request.","InvalidResponse");return{...n,data:n.data}}async makeRequest(e,n,i){let t=await this.fetchResponse(zt(new URL(n.replace(/^\//,""),this.baseUrl),{method:e,...i,headers:this.headers}));if(!t.ok)throw await wl(t);if(t.status===204)return{data:void 0};let o=await t.text();if(o==="")throw new R("PHPSandbox API returned an empty response.","InvalidResponse",t);try{let a=JSON.parse(o);if(a===null||typeof a!="object"||Array.isArray(a)||!Object.prototype.hasOwnProperty.call(a,"data"))throw new R("PHPSandbox API returned an invalid success response.","InvalidResponse",t);return a}catch(a){throw R.is(a)?a:new R("PHPSandbox API returned an invalid JSON response.","InvalidResponse",a)}}async fetchResponse(e){try{return await this.fetch(e)}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?n:new R("Unable to reach the PHPSandbox API.","ConnectionFailed",n)}}};async function wl(r){let e=await r.text();try{return $t("core",Sb(e===""?void 0:JSON.parse(e)),r)}catch{return new R(`PHPSandbox API returned an invalid error response (HTTP ${r.status}).`,"InvalidResponse",r,{status:r.status,statusText:r.statusText,body:e})}}function Sb(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)?r.error:void 0}var Il=class r{constructor(e){this.client=e;this.notebook=e.notebook,this.publications=e.publications,this.servers=e.servers,this.integrations=e.integrations}async whoami(){let{data:e}=await this.client.get("/auth/whoami"),n=Rm.safeParse(e);if(!n.success)throw new D("Invalid identity response.");return n.data}get runtimeTransport(){return this.client.runtimeTransport}static realtime(e,n="https://api.phpsandbox.io/v1",i={}){return new r(new Mi(e,n,i))}static rest(e,n="https://api.phpsandbox.io/v1",i={}){return new r(new Mi(e,n,i,"rest"))}},Q,Rr,Pl,Dl=class Dl{constructor(e,n){this.data=e;this.client=n;Dt(this,Rr);this.initialized=!1;Dt(this,Q,null);this.disposables=[];let i=n.options.runtimeUrlProvider;if(this.emitter=Er.createInstance(),n.runtimeTransport==="rest")this.socket=null,this.restInvoker=new Ai(e,n.options.fetch??globalThis.fetch,i===void 0?void 0:()=>i(e.id));else{this.restInvoker=null;let t=!0,o=i===void 0?e.runtimeUrl:async()=>t?(t=!1,e.runtimeUrl):i(e.id);this.socket=new Di(o,this.emitter,{debug:n.options.debug,webSocket:n.options.webSocket}),this.watchConnection(),Ut(this,Q,pe(this,Rr,Pl).call(this))}this.files=new yi(this,this.socket===null?null:t=>this.onDidConnect(t)),this.terminals=new mr(this),this.lsp=new fr(this),this.composer=new vr(this,n),this.runtime=new $r(this),this.repl=new kr(this),this.shell=new hr(this),this.git=new Dr(this,n),this.services=new _r(this),this.config=new wr(this),this.secrets=new zl(n,this.data.id),this.integrations=new Fi(this.data.id,n),this.preview=new El(n,this.data.id),this.mail=new Tl(n,this.data.id),this.feedback=new Ci(n,this.data.id),this.publication=new wt(this.data.id,n)}get runtimeTransport(){return this.client.runtimeTransport}async ready(){if(this.restInvoker!==null)return this.restInitialization();let e=this.realtimeSocket(),n=e.getTerminalError();if(n)throw n;return(async()=>(e.isConnected||await e.connect(),ze(this,Q)))()}async update(e){let n=await this.client.put(`/notebook/${this.data.id}`,e);return Object.assign(this.data,n.data),this.data}async fork(e={}){let n=await this.client.post(`/notebook/${this.data.id}/fork`,e);return new Dl(n.data,this.client)}run(e,n=[],i){return Array.isArray(n)?this.shell.run(e,n,i):this.shell.run(e,n)}exec(e,n=[],i){return Array.isArray(n)?this.run(e,n,i).wait():this.run(e,n).wait()}async destroy(){await this.client.delete(`/notebook/${this.data.id}`),this.socket?.terminate(new j("Notebook has been deleted.",{source:"runtime",status:503,code:"NotebookUnavailable",details:{id:this.data.id}}))}restart(){return this.invoke("container.restart")}stop(){return this.invoke("container.stop")}invoke(e,n={},i={}){return this.restInvoker!==null?(this.restInvoker.supports(String(e))&&this.restInitialization(),this.restInvoker.invoke(e,n||{},i)):this.realtimeSocket().invoke(e,n||{},i)}send(e,n={}){return this.restInvoker!==null?this.restInvoker.send():this.realtimeSocket().send(e,n||{})}listen(e,n){let i=this.emitter.listen(e,n);return this.disposables.push(i),i}dispose(){this.disposables.forEach(e=>e.dispose()),this.socket!==null&&!this.socket.isClosed&&this.socket.disconnect()}connected(){return this.waitForSocketConnection({rejectOnClose:!0})}waitForSocketConnection(e){let n=this.realtimeSocket(),i=n.getTerminalError();return i?Promise.reject(i):n.isConnected?Promise.resolve(this):new Promise((t,o)=>{let a=[],s=!1,u=()=>{for(let l of a)l.dispose();a.length=0},c=l=>{s||(s=!0,u(),l())};try{a.push(n.onDidConnect(()=>c(()=>t(this)))),e.rejectOnClose&&a.push(n.onDidClose(()=>c(()=>o(new Error("Connection closed"))))),a.push(n.onDidBootError(l=>c(()=>o(l))))}catch(l){c(()=>o(l))}})}watchConnection(){let e=this.realtimeSocket();e.onDidConnect(()=>{e.emit("okra.connected")}),e.onDidClose(()=>{e.emit("okra.disconnected"),this.initialized=!1}),e.onDidBootError(n=>{e.emit("okra.boot_error",n),e.emit("okra.disconnected"),this.initialized=!1})}onDidConnect(e){let n=this.realtimeSocket();n.removeListener("okra.connected",e);let i=n.listen("okra.connected",e);return this.disposables.push(i),i}onDidDisconnect(e){let n=this.realtimeSocket().listen("okra.disconnected",e);return this.disposables.push(n),n}onDidBootError(e){let n=this.realtimeSocket().listen("okra.boot_error",i=>{j.is(i,"NotebookUnavailable")&&e(i)});return this.disposables.push(n),n}restInitialization(){if(this.restInvoker===null)throw new D("This operation requires the REST transport.");return ze(this,Q)===null&&(Ut(this,Q,this.restInvoker.ready().then(e=>(this.initialized=e,this.emitter.emit("notebook.initialized",e),e))),ze(this,Q).catch(()=>{})),ze(this,Q)}onDidInitialize(e){return this.listen("notebook.initialized",e)}async reconnect(){let e=this.realtimeSocket(),n=this.waitForSocketConnection({rejectOnClose:!1});return e.reconnect(),this.initialized=!1,await n,Ut(this,Q,pe(this,Rr,Pl).call(this)),this.ready().then(()=>this)}realtimeSocket(){if(this.socket===null)throw new D("This operation requires the realtime transport.");return this.socket}};Q=new WeakMap,Rr=new WeakSet,Pl=function(){return Ut(this,Q,new Promise((e,n)=>{let i=this.onDidInitialize(o=>{if(t.dispose(),i.dispose(),this.initialized=o,o.type==="error"){n(new j(o.message,{source:"runtime",status:503,code:"NotebookInitializationFailed",details:o.data}));return}e(o)}),t=this.onDidBootError(o=>{i.dispose(),t.dispose(),n(o)})})),ze(this,Q).catch(()=>{}),ze(this,Q)};var Et=Dl,zl=class{constructor(e,n){this.client=e;this.notebookId=n}async list(e){let n=new URLSearchParams;e?.environment&&n.set("environment",e.environment);let i=n.toString();return(await this.client.get(`/notebook/${this.notebookId}/secrets${i?`?${i}`:""}`)).data}async set(e,n){let i=typeof n=="string"?{name:e,value:n}:{name:e,...n};return(await this.client.put(`/notebook/${this.notebookId}/secrets`,i)).data}async setMany(e){return(await this.client.put(`/notebook/${this.notebookId}/secrets`,{secrets:_b(e)})).data}async delete(e,n){let i=new URLSearchParams;n?.environment&&i.set("environment",n.environment);let t=i.toString();await this.client.delete(`/notebook/${this.notebookId}/secrets/${encodeURIComponent(e)}${t?`?${t}`:""}`)}},El=class{constructor(e,n){this.client=e;this.notebookId=n}async get(e){let n=e===void 0?"":`?${new URLSearchParams({url:e}).toString()}`;return(await this.client.get(`/notebook/${this.notebookId}/preview${n}`)).data}async setPassword(e){return(await this.client.put(`/notebook/${this.notebookId}/preview`,e)).data}async disable(){await this.client.delete(`/notebook/${this.notebookId}/preview`)}async createSession(e){return(await this.client.post(`/notebook/${this.notebookId}/preview/session`,e)).data}async createHandoff(e){return(await this.client.post(`/notebook/${this.notebookId}/preview/handoff`,e)).data}},Tl=class{constructor(e,n){this.client=e;this.notebookId=n}async status(){return(await this.client.get(`/notebook/${this.notebookId}/mail`)).data}async enable(){return(await this.client.put(`/notebook/${this.notebookId}/mail`)).data}async disable(){await this.client.delete(`/notebook/${this.notebookId}/mail`)}async list(e={}){return this.client.get(`/notebook/${this.notebookId}/mails${sf(e)}`)}async get(e){return(await this.client.get(`/notebook/${this.notebookId}/mails/${encodeURIComponent(e)}`)).data}async delete(e){await this.client.delete(`/notebook/${this.notebookId}/mails/${encodeURIComponent(e)}`)}};function sf(r){let e=new URLSearchParams;for(let[i,t]of Object.entries(r))(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&e.set(i,String(t));let n=e.toString();return n===""?"":`?${n}`}return mf(Ib);})();
|
|
65
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of r.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(r.external){let c=r.external.registry.get(a[0])?.id;if(e!==a[0]&&c){o(a);continue}}if(r.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&r.reused==="ref"){o(a);continue}}}function ke(r,e){let n=r.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let u=r.seen.get(s);if(u.ref===null)return;let c=u.def??u.schema,l={...c},m=u.ref;if(u.ref=null,m){i(m);let f=r.seen.get(m),x=f.schema;if(x.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(x)):Object.assign(c,x),Object.assign(c,l),s._zod.parent===m)for(let P in c)P==="$ref"||P==="allOf"||P in l||delete c[P];if(x.$ref&&f.def)for(let P in c)P==="$ref"||P==="allOf"||P in f.def&&JSON.stringify(c[P])===JSON.stringify(f.def[P])&&delete c[P]}let g=s._zod.parent;if(g&&g!==m){i(g);let f=r.seen.get(g);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let x in c)x==="$ref"||x==="allOf"||x in f.def&&JSON.stringify(c[x])===JSON.stringify(f.def[x])&&delete c[x]}r.override({zodSchema:s,jsonSchema:c,path:u.path??[]})};for(let s of[...r.seen.entries()].reverse())i(s[0]);let t={};if(r.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":r.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":r.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":r.target,r.external?.uri){let s=r.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");t.$id=r.external.uri(s)}Object.assign(t,n.def??n.schema);let o=r.metadataRegistry.get(e)?.id;o!==void 0&&t.id===o&&delete t.id;let a=r.external?.defs??{};for(let s of r.seen.entries()){let u=s[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}r.external||Object.keys(a).length>0&&(r.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:dt(e,"input",r.processors),output:dt(e,"output",r.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function V(r,e){let n=e??{seen:new Set};if(n.seen.has(r))return!1;n.seen.add(r);let i=r._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return V(i.element,n);if(i.type==="set")return V(i.valueType,n);if(i.type==="lazy")return V(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return V(i.innerType,n);if(i.type==="intersection")return V(i.left,n)||V(i.right,n);if(i.type==="record"||i.type==="map")return V(i.keyType,n)||V(i.valueType,n);if(i.type==="pipe")return r._zod.traits.has("$ZodCodec")?!0:V(i.in,n)||V(i.out,n);if(i.type==="object"){for(let t in i.shape)if(V(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(V(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(V(t,n))return!0;return!!(i.rest&&V(i.rest,n))}return!1}var ec=(r,e={})=>n=>{let i=xe({...n,processors:e});return z(r,i),$e(i,r),ke(i,r)},dt=(r,e,n={})=>i=>{let{libraryOptions:t,target:o}=i??{},a=xe({...t??{},target:o,io:e,processors:n});return z(r,a),$e(a,r),ke(a,r)};var Mh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tc=(r,e,n,i)=>{let t=n;t.type="string";let{minimum:o,maximum:a,format:s,patterns:u,contentEncoding:c}=r._zod.bag;if(typeof o=="number"&&(t.minLength=o),typeof a=="number"&&(t.maxLength=a),s&&(t.format=Mh[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),c&&(t.contentEncoding=c),u&&u.size>0){let l=[...u];l.length===1?t.pattern=l[0].source:l.length>1&&(t.allOf=[...l.map(m=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},rc=(r,e,n,i)=>{let t=n,{minimum:o,maximum:a,format:s,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=r._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number";let m=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),g=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=e.target==="draft-04"||e.target==="openapi-3.0";m?f?(t.minimum=l,t.exclusiveMinimum=!0):t.exclusiveMinimum=l:typeof o=="number"&&(t.minimum=o),g?f?(t.maximum=c,t.exclusiveMaximum=!0):t.exclusiveMaximum=c:typeof a=="number"&&(t.maximum=a),typeof u=="number"&&(t.multipleOf=u)},nc=(r,e,n,i)=>{n.type="boolean"},ic=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},oc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},ac=(r,e,n,i)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},sc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},uc=(r,e,n,i)=>{n.not={}},lc=(r,e,n,i)=>{},dc=(r,e,n,i)=>{},pc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},mc=(r,e,n,i)=>{let t=r._zod.def,o=Ot(t.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},fc=(r,e,n,i)=>{let t=r._zod.def,o=[];for(let a of t.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},gc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},hc=(r,e,n,i)=>{let t=n,o=r._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=o.source},vc=(r,e,n,i)=>{let t=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=r._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),u?u.length===1?(o.contentMediaType=u[0],Object.assign(t,o)):(Object.assign(t,o),t.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(t,o)},bc=(r,e,n,i)=>{n.type="boolean"},yc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},xc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},$c=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kc=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_c=(r,e,n,i)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},wc=(r,e,n,i)=>{let t=n,o=r._zod.def,{minimum:a,maximum:s}=r._zod.bag;typeof a=="number"&&(t.minItems=a),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=z(o.element,e,{...i,path:[...i.path,"items"]})},Sc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="object",t.properties={};let a=o.shape;for(let c in a)t.properties[c]=z(a[c],e,{...i,path:[...i.path,"properties",c]});let s=new Set(Object.keys(a)),u=new Set([...s].filter(c=>{let l=o.shape[c]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(t.required=Array.from(u)),o.catchall?._zod.def.type==="never"?t.additionalProperties=!1:o.catchall?o.catchall&&(t.additionalProperties=z(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(t.additionalProperties=!1)},An=(r,e,n,i)=>{let t=r._zod.def,o=t.inclusive===!1,a=t.options.map((s,u)=>z(s,e,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},Ic=(r,e,n,i)=>{let t=r._zod.def,o=z(t.left,e,{...i,path:[...i.path,"allOf",0]}),a=z(t.right,e,{...i,path:[...i.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,u=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=u},Pc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,f)=>z(g,e,{...i,path:[...i.path,a,f]})),c=o.rest?z(o.rest,e,{...i,path:[...i.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(t.prefixItems=u,c&&(t.items=c)):e.target==="openapi-3.0"?(t.items={anyOf:u},c&&t.items.anyOf.push(c),t.minItems=u.length,c||(t.maxItems=u.length)):(t.items=u,c&&(t.additionalItems=c));let{minimum:l,maximum:m}=r._zod.bag;typeof l=="number"&&(t.minItems=l),typeof m=="number"&&(t.maxItems=m)},zc=(r,e,n,i)=>{let t=n,o=r._zod.def;t.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=z(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(let m of u)t.patternProperties[m.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(t.propertyNames=z(o.keyType,e,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=z(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let c=a._zod.values;if(c){let l=[...c].filter(m=>typeof m=="string"||typeof m=="number");l.length>0&&(t.required=l)}},Ec=(r,e,n,i)=>{let t=r._zod.def,o=z(t.innerType,e,i),a=e.seen.get(r);e.target==="openapi-3.0"?(a.ref=t.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Tc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Dc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Uc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Rc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Oc=(r,e,n,i)=>{let t=r._zod.def,o=t.in._zod.traits.has("$ZodTransform"),a=e.io==="input"?o?t.out:t.in:t.out;z(a,e,i);let s=e.seen.get(r);s.ref=a},Nc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType,n.readOnly=!0},jc=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Cn=(r,e,n,i)=>{let t=r._zod.def;z(t.innerType,e,i);let o=e.seen.get(r);o.ref=t.innerType},Ac=(r,e,n,i)=>{let t=r._zod.innerType;z(t,e,i);let o=e.seen.get(r);o.ref=t},jn={string:tc,number:rc,boolean:nc,bigint:ic,symbol:oc,null:ac,undefined:sc,void:cc,never:uc,any:lc,unknown:dc,date:pc,enum:mc,literal:fc,nan:gc,template_literal:hc,file:vc,success:bc,custom:yc,function:xc,transform:$c,map:kc,set:_c,array:wc,object:Sc,union:An,intersection:Ic,tuple:Pc,record:zc,nullable:Ec,nonoptional:Tc,default:Dc,prefault:Uc,catch:Rc,pipe:Oc,readonly:Nc,promise:jc,optional:Cn,lazy:Ac};function Ln(r,e){if("_idmap"in r){let i=r,t=xe({...e,processors:jn}),o={};for(let u of i._idmap.entries()){let[c,l]=u;z(l,t)}let a={},s={registry:i,uri:e?.uri,defs:o};t.external=s;for(let u of i._idmap.entries()){let[c,l]=u;$e(t,l),a[c]=ke(t,l)}if(Object.keys(o).length>0){let u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=xe({...e,processors:jn});return z(r,n),$e(n,r),ke(n,r)}var Zn=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=xe({processors:jn,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return z(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),$e(this.ctx,e);let i=ke(this.ctx,e),{"~standard":t,...o}=i;return o}};var mp={};var Yt={};te(Yt,{ZodAny:()=>su,ZodArray:()=>du,ZodBase64:()=>si,ZodBase64URL:()=>ci,ZodBigInt:()=>yt,ZodBigIntFormat:()=>di,ZodBoolean:()=>bt,ZodCIDRv4:()=>oi,ZodCIDRv6:()=>ai,ZodCUID:()=>Yn,ZodCUID2:()=>Qn,ZodCatch:()=>Ru,ZodCodec:()=>lr,ZodCustom:()=>dr,ZodCustomStringFormat:()=>ht,ZodDate:()=>or,ZodDefault:()=>Pu,ZodDiscriminatedUnion:()=>mu,ZodE164:()=>ui,ZodEmail:()=>qn,ZodEmoji:()=>Hn,ZodEnum:()=>ft,ZodExactOptional:()=>wu,ZodFile:()=>ku,ZodFunction:()=>Gu,ZodGUID:()=>er,ZodIPv4:()=>ni,ZodIPv6:()=>ii,ZodIntersection:()=>fu,ZodJWT:()=>li,ZodKSUID:()=>ri,ZodLazy:()=>Zu,ZodLiteral:()=>$u,ZodMAC:()=>eu,ZodMap:()=>yu,ZodNaN:()=>Nu,ZodNanoID:()=>Xn,ZodNever:()=>uu,ZodNonOptional:()=>vi,ZodNull:()=>ou,ZodNullable:()=>Iu,ZodNumber:()=>vt,ZodNumberFormat:()=>Ae,ZodObject:()=>sr,ZodOptional:()=>hi,ZodPipe:()=>ur,ZodPrefault:()=>Eu,ZodPreprocess:()=>ju,ZodPromise:()=>Mu,ZodReadonly:()=>Au,ZodRecord:()=>mt,ZodSet:()=>xu,ZodString:()=>gt,ZodStringFormat:()=>D,ZodSuccess:()=>Uu,ZodSymbol:()=>nu,ZodTemplateLiteral:()=>Lu,ZodTransform:()=>_u,ZodTuple:()=>hu,ZodType:()=>S,ZodULID:()=>ei,ZodURL:()=>ir,ZodUUID:()=>se,ZodUndefined:()=>iu,ZodUnion:()=>cr,ZodUnknown:()=>cu,ZodVoid:()=>lu,ZodXID:()=>ti,ZodXor:()=>pu,_ZodString:()=>Kn,_default:()=>zu,_function:()=>km,any:()=>Qp,array:()=>ar,base64:()=>jp,base64url:()=>Ap,bigint:()=>Kp,boolean:()=>ru,catch:()=>Ou,check:()=>_m,cidrv4:()=>Op,cidrv6:()=>Np,codec:()=>bm,cuid:()=>Ip,cuid2:()=>Pp,custom:()=>wm,date:()=>tm,describe:()=>Sm,discriminatedUnion:()=>sm,e164:()=>Cp,email:()=>hp,emoji:()=>wp,enum:()=>fi,exactOptional:()=>Su,file:()=>fm,float32:()=>Bp,float64:()=>Wp,function:()=>km,guid:()=>vp,hash:()=>Gp,hex:()=>Mp,hostname:()=>Fp,httpUrl:()=>_p,instanceof:()=>Pm,int:()=>Vn,int32:()=>Vp,int64:()=>qp,intersection:()=>gu,invertCodec:()=>ym,ipv4:()=>Dp,ipv6:()=>Rp,json:()=>Em,jwt:()=>Lp,keyof:()=>rm,ksuid:()=>Tp,lazy:()=>Fu,literal:()=>mm,looseObject:()=>om,looseRecord:()=>um,mac:()=>Up,map:()=>lm,meta:()=>Im,nan:()=>vm,nanoid:()=>Sp,nativeEnum:()=>pm,never:()=>pi,nonoptional:()=>Du,null:()=>au,nullable:()=>rr,nullish:()=>gm,number:()=>tu,object:()=>nm,optional:()=>tr,partialRecord:()=>cm,pipe:()=>Jn,prefault:()=>Tu,preprocess:()=>Tm,promise:()=>$m,readonly:()=>Cu,record:()=>bu,refine:()=>Bu,set:()=>dm,strictObject:()=>im,string:()=>Qt,stringFormat:()=>Zp,stringbool:()=>zm,success:()=>hm,superRefine:()=>Wu,symbol:()=>Xp,templateLiteral:()=>xm,transform:()=>gi,tuple:()=>vu,uint32:()=>Jp,uint64:()=>Hp,ulid:()=>zp,undefined:()=>Yp,union:()=>mi,unknown:()=>je,url:()=>kp,uuid:()=>bp,uuidv4:()=>yp,uuidv6:()=>xp,uuidv7:()=>$p,void:()=>em,xid:()=>Ep,xor:()=>am});var Fn={};te(Fn,{endsWith:()=>nt,gt:()=>oe,gte:()=>W,includes:()=>tt,length:()=>Ne,lowercase:()=>Qe,lt:()=>ie,lte:()=>Y,maxLength:()=>Oe,maxSize:()=>ye,mime:()=>it,minLength:()=>ue,minSize:()=>ae,multipleOf:()=>be,negative:()=>Un,nonnegative:()=>On,nonpositive:()=>Rn,normalize:()=>ot,overwrite:()=>ne,positive:()=>Dn,property:()=>Nn,regex:()=>Ye,size:()=>Re,slugify:()=>ut,startsWith:()=>rt,toLowerCase:()=>st,toUpperCase:()=>ct,trim:()=>at,uppercase:()=>et});var pt={};te(pt,{ZodISODate:()=>Gn,ZodISODateTime:()=>Mn,ZodISODuration:()=>Wn,ZodISOTime:()=>Bn,date:()=>Lc,datetime:()=>Cc,duration:()=>Fc,time:()=>Zc});var Mn=d("ZodISODateTime",(r,e)=>{ga.init(r,e),D.init(r,e)});function Cc(r){return ys(Mn,r)}var Gn=d("ZodISODate",(r,e)=>{ha.init(r,e),D.init(r,e)});function Lc(r){return xs(Gn,r)}var Bn=d("ZodISOTime",(r,e)=>{va.init(r,e),D.init(r,e)});function Zc(r){return $s(Bn,r)}var Wn=d("ZodISODuration",(r,e)=>{ba.init(r,e),D.init(r,e)});function Fc(r){return ks(Wn,r)}var fp=(r,e)=>{Lt.init(r,e),r.name="ZodError",Object.defineProperties(r,{format:{value:n=>Ft(r,n)},flatten:{value:n=>Zt(r,n)},addIssue:{value:n=>{r.issues.push(n),r.message=JSON.stringify(r.issues,Ge,2)}},addIssues:{value:n=>{r.issues.push(...n),r.message=JSON.stringify(r.issues,Ge,2)}},isEmpty:{get(){return r.issues.length===0}}})},Bh=d("ZodError",fp),q=d("ZodError",fp,{Parent:Error});var Mc=Ve(q),Gc=Je(q),Bc=Ke(q),Wc=qe(q),Vc=Cr(q),Jc=Lr(q),Kc=Zr(q),qc=Fr(q),Hc=Mr(q),Xc=Gr(q),Yc=Br(q),Qc=Wr(q);var gp=new WeakMap;function nr(r,e,n){let i=Object.getPrototypeOf(r),t=gp.get(i);if(t||(t=new Set,gp.set(i,t)),!t.has(e)){t.add(e);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var S=d("ZodType",(r,e)=>(w.init(r,e),Object.assign(r["~standard"],{jsonSchema:{input:dt(r,"input"),output:dt(r,"output")}}),r.toJSONSchema=ec(r,{}),r.def=e,r.type=e.type,Object.defineProperty(r,"_def",{value:e}),r.parse=(n,i)=>Mc(r,n,i,{callee:r.parse}),r.safeParse=(n,i)=>Bc(r,n,i),r.parseAsync=async(n,i)=>Gc(r,n,i,{callee:r.parseAsync}),r.safeParseAsync=async(n,i)=>Wc(r,n,i),r.spa=r.safeParseAsync,r.encode=(n,i)=>Vc(r,n,i),r.decode=(n,i)=>Jc(r,n,i),r.encodeAsync=async(n,i)=>Kc(r,n,i),r.decodeAsync=async(n,i)=>qc(r,n,i),r.safeEncode=(n,i)=>Hc(r,n,i),r.safeDecode=(n,i)=>Xc(r,n,i),r.safeEncodeAsync=async(n,i)=>Yc(r,n,i),r.safeDecodeAsync=async(n,i)=>Qc(r,n,i),nr(r,"ZodType",{check(...n){let i=this.def;return this.clone(b.mergeDefs(i,{checks:[...i.checks??[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return G(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Bu(n,i))},superRefine(n,i){return this.check(Wu(n,i))},overwrite(n){return this.check(ne(n))},optional(){return tr(this)},exactOptional(){return Su(this)},nullable(){return rr(this)},nullish(){return tr(rr(this))},nonoptional(n){return Du(this,n)},array(){return ar(this)},or(n){return mi([this,n])},and(n){return gu(this,n)},transform(n){return Jn(this,gi(n))},default(n){return zu(this,n)},prefault(n){return Tu(this,n)},catch(n){return Ou(this,n)},pipe(n){return Jn(this,n)},readonly(){return Cu(this)},describe(n){let i=this.clone();return Z.add(i,{description:n}),i},meta(...n){if(n.length===0)return Z.get(this);let i=this.clone();return Z.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(r,"description",{get(){return Z.get(r)?.description},configurable:!0}),r)),Kn=d("_ZodString",(r,e)=>{Ue.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>tc(r,i,t,o);let n=r._zod.bag;r.format=n.format??null,r.minLength=n.minimum??null,r.maxLength=n.maximum??null,nr(r,"_ZodString",{regex(...i){return this.check(Ye(...i))},includes(...i){return this.check(tt(...i))},startsWith(...i){return this.check(rt(...i))},endsWith(...i){return this.check(nt(...i))},min(...i){return this.check(ue(...i))},max(...i){return this.check(Oe(...i))},length(...i){return this.check(Ne(...i))},nonempty(...i){return this.check(ue(1,...i))},lowercase(i){return this.check(Qe(i))},uppercase(i){return this.check(et(i))},trim(){return this.check(at())},normalize(...i){return this.check(ot(...i))},toLowerCase(){return this.check(st())},toUpperCase(){return this.check(ct())},slugify(){return this.check(ut())}})}),gt=d("ZodString",(r,e)=>{Ue.init(r,e),Kn.init(r,e),r.email=n=>r.check(dn(qn,n)),r.url=n=>r.check(Xt(ir,n)),r.jwt=n=>r.check(Tn(li,n)),r.emoji=n=>r.check(hn(Hn,n)),r.guid=n=>r.check(Ht(er,n)),r.uuid=n=>r.check(pn(se,n)),r.uuidv4=n=>r.check(mn(se,n)),r.uuidv6=n=>r.check(fn(se,n)),r.uuidv7=n=>r.check(gn(se,n)),r.nanoid=n=>r.check(vn(Xn,n)),r.guid=n=>r.check(Ht(er,n)),r.cuid=n=>r.check(bn(Yn,n)),r.cuid2=n=>r.check(yn(Qn,n)),r.ulid=n=>r.check(xn(ei,n)),r.base64=n=>r.check(Pn(si,n)),r.base64url=n=>r.check(zn(ci,n)),r.xid=n=>r.check($n(ti,n)),r.ksuid=n=>r.check(kn(ri,n)),r.ipv4=n=>r.check(_n(ni,n)),r.ipv6=n=>r.check(wn(ii,n)),r.cidrv4=n=>r.check(Sn(oi,n)),r.cidrv6=n=>r.check(In(ai,n)),r.e164=n=>r.check(En(ui,n)),r.datetime=n=>r.check(Cc(n)),r.date=n=>r.check(Lc(n)),r.time=n=>r.check(Zc(n)),r.duration=n=>r.check(Fc(n))});function Qt(r){return gs(gt,r)}var D=d("ZodStringFormat",(r,e)=>{T.init(r,e),Kn.init(r,e)}),qn=d("ZodEmail",(r,e)=>{aa.init(r,e),D.init(r,e)});function hp(r){return dn(qn,r)}var er=d("ZodGUID",(r,e)=>{ia.init(r,e),D.init(r,e)});function vp(r){return Ht(er,r)}var se=d("ZodUUID",(r,e)=>{oa.init(r,e),D.init(r,e)});function bp(r){return pn(se,r)}function yp(r){return mn(se,r)}function xp(r){return fn(se,r)}function $p(r){return gn(se,r)}var ir=d("ZodURL",(r,e)=>{sa.init(r,e),D.init(r,e)});function kp(r){return Xt(ir,r)}function _p(r){return Xt(ir,{protocol:X.httpProtocol,hostname:X.domain,...b.normalizeParams(r)})}var Hn=d("ZodEmoji",(r,e)=>{ca.init(r,e),D.init(r,e)});function wp(r){return hn(Hn,r)}var Xn=d("ZodNanoID",(r,e)=>{ua.init(r,e),D.init(r,e)});function Sp(r){return vn(Xn,r)}var Yn=d("ZodCUID",(r,e)=>{la.init(r,e),D.init(r,e)});function Ip(r){return bn(Yn,r)}var Qn=d("ZodCUID2",(r,e)=>{da.init(r,e),D.init(r,e)});function Pp(r){return yn(Qn,r)}var ei=d("ZodULID",(r,e)=>{pa.init(r,e),D.init(r,e)});function zp(r){return xn(ei,r)}var ti=d("ZodXID",(r,e)=>{ma.init(r,e),D.init(r,e)});function Ep(r){return $n(ti,r)}var ri=d("ZodKSUID",(r,e)=>{fa.init(r,e),D.init(r,e)});function Tp(r){return kn(ri,r)}var ni=d("ZodIPv4",(r,e)=>{ya.init(r,e),D.init(r,e)});function Dp(r){return _n(ni,r)}var eu=d("ZodMAC",(r,e)=>{$a.init(r,e),D.init(r,e)});function Up(r){return vs(eu,r)}var ii=d("ZodIPv6",(r,e)=>{xa.init(r,e),D.init(r,e)});function Rp(r){return wn(ii,r)}var oi=d("ZodCIDRv4",(r,e)=>{ka.init(r,e),D.init(r,e)});function Op(r){return Sn(oi,r)}var ai=d("ZodCIDRv6",(r,e)=>{_a.init(r,e),D.init(r,e)});function Np(r){return In(ai,r)}var si=d("ZodBase64",(r,e)=>{Sa.init(r,e),D.init(r,e)});function jp(r){return Pn(si,r)}var ci=d("ZodBase64URL",(r,e)=>{Ia.init(r,e),D.init(r,e)});function Ap(r){return zn(ci,r)}var ui=d("ZodE164",(r,e)=>{Pa.init(r,e),D.init(r,e)});function Cp(r){return En(ui,r)}var li=d("ZodJWT",(r,e)=>{za.init(r,e),D.init(r,e)});function Lp(r){return Tn(li,r)}var ht=d("ZodCustomStringFormat",(r,e)=>{Ea.init(r,e),D.init(r,e)});function Zp(r,e,n={}){return lt(ht,r,e,n)}function Fp(r){return lt(ht,"hostname",X.hostname,r)}function Mp(r){return lt(ht,"hex",X.hex,r)}function Gp(r,e){let n=e?.enc??"hex",i=`${r}_${n}`,t=X[i];if(!t)throw new Error(`Unrecognized hash format: ${i}`);return lt(ht,i,t,e)}var vt=d("ZodNumber",(r,e)=>{en.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>rc(r,i,t,o),nr(r,"ZodNumber",{gt(i,t){return this.check(oe(i,t))},gte(i,t){return this.check(W(i,t))},min(i,t){return this.check(W(i,t))},lt(i,t){return this.check(ie(i,t))},lte(i,t){return this.check(Y(i,t))},max(i,t){return this.check(Y(i,t))},int(i){return this.check(Vn(i))},safe(i){return this.check(Vn(i))},positive(i){return this.check(oe(0,i))},nonnegative(i){return this.check(W(0,i))},negative(i){return this.check(ie(0,i))},nonpositive(i){return this.check(Y(0,i))},multipleOf(i,t){return this.check(be(i,t))},step(i,t){return this.check(be(i,t))},finite(){return this}});let n=r._zod.bag;r.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),r.isFinite=!0,r.format=n.format??null});function tu(r){return _s(vt,r)}var Ae=d("ZodNumberFormat",(r,e)=>{Ta.init(r,e),vt.init(r,e)});function Vn(r){return Ss(Ae,r)}function Bp(r){return Is(Ae,r)}function Wp(r){return Ps(Ae,r)}function Vp(r){return zs(Ae,r)}function Jp(r){return Es(Ae,r)}var bt=d("ZodBoolean",(r,e)=>{Wt.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>nc(r,n,i,t)});function ru(r){return Ts(bt,r)}var yt=d("ZodBigInt",(r,e)=>{tn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>ic(r,i,t,o),r.gte=(i,t)=>r.check(W(i,t)),r.min=(i,t)=>r.check(W(i,t)),r.gt=(i,t)=>r.check(oe(i,t)),r.gte=(i,t)=>r.check(W(i,t)),r.min=(i,t)=>r.check(W(i,t)),r.lt=(i,t)=>r.check(ie(i,t)),r.lte=(i,t)=>r.check(Y(i,t)),r.max=(i,t)=>r.check(Y(i,t)),r.positive=i=>r.check(oe(BigInt(0),i)),r.negative=i=>r.check(ie(BigInt(0),i)),r.nonpositive=i=>r.check(Y(BigInt(0),i)),r.nonnegative=i=>r.check(W(BigInt(0),i)),r.multipleOf=(i,t)=>r.check(be(i,t));let n=r._zod.bag;r.minValue=n.minimum??null,r.maxValue=n.maximum??null,r.format=n.format??null});function Kp(r){return Us(yt,r)}var di=d("ZodBigIntFormat",(r,e)=>{Da.init(r,e),yt.init(r,e)});function qp(r){return Os(di,r)}function Hp(r){return Ns(di,r)}var nu=d("ZodSymbol",(r,e)=>{Ua.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>oc(r,n,i,t)});function Xp(r){return js(nu,r)}var iu=d("ZodUndefined",(r,e)=>{Ra.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>sc(r,n,i,t)});function Yp(r){return As(iu,r)}var ou=d("ZodNull",(r,e)=>{Oa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>ac(r,n,i,t)});function au(r){return Cs(ou,r)}var su=d("ZodAny",(r,e)=>{Na.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>lc(r,n,i,t)});function Qp(){return Ls(su)}var cu=d("ZodUnknown",(r,e)=>{ja.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>dc(r,n,i,t)});function je(){return Zs(cu)}var uu=d("ZodNever",(r,e)=>{Aa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>uc(r,n,i,t)});function pi(r){return Fs(uu,r)}var lu=d("ZodVoid",(r,e)=>{Ca.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>cc(r,n,i,t)});function em(r){return Ms(lu,r)}var or=d("ZodDate",(r,e)=>{La.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>pc(r,i,t,o),r.min=(i,t)=>r.check(W(i,t)),r.max=(i,t)=>r.check(Y(i,t));let n=r._zod.bag;r.minDate=n.minimum?new Date(n.minimum):null,r.maxDate=n.maximum?new Date(n.maximum):null});function tm(r){return Gs(or,r)}var du=d("ZodArray",(r,e)=>{Za.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>wc(r,n,i,t),r.element=e.element,nr(r,"ZodArray",{min(n,i){return this.check(ue(n,i))},nonempty(n){return this.check(ue(1,n))},max(n,i){return this.check(Oe(n,i))},length(n,i){return this.check(Ne(n,i))},unwrap(){return this.element}})});function ar(r,e){return Vs(du,r,e)}function rm(r){let e=r._zod.def.shape;return fi(Object.keys(e))}var sr=d("ZodObject",(r,e)=>{Fa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Sc(r,n,i,t),b.defineLazy(r,"shape",()=>e.shape),nr(r,"ZodObject",{keyof(){return fi(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:je()})},loose(){return this.clone({...this._zod.def,catchall:je()})},strict(){return this.clone({...this._zod.def,catchall:pi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return b.extend(this,n)},safeExtend(n){return b.safeExtend(this,n)},merge(n){return b.merge(this,n)},pick(n){return b.pick(this,n)},omit(n){return b.omit(this,n)},partial(...n){return b.partial(hi,this,n[0])},required(...n){return b.required(vi,this,n[0])}})});function nm(r,e){let n={type:"object",shape:r??{},...b.normalizeParams(e)};return new sr(n)}function im(r,e){return new sr({type:"object",shape:r,catchall:pi(),...b.normalizeParams(e)})}function om(r,e){return new sr({type:"object",shape:r,catchall:je(),...b.normalizeParams(e)})}var cr=d("ZodUnion",(r,e)=>{Vt.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>An(r,n,i,t),r.options=e.options});function mi(r,e){return new cr({type:"union",options:r,...b.normalizeParams(e)})}var pu=d("ZodXor",(r,e)=>{cr.init(r,e),Ma.init(r,e),r._zod.processJSONSchema=(n,i,t)=>An(r,n,i,t),r.options=e.options});function am(r,e){return new pu({type:"union",options:r,inclusive:!1,...b.normalizeParams(e)})}var mu=d("ZodDiscriminatedUnion",(r,e)=>{cr.init(r,e),Ga.init(r,e)});function sm(r,e,n){return new mu({type:"union",options:e,discriminator:r,...b.normalizeParams(n)})}var fu=d("ZodIntersection",(r,e)=>{Ba.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ic(r,n,i,t)});function gu(r,e){return new fu({type:"intersection",left:r,right:e})}var hu=d("ZodTuple",(r,e)=>{rn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Pc(r,n,i,t),r.rest=n=>r.clone({...r._zod.def,rest:n})});function vu(r,e,n){let i=e instanceof w,t=i?n:e,o=i?e:null;return new hu({type:"tuple",items:r,rest:o,...b.normalizeParams(t)})}var mt=d("ZodRecord",(r,e)=>{Wa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>zc(r,n,i,t),r.keyType=e.keyType,r.valueType=e.valueType});function bu(r,e,n){return!e||!e._zod?new mt({type:"record",keyType:Qt(),valueType:r,...b.normalizeParams(e)}):new mt({type:"record",keyType:r,valueType:e,...b.normalizeParams(n)})}function cm(r,e,n){let i=G(r);return i._zod.values=void 0,new mt({type:"record",keyType:i,valueType:e,...b.normalizeParams(n)})}function um(r,e,n){return new mt({type:"record",keyType:r,valueType:e,mode:"loose",...b.normalizeParams(n)})}var yu=d("ZodMap",(r,e)=>{Va.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>kc(r,n,i,t),r.keyType=e.keyType,r.valueType=e.valueType,r.min=(...n)=>r.check(ae(...n)),r.nonempty=n=>r.check(ae(1,n)),r.max=(...n)=>r.check(ye(...n)),r.size=(...n)=>r.check(Re(...n))});function lm(r,e,n){return new yu({type:"map",keyType:r,valueType:e,...b.normalizeParams(n)})}var xu=d("ZodSet",(r,e)=>{Ja.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>_c(r,n,i,t),r.min=(...n)=>r.check(ae(...n)),r.nonempty=n=>r.check(ae(1,n)),r.max=(...n)=>r.check(ye(...n)),r.size=(...n)=>r.check(Re(...n))});function dm(r,e){return new xu({type:"set",valueType:r,...b.normalizeParams(e)})}var ft=d("ZodEnum",(r,e)=>{Ka.init(r,e),S.init(r,e),r._zod.processJSONSchema=(i,t,o)=>mc(r,i,t,o),r.enum=e.entries,r.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));r.extract=(i,t)=>{let o={};for(let a of i)if(n.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ft({...e,checks:[],...b.normalizeParams(t),entries:o})},r.exclude=(i,t)=>{let o={...e.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new ft({...e,checks:[],...b.normalizeParams(t),entries:o})}});function fi(r,e){let n=Array.isArray(r)?Object.fromEntries(r.map(i=>[i,i])):r;return new ft({type:"enum",entries:n,...b.normalizeParams(e)})}function pm(r,e){return new ft({type:"enum",entries:r,...b.normalizeParams(e)})}var $u=d("ZodLiteral",(r,e)=>{qa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>fc(r,n,i,t),r.values=new Set(e.values),Object.defineProperty(r,"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 mm(r,e){return new $u({type:"literal",values:Array.isArray(r)?r:[r],...b.normalizeParams(e)})}var ku=d("ZodFile",(r,e)=>{Ha.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>vc(r,n,i,t),r.min=(n,i)=>r.check(ae(n,i)),r.max=(n,i)=>r.check(ye(n,i)),r.mime=(n,i)=>r.check(it(Array.isArray(n)?n:[n],i))});function fm(r){return Js(ku,r)}var _u=d("ZodTransform",(r,e)=>{Xa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>$c(r,n,i,t),r._zod.parse=(n,i)=>{if(i.direction==="backward")throw new me(r.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(b.issue(o,n.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),n.issues.push(b.issue(a))}};let t=e.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=t,n.fallback=!0,n)}});function gi(r){return new _u({type:"transform",transform:r})}var hi=d("ZodOptional",(r,e)=>{nn.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Cn(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function tr(r){return new hi({type:"optional",innerType:r})}var wu=d("ZodExactOptional",(r,e)=>{Ya.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Cn(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Su(r){return new wu({type:"optional",innerType:r})}var Iu=d("ZodNullable",(r,e)=>{Qa.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ec(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function rr(r){return new Iu({type:"nullable",innerType:r})}function gm(r){return tr(rr(r))}var Pu=d("ZodDefault",(r,e)=>{es.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Dc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});function zu(r,e){return new Pu({type:"default",innerType:r,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var Eu=d("ZodPrefault",(r,e)=>{ts.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Uc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Tu(r,e){return new Eu({type:"prefault",innerType:r,get defaultValue(){return typeof e=="function"?e():b.shallowClone(e)}})}var vi=d("ZodNonOptional",(r,e)=>{rs.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Tc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Du(r,e){return new vi({type:"nonoptional",innerType:r,...b.normalizeParams(e)})}var Uu=d("ZodSuccess",(r,e)=>{ns.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>bc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function hm(r){return new Uu({type:"success",innerType:r})}var Ru=d("ZodCatch",(r,e)=>{is.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Rc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});function Ou(r,e){return new Ru({type:"catch",innerType:r,catchValue:typeof e=="function"?e:()=>e})}var Nu=d("ZodNaN",(r,e)=>{os.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>gc(r,n,i,t)});function vm(r){return Ws(Nu,r)}var ur=d("ZodPipe",(r,e)=>{on.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Oc(r,n,i,t),r.in=e.in,r.out=e.out});function Jn(r,e){return new ur({type:"pipe",in:r,out:e})}var lr=d("ZodCodec",(r,e)=>{ur.init(r,e),Jt.init(r,e)});function bm(r,e,n){return new lr({type:"pipe",in:r,out:e,transform:n.decode,reverseTransform:n.encode})}function ym(r){let e=r._zod.def;return new lr({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var ju=d("ZodPreprocess",(r,e)=>{ur.init(r,e),as.init(r,e)}),Au=d("ZodReadonly",(r,e)=>{ss.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Nc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function Cu(r){return new Au({type:"readonly",innerType:r})}var Lu=d("ZodTemplateLiteral",(r,e)=>{cs.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>hc(r,n,i,t)});function xm(r,e){return new Lu({type:"template_literal",parts:r,...b.normalizeParams(e)})}var Zu=d("ZodLazy",(r,e)=>{ds.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>Ac(r,n,i,t),r.unwrap=()=>r._zod.def.getter()});function Fu(r){return new Zu({type:"lazy",getter:r})}var Mu=d("ZodPromise",(r,e)=>{ls.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>jc(r,n,i,t),r.unwrap=()=>r._zod.def.innerType});function $m(r){return new Mu({type:"promise",innerType:r})}var Gu=d("ZodFunction",(r,e)=>{us.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>xc(r,n,i,t)});function km(r){return new Gu({type:"function",input:Array.isArray(r?.input)?vu(r?.input):r?.input??ar(je()),output:r?.output??je()})}var dr=d("ZodCustom",(r,e)=>{ps.init(r,e),S.init(r,e),r._zod.processJSONSchema=(n,i,t)=>yc(r,n,i,t)});function _m(r){let e=new U({check:"custom"});return e._zod.check=r,e}function wm(r,e){return Ks(dr,r??(()=>!0),e)}function Bu(r,e={}){return qs(dr,r,e)}function Wu(r,e){return Hs(r,e)}var Sm=Xs,Im=Ys;function Pm(r,e={}){let n=new dr({type:"custom",check:"custom",fn:i=>i instanceof r,abort:!0,...b.normalizeParams(e)});return n._zod.bag.Class=r,n._zod.check=i=>{i.value instanceof r||i.issues.push({code:"invalid_type",expected:r.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var zm=(...r)=>Qs({Codec:lr,Boolean:bt,String:gt},...r);function Em(r){let e=Fu(()=>mi([Qt(r),tu(),ru(),au(),ar(e),bu(Qt(),e)]));return e}function Tm(r,e){return new ju({type:"pipe",in:gi(r),out:e})}var Vh={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 Jh(r){N({customError:r})}function Kh(){return N().customError}var Vu;Vu||(Vu={});var $={...Yt,...Fn,iso:pt},qh=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Hh(r,e){let n=r.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function Xh(r,e){if(!r.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=r.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!e.defs[t])throw new Error(`Reference not found: ${r}`);return e.defs[t]}throw new Error(`Reference not found: ${r}`)}function Dm(r,e){if(r.not!==void 0){if(typeof r.not=="object"&&Object.keys(r.not).length===0)return $.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(r.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(r.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(r.if!==void 0||r.then!==void 0||r.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(r.dependentSchemas!==void 0||r.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let t=r.$ref;if(e.refs.has(t))return e.refs.get(t);if(e.processing.has(t))return $.lazy(()=>{if(!e.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return e.refs.get(t)});e.processing.add(t);let o=Xh(t,e),a=M(o,e);return e.refs.set(t,a),e.processing.delete(t),a}if(r.enum!==void 0){let t=r.enum;if(e.version==="openapi-3.0"&&r.nullable===!0&&t.length===1&&t[0]===null)return $.null();if(t.length===0)return $.never();if(t.length===1)return $.literal(t[0]);if(t.every(a=>typeof a=="string"))return $.enum(t);let o=t.map(a=>$.literal(a));return o.length<2?o[0]:$.union([o[0],o[1],...o.slice(2)])}if(r.const!==void 0)return $.literal(r.const);let n=r.type;if(Array.isArray(n)){let t=n.map(o=>{let a={...r,type:o};return Dm(a,e)});return t.length===0?$.never():t.length===1?t[0]:$.union(t)}if(!n)return $.any();let i;switch(n){case"string":{let t=$.string();if(r.format){let o=r.format;o==="email"?t=t.check($.email()):o==="uri"||o==="uri-reference"?t=t.check($.url()):o==="uuid"||o==="guid"?t=t.check($.uuid()):o==="date-time"?t=t.check($.iso.datetime()):o==="date"?t=t.check($.iso.date()):o==="time"?t=t.check($.iso.time()):o==="duration"?t=t.check($.iso.duration()):o==="ipv4"?t=t.check($.ipv4()):o==="ipv6"?t=t.check($.ipv6()):o==="mac"?t=t.check($.mac()):o==="cidr"?t=t.check($.cidrv4()):o==="cidr-v6"?t=t.check($.cidrv6()):o==="base64"?t=t.check($.base64()):o==="base64url"?t=t.check($.base64url()):o==="e164"?t=t.check($.e164()):o==="jwt"?t=t.check($.jwt()):o==="emoji"?t=t.check($.emoji()):o==="nanoid"?t=t.check($.nanoid()):o==="cuid"?t=t.check($.cuid()):o==="cuid2"?t=t.check($.cuid2()):o==="ulid"?t=t.check($.ulid()):o==="xid"?t=t.check($.xid()):o==="ksuid"&&(t=t.check($.ksuid()))}typeof r.minLength=="number"&&(t=t.min(r.minLength)),typeof r.maxLength=="number"&&(t=t.max(r.maxLength)),r.pattern&&(t=t.regex(new RegExp(r.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?$.number().int():$.number();typeof r.minimum=="number"&&(t=t.min(r.minimum)),typeof r.maximum=="number"&&(t=t.max(r.maximum)),typeof r.exclusiveMinimum=="number"?t=t.gt(r.exclusiveMinimum):r.exclusiveMinimum===!0&&typeof r.minimum=="number"&&(t=t.gt(r.minimum)),typeof r.exclusiveMaximum=="number"?t=t.lt(r.exclusiveMaximum):r.exclusiveMaximum===!0&&typeof r.maximum=="number"&&(t=t.lt(r.maximum)),typeof r.multipleOf=="number"&&(t=t.multipleOf(r.multipleOf)),i=t;break}case"boolean":{i=$.boolean();break}case"null":{i=$.null();break}case"object":{let t={},o=r.properties||{},a=new Set(r.required||[]);for(let[u,c]of Object.entries(o)){let l=M(c,e);t[u]=a.has(u)?l:l.optional()}if(r.propertyNames){let u=M(r.propertyNames,e),c=r.additionalProperties&&typeof r.additionalProperties=="object"?M(r.additionalProperties,e):$.any();if(Object.keys(t).length===0){i=$.record(u,c);break}let l=$.object(t).passthrough(),m=$.looseRecord(u,c);i=$.intersection(l,m);break}if(r.patternProperties){let u=r.patternProperties,c=Object.keys(u),l=[];for(let g of c){let f=M(u[g],e),x=$.string().regex(new RegExp(g));l.push($.looseRecord(x,f))}let m=[];if(Object.keys(t).length>0&&m.push($.object(t).passthrough()),m.push(...l),m.length===0)i=$.object({}).passthrough();else if(m.length===1)i=m[0];else{let g=$.intersection(m[0],m[1]);for(let f=2;f<m.length;f++)g=$.intersection(g,m[f]);i=g}break}let s=$.object(t);r.additionalProperties===!1?i=s.strict():typeof r.additionalProperties=="object"?i=s.catchall(M(r.additionalProperties,e)):i=s.passthrough();break}case"array":{let t=r.prefixItems,o=r.items;if(t&&Array.isArray(t)){let a=t.map(u=>M(u,e)),s=o&&typeof o=="object"&&!Array.isArray(o)?M(o,e):void 0;s?i=$.tuple(a).rest(s):i=$.tuple(a),typeof r.minItems=="number"&&(i=i.check($.minLength(r.minItems))),typeof r.maxItems=="number"&&(i=i.check($.maxLength(r.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>M(u,e)),s=r.additionalItems&&typeof r.additionalItems=="object"?M(r.additionalItems,e):void 0;s?i=$.tuple(a).rest(s):i=$.tuple(a),typeof r.minItems=="number"&&(i=i.check($.minLength(r.minItems))),typeof r.maxItems=="number"&&(i=i.check($.maxLength(r.maxItems)))}else if(o!==void 0){let a=M(o,e),s=$.array(a);typeof r.minItems=="number"&&(s=s.min(r.minItems)),typeof r.maxItems=="number"&&(s=s.max(r.maxItems)),i=s}else i=$.array($.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function M(r,e){if(typeof r=="boolean")return r?$.any():$.never();let n=Dm(r,e),i=r.type||r.enum!==void 0||r.const!==void 0;if(r.anyOf&&Array.isArray(r.anyOf)){let s=r.anyOf.map(c=>M(c,e)),u=$.union(s);n=i?$.intersection(n,u):u}if(r.oneOf&&Array.isArray(r.oneOf)){let s=r.oneOf.map(c=>M(c,e)),u=$.xor(s);n=i?$.intersection(n,u):u}if(r.allOf&&Array.isArray(r.allOf))if(r.allOf.length===0)n=i?n:$.any();else{let s=i?n:M(r.allOf[0],e),u=i?0:1;for(let c=u;c<r.allOf.length;c++)s=$.intersection(s,M(r.allOf[c],e));n=s}r.nullable===!0&&e.version==="openapi-3.0"&&(n=$.nullable(n)),r.readOnly===!0&&(n=$.readonly(n)),r.default!==void 0&&(n=n.default(r.default));let t={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in r&&(t[s]=r[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in r&&(t[s]=r[s]);for(let s of Object.keys(r))qh.has(s)||(t[s]=r[s]);return Object.keys(t).length>0&&e.registry.add(n,t),r.description&&(n=n.describe(r.description)),n}function Um(r,e){if(typeof r=="boolean")return r?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(r))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Hh(n,e?.defaultTarget),t=n.$defs||n.definitions||{},o={version:i,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??Z};return M(n,o)}var Ju={};te(Ju,{bigint:()=>tv,boolean:()=>ev,date:()=>rv,number:()=>Qh,string:()=>Yh});function Yh(r){return hs(gt,r)}function Qh(r){return ws(vt,r)}function ev(r){return Ds(bt,r)}function tv(r){return Rs(yt,r)}function rv(r){return Bs(or,r)}N(an());var Rm=k.object({user:k.object({id:k.string(),name:k.string()}).nullable(),organization:k.object({id:k.string(),name:k.string()}),permissions:k.array(k.string())});var nv=["ActionNotFound","AuthenticationRequired","BadGateway","BadRequest","Conflict","FileAlreadyExists","FileIsDirectory","FileNotDirectory","FileNotFound","FilesystemUnavailable","InternalError","InvalidArgument","InvalidConfiguration","InvalidRequest","InvalidResponse","InvalidServiceCommand","MethodNotAllowed","NotebookInitializationFailed","NotebookUnavailable","NotFound","PayloadTooLarge","PermissionDenied","RateLimited","RequestFailed","RuntimeOperationFailed","ServiceNotFound","ServiceUnavailable","UnprocessableEntity","ValidationFailed","WorkspaceUnavailable"],E=class extends Error{constructor(e,n){super(e),this.name=new.target.name,this.cause=n}},j=class r extends E{constructor(e,n){super(e,n.cause),this.source=n.source,this.status=n.status,this.code=n.code,this.details=n.details}static is(e,n){return e instanceof r&&(n===void 0||e.code===n)}static isValidation(e){return r.is(e,"ValidationFailed")&&sv(e.details)!==void 0}is(e){return this.code===e}},R=class r extends E{constructor(n,i,t,o){super(n,t);this.code=i;this.response=o}static is(n,i){return n instanceof r&&(i===void 0||n.code===i)}is(n){return this.code===n}};function $t(r,e,n){let i=Ku(e),t=ov(i?.status),o=Om(i?.code),a=Om(i?.message);if(t===void 0||!iv(o)||a===void 0)throw new R("PHPSandbox returned an invalid error response.","InvalidResponse",n??e);return new j(a,{source:r,status:t,code:o,details:i?.details,cause:n})}function iv(r){return typeof r=="string"&&nv.includes(r)}function ov(r){return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}function Om(r){return typeof r=="string"&&r.trim()!==""?r.trim():void 0}function Ku(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)?r:void 0}function av(r){let e=Ku(r);if(e===void 0)return;let n=Object.entries(e);if(n.every(([,i])=>Array.isArray(i)&&i.every(t=>typeof t=="string")))return Object.fromEntries(n)}function sv(r){let e=Ku(r),n=av(e?.errors);return n===void 0?void 0:{errors:n}}var xt=class extends Error{constructor(n,i){super(n);this.time=i}},pr=class r extends R{constructor(n,i,t){super(n,"SendTimeout",t);this.time=i}static fromPromiseTimeoutError(n){return new r(n.message,n.time,n)}};var P$=k.enum(["cloudflare-containers","ssh-server","laravel-cloud"]),cv=k.enum(["pending","queued","building","deploying","healthy","failed","stopped","deleting","deleted","delete_failed"]),z$=k.enum(["pending","queued","running","succeeded","failed","cancelled"]),E$=k.enum(["created","ready","deleted"]),T$=k.enum(["nano","small","medium","large","lite","basic","standard-1","standard-2"]),D$=k.enum(["ENAM","WNAM","EEUR","WEUR","APAC","SAM","ME","OC","AFR"]),U$=k.enum(["eu","fedramp"]),R$=k.enum(["none","password"]),uv=k.enum(["build","runtime"]),lv=k.enum(["build","publish","runtime"]),dv=k.preprocess(r=>Array.isArray(r)&&r.length===0?{}:r,k.record(k.string(),k.unknown())),Nm=k.object({id:k.union([k.number(),k.string()]).optional(),sequence:k.number(),type:k.string(),payload:dv,createdAt:k.string().nullable()}).passthrough(),qu=k.object({sequence:k.number(),stream:uv,content:k.string(),createdAt:k.string().nullable()}).passthrough(),jm=k.object({name:k.string(),status:k.enum(["running","completed","failed"]).optional(),data:k.record(k.string(),k.unknown()).optional()}).strict(),Am=k.object({stream:lv,content:k.string()}).strict(),Hu=k.object({success:k.boolean(),publicationId:k.string(),url:k.string().url(),buildId:k.string(),releaseId:k.string(),status:cv}).strict(),pv=jm.extend({type:k.literal("phase")}).strict(),mv=Am.extend({type:k.literal("log")}).strict(),fv=Hu.extend({type:k.literal("result")}).strict(),gv=k.discriminatedUnion("type",[pv,mv,fv]),hv=k.object({message:k.string().optional()}).passthrough(),Cm=k.enum(["phase","log","done","result","error"]),vv=k.object({event:k.literal("phase"),data:jm}).strict(),bv=k.object({event:k.literal("log"),data:Am}).strict(),yv=k.object({event:k.literal("done"),data:Hu}).strict(),xv=k.object({event:k.literal("result"),data:Hu}).strict(),$v=k.object({event:k.literal("error"),data:hv}).strict(),Lm=k.discriminatedUnion("event",[vv,bv,yv,xv,$v]).transform(r=>{if(r.event==="error")throw new Error(r.data.message??"Publish failed");let e=r.event==="done"?"result":r.event;return gv.parse({type:e,...r.data})});async function*bi(r,e={}){if(r instanceof Response&&(!r.ok||!r.body))throw await r.body?.cancel().catch(()=>{}),new E(`Publishing stream is unavailable (HTTP ${r.status}).`);let i=(r instanceof Response?r.body:r).getReader(),t=new TextDecoder,o="",a="message",s=[],u=!1,c=!1;function l(){let g=a,f=s;if(a="message",s=[],!f.length||!Cm.safeParse(g).success)return null;let x=f.join(`
|
|
66
|
+
`),_;try{_=JSON.parse(x)}catch{_=x}let P=Lm.parse({event:g,data:_});return P.type==="result"&&(c=!0),P}function m(g){if(g==="")return l();if(g.startsWith(":"))return null;let f=g.indexOf(":"),x=f<0?g:g.slice(0,f),_=f<0?"":g.slice(f+1);return _.startsWith(" ")&&(_=_.slice(1)),x==="event"&&(a=_),x==="data"&&s.push(_),null}try{for(;;){let{done:g,value:f}=await i.read();o+=g?t.decode():t.decode(f,{stream:!0});let x;for(;(x=/\r\n|\r|\n/.exec(o))&&!(!g&&x[0]==="\r"&&x.index===o.length-1);){let _=m(o.slice(0,x.index));o=o.slice(x.index+x[0].length),_&&(yield _)}if(g){if(u=!0,o){let P=m(o);P&&(yield P)}let _=l();if(_&&(yield _),e.requireResult!==!1&&!c)throw new E("Publish stream ended without result");return}}}finally{u||await i.cancel().catch(()=>{}),i.releaseLock()}}function Zm(r,e={}){let n=r.getReader(),i=!1,t=!1,o,a;async function s(){i||(i=!0,e.signal?.removeEventListener("abort",a),n.releaseLock(),await e.onDispose?.())}function u(c){return o??(o=(async()=>{t=!0;try{await n.cancel(c)}finally{await s()}})())}return new Response(new ReadableStream({start(c){a=()=>{c.error(e.signal.reason),u(e.signal.reason).catch(()=>{})},e.signal?.aborted?a():e.signal?.addEventListener("abort",a,{once:!0})},async pull(c){try{let{done:l,value:m}=await n.read();if(t)return;l?(t=!0,await s(),c.close()):c.enqueue(m)}catch(l){if(t&&o)return;try{await u(l)}finally{c.error(l)}}},cancel:u},{highWaterMark:0}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform","X-Accel-Buffering":"no"}})}var _e=class{constructor(e,n){this.initial=e;this.client=n;this.streamAbort=new AbortController;this.started=!1;this.completed=!1;this.finalError=null;this.finalResult=null;this.resultPromise=null;this.resolveResult=null;this.rejectResult=null;this.bufferedEvents=[];this.subscribers=new Set}async*events(){this.start();let e=this.subscribe();try{for await(let n of e)yield n}finally{this.subscribers.delete(e),e.close()}}result(){if(this.start(),!this.resultPromise)throw new E("Publication stream could not start.");return this.resultPromise}async publication(){return await this.result(),this.initial.refresh()}start(){if(this.started)return this;let e=this.initial.data.eventStreamUrl;if(!e)throw new E(`Publication ${this.initial.data.id} has no eventStreamUrl for SSE streaming`);return this.started=!0,this.resultPromise=new Promise((n,i)=>{this.resolveResult=n,this.rejectResult=i}),this.resultPromise.catch(()=>{}),this.consumeStream(e),this}dispose(){if(this.completed)return;let e=new DOMException("Stopped observing publication; deployment continues.","AbortError");this.started||(this.started=!0,this.resultPromise=Promise.reject(e),this.resultPromise.catch(()=>{})),this.streamAbort.abort(e),this.fail(e)}subscribe(){let e=new Xu;for(let n of this.bufferedEvents)e.push(n);return this.finalError?e.fail(this.finalError):this.completed?e.close():this.subscribers.add(e),e}async consumeStream(e){try{let n=await this.client.sse(e,this.streamAbort.signal);for await(let i of bi(n))if(this.publish(i),i.type==="result"){let{type:t,...o}=i;this.finalResult=o,this.resolveResult?.(this.finalResult)}if(!this.finalResult)throw new E("Publish stream ended without result");this.closeSubscribers()}catch(n){this.fail(n instanceof Error?n:new E(String(n),n))}}publish(e){this.bufferedEvents.push(e);for(let n of this.subscribers)n.push(e)}closeSubscribers(){this.completed=!0;for(let e of this.subscribers)e.close();this.subscribers.clear()}fail(e){this.finalError=e,this.completed=!0,this.rejectResult?.(e);for(let n of this.subscribers)n.fail(e);this.subscribers.clear()}},Xu=class{constructor(){this.values=[];this.pending=[];this.closed=!1;this.error=null}push(e){if(this.closed)return;let n=this.pending.shift();if(n){n.resolve({done:!1,value:e});return}this.values.push(e)}close(){if(!this.closed){this.closed=!0;for(let e of this.pending.splice(0))e.resolve({done:!0,value:void 0})}}fail(e){if(!this.closed){this.error=e,this.closed=!0;for(let n of this.pending.splice(0))n.reject(e)}}async*[Symbol.asyncIterator](){for(;;){let e=await this.next();if(e.done)return;yield e.value}}next(){let e=this.values.shift();return e?Promise.resolve({done:!1,value:e}):this.error?Promise.reject(this.error):this.closed?Promise.resolve({done:!0,value:void 0}):new Promise((n,i)=>{this.pending.push({resolve:n,reject:i})})}};var we=class{constructor(e,n="/publication-resources"){this.client=e;this.path=n}async inspect(e){return(await this.client.post(`/publication-resources/${encodeURIComponent(e)}/inspect`,{})).data}async list(e={}){let n=new URLSearchParams;for(let[t,o]of Object.entries(e))o!==void 0&&n.set(t,String(o));let i=n.size>0?`?${n.toString()}`:"";return this.client.get(`${this.path}${i}`)}};var kt=class{constructor(e,n){this.client=e;this.publicationId=n}async list(){return(await this.client.get(this.path())).data}async create(e){return(await this.client.post(this.path(),{hostname:e})).data}async refresh(e){return(await this.client.post(`${this.path()}/${encodeURIComponent(e)}/refresh`)).data}async useAsApplicationUrl(e){return(await this.client.post(`${this.path()}/${encodeURIComponent(e)}/application-url`)).data}async delete(e){await this.client.delete(`${this.path()}/${encodeURIComponent(e)}`)}path(){return`/publications/${encodeURIComponent(this.publicationId)}/domains`}};var _t=class{constructor(e){this.client=e;this.resources=new we(e)}async get(e){let n=await this.client.get(`/publications/${encodeURIComponent(e)}`);return new Se(n.data,this.client)}},Se=class r{constructor(e,n,i){this.data=e;this.client=n;this.notebookId=i;this.domains=new kt(n,e.id)}async reconcileLaravelCloudResource(e){let n=await this.client.post(`/publications/${encodeURIComponent(this.data.id)}/laravel-cloud/reconcile`,{resourceId:e});return new r(n.data,this.client,this.notebookId)}async configureLaravelCloud(e){let n=await this.client.put(`/publications/${encodeURIComponent(this.data.id)}/laravel-cloud/setup`,{setup:e});return new r(n.data,this.client,this.notebookId)}async refresh(){let e=await this.client.get(`/publications/${encodeURIComponent(this.data.id)}`);return new r(e.data,this.client,this.notebookId)}follow(){return new _e(this,this.client).start()}async stream(e){if(!this.data.eventStreamUrl)throw new E(`Publication ${this.data.id} has no eventStreamUrl for SSE streaming`);return this.client.sse(this.data.eventStreamUrl,e)}async destroy(e={}){let n=e.deleteResources?"?deleteResources=1":"";await this.client.delete(`/publications/${encodeURIComponent(this.data.id)}${n}`)}async wait(e={}){let n=e.intervalMs??1e3,i=e.timeoutMs??3e5,t=Date.now(),o=this;for(;!kv(o.data.status);){if(Date.now()-t>i)throw new E(`Timed out waiting for publication ${this.data.id}`);await _v(n),o=await o.refresh()}return o}async events(){return Yu(await this.client.stream(`/publications/${encodeURIComponent(this.data.id)}/events/stream`),Nm)}buildLogs(e=this.data.latestBuild?.id??""){return e===""?Promise.reject(new E("Publication has no latest build id")):this.client.stream(`/publications/${encodeURIComponent(this.data.id)}/builds/${encodeURIComponent(e)}/logs/stream`).then(n=>Yu(n,qu))}async logSnapshot(e,n=50){let i=new URLSearchParams({stream:e,limit:String(n)});return(await this.client.get(`/publications/${encodeURIComponent(this.data.id)}/logs?${i}`)).data}async logs(){return Yu(await this.client.stream(`/publications/${encodeURIComponent(this.data.id)}/logs/stream`),qu)}async setProtection(e){let n=await this.client.put(`/publications/${encodeURIComponent(this.data.id)}/protection`,e);return new r(n.data,this.client,this.notebookId)}async protection(){return(await this.client.get(`/publications/${encodeURIComponent(this.data.id)}/protection`)).data}async createProtectionSession(){return(await this.client.post(`/publications/${encodeURIComponent(this.data.id)}/protection/session`)).data}async disableProtection(){let e=await this.client.delete(`/publications/${encodeURIComponent(this.data.id)}/protection`);if(!e.data)throw new R("Protection response has no publication data.","InvalidResponse");return new r(e.data,this.client,this.notebookId)}};function kv(r){return["healthy","failed","stopped","deleted","delete_failed"].includes(r)}function _v(r){return new Promise(e=>setTimeout(e,r))}function Yu(r,e){let n=new TextDecoder,i="";return r.pipeThrough(new TransformStream({transform(t,o){i+=n.decode(t,{stream:!0});let a=i.split(`
|
|
67
|
+
`);i=a.pop()??"";for(let s of a){let u=s.trim();u!==""&&o.enqueue(e.parse(JSON.parse(u)))}},flush(t){i+=n.decode();let o=i.trim();o!==""&&t.enqueue(e.parse(JSON.parse(o)))}}))}var wt=class{constructor(e,n){this.notebookId=e;this.client=n;this.resources=new we(n,`${this.path}/publication/resources`)}get path(){return`/notebook/${encodeURIComponent(this.notebookId)}`}async current(){try{let e=await this.client.get(`${this.path}/publication`);return new Se(e.data,this.client,this.notebookId)}catch(e){if(j.is(e)&&e.status===404)return null;throw e}}async readiness(){return(await this.client.get(`${this.path}/publication/readiness`)).data}async configuration(){return(await this.client.get(`${this.path}/publication/configuration`)).data}async updateConfiguration(e){return(await this.client.patch(`${this.path}/publication/configuration`,e)).data}async prepare(e){return(await this.client.post(`${this.path}/publication/plan`,e)).data}async publish(e){let n=(await this.client.post(`${this.path}/publication`,e)).data;return"confirmationRequired"in n||this.startApplicationRuns(n),n}async application(e){return(await this.client.get(`${this.path}/publication/application/${encodeURIComponent(e)}`)).data}async retryApplication(e){let n=(await this.client.post(`${this.path}/publication/application/${encodeURIComponent(e)}/retry`,{})).data;return this.startApplicationRuns(n),n}async destroyApplication(e,n={}){let i=n.deleteResources?"?deleteResources=1":"";await this.client.delete(`${this.path}/publication/application/${encodeURIComponent(e)}${i}`)}startApplicationRuns(e){for(let n of e.apps)(e.selectedAppIds??[]).includes(n.appId)&&["pending","queued","building","deploying"].includes(n.publication.status)&&new _e(new Se(n.publication,this.client,this.notebookId),this.client).start()}async catalog(e,n){let i=new URLSearchParams({provider:e});return n!==void 0&&i.set("serverId",n),(await this.client.get(`${this.path}/publication/catalog?${i}`)).data}};function Fm(r={},e=null){let n={...r},i={database:e?.databaseId,cache:e?.cacheId,storage:e?.storageId},t=["database","cache","storage"];for(let o of t){let a=i[o];r[o]?.mode==="create"&&a&&(n[o]={mode:"reuse",id:a})}return n}var Mm="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var A=(r=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+=Mm[n[r]&63];return e};var el=(t=>(t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink",t))(el||{}),tl=(i=>(i[i.UPDATED=2]="UPDATED",i[i.ADDED=4]="ADDED",i[i.DELETED=8]="DELETED",i))(tl||{}),rl=(i=>(i[i.UPDATED=1]="UPDATED",i[i.ADDED=2]="ADDED",i[i.DELETED=3]="DELETED",i))(rl||{}),Qu=class{constructor(e,n){this.disposable=e;this.onDispose=n;this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposable.dispose(),this.onDispose())}},yi=class{constructor(e,n=i=>e.onDidConnect(i)){this.okra=e;this.watches=new Map;this.registerReconnectHandler(n)}registerReconnectHandler(e){e!==null&&e(()=>{for(let{path:n,options:i}of this.watches.values())this.okra.invoke("fs.watch",{path:n,options:i}).catch(()=>{})})}async write(e,n,i={}){let t={overwrite:!0,create:!0,unlock:!1,atomic:!1,...i},o=typeof n=="string"?new TextEncoder().encode(n):n;if(this.okra.runtimeTransport==="rest"){let u=o instanceof Uint8Array?o:await Sv(o);await this.okra.invoke("fs.writeFile",{path:e,contents:u,options:t}).catch(c=>this.handleError(c));return}let a=A(),s=this.okra.invoke("fs.writeStream",{id:a,path:e,options:t});s.catch(()=>{});try{for await(let c of wv(o))if(!await this.okra.invoke("fs.writeChunk",{id:a,contents:c}))throw new Error(`File write stream ${a} is not available`);if(!await this.okra.invoke("fs.endWrite",{id:a}))throw new Error(`File write stream ${a} could not be completed`);await s}catch(u){throw await this.okra.invoke("fs.abortWrite",{id:a}).catch(()=>!1),await s.catch(()=>!1),u}}async read(e){try{let n=await this.okra.invoke("fs.readFile",{path:e});return n instanceof Uint8Array?n:new TextEncoder().encode(n)}catch(n){this.handleError(n)}}async readText(e){return new TextDecoder().decode(await this.read(e))}async readLines(e,n){try{let i=await this.okra.invoke("fs.readFile",{path:e,lineRange:{lineStart:n.start,lineEnd:n.end}});if(typeof i=="string"||i instanceof Uint8Array)throw new Error(`Unexpected ranged file response for ${e}`);return{start:i.lineStart,end:i.lineEnd,content:i.content,...i.error===null?{}:{warning:i.error}}}catch(i){this.handleError(i)}}readStream(e){if(this.okra.runtimeTransport==="rest")return new ReadableStream({start:async o=>{try{o.enqueue(await this.read(e)),o.close()}catch(a){o.error(a)}}});let n=A(),i=null,t=!1;return new ReadableStream({start:o=>{i=this.okra.listen(`fs.read.${n}`,a=>{o.enqueue(a.data)}),this.okra.invoke("fs.readStream",{id:n,path:e}).then(()=>{t||(t=!0,i?.dispose(),o.close())}).catch(a=>{t||(t=!0,i?.dispose(),o.error(a))})},cancel:async()=>{t||(t=!0,i?.dispose(),await this.okra.invoke("fs.cancelRead",{id:n}).catch(()=>!1))}})}follow(e,n={}){if(this.okra.runtimeTransport==="rest")return new ReadableStream({start(c){c.error(new E("Following files requires the realtime transport."))}});let i=A(),t=null,o=null,a=!1,s=!1,u=async()=>{s||(s=!0,t?.dispose(),t=null,o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,a&&await this.okra.invoke("fs.cancelFollow",{id:i}).catch(()=>!1))};return new ReadableStream({start:c=>{if(t=this.okra.listen(`fs.follow.${i}`,l=>{s||c.enqueue(l.data)}),n.signal){if(o=()=>{u().finally(()=>c.error(n.signal?.reason??new Error("Aborted")))},n.signal.aborted){o();return}n.signal.addEventListener("abort",o,{once:!0})}a=!0,this.okra.invoke("fs.follow",{id:i,path:e,lines:n.lines??10}).then(()=>{s||(s=!0,t?.dispose(),o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,c.close())}).catch(l=>{s||(s=!0,t?.dispose(),o&&n.signal&&n.signal.removeEventListener("abort",o),o=null,c.error(l))})},cancel:u})}find(e,n={useIgnoreFiles:!1,followSymlinks:!1,useGlobalIgnoreFiles:!1,useParentIgnoreFiles:!1}){return this.okra.invoke("fs.find",{query:e,options:{includes:[],excludes:["**/storage","**/vendor","**/node_modules","**/.git","**/.svn","**/.hg","**/CVS","**/.DS_Store","**/Thumbs.db","**/*.crswap"],useIgnoreFiles:!1,followSymlinks:!1,useGlobalIgnoreFiles:!1,useParentIgnoreFiles:!1,...n}})}search(e,n,i){e.id||(e.id=A());let t={maxResults:5,afterContext:2,beforeContext:2,includes:[],excludes:["**/.git","**/.svn","**/.hg","**/CVS","**/.DS_Store","**/Thumbs.db","**/*.crswap","**/node_modules","**/vendor","**/bower_components","**/*.code-search"],useIgnoreFiles:!0,followSymlinks:!0,useGlobalIgnoreFiles:!0,useParentIgnoreFiles:!0,encoding:"utf-8",previewOptions:{matchLines:5,charsPerLine:1e3}},o=e.id,a=async u=>{u===!1&&s.dispose(),i&&await Promise.resolve(i(u))===!1&&s.dispose()},s=this.okra.listen(`fs.text.search.${o}`,a);return this.okra.invoke("fs.textSearch",{query:e,options:{...t,...n}}).finally(()=>s.dispose())}tail(e,n={}){return this.okra.invoke("fs.tail",{path:e,lines:n.lines??10}).then(({content:i})=>i).catch(i=>this.handleError(i))}stat(e){return this.okra.invoke("fs.stat",{path:e}).catch(n=>this.handleError(n))}move(e,n,i={}){return this.okra.invoke("fs.rename",{from:e,to:n,options:{overwrite:!1,...i}}).catch(t=>this.handleError(t))}remove(e,n={}){return this.okra.invoke("fs.delete",{path:e,options:{recursive:!1,useTrash:!1,atomic:!1,...n}}).catch(i=>this.handleError(i))}copy(e,n,i={}){return this.okra.invoke("fs.copy",{source:e,destination:n,options:{overwrite:!1,...i}}).catch(t=>this.handleError(t))}list(e,n={}){return this.okra.invoke("fs.readDirectory",{path:e,include:n.include??[],exclude:n.exclude??[]}).catch(i=>this.handleError(i))}createDirectory(e){return this.okra.invoke("fs.createDirectory",{path:e}).catch(n=>this.handleError(n))}watch(e,n,i){let t=this.okra.listen(`fs.watch.${e}`,i),o={dispose:()=>{t.dispose(),this.okra.invoke("fs.unwatch",{path:e}).catch(()=>{})}},a=new Qu(o,()=>{this.watches.get(e)?.onDidChange===i&&this.watches.delete(e)});return this.watches.set(e,{options:n,path:e,onDidChange:i}),this.okra.invoke("fs.watch",{path:e,options:n}).then(()=>a).catch(s=>{throw a.dispose(),s})}exists(e){return this.stat(e).then(()=>!0).catch(()=>!1)}async download(e={}){let n=A(),i=!!e.onChunk,t=[],o=this.okra.listen(`fs.download.${n}`,i?e.onChunk:a=>{t.push(a)});return this.okra.invoke("fs.download",{id:n,exclude:e.exclude,include:e.include}).then(()=>new Blob(t,{type:"application/octet-stream"})).finally(()=>o.dispose())}tree(e="/"){return this.okra.invoke("fs.tree",{path:e})}handleError(e){throw e}};async function*wv(r){if(r instanceof Uint8Array){yield r;return}yield*r}async function Sv(r){let e=[],n=0;for await(let o of r)e.push(o),n+=o.byteLength;let i=new Uint8Array(n),t=0;for(let o of e)i.set(o,t),t+=o.byteLength;return i}var Gm=(r,e)=>{let n;return Promise.race([r,new Promise((i,t)=>n=setTimeout(t,e,new xt("Timeout before promise can resolve",e)))]).finally(()=>clearTimeout(n))},xi=r=>{let e=null;return()=>e||(e=r())};var Iv=8,Pv=/[\x00-\x1f\x7f]/,mr=class{constructor(e){this.okra=e}list(){return this.okra.invoke("terminal.list")}async create(e={}){let n=e.id??A(),i=this.processHandle(n,e.abortSignal),t=typeof e.command=="string"&&e.args?.length?[e.command,...e.args]:e.command,{abortSignal:o,args:a,...s}=e;try{let u=await this.okra.invoke("terminal.create",{...s,id:n,kind:e.kind??"bash",size:e.size??[80,24],command:t},{abortSignal:o});return{...i.process,...u}}catch(u){throw i.dispose(),u}}async attach(e,n){let i=this.processHandle(e,n?.abortSignal);try{let t=await this.okra.invoke("terminal.attach",{id:e,replayHistory:n?.replayHistory},{abortSignal:n?.abortSignal});return t?{...i.process,...t}:(i.dispose(),!1)}catch(t){throw i.dispose(),t}}processHandle(e,n){let i=new Set,t,o=()=>{t&&(n?.removeEventListener("abort",t),t=void 0);for(let F of i)F.dispose();i.clear()},a="",s,u=()=>{if(s&&(clearTimeout(s),s=void 0),a==="")return;let F=a;a="",this.okra.send("terminal.input",{id:e,input:F})},c=()=>{s||(s=setTimeout(u,Iv))},l=F=>{let C=typeof F=="string"?F:new TextDecoder().decode(F);if(a+=C,Pv.test(C)){u();return}c()},m=()=>{u(),o()},g=new WritableStream({write:l,close:m,abort:m}),f=null,x=new ReadableStream({start:F=>{f=F,i.add(this.okra.listen(`terminal.output.${e}`,C=>{f?.enqueue(C.output)}))},cancel:()=>{f=null,m()}}),_=new Promise(F=>{i.add(this.okra.listen(`terminal.close.${e}`,C=>{if(f)try{f.close()}catch{}m(),F(C.exitCode)}))}),P=xi(()=>(m(),this.okra.invoke("terminal.close",{id:e}))),Tt=F=>this.okra.invoke("terminal.resize",{id:e,width:F.cols,height:F.rows});return n&&!n.aborted&&(t=()=>{P()},n.addEventListener("abort",t,{once:!0})),{process:{wait:()=>_,input:g,output:x,kill:P,resize:Tt},dispose:m}}};var fr=class{constructor(e){this.okra=e}message(e,n){return this.okra.invoke("lsp.message",{id:e,message:n})}listen(e,n,i){return this.okra.listen(`${n}.${e}`,t=>i(t))}onClose(e,n){return this.listen(e,"lsp.closed",i=>n(i.code,i.reason))}onError(e,n){return this.listen(e,"lsp.error",i=>n(i.message))}onClientDisconnect(e){return this.okra.onDidDisconnect(()=>e(1e3,"OKRA DISCONNECTED"))}onResponse(e,n){return this.listen(e,"lsp.response",i=>n(JSON.stringify(i)))}close(e){return this.okra.invoke("lsp.close",{id:e})}start(e){return this.okra.invoke("lsp.start",{id:e})}connection(e){return gr.create(e,this)}whenSocketConnected(){return this.okra.connected()}},gr=class r{constructor(e,n){this.id=e;this.lsp=n}send(e){return this.lsp.message(this.id,e)}onMessage(e){return this.lsp.onResponse(this.id,e)}onError(e){return this.lsp.onError(this.id,e)}onClose(e){return this.lsp.onClose(this.id,e)}dispose(){return this.lsp.close(this.id)}start(){return this.lsp.start(this.id)}onClientDisconnect(e){return this.lsp.onClientDisconnect(e)}whenSocketConnected(){return this.lsp.whenSocketConnected()}static create(e,n){return new r(e,n)}};function zv(r,e=[],n){let i=Array.isArray(e)?e:[],t=Array.isArray(e)?n:e;return{command:Array.isArray(r)?r:i.length>0?[r,...i]:r,opts:{tty:!1,...t}}}var de=class{constructor(){this.controller=null;this.closed=!1;this.stream=new ReadableStream({start:e=>{this.controller=e},cancel:()=>{this.closed=!0,this.controller=null}})}enqueue(e){this.closed||this.controller?.enqueue(e)}close(){this.closed||(this.closed=!0,this.controller?.close(),this.controller=null)}fail(e){this.closed||(this.closed=!0,this.controller?.error(e),this.controller=null)}},nl=class{constructor(e,n,i,t){this.id=e;this.okra=n;let o=new de,a=new de,s=new de;this.output=o.stream,this.stdout=a.stream,this.stderr=s.stream,this.stdin=new WritableStream({write:async x=>{let _=typeof x=="string"?x:new TextDecoder().decode(x);if(!await this.okra.invoke("shell.input",{id:this.id,input:_}))throw new Error(`Process ${this.id} is not accepting input`)}});let u=new TextEncoder,c=this.okra.listen(`shell.output.${this.id}`,x=>{let _=u.encode(x.output),P=x.source??"output";o.enqueue({source:P,data:_}),P==="stderr"?s.enqueue(_):a.enqueue(_)}),l=()=>{c?.dispose(),c=null,o.close(),a.close(),s.close()},m=x=>{c?.dispose(),c=null,o.fail(x),a.fail(x),s.fail(x)},{abortSignal:g,...f}=t;this.completion=this.okra.invoke("shell.exec",{command:i,opts:{...f,id:this.id}},{abortSignal:g}).then(x=>(l(),x)).catch(x=>{throw m(x),x})}wait(){return this.completion}async kill(){await this.okra.invoke("shell.kill",{id:this.id})}},hr=class{constructor(e){this.okra=e}run(e,n=[],i){let t=zv(e,n,i),o=t.opts?.id??A();return new nl(o,this.okra,t.command,{...t.opts,id:o})}};var il=class{constructor(e,n){this.client=e;this.notebookId=n}async set(e){return(await this.client.put(`/notebook/${this.notebookId}/composer/credentials`,e)).data}async remove(e,n){let i=new URLSearchParams({type:e});n&&i.set("url",n),await this.client.delete(`/notebook/${this.notebookId}/composer/credentials?${i.toString()}`)}},ol=class{constructor(e,n,i,t,o){this.id=e;this.okra=n;let a=new de,s=new de,u=new de;this.output=a.stream,this.stdout=s.stream,this.stderr=u.stream;let c=new TextEncoder,l=this.okra.listen(`composer.output.${this.id}`,f=>{let x=c.encode(f.output),_=f.source??"output";a.enqueue({source:_,data:x}),_==="stderr"?u.enqueue(x):s.enqueue(x)}),m=()=>{l?.dispose(),l=null,a.close(),s.close(),u.close()},g=f=>{l?.dispose(),l=null,a.fail(f),s.fail(f),u.fail(f)};this.completion=this.okra.invoke("composer.invoke",{id:e,command:i,args:t,options:o}).then(f=>(m(),f)).catch(f=>{throw g(f),f})}wait(){return this.completion}async kill(){await this.okra.invoke("composer.kill",{id:this.id})}},vr=class{constructor(e,n){this.okra=e;this.credentials=new il(n,e.data.id)}run(e,n={},i={}){return new ol(A(),this.okra,e,n,i)}packages(){return this.okra.invoke("composer.packages")}};var $i=class{constructor(e){this.okra=e;this.references=new Map;this.synchronization=Promise.resolve();e.runtimeTransport==="realtime"&&e.onDidConnect(()=>{this.references.size>0&&this.synchronize()})}async acquire(e){this.references.set(e,(this.references.get(e)??0)+1);try{await this.synchronize()}catch(i){throw this.removeReference(e),i}let n=!1;return async()=>{n||(n=!0,this.removeReference(e),await this.synchronize())}}removeReference(e){let n=this.references.get(e)??0;n<=1?this.references.delete(e):this.references.set(e,n-1)}synchronize(){return this.synchronization=this.synchronization.catch(()=>{}).then(async()=>{let e=Array.from(this.references.keys());e.length===0?await this.okra.invoke("container.stop-telemetry"):await this.okra.invoke("container.stream-telemetry",{features:e})}),this.synchronization}};function St(r,e,n,i,t,o={}){let a=null,s=null,u=!1,c=null,l=async()=>{u||(u=!0,a?.dispose(),a=null,c&&o.signal&&o.signal.removeEventListener("abort",c),c=null,await s?.(),s=null)};return new ReadableStream({start(m){if(a=r.listen(i,g=>{u||m.enqueue(t(g))}),o.signal){if(c=()=>{l().finally(()=>m.error(o.signal?.reason??new Error("Aborted")))},o.signal.aborted){c();return}o.signal.addEventListener("abort",c,{once:!0})}e.acquire(n).then(async g=>{if(u){await g();return}s=g}).catch(g=>{u||(u=!0,a?.dispose(),c&&o.signal&&o.signal.removeEventListener("abort",c),c=null,m.error(g))})},cancel:l})}var br=class{constructor(e,n){this.okra=e;this.telemetry=n}follow(e={}){return St(this.okra,this.telemetry,"logs","notebook.log",n=>({timestamp:new Date().toISOString(),source:"runtime",message:n}),e)}};var yr=class{constructor(e,n){this.okra=e;this.telemetry=n}current(){return this.okra.invoke("container.stats")}watch(e={}){return St(this.okra,this.telemetry,"stats","container.stats",n=>n,e)}};var xr=class{constructor(e,n){this.okra=e;this.telemetry=n}list(){return this.okra.invoke("container.opened-ports")}resolve(e){return this.okra.invoke("container.resolve-port",{port:e})}watch(e={}){return St(this.okra,this.telemetry,"ports","container.ports",n=>n,e)}};var al=class{constructor(e){this.metrics=e}current(){return this.metrics.current()}watch(e={}){return this.metrics.watch(e)}},sl=class{constructor(e){this.logs=e}follow(e={}){return this.logs.follow(e)}},cl=class{constructor(e){this.ports=e}list(){return this.ports.list()}resolve(e){return this.ports.resolve(e)}watch(e={}){return this.ports.watch(e)}},$r=class{constructor(e){this.notebook=e;let n=new $i(e);this.metrics=new al(new yr(e,n)),this.logs=new sl(new br(e,n)),this.ports=new cl(new xr(e,n))}setPhpVersion(e){return this.notebook.invoke("container.set-php",{version:e})}};var kr=class{constructor(e){this.okra=e}eval(e,n="",i={prependWith:"",appendWith:""}){return this.okra.invoke("repl.eval",{code:e,args:n,repl:i})}write(e){return this.okra.invoke("repl.write",{input:e})}stop(){return this.okra.invoke("repl.stop")}resize(e,n){return this.okra.invoke("repl.resize",{cols:e,rows:n})}listen(e,n){return this.okra.listen(e,n)}onOutput(e){return this.okra.listen("repl.output",e)}};var ul=["redis"],Bm=["start","nginx",...ul],_r=class{constructor(e){this.okra=e}list(){return this.okra.invoke("service.list")}run(e,n){return this.okra.invoke("service.run",{name:e,command:n})}stop(e){return this.okra.invoke("service.stop",{name:e})}logs(e,n={}){return n.follow?this.followLogs(e,n):this.okra.invoke("service.logs",{name:e,tail:n.tail}).then(i=>{if(!("output"in i))throw new Error(`Unexpected service.logs response for ${e}`);return i.output})}followLogs(e,n){let i=n.id||A(),t=new Set,o=null,a=!1,s=()=>{for(let m of t)m.dispose();t.clear()},u=()=>{if(!a&&(a=!0,s(),o))try{o.close()}catch{}},c=m=>{a||(a=!0,s(),o&&o.error(m))},l=xi(()=>(u(),this.okra.invoke("service.stop-logs",{id:i})));return new ReadableStream({start:m=>{o=m,t.add(this.okra.listen(`service.log.${i}`,g=>{o?.enqueue(g.output)})),this.okra.invoke("service.logs",{name:e,tail:n.tail,follow:!0,id:i}).catch(g=>{c(g)})},cancel:()=>l().then(()=>{})})}};var wr=class{constructor(e){this.okra=e}get(){return this.okra.invoke("config.get")}update(e){return this.okra.invoke("config.update",{config:e})}setPorts(e){return this.okra.invoke("config.set-ports",{ports:e})}};function Wm(r){let e=r.length,n=0,i=0;for(;i<e;){let t=r.charCodeAt(i++);if((t&4294967168)===0){n++;continue}else if((t&4294965248)===0)n+=2;else{if(t>=55296&&t<=56319&&i<e){let o=r.charCodeAt(i);(o&64512)===56320&&(++i,t=((t&1023)<<10)+(o&1023)+65536)}(t&4294901760)===0?n+=3:n+=4}}return n}function Ev(r,e,n){let i=r.length,t=n,o=0;for(;o<i;){let a=r.charCodeAt(o++);if((a&4294967168)===0){e[t++]=a;continue}else if((a&4294965248)===0)e[t++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&o<i){let s=r.charCodeAt(o);(s&64512)===56320&&(++o,a=((a&1023)<<10)+(s&1023)+65536)}(a&4294901760)===0?(e[t++]=a>>12&15|224,e[t++]=a>>6&63|128):(e[t++]=a>>18&7|240,e[t++]=a>>12&63|128,e[t++]=a>>6&63|128)}e[t++]=a&63|128}}var Tv=new TextEncoder,Dv=50;function Uv(r,e,n){Tv.encodeInto(r,e.subarray(n))}function Vm(r,e,n){r.length>Dv?Uv(r,e,n):Ev(r,e,n)}var Rv=4096;function ll(r,e,n){let i=e,t=i+n,o=[],a="";for(;i<t;){let s=r[i++];if((s&128)===0)o.push(s);else if((s&224)===192){let u=r[i++]&63;o.push((s&31)<<6|u)}else if((s&240)===224){let u=r[i++]&63,c=r[i++]&63;o.push((s&31)<<12|u<<6|c)}else if((s&248)===240){let u=r[i++]&63,c=r[i++]&63,l=r[i++]&63,m=(s&7)<<18|u<<12|c<<6|l;m>65535&&(m-=65536,o.push(m>>>10&1023|55296),m=56320|m&1023),o.push(m)}else o.push(s);o.length>=Rv&&(a+=String.fromCharCode(...o),o.length=0)}return o.length>0&&(a+=String.fromCharCode(...o)),a}var Ov=new TextDecoder,Nv=200;function jv(r,e,n){let i=r.subarray(e,e+n);return Ov.decode(i)}function Jm(r,e,n){return n>Nv?jv(r,e,n):ll(r,e,n)}var Ce=class{constructor(e,n){this.type=e,this.data=n}};var H=class r extends Error{constructor(e){super(e);let n=Object.create(r.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:r.name})}};function Km(r,e,n){let i=n/4294967296,t=n;r.setUint32(e,i),r.setUint32(e+4,t)}function ki(r,e,n){let i=Math.floor(n/4294967296),t=n;r.setUint32(e,i),r.setUint32(e+4,t)}function _i(r,e){let n=r.getInt32(e),i=r.getUint32(e+4);return n*4294967296+i}function qm(r,e){let n=r.getUint32(e),i=r.getUint32(e+4);return n*4294967296+i}var Av=-1,Cv=4294967296-1,Lv=17179869184-1;function Zv({sec:r,nsec:e}){if(r>=0&&e>=0&&r<=Lv)if(e===0&&r<=Cv){let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,r),n}else{let n=r/4294967296,i=r&4294967295,t=new Uint8Array(8),o=new DataView(t.buffer);return o.setUint32(0,e<<2|n&3),o.setUint32(4,i),t}else{let n=new Uint8Array(12),i=new DataView(n.buffer);return i.setUint32(0,e),ki(i,4,r),n}}function Fv(r){let e=r.getTime(),n=Math.floor(e/1e3),i=(e-n*1e3)*1e6,t=Math.floor(i/1e9);return{sec:n+t,nsec:i-t*1e9}}function Mv(r){if(r instanceof Date){let e=Fv(r);return Zv(e)}else return null}function Gv(r){let e=new DataView(r.buffer,r.byteOffset,r.byteLength);switch(r.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let n=e.getUint32(0),i=e.getUint32(4),t=(n&3)*4294967296+i,o=n>>>2;return{sec:t,nsec:o}}case 12:{let n=_i(e,4),i=e.getUint32(0);return{sec:n,nsec:i}}default:throw new H(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${r.length}`)}}function Bv(r){let e=Gv(r);return new Date(e.sec*1e3+e.nsec/1e6)}var Hm={type:Av,encode:Mv,decode:Bv};var Ie=class{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Hm)}register({type:e,encode:n,decode:i}){if(e>=0)this.encoders[e]=n,this.decoders[e]=i;else{let t=-1-e;this.builtInEncoders[t]=n,this.builtInDecoders[t]=i}}tryToEncode(e,n){for(let i=0;i<this.builtInEncoders.length;i++){let t=this.builtInEncoders[i];if(t!=null){let o=t(e,n);if(o!=null){let a=-1-i;return new Ce(a,o)}}}for(let i=0;i<this.encoders.length;i++){let t=this.encoders[i];if(t!=null){let o=t(e,n);if(o!=null){let a=i;return new Ce(a,o)}}}return e instanceof Ce?e:null}decode(e,n,i){let t=n<0?this.builtInDecoders[-1-n]:this.decoders[n];return t?t(e,n,i):new Ce(n,e)}};Ie.defaultCodec=new Ie;function Wv(r){return r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer}function Sr(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Wv(r)?new Uint8Array(r):Uint8Array.from(r)}var Vv=100,Jv=2048,wi=class r{constructor(e){this.entered=!1,this.extensionCodec=e?.extensionCodec??Ie.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Vv,this.initialBufferSize=e?.initialBufferSize??Jv,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,n){if(n>this.maxDepth)throw new Error(`Too deep objects in depth ${n}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,n)}ensureBufferSizeToWrite(e){let n=this.pos+e;this.view.byteLength<n&&this.resizeBuffer(n*2)}resizeBuffer(e){let n=new ArrayBuffer(e),i=new Uint8Array(n),t=new DataView(n);i.set(this.bytes),this.view=t,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let i=Wm(e);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),Vm(e,this.bytes,this.pos),this.pos+=i}encodeObject(e,n){let i=this.extensionCodec.tryToEncode(e,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(e))this.encodeArray(e,n);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,n);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let n=e.byteLength;if(n<256)this.writeU8(196),this.writeU8(n);else if(n<65536)this.writeU8(197),this.writeU16(n);else if(n<4294967296)this.writeU8(198),this.writeU32(n);else throw new Error(`Too large binary: ${n}`);let i=Sr(e);this.writeU8a(i)}encodeArray(e,n){let i=e.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else if(i<4294967296)this.writeU8(221),this.writeU32(i);else throw new Error(`Too large array: ${i}`);for(let t of e)this.doEncode(t,n+1)}countWithoutUndefined(e,n){let i=0;for(let t of n)e[t]!==void 0&&i++;return i}encodeMap(e,n){let i=Object.keys(e);this.sortKeys&&i.sort();let t=this.ignoreUndefined?this.countWithoutUndefined(e,i):i.length;if(t<16)this.writeU8(128+t);else if(t<65536)this.writeU8(222),this.writeU16(t);else if(t<4294967296)this.writeU8(223),this.writeU32(t);else throw new Error(`Too large map object: ${t}`);for(let o of i){let a=e[o];this.ignoreUndefined&&a===void 0||(this.encodeString(o),this.doEncode(a,n+1))}}encodeExtension(e){if(typeof e.data=="function"){let i=e.data(this.pos+6),t=i.length;if(t>=4294967296)throw new Error(`Too large extension object: ${t}`);this.writeU8(201),this.writeU32(t),this.writeI8(e.type),this.writeU8a(i);return}let n=e.data.length;if(n===1)this.writeU8(212);else if(n===2)this.writeU8(213);else if(n===4)this.writeU8(214);else if(n===8)this.writeU8(215);else if(n===16)this.writeU8(216);else if(n<256)this.writeU8(199),this.writeU8(n);else if(n<65536)this.writeU8(200),this.writeU16(n);else if(n<4294967296)this.writeU8(201),this.writeU32(n);else throw new Error(`Too large extension object: ${n}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let n=e.length;this.ensureBufferSizeToWrite(n),this.bytes.set(e,this.pos),this.pos+=n}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Km(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),ki(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function dl(r,e){return new wi(e).encodeSharedRef(r)}function Si(r){return`${r<0?"-":""}0x${Math.abs(r).toString(16).padStart(2,"0")}`}var Kv=16,qv=16,Ii=class{constructor(e=Kv,n=qv){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=n,this.caches=[];for(let i=0;i<this.maxKeyLength;i++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,n,i){let t=this.caches[i-1];e:for(let o of t){let a=o.bytes;for(let s=0;s<i;s++)if(a[s]!==e[n+s])continue e;return o.str}return null}store(e,n){let i=this.caches[e.length-1],t={bytes:e,str:n};i.length>=this.maxLengthPerKey?i[Math.random()*i.length|0]=t:i.push(t)}decode(e,n,i){let t=this.find(e,n,i);if(t!=null)return this.hit++,t;this.miss++;let o=ll(e,n,i),a=Uint8Array.prototype.slice.call(e,n,n+i);return this.store(a,o),o}};var pl="array",zr="map_key",Ym="map_value",Hv=r=>{if(typeof r=="string"||typeof r=="number")return r;throw new H("The type of key must be string or number but "+typeof r)},ml=class{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let n=this.getUninitializedStateFromPool();n.type=pl,n.position=0,n.size=e,n.array=new Array(e)}pushMapState(e){let n=this.getUninitializedStateFromPool();n.type=zr,n.readCount=0,n.size=e,n.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===pl){let i=e;i.size=0,i.array=void 0,i.position=0,i.type=void 0}if(e.type===zr||e.type===Ym){let i=e;i.size=0,i.map=void 0,i.readCount=0,i.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},Pr=-1,fl=new DataView(new ArrayBuffer(0)),Xv=new Uint8Array(fl.buffer);try{fl.getInt8(0)}catch(r){if(!(r instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Xm=new RangeError("Insufficient data"),Yv=new Ii,Pi=class r{constructor(e){this.totalPos=0,this.pos=0,this.view=fl,this.bytes=Xv,this.headByte=Pr,this.stack=new ml,this.entered=!1,this.extensionCodec=e?.extensionCodec??Ie.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:Yv,this.mapKeyConverter=e?.mapKeyConverter??Hv}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=Pr,this.stack.reset()}setBuffer(e){let n=Sr(e);this.bytes=n,this.view=new DataView(n.buffer,n.byteOffset,n.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Pr&&!this.hasRemaining(1))this.setBuffer(e);else{let n=this.bytes.subarray(this.pos),i=Sr(e),t=new Uint8Array(n.length+i.length);t.set(n),t.set(i,n.length),this.setBuffer(t)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:n,pos:i}=this;return new RangeError(`Extra ${n.byteLength-i} of ${n.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let n=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return n}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let n=!1,i;for await(let s of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{i=this.doDecodeSync(),n=!0}catch(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return i}let{headByte:t,pos:o,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${Si(t)} at ${a} (${o} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,n){if(this.entered){yield*this.clone().decodeMultiAsync(e,n);return}try{this.entered=!0;let i=n,t=-1;for await(let o of e){if(n&&t===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),i&&(t=this.readArraySize(),i=!1,this.complete());try{for(;yield this.doDecodeSync(),--t!==0;);}catch(a){if(!(a instanceof RangeError))throw a}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),n;if(e>=224)n=e-256;else if(e<192)if(e<128)n=e;else if(e<144){let t=e-128;if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e<160){let t=e-144;if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else{let t=e-160;n=this.decodeString(t,0)}else if(e===192)n=null;else if(e===194)n=!1;else if(e===195)n=!0;else if(e===202)n=this.readF32();else if(e===203)n=this.readF64();else if(e===204)n=this.readU8();else if(e===205)n=this.readU16();else if(e===206)n=this.readU32();else if(e===207)this.useBigInt64?n=this.readU64AsBigInt():n=this.readU64();else if(e===208)n=this.readI8();else if(e===209)n=this.readI16();else if(e===210)n=this.readI32();else if(e===211)this.useBigInt64?n=this.readI64AsBigInt():n=this.readI64();else if(e===217){let t=this.lookU8();n=this.decodeString(t,1)}else if(e===218){let t=this.lookU16();n=this.decodeString(t,2)}else if(e===219){let t=this.lookU32();n=this.decodeString(t,4)}else if(e===220){let t=this.readU16();if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else if(e===221){let t=this.readU32();if(t!==0){this.pushArrayState(t),this.complete();continue e}else n=[]}else if(e===222){let t=this.readU16();if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e===223){let t=this.readU32();if(t!==0){this.pushMapState(t),this.complete();continue e}else n={}}else if(e===196){let t=this.lookU8();n=this.decodeBinary(t,1)}else if(e===197){let t=this.lookU16();n=this.decodeBinary(t,2)}else if(e===198){let t=this.lookU32();n=this.decodeBinary(t,4)}else if(e===212)n=this.decodeExtension(1,0);else if(e===213)n=this.decodeExtension(2,0);else if(e===214)n=this.decodeExtension(4,0);else if(e===215)n=this.decodeExtension(8,0);else if(e===216)n=this.decodeExtension(16,0);else if(e===199){let t=this.lookU8();n=this.decodeExtension(t,1)}else if(e===200){let t=this.lookU16();n=this.decodeExtension(t,2)}else if(e===201){let t=this.lookU32();n=this.decodeExtension(t,4)}else throw new H(`Unrecognized type byte: ${Si(e)}`);this.complete();let i=this.stack;for(;i.length>0;){let t=i.top();if(t.type===pl)if(t.array[t.position]=n,t.position++,t.position===t.size)n=t.array,i.release(t);else continue e;else if(t.type===zr){if(n==="__proto__")throw new H("The key __proto__ is not allowed");t.key=this.mapKeyConverter(n),t.type=Ym;continue e}else if(t.map[t.key]=n,t.readCount++,t.readCount===t.size)n=t.map,i.release(t);else{t.key=null,t.type=zr;continue e}}return n}}readHeadByte(){return this.headByte===Pr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Pr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new H(`Unrecognized array type byte: ${Si(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new H(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new H(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,n){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,n):this.decodeBinary(e,n)}decodeUtf8String(e,n){if(e>this.maxStrLength)throw new H(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+n+e)throw Xm;let i=this.pos+n,t;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?t=this.keyDecoder.decode(this.bytes,i,e):t=Jm(this.bytes,i,e),this.pos+=n+e,t}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===zr:!1}decodeBinary(e,n){if(e>this.maxBinLength)throw new H(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+n))throw Xm;let i=this.pos+n,t=this.bytes.subarray(i,i+e);return this.pos+=n+e,t}decodeExtension(e,n){if(e>this.maxExtLength)throw new H(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let i=this.view.getInt8(this.pos+n),t=this.decodeBinary(e,n+1);return this.extensionCodec.decode(t,i,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=qm(this.view,this.pos);return this.pos+=8,e}readI64(){let e=_i(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function gl(r,e){return new Pi(e).decode(r)}var zi=class{constructor(e){this.error=e}},Qv=r=>new Promise(e=>{setTimeout(e,r)}),eb=(r,e)=>{let n=e.randomize?Math.random()+1:1,i=Math.max(e.minTimeout,1)*Math.pow(e.factor,r-1);return Math.round(Math.min(n*i,e.maxTimeout))};async function Qm(r,e={}){let n={retries:e.retries??10,minTimeout:e.minTimeout??1e3,maxTimeout:e.maxTimeout??1/0,factor:e.factor??2,randomize:e.randomize??!0},i=o=>{throw new zi(o??new Error("Aborted"))},t;for(let o=1;o<=n.retries+1;o++)try{return await r(i,o)}catch(a){if(a instanceof zi)throw a.error;if(t=a,o>n.retries)throw a;await e.onRetry?.(a,o),await Qv(eb(o,n))}throw t}var bl={};te(bl,{default:()=>vl});var hl=function(r,e){return hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var t in i)i.hasOwnProperty(t)&&(n[t]=i[t])},hl(r,e)};function ef(r,e){hl(r,e);function n(){this.constructor=r}r.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function tb(r){var e=typeof Symbol=="function"&&r[Symbol.iterator],n=0;return e?e.call(r):{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}}}function rb(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),t,o=[],a;try{for(;(e===void 0||e-- >0)&&!(t=i.next()).done;)o.push(t.value)}catch(s){a={error:s}}finally{try{t&&!t.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function nb(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(rb(arguments[e]));return r}var tf=(function(){function r(e,n){this.target=n,this.type=e}return r})(),ib=(function(r){ef(e,r);function e(n,i){var t=r.call(this,"error",i)||this;return t.message=n.message,t.error=n,t}return e})(tf),ob=(function(r){ef(e,r);function e(n,i,t){n===void 0&&(n=1e3),i===void 0&&(i="");var o=r.call(this,"close",t)||this;return o.wasClean=!0,o.code=n,o.reason=i,o}return e})(tf);var ab=function(){if(typeof WebSocket<"u")return WebSocket},sb=function(r){return typeof r<"u"&&!!r&&r.CLOSING===2},Le={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},cb=(function(){function r(e,n,i){var t=this;i===void 0&&(i={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){t._debug("open event");var a=t._options.minUptime,s=a===void 0?Le.minUptime:a;clearTimeout(t._connectTimeout),t._uptimeTimeout=setTimeout(function(){return t._acceptOpen()},s),t._ws.binaryType=t._binaryType,t._messageQueue.forEach(function(u){return t._ws.send(u)}),t._messageQueue=[],t.onopen&&t.onopen(o),t._listeners.open.forEach(function(u){return t._callEventListener(o,u)})},this._handleMessage=function(o){t._debug("message event"),t.onmessage&&t.onmessage(o),t._listeners.message.forEach(function(a){return t._callEventListener(o,a)})},this._handleError=function(o){t._debug("error event",o.message),t._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),t.onerror&&t.onerror(o),t._debug("exec error listeners"),t._listeners.error.forEach(function(a){return t._callEventListener(o,a)}),t._connect()},this._handleClose=function(o){t._debug("close event"),t._clearTimeouts(),t._shouldReconnect&&t._connect(),t.onclose&&t.onclose(o),t._listeners.close.forEach(function(a){return t._callEventListener(o,a)})},this._url=e,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(r,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(r,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(r,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CONNECTING",{get:function(){return r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"OPEN",{get:function(){return r.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSING",{get:function(){return r.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"CLOSED",{get:function(){return r.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(n,i){return typeof i=="string"?n+=i.length:i instanceof Blob?n+=i.size:n+=i.byteLength,n},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?r.CLOSED:r.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),r.prototype.close=function(e,n){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,n)},r.prototype.reconnect=function(e,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,n),this._connect())},r.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var n=this._options.maxEnqueuedMessages,i=n===void 0?Le.maxEnqueuedMessages:n;this._messageQueue.length<i&&(this._debug("enqueue",e),this._messageQueue.push(e))}},r.prototype.addEventListener=function(e,n){this._listeners[e]&&this._listeners[e].push(n)},r.prototype.dispatchEvent=function(e){var n,i,t=this._listeners[e.type];if(t)try{for(var o=tb(t),a=o.next();!a.done;a=o.next()){var s=a.value;this._callEventListener(e,s)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!0},r.prototype.removeEventListener=function(e,n){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(i){return i!==n}))},r.prototype._debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._options.debug&&console.log.apply(console,nb(["RWS>"],e))},r.prototype._getNextDelay=function(){var e=this._options,n=e.reconnectionDelayGrowFactor,i=n===void 0?Le.reconnectionDelayGrowFactor:n,t=e.minReconnectionDelay,o=t===void 0?Le.minReconnectionDelay:t,a=e.maxReconnectionDelay,s=a===void 0?Le.maxReconnectionDelay:a,u=0;return this._retryCount>0&&(u=o*Math.pow(i,this._retryCount-1),u>s&&(u=s)),this._debug("next delay",u),u},r.prototype._wait=function(){var e=this;return new Promise(function(n){setTimeout(n,e._getNextDelay())})},r.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var n=e();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")},r.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var n=this._options,i=n.maxRetries,t=i===void 0?Le.maxRetries:i,o=n.connectionTimeout,a=o===void 0?Le.connectionTimeout:o,s=n.WebSocket,u=s===void 0?ab():s;if(this._retryCount>=t){this._debug("max retries reached",this._retryCount,">=",t);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!sb(u))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(c){e._closeCalled||(e._debug("connect",{url:c,protocols:e._protocols}),e._ws=e._protocols?new u(c,e._protocols):new u(c),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},r.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new ib(Error("TIMEOUT"),this))},r.prototype._disconnect=function(e,n){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,n),this._handleClose(new ob(e,n,this))}catch{}}},r.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},r.prototype._callEventListener=function(e,n){"handleEvent"in n?n.handleEvent(e):n(e)},r.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},r.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},r.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},r})(),vl=cb;var ub=r=>{if(typeof r=="number")return{0:"CONNECTING",1:"OPEN",2:"CLOSING",3:"CLOSED"}[r]??`STATE_${r}`},lb=r=>{try{let e=new URL(r);return`${e.origin}${e.pathname}`}catch{return r}},rf=r=>{if(r instanceof Error)return r.message?`${r.name}: ${r.message}`:r.name;if(typeof r=="string")return r;if(!r||typeof r!="object")return;let e=r,n=typeof e.message=="string"&&e.message?e.message:typeof e.reason=="string"&&e.reason?e.reason:void 0;if(!n)return;let i=typeof e.name=="string"&&e.name?e.name:void 0;return i?`${i}: ${n}`:n},Ei=r=>{if(r instanceof Error)return r.message?`${r.name}: ${r.message}`:r.name;if(typeof r=="string")return r;if(!r||typeof r!="object")return String(r);let e=r,n=[],i=rf(e);i&&n.push(i);let t=rf(e.error);t&&t!==i&&n.push(`error=${t}`),typeof e.type=="string"&&e.type&&n.push(`type=${e.type}`),typeof e.code=="number"&&n.push(`code=${e.code}`),typeof e.reason=="string"&&e.reason&&e.reason!==i&&n.push(`reason=${e.reason}`),typeof e.wasClean=="boolean"&&n.push(`wasClean=${e.wasClean}`);let o=e.target??e.currentTarget;if(o&&typeof o=="object"){typeof o.url=="string"&&o.url&&n.push(`url=${lb(o.url)}`);let a=ub(o.readyState);a&&n.push(`readyState=${a}`)}return n.length>0?n.join(" | "):"Unknown websocket event"};var It=null;typeof WebSocket<"u"?It=WebSocket:typeof MozWebSocket<"u"?It=MozWebSocket:typeof global<"u"?It=global.WebSocket||global.MozWebSocket:typeof window<"u"?It=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(It=self.WebSocket||self.MozWebSocket);var nf=It;var Ti=class{constructor(){this.disposables=new Map}add(e,n){this.disposables.has(e)&&(console.warn(`Disposable with key "${e}" already exists. Disposing the old one.`),this.disposables.get(e)?.dispose()),typeof n=="function"&&(n=n()),this.disposables.set(e,n)}dispose(){this.disposables.forEach(e=>e.dispose()),this.disposables.clear()}};var db=new Set(["url","action","event","responseEvent","errorEvent","hasData","code","attempt","maxRetries","timeout","errorCount","byteLength"]),pb=vl??bl;var yl=class extends R{constructor(e="WebSocket connection timeout"){super(e,"ConnectionTimeout")}},Pt=class extends R{constructor(n,i){super(n,"ConnectionFailed",i);this.originalError=i}},Ze=class extends R{constructor(n,i){super(n,"InvalidResponse",i);this.data=i}},Fe=class extends Error{constructor(e){super(e),this.name="InvalidConfigurationError"}},Pe,xl,$l,Di=class{constructor(e,n,i={}){this.eventEmitter=n;this.options=i;Dt(this,Pe);this.clientId="";this.closed=!1;this.disposables=new Ti;this.connectPromise=null;this.terminalError=null;this.pingIntervalStarted=!1;this.incomingMessageChain=Promise.resolve();this.validateConfiguration(i),this.url=typeof e=="string"?new URL(e):null;let t=typeof e=="string"?new URL(e).toString():async()=>new URL(await e()).toString();this.PING_INTERVAL=i.pingInterval??3e4,this.CONNECT_WAIT_TIMEOUT=i.connectWaitTimeout??3e4,this.rws=new pb(t,[],{WebSocket:i.webSocket??globalThis.WebSocket??nf,connectionTimeout:i.connectionTimeout,maxReconnectionDelay:2e3,minReconnectionDelay:200,maxEnqueuedMessages:0,maxRetries:i.maxRetries??50,startClosed:!0}),this.log("debug","Transport initialized",{url:this.url===null?"dynamic":fb(this.url),options:i}),this.registerWatchers()}validateConfiguration(e){if(e.pingInterval!==void 0&&(e.pingInterval<1e3||e.pingInterval>3e5))throw new Fe("pingInterval must be between 1000ms and 300000ms");if(e.connectionTimeout!==void 0&&(e.connectionTimeout<100||e.connectionTimeout>3e4))throw new Fe("connectionTimeout must be between 100ms and 30000ms");if(e.connectWaitTimeout!==void 0&&(e.connectWaitTimeout<1e3||e.connectWaitTimeout>3e5))throw new Fe("connectWaitTimeout must be between 1000ms and 300000ms");if(e.maxRetries!==void 0&&(e.maxRetries<0||e.maxRetries>100))throw new Fe("maxRetries must be between 0 and 100")}log(e,n,i){if(this.options.debug){let t=new Date().toISOString(),o=mb(i),a=o?`
|
|
68
|
+
${JSON.stringify(o,null,2)}`:"";console[e](`[Transport ${t}] ${n}${a}`)}}connect(){return this.terminalError?Promise.reject(this.terminalError):pe(this,Pe,xl).call(this)}id(){return this.clientId}registerWatchers(){let e=n=>{this.incomingMessageChain=this.incomingMessageChain.catch(()=>{}).then(()=>this.processIncomingMessage(n)).catch(i=>{this.log("error","Failed to process queued WebSocket frame",{error:i instanceof Error?i.message:String(i)}),this.eventEmitter.emit("transport.error",{type:"message_handle_error",error:i,rawMessage:n.data,timestamp:Date.now()})})};this.rws.addEventListener("message",e),this.disposables.add("message",{dispose:()=>{this.rws.removeEventListener("message",e)}})}async processIncomingMessage(e){let n;try{n=await this.toArrayBuffer(e.data)}catch(t){this.log("error","Unexpected WebSocket message type",{error:t instanceof Error?t.message:String(t),messageType:typeof e.data}),this.eventEmitter.emit("transport.error",{type:"message_type_error",error:t,rawMessage:e.data,timestamp:Date.now()});return}if(n.byteLength===0){this.log("warn","Ignoring empty WebSocket frame");return}let i;try{i=gl(n)}catch(t){this.log("error","Failed to decode WebSocket frame",{error:t instanceof Error?t.message:String(t),byteLength:n.byteLength}),this.eventEmitter.emit("transport.error",{type:"message_decode_error",error:t,rawMessage:n,timestamp:Date.now()});return}try{await this.handleRawMessage(i)}catch(t){this.log("error","Failed to process WebSocket frame",{error:t instanceof Error?t.message:String(t),byteLength:n.byteLength}),this.eventEmitter.emit("transport.error",{type:"message_handle_error",error:t,rawMessage:n,timestamp:Date.now()})}}async toArrayBuffer(e){if(e instanceof Blob)return e.arrayBuffer();if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice().buffer;throw new Error("Unexpected message type: "+typeof e)}async handleRawMessage(e){if(this.closed){this.log("debug","Ignoring message received after transport was closed");return}if(typeof e!="object"||e===null){this.log("debug","Received invalid message format",{ev:e});return}try{let{data:n,event:i,as:t}=e;if(!i||typeof i!="string")throw new Ze("Message missing event field",e);if(this.log("debug","Processing message",{event:i,hasData:!!n}),i==="App.Actions.GetClientId"){this.clientId=n.id,this.log("info","Client ID received",{clientId:this.clientId});return}if(i==="Events.BootError"){let o=n,a=new j(o?.message||"Notebook is no longer available",{source:"runtime",status:503,code:"NotebookUnavailable",details:o||{}});this.log("error","Boot error received",{data:n}),this.terminate(a,4e3,a.message);return}if(i==="response"){let{responseEvent:o,data:a}=n;if(!o)throw new Ze("Response message missing responseEvent",e);this.log("debug","Response message received",{responseEvent:o}),await this.handleMessage(o,a);return}if(i==="error"){let{errorEvent:o,data:a}=n;if(!o)throw new Ze("Error message missing errorEvent",e);this.log("debug","Error message received",{errorEvent:o,errorData:a}),await this.handleMessage(o,a);return}await this.handleMessage(i,n,t)}catch(n){n instanceof Ze?this.log("error","Invalid message format",{error:n.message,data:n.data}):this.log("error","Failed to parse message",{ev:e,error:n instanceof Error?n.message:String(n)}),this.eventEmitter.emit("transport.error",{type:"message_parse_error",error:n,rawMessage:e,timestamp:Date.now()})}}async handleMessage(e,n,i){if(e==="App.Actions.GetClientId"){this.clientId=n.id,this.eventEmitter.emit(e,this.clientId);return}e&&this.eventEmitter.emit(i||e,n)}listen(e,n,i){return this.eventEmitter.listen(e,n)}onDidBootError(e){return this.eventEmitter.listen("transport.boot_error",n=>{n&&typeof n=="object"&&"error"in n&&j.is(n.error,"NotebookUnavailable")&&e(n.error)})}removeListener(e,n){this.eventEmitter.removeListener(e,n)}listenOnce(e,n,i){return this.eventEmitter.once(e,n,i)}emit(e,...n){this.eventEmitter.emit(e,n.length>1?n:n[0])}get isConnected(){return this.status==="OPEN"}get isConnecting(){return this.status==="CONNECTING"}get isDisconnected(){return this.status==="CLOSED"}get isClosed(){return this.closed}getTerminalError(){return this.terminalError}get status(){return{0:"CONNECTING",1:"OPEN",2:"CLOSING",3:"CLOSED"}[this.rws.readyState]}async call(e,n={},i={}){if(this.terminalError)throw this.terminalError;let t=i.responseEvent||`${e}_${A()}_response`,o=`${t}_error`,a,s,u=()=>{a&&(this.rws.removeEventListener("close",a),this.rws.removeEventListener("error",a)),s&&(i.abortSignal?.removeEventListener("abort",s),s=void 0),this.eventEmitter.removeListener(t),this.eventEmitter.removeListener(o)},c=(g,f)=>{if(this.terminalError){f(this.terminalError);return}let x=new DOMException("Request aborted","AbortError");if(i.abortSignal?.aborted){f(x);return}if(i.abortSignal&&(s=()=>{f(x)},i.abortSignal.addEventListener("abort",s,{once:!0})),!this.isConnected||this.isClosed){f(new Pt(`Connection is not open while sending ${e}. Current status: ${this.status}`));return}this.listenOnce(t,_=>{this.log("debug","Message response received",{action:e}),g(_)}),this.listenOnce(o,_=>{this.log("error","Message error received",{action:e,error:_}),f($t("runtime",_))}),a=_=>{if(_.code===1008&&(_.reason||"").includes("rate limit")){f(new j(_.reason||"Rate limit exceeded",{source:"runtime",status:429,code:"RateLimited",cause:_}));return}let P=Ei(_);f(this.terminalError||new Pt(`Connection lost to the notebook during request: ${P}`,_))},this.rws.addEventListener("close",a),this.rws.addEventListener("error",a);try{this.rws.send(this.pack({action:e,data:n,errorEvent:o,responseEvent:t})),this.log("debug","Message sent",{action:e,data:n})}catch(_){this.log("error","Failed to send message",{action:e,error:_}),f(new Pt(`Failed to send runtime action ${e}.`,_))}},l=async()=>{if(i.abortSignal?.aborted)throw new DOMException("Request aborted","AbortError");if(await pe(this,Pe,xl).call(this),i.abortSignal?.aborted)throw new DOMException("Request aborted","AbortError");let g=new Promise(c).finally(u);return i.timeout?Gm(g,i.timeout).catch(f=>{throw f instanceof xt?pr.fromPromiseTimeoutError(f):f}).finally(u):g},m=i.retries===!1?0:i.retries??0;return this.sendWithRetry(async()=>await l(),m)}send(e,n={}){if(this.terminalError)throw this.terminalError;if(!this.isConnected||this.isClosed)return this.log("debug","Connection not available, dropping one-way message",{action:e}),!1;try{return this.rws.send(this.pack({action:e,data:n})),this.log("debug","One-way message sent",{action:e,data:n}),!0}catch(i){return this.log("error","Failed to send one-way message",{action:e,error:i}),!1}}pack(e){return new Blob([dl(e)])}sendWithRetry(e,n){return Qm(async(i,t)=>{try{return await e()}catch(o){if(o instanceof j||o instanceof Fe||o instanceof Ze||o instanceof DOMException){this.log("debug","Non-retryable error, bailing",{error:o.message,attempt:t}),i(o);return}throw o instanceof pr&&(this.reconnect(),this.log("warn","Send operation timed out, connection reset",{attempt:t,timeout:o.time})),this.log("debug","Retrying send operation",{attempt:t,error:o instanceof Error?o.message:String(o)}),o}},{retries:n,onRetry:(i,t)=>{this.log("warn","Send operation retry",{attempt:t,maxRetries:n,error:i instanceof Error?i.message:String(i)})},minTimeout:1e3,factor:2,maxTimeout:3e4,randomize:!0})}invoke(e,n={},i={}){return i.responseEvent||(i.responseEvent=`${e}_${A()}`),this.call("invoke",{action:e,data:n},i)}reconnect(){if(this.terminalError)throw this.terminalError;if(this.closed)throw new Error("Cannot reconnect a closed transport. The transport has been permanently closed.");this.log("info","Reconnecting transport"),this.connectPromise=null,this.rws.reconnect()}disconnect(){this.closed||this.close()}terminate(e,n=4e3,i=e.message){this.terminalError=e,j.is(e,"NotebookUnavailable")&&this.eventEmitter.emit("transport.boot_error",{error:e,timestamp:Date.now()}),this.close(n,i)}close(e,n){if(!this.closed){this.log("info","Closing transport connection",{code:e,reason:n}),this.connectPromise=null,this.disposables.dispose();try{this.rws.close(e,n)}catch(i){this.log("error","Error closing WebSocket",{error:i instanceof Error?i.message:String(i)})}this.eventEmitter.emit("transport.closed",{code:e,reason:n,timestamp:Date.now()}),this.eventEmitter.removeListener("*"),this.closed=!0,this.log("info","Transport connection closed successfully")}}onDidConnect(e){this.rws.addEventListener("open",e);let n={dispose:()=>{this.rws.removeEventListener("open",e)}};return this.disposables.add(`connect_${A()}`,n),n}onDidClose(e){this.rws.addEventListener("close",e);let n={dispose:()=>{this.rws.removeEventListener("close",e)}};return this.disposables.add(`close_${A()}`,n),n}};Pe=new WeakSet,xl=function(){return this.terminalError?Promise.reject(this.terminalError):this.isConnected?Promise.resolve():this.connectPromise?this.connectPromise:(this.connectPromise=new Promise((e,n)=>{if(this.isConnected){e(),pe(this,Pe,$l).call(this);return}let i,t=0,o=()=>{this.rws.removeEventListener("open",a),this.rws.removeEventListener("error",s),this.rws.removeEventListener("close",u),clearTimeout(i)},a=()=>{o(),this.connectPromise=null,e(),pe(this,Pe,$l).call(this)},s=c=>{t+=1,this.log("warn","WebSocket emitted an error while connecting; waiting for reconnect/open",{errorCount:t,error:Ei(c)})},u=c=>{let l=Ei(c);if(c.code===1008||c.code===4e3){o(),this.connectPromise=null,n(new Pt(`WebSocket connection failed: ${l}`,c));return}this.log("warn","WebSocket closed before opening; waiting for reconnect/open",{error:l})};this.rws.addEventListener("open",a),this.rws.addEventListener("error",s),this.rws.addEventListener("close",u),this.rws.readyState===3&&this.rws.reconnect(),i=setTimeout(()=>{o(),this.connectPromise=null,n(new yl(`WebSocket connection timeout after ${this.CONNECT_WAIT_TIMEOUT}ms`))},this.CONNECT_WAIT_TIMEOUT)}),this.connectPromise)},$l=function(){this.pingIntervalStarted||this.closed||(this.pingIntervalStarted=!0,this.disposables.add("pingInterval",()=>{let e=setInterval(async()=>{try{this.log("debug","Sending periodic ping"),await this.invoke("ping"),this.log("debug","Ping successful")}catch(n){this.log("error","Ping failed",{error:n instanceof Error?n.message:String(n)})}},this.PING_INTERVAL);return{dispose:()=>{clearInterval(e),this.pingIntervalStarted=!1}}}))};function mb(r){if(r===null||typeof r!="object")return null;let e=Object.entries(r).filter(([n,i])=>db.has(n)&&["string","number","boolean"].includes(typeof i));return e.length>0?Object.fromEntries(e):null}function fb(r){let e=new URL(r);return e.search="",e.hash="",e.toString()}function Ui(r){return{all:r=r||new Map,on:function(e,n){var i=r.get(e);i?i.push(n):r.set(e,[n])},off:function(e,n){var i=r.get(e);i&&(n?i.splice(i.indexOf(n)>>>0,1):r.set(e,[]))},emit:function(e,n){var i=r.get(e);i&&i.slice().map(function(t){t(n)}),(i=r.get("*"))&&i.slice().map(function(t){t(e,n)})}}}var gb=typeof Ui=="function"?Ui:Ui.default;function hb(r){let e=gb(r);return Object.assign(e,{once:(i,t)=>{let o=a=>{e.off(i,o),t(a)};return e.on(i,o),{dispose:()=>{e.off(i,o)}}}})}var Er=class r{constructor(){this.emitter=hb()}listen(e,n){let i=()=>{this.removeListener(e,n)};return this.emitter.on(e,n),{dispose:i}}emit(e,...n){this.emitter.emit(e,n[0])}once(e,n){return this.emitter.once(e,n)}static make(){return new r}static refresh(){return new r}removeListener(e,n){if(e===void 0){this.emitter.all.clear();return}this.emitter.off(e,n)}static createInstance(){return new r}inspect(){return this.emitter.all}};var Dr=class{constructor(e,n){this.okra=e;this.client=n;this.targets=new kl(e.data.id,n)}checkpoint(e,n,i="main",t=!1){return this.okra.invoke("git.checkpoint",{author:e,message:n,branch:i,allowEmpty:t})}checkout(e,n=!0){return this.okra.invoke("git.checkout",{branch:e,create:n})}log(e="main"){return this.okra.invoke("git.log",{ref:e})}diff(e){return this.okra.invoke("git.diff",this.normalizeRemoteInput(e))}merge(e){return this.okra.invoke("git.merge",this.normalizeRemoteInput(e))}conflicts(){return this.okra.invoke("git.conflicts",{})}abortMerge(){return this.okra.invoke("git.resolve",{action:"abort"})}continueMerge(e,n){return this.okra.invoke("git.resolve",{action:"continue",author:e,message:n})}review(){return this.okra.invoke("git.review",{})}stage(e={all:!0}){return this.okra.invoke("git.stage",e)}unstage(e={all:!0}){return this.okra.invoke("git.unstage",e)}revert(e){return this.okra.invoke("git.revert",e)}async credentials(){return(await this.client.post(`/notebook/${this.okra.data.id}/git/credentials`)).data}restore(e){return this.okra.invoke("git.restore",{ref:e})}status(){return this.okra.invoke("git.status",{})}normalizeRemoteInput(e){if(e.notebookId===void 0)return e;let n=e.notebookId.trim();if(!n)throw new Error("'notebookId' cannot be empty.");if(e.url?.trim())throw new Error("Pass either 'url' or 'notebookId', not both.");if(e.target?.trim())throw new Error("Pass either 'target' or 'notebookId', not both.");let{notebookId:i,...t}=e;return{...t,url:this.gitUrlForNotebook(n)}}gitUrlForNotebook(e){let n=new URL(this.okra.data.gitUrl);return n.username="",n.password="",n.pathname=`/${encodeURIComponent(e)}.git`,n.search="",n.hash="",n.toString()}},kl=class{constructor(e,n){this.notebookId=e;this.client=n}async create(e){let n=await this.client.post(`/notebook/${this.notebookId}/git/targets`,of({...e}));return new Tr(n.data,this.notebookId,this.client)}async list(){return(await this.client.get(`/notebook/${this.notebookId}/git/targets`)).data.map(n=>new Tr(n,this.notebookId,this.client))}async get(e){let n=await this.client.get(`/notebook/${this.notebookId}/git/targets/${encodeURIComponent(vb(e))}`);return new Tr(n.data,this.notebookId,this.client)}},Tr=class r{constructor(e,n,i){this.data=e;this.notebookId=n;this.client=i}get id(){return this.data.id}async sync(e={}){let n=await this.client.post(`/notebook/${this.notebookId}/git/targets/${encodeURIComponent(this.id)}/sync`,of({...e}));return new r(n.data,this.notebookId,this.client)}};function vb(r){return typeof r=="string"?r:r.id}function of(r){return Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0))}var Ri=class{constructor(e){this.client=e}async inspectInvitation(e,n){return(await this.client.post(`/platform/server-invitations/${encodeURIComponent(e)}/inspect`,{token:n})).data}async acceptInvitation(e,n){return(await this.client.post(`/platform/server-invitations/${encodeURIComponent(e)}/accept`,{token:n})).data}async declineInvitation(e,n){return(await this.client.post(`/platform/server-invitations/${encodeURIComponent(e)}/decline`,{token:n})).data}async list(e={}){let n=e.page===void 0?"":`?${new URLSearchParams({page:String(e.page)}).toString()}`;return this.client.get(`/servers${n}`)}async create(e){let n=await this.client.post("/servers",e);return new Oi(n.data,this.client)}async get(e){let n=await this.client.get(`/servers/${e}`);return new Oi(n.data,this.client)}},Oi=class{constructor(e,n){this.data=e;this.client=n}async installation(){return(await this.client.get(`/servers/${encodeURIComponent(this.data.id)}/installation`)).data}async members(e={}){let n=e.page===void 0?"":`?${new URLSearchParams({page:String(e.page)}).toString()}`;return this.client.get(`/servers/${encodeURIComponent(this.data.id)}/members${n}`)}async share(e){if(e.email!==void 0)return(await this.client.post(`/platform/servers/${encodeURIComponent(this.data.id)}/invitations`,{email:e.email,requestId:e.requestId??crypto.randomUUID()})).data;let n={organizationId:e.organizationId,requestId:e.requestId};return(await this.client.post(`/servers/${encodeURIComponent(this.data.id)}/members`,n)).data}async revokeAccess(e){await this.client.delete(`/servers/${encodeURIComponent(this.data.id)}/members/${encodeURIComponent(String(e))}`)}async invitations(e={}){let n=e.page===void 0?"":`?${new URLSearchParams({page:String(e.page)}).toString()}`;return this.client.get(`/platform/servers/${encodeURIComponent(this.data.id)}/invitations${n}`)}async cancelInvitation(e){let n=await this.client.delete(`/platform/servers/${encodeURIComponent(this.data.id)}/invitations/${encodeURIComponent(e)}`);if(n.data===void 0)throw new E("Missing invitation cancellation response.");return n.data}async resendInvitation(e){return(await this.client.post(`/platform/servers/${encodeURIComponent(this.data.id)}/invitations/${encodeURIComponent(e)}/resend`,{})).data}refresh(){return this.client.servers.get(this.data.id)}async delete(){await this.client.delete(`/servers/${this.data.id}`)}async waitReady(e){let n=e?.timeout??3e5,i=e?.interval??3e3,t=Date.now()+n;for(;Date.now()<t;){let o=await this.refresh();if(o.data.status==="connected")return o;if(o.data.status==="failed")throw new Error(`Server provisioning failed: ${o.data.id}`);await new Promise(a=>setTimeout(a,i))}throw new Error(`Server did not become ready within ${n}ms`)}};function zt(r,e){return new Request(r,{...e,redirect:"manual"})}var af={"runtime.ready":{method:"GET",path:"/runtime"},"config.get":{method:"GET",path:"/runtime/config"},"config.update":{method:"PATCH",path:"/runtime/config"},"config.set-ports":{method:"PUT",path:"/runtime/config/ports"},"container.restart":{method:"POST",path:"/runtime/container/restart"},"container.stop":{method:"POST",path:"/runtime/container/stop"},"container.set-php":{method:"PUT",path:"/runtime/container/php"},"container.opened-ports":{method:"GET",path:"/runtime/container/ports"},"container.resolve-port":{method:"POST",path:"/runtime/container/ports/resolve"},"container.stats":{method:"GET",path:"/runtime/container/stats"},"terminal.list":{method:"GET",path:"/runtime/terminals"},"shell.exec":{method:"POST",path:"/runtime/executions"},"fs.readFile":{method:"GET",path:"/runtime/files/content"},"fs.writeFile":{method:"PUT",path:"/runtime/files/content"},"fs.createDirectory":{method:"PUT",path:"/runtime/directories"},"fs.readDirectory":{method:"POST",path:"/runtime/directories/read"},"fs.stat":{method:"POST",path:"/runtime/files/stat"},"fs.rename":{method:"POST",path:"/runtime/files/rename"},"fs.copy":{method:"POST",path:"/runtime/files/copy"},"fs.delete":{method:"DELETE",path:"/runtime/files"},"fs.tail":{method:"POST",path:"/runtime/files/tail"},"fs.find":{method:"POST",path:"/runtime/files/find"},"fs.textSearch":{method:"POST",path:"/runtime/files/search"},"fs.tree":{method:"POST",path:"/runtime/files/tree"},"service.list":{method:"GET",path:"/runtime/services"},"service.run":{method:"POST",path:"/runtime/services/run"},"service.stop":{method:"POST",path:"/runtime/services/stop"},"service.logs":{method:"POST",path:"/runtime/services/logs"},"composer.invoke":{method:"POST",path:"/runtime/composer/executions"},"composer.packages":{method:"GET",path:"/runtime/composer/packages"},"git.checkpoint":{method:"POST",path:"/runtime/git/checkpoints"},"git.checkout":{method:"POST",path:"/runtime/git/checkouts"},"git.log":{method:"POST",path:"/runtime/git/log"},"git.sync":{method:"POST",path:"/runtime/git/sync"},"git.diff":{method:"POST",path:"/runtime/git/diff"},"git.merge":{method:"POST",path:"/runtime/git/merge"},"git.conflicts":{method:"GET",path:"/runtime/git/conflicts"},"git.resolve":{method:"POST",path:"/runtime/git/conflicts/resolve"},"git.restore":{method:"POST",path:"/runtime/git/restore"},"git.status":{method:"GET",path:"/runtime/git/status"},"git.review":{method:"GET",path:"/runtime/git/review"},"git.stage":{method:"POST",path:"/runtime/git/stage"},"git.unstage":{method:"POST",path:"/runtime/git/unstage"},"git.revert":{method:"POST",path:"/runtime/git/revert"}},Ai=class{constructor(e,n,i){this.fetch=n;this.refresh=i;this.refreshPromise=null;this.notebookId=e.id,this.configure(e.runtimeUrl)}configure(e){let n=new URL(e),i=n.searchParams.get("ticket")??"";if(i==="")throw new E("The notebook connection does not contain a runtime ticket.");this.ticket=i,n.protocol==="wss:"?n.protocol="https:":n.protocol==="ws:"&&(n.protocol="http:"),n.pathname=`/api/v1/notebooks/${encodeURIComponent(this.notebookId)}`,n.searchParams.delete("ticket"),n.hash="",this.actionUrl=n}ready(){return this.invokeRaw("runtime.ready",{},{})}supports(e){return e in af}invoke(e,n={},i={}){return this.invokeRaw(e,n??{},i)}send(){throw new E("Fire-and-forget actions require the realtime transport.")}async invokeRaw(e,n,i){let t=$b(i);try{for(let o=0;o<2;o+=1){let a=await bb(this.fetch,this.request(e,n,t.signal));if(a.status===401&&o===0&&this.refresh!==void 0){await this.refreshAuthorization();continue}let s=await yb(a);if(!a.ok||s.error!==void 0)throw $t("runtime",s.error,a);return s.data}throw new j(`Runtime action ${e} could not be authorized.`,{source:"runtime",status:401,code:"AuthenticationRequired"})}finally{t.dispose()}}request(e,n,i){let t=af[e];if(t===void 0)throw new E(`Runtime action ${e} requires the realtime transport.`);let o=new URL(this.actionUrl);o.pathname+=t.path;let a={Accept:"application/json, application/octet-stream",Authorization:`Bearer ${this.ticket}`},s=xb(e,n,o,a);return zt(o,{method:t.method,headers:a,body:t.method==="GET"?void 0:s,signal:i})}async refreshAuthorization(){this.refreshPromise===null&&(this.refreshPromise=this.refresh().then(e=>this.configure(e)));try{await this.refreshPromise}finally{this.refreshPromise=null}}};async function bb(r,e){try{return await r(e)}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?n:new R("Unable to reach the PHPSandbox runtime.","ConnectionFailed",n)}}async function yb(r){if(r.ok&&r.headers.get("content-type")?.toLowerCase().startsWith("application/octet-stream"))return{data:new Uint8Array(await r.arrayBuffer())};let e=await r.text();if(e===""){if(r.ok)throw new R("PHPSandbox runtime returned an empty response.","InvalidResponse",r);return{}}try{return JSON.parse(e)}catch(n){throw new R("PHPSandbox runtime returned an invalid JSON response.","InvalidResponse",n)}}function xb(r,e,n,i){let t=Ni(e);if(r==="fs.readFile"){ji(n,"path",t.path);let o=Ni(t.lineRange);(o.lineStart!==void 0||o.lineEnd!==void 0)&&(ji(n,"lineStart",o.lineStart),ji(n,"lineEnd",o.lineEnd));return}if(r==="fs.writeFile"){ji(n,"path",t.path);let o=Ni(t.options);_l(n,"overwrite",o.overwrite),_l(n,"create",o.create),_l(n,"unlock",o.unlock);let a=Ni(o.atomic);if(typeof a.postfix=="string"&&a.postfix!==""&&n.searchParams.set("atomicPostfix",a.postfix),!ArrayBuffer.isView(t.contents))throw new TypeError("Runtime file contents must be binary data.");return i["Content-Type"]="application/octet-stream",Uint8Array.from(new Uint8Array(t.contents.buffer,t.contents.byteOffset,t.contents.byteLength)).buffer}return i["Content-Type"]="application/json",JSON.stringify(e)}function Ni(r){return r!==null&&typeof r=="object"?r:{}}function ji(r,e,n){if(typeof n!="string"&&typeof n!="number"||String(n)==="")throw new TypeError(`Runtime file ${e} is required.`);r.searchParams.set(e,String(n))}function _l(r,e,n){r.searchParams.set(e,n===!0?"true":"false")}function $b(r){if(r.timeout===void 0&&r.abortSignal===void 0)return{signal:new AbortController().signal,dispose:()=>{}};let e=new AbortController,n=()=>e.abort(r.abortSignal?.reason);r.abortSignal?.addEventListener("abort",n,{once:!0}),r.abortSignal?.aborted&&n();let i=r.timeout===void 0?void 0:setTimeout(()=>e.abort(),r.timeout);return{signal:e.signal,dispose:()=>{r.abortSignal?.removeEventListener("abort",n),i!==void 0&&clearTimeout(i)}}}var Ci=class{constructor(e,n){this.client=e;this.notebookId=n}async configure(e){return(await this.client.put(this.path("/configuration"),e)).data}async configuration(){return(await this.client.get(this.path("/configuration"))).data}async submit(e){return(await this.client.post(this.path(),e)).data}async list(e={}){let n=new URLSearchParams;for(let[i,t]of Object.entries(e))t!==void 0&&n.set(i,String(t));return this.client.get(`${this.path()}${n.size===0?"":`?${n.toString()}`}`)}async get(e){return(await this.client.get(this.path(`/${encodeURIComponent(e)}`))).data}async update(e,n){return(await this.client.patch(this.path(`/${encodeURIComponent(e)}`),n)).data}path(e=""){return`/notebook/${this.notebookId}/feedback${e}`}};var Li=class{constructor(e){this.client=e}async link(e){let n=await this.client.post("/integrations",e);return new Me(n.data,this.client)}async list(){return(await this.client.get("/integrations")).data.map(n=>new Me(n,this.client))}async get(e){let n=await this.client.get(`/integrations/${encodeURIComponent(Zi(e))}`);return new Me(n.data,this.client)}},Me=class r{constructor(e,n){this.data=e;this.client=n}get id(){return this.data.id}get provider(){return this.data.provider}get label(){return this.data.label}async update(e){let n=await this.client.patch(`/integrations/${encodeURIComponent(this.id)}`,e);return new r(n.data,this.client)}async unlink(){await this.client.delete(`/integrations/${encodeURIComponent(this.id)}`)}};function Zi(r){return typeof r=="string"?r:r.id}var Fi=class{constructor(e,n){this.notebookId=e;this.client=n}async attach(e){let n=await this.client.post(this.path(),{...e,integration:Zi(e.integration)});return new Ur(n.data,this.notebookId,this.client)}async list(){return(await this.client.get(this.path())).data.map(n=>new Ur(n,this.notebookId,this.client))}async get(e){let n=await this.client.get(this.bindingPath(e));return new Ur(n.data,this.notebookId,this.client)}path(){return`/notebook/${this.notebookId}/integrations`}bindingPath(e){return`${this.path()}/${encodeURIComponent(kb(e))}`}},Ur=class r{constructor(e,n,i){this.data=e;this.notebookId=n;this.client=i}get id(){return this.data.id}get integration(){return new Me(this.data.integration,this.client)}get effects(){return this.data.effects}async update(e){let n=await this.client.patch(this.path(),{...e,integration:e.integration===void 0?void 0:Zi(e.integration)});return new r(n.data,this.notebookId,this.client)}async detach(){await this.client.delete(this.path())}path(){return`/notebook/${this.notebookId}/integrations/${encodeURIComponent(this.id)}`}};function kb(r){return typeof r=="string"?r:r.id}function _b(r){return Array.isArray(r)?r:Object.entries(r).map(([e,n])=>({name:e,...typeof n=="string"?{value:n}:n}))}var Sl=class{constructor(e){this.client=e}async list(e={}){return this.client.get(`/notebook${sf({page:e.page,per_page:e.perPage})}`)}async inspectImport(e){return(await this.client.post("/notebook/imports/inspect",e)).data}async create(e,n={}){let i=await this.client.post("/notebook",{template:e,...n});return new Et(i.data,this.client)}async get(e){let n=await this.client.get(`/notebook/${e}`);return new Et(n.data,this.client)}open(e){return new Et(e,this.client)}};function wb(r){let e=new URL(r),n=e.pathname.replace(/\/+$/,"");return e.pathname=n===""||n==="/"?"/v1/":`${n}/`,e.search="",e.hash="",e.toString()}var Mi=class{constructor(e,n="https://api.phpsandbox.io/v1",i={},t="realtime"){this.fetch=globalThis.fetch;this.publications=new _t(this),this.notebook=new Sl(this),this.servers=new Ri(this),this.integrations=new Li(this),this.options={...i},this.runtimeTransportValue=t,this.baseUrl=wb(n),i.fetch&&(this.fetch=i.fetch),this.headers={Accept:"application/json",Authorization:`Bearer ${e}`,"Content-Type":"application/json"}}get runtimeTransport(){return this.runtimeTransportValue}get(e){return this.requireData(this.makeRequest("GET",e))}post(e,n){return this.requireData(this.makeRequest("POST",e,{body:n===void 0?void 0:JSON.stringify(n)}))}delete(e){return this.makeRequest("DELETE",e)}put(e,n){return this.requireData(this.makeRequest("PUT",e,{body:n===void 0?void 0:JSON.stringify(n)}))}patch(e,n){return this.requireData(this.makeRequest("PATCH",e,{body:n===void 0?void 0:JSON.stringify(n)}))}async stream(e){let n=await this.fetchResponse(zt(new URL(e.replace(/^\//,""),this.baseUrl),{method:"GET",headers:this.headers}));if(!n.ok)throw await wl(n);if(!n.body)throw new R("PHPSandbox API response body is not readable.","InvalidResponse",n);return n.body}async sse(e,n){let i=await this.fetchResponse(zt(e,{method:"GET",headers:{...this.headers,Accept:"text/event-stream"},...n===void 0?{}:{signal:n}}));if(!i.ok)throw await wl(i);if(!i.body)throw new R("PHPSandbox API SSE response body is not readable.","InvalidResponse",i);return i.body}async requireData(e){let n=await e;if(n.data===void 0)throw new R("PHPSandbox API returned no data for a data request.","InvalidResponse");return{...n,data:n.data}}async makeRequest(e,n,i){let t=await this.fetchResponse(zt(new URL(n.replace(/^\//,""),this.baseUrl),{method:e,...i,headers:this.headers}));if(!t.ok)throw await wl(t,n.startsWith("/platform/")?"platform":"core");if(t.status===204)return{data:void 0};let o=await t.text();if(o==="")throw new R("PHPSandbox API returned an empty response.","InvalidResponse",t);try{let a=JSON.parse(o);if(a===null||typeof a!="object"||Array.isArray(a)||!Object.prototype.hasOwnProperty.call(a,"data"))throw new R("PHPSandbox API returned an invalid success response.","InvalidResponse",t);return a}catch(a){throw R.is(a)?a:new R("PHPSandbox API returned an invalid JSON response.","InvalidResponse",a)}}async fetchResponse(e){try{return await this.fetch(e)}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?n:new R("Unable to reach the PHPSandbox API.","ConnectionFailed",n)}}};async function wl(r,e="core"){let n=await r.text();try{return $t(e,Sb(n===""?void 0:JSON.parse(n)),r)}catch{return new R(`PHPSandbox API returned an invalid error response (HTTP ${r.status}).`,"InvalidResponse",r,{status:r.status,statusText:r.statusText,body:n})}}function Sb(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)?r.error:void 0}var Il=class r{constructor(e){this.client=e;this.notebook=e.notebook,this.publications=e.publications,this.servers=e.servers,this.integrations=e.integrations}async whoami(){let{data:e}=await this.client.get("/auth/whoami"),n=Rm.safeParse(e);if(!n.success)throw new E("Invalid identity response.");return n.data}get runtimeTransport(){return this.client.runtimeTransport}static realtime(e,n="https://api.phpsandbox.io/v1",i={}){return new r(new Mi(e,n,i))}static rest(e,n="https://api.phpsandbox.io/v1",i={}){return new r(new Mi(e,n,i,"rest"))}},Q,Rr,Pl,Dl=class Dl{constructor(e,n){this.data=e;this.client=n;Dt(this,Rr);this.initialized=!1;Dt(this,Q,null);this.disposables=[];let i=n.options.runtimeUrlProvider;if(this.emitter=Er.createInstance(),n.runtimeTransport==="rest")this.socket=null,this.restInvoker=new Ai(e,n.options.fetch??globalThis.fetch,i===void 0?void 0:()=>i(e.id));else{this.restInvoker=null;let t=!0,o=i===void 0?e.runtimeUrl:async()=>t?(t=!1,e.runtimeUrl):i(e.id);this.socket=new Di(o,this.emitter,{debug:n.options.debug,webSocket:n.options.webSocket}),this.watchConnection(),Ut(this,Q,pe(this,Rr,Pl).call(this))}this.files=new yi(this,this.socket===null?null:t=>this.onDidConnect(t)),this.terminals=new mr(this),this.lsp=new fr(this),this.composer=new vr(this,n),this.runtime=new $r(this),this.repl=new kr(this),this.shell=new hr(this),this.git=new Dr(this,n),this.services=new _r(this),this.config=new wr(this),this.secrets=new zl(n,this.data.id),this.integrations=new Fi(this.data.id,n),this.preview=new El(n,this.data.id),this.mail=new Tl(n,this.data.id),this.feedback=new Ci(n,this.data.id),this.publication=new wt(this.data.id,n)}get runtimeTransport(){return this.client.runtimeTransport}async ready(){if(this.restInvoker!==null)return this.restInitialization();let e=this.realtimeSocket(),n=e.getTerminalError();if(n)throw n;return(async()=>(e.isConnected||await e.connect(),ze(this,Q)))()}async update(e){let n=await this.client.put(`/notebook/${this.data.id}`,e);return Object.assign(this.data,n.data),this.data}async fork(e={}){let n=await this.client.post(`/notebook/${this.data.id}/fork`,e);return new Dl(n.data,this.client)}run(e,n=[],i){return Array.isArray(n)?this.shell.run(e,n,i):this.shell.run(e,n)}exec(e,n=[],i){return Array.isArray(n)?this.run(e,n,i).wait():this.run(e,n).wait()}async destroy(){await this.client.delete(`/notebook/${this.data.id}`),this.socket?.terminate(new j("Notebook has been deleted.",{source:"runtime",status:503,code:"NotebookUnavailable",details:{id:this.data.id}}))}restart(){return this.invoke("container.restart")}stop(){return this.invoke("container.stop")}invoke(e,n={},i={}){return this.restInvoker!==null?(this.restInvoker.supports(String(e))&&this.restInitialization(),this.restInvoker.invoke(e,n||{},i)):this.realtimeSocket().invoke(e,n||{},i)}send(e,n={}){return this.restInvoker!==null?this.restInvoker.send():this.realtimeSocket().send(e,n||{})}listen(e,n){let i=this.emitter.listen(e,n);return this.disposables.push(i),i}dispose(){this.disposables.forEach(e=>e.dispose()),this.socket!==null&&!this.socket.isClosed&&this.socket.disconnect()}connected(){return this.waitForSocketConnection({rejectOnClose:!0})}waitForSocketConnection(e){let n=this.realtimeSocket(),i=n.getTerminalError();return i?Promise.reject(i):n.isConnected?Promise.resolve(this):new Promise((t,o)=>{let a=[],s=!1,u=()=>{for(let l of a)l.dispose();a.length=0},c=l=>{s||(s=!0,u(),l())};try{a.push(n.onDidConnect(()=>c(()=>t(this)))),e.rejectOnClose&&a.push(n.onDidClose(()=>c(()=>o(new Error("Connection closed"))))),a.push(n.onDidBootError(l=>c(()=>o(l))))}catch(l){c(()=>o(l))}})}watchConnection(){let e=this.realtimeSocket();e.onDidConnect(()=>{e.emit("okra.connected")}),e.onDidClose(()=>{e.emit("okra.disconnected"),this.initialized=!1}),e.onDidBootError(n=>{e.emit("okra.boot_error",n),e.emit("okra.disconnected"),this.initialized=!1})}onDidConnect(e){let n=this.realtimeSocket();n.removeListener("okra.connected",e);let i=n.listen("okra.connected",e);return this.disposables.push(i),i}onDidDisconnect(e){let n=this.realtimeSocket().listen("okra.disconnected",e);return this.disposables.push(n),n}onDidBootError(e){let n=this.realtimeSocket().listen("okra.boot_error",i=>{j.is(i,"NotebookUnavailable")&&e(i)});return this.disposables.push(n),n}restInitialization(){if(this.restInvoker===null)throw new E("This operation requires the REST transport.");return ze(this,Q)===null&&(Ut(this,Q,this.restInvoker.ready().then(e=>(this.initialized=e,this.emitter.emit("notebook.initialized",e),e))),ze(this,Q).catch(()=>{})),ze(this,Q)}onDidInitialize(e){return this.listen("notebook.initialized",e)}async reconnect(){let e=this.realtimeSocket(),n=this.waitForSocketConnection({rejectOnClose:!1});return e.reconnect(),this.initialized=!1,await n,Ut(this,Q,pe(this,Rr,Pl).call(this)),this.ready().then(()=>this)}realtimeSocket(){if(this.socket===null)throw new E("This operation requires the realtime transport.");return this.socket}};Q=new WeakMap,Rr=new WeakSet,Pl=function(){return Ut(this,Q,new Promise((e,n)=>{let i=this.onDidInitialize(o=>{if(t.dispose(),i.dispose(),this.initialized=o,o.type==="error"){n(new j(o.message,{source:"runtime",status:503,code:"NotebookInitializationFailed",details:o.data}));return}e(o)}),t=this.onDidBootError(o=>{i.dispose(),t.dispose(),n(o)})})),ze(this,Q).catch(()=>{}),ze(this,Q)};var Et=Dl,zl=class{constructor(e,n){this.client=e;this.notebookId=n}async list(e){let n=new URLSearchParams;e?.environment&&n.set("environment",e.environment);let i=n.toString();return(await this.client.get(`/notebook/${this.notebookId}/secrets${i?`?${i}`:""}`)).data}async set(e,n){let i=typeof n=="string"?{name:e,value:n}:{name:e,...n};return(await this.client.put(`/notebook/${this.notebookId}/secrets`,i)).data}async setMany(e){return(await this.client.put(`/notebook/${this.notebookId}/secrets`,{secrets:_b(e)})).data}async delete(e,n){let i=new URLSearchParams;n?.environment&&i.set("environment",n.environment);let t=i.toString();await this.client.delete(`/notebook/${this.notebookId}/secrets/${encodeURIComponent(e)}${t?`?${t}`:""}`)}},El=class{constructor(e,n){this.client=e;this.notebookId=n}async get(e){let n=e===void 0?"":`?${new URLSearchParams({url:e}).toString()}`;return(await this.client.get(`/notebook/${this.notebookId}/preview${n}`)).data}async setPassword(e){return(await this.client.put(`/notebook/${this.notebookId}/preview`,e)).data}async disable(){await this.client.delete(`/notebook/${this.notebookId}/preview`)}async createSession(e){return(await this.client.post(`/notebook/${this.notebookId}/preview/session`,e)).data}async createHandoff(e){return(await this.client.post(`/notebook/${this.notebookId}/preview/handoff`,e)).data}},Tl=class{constructor(e,n){this.client=e;this.notebookId=n}async status(){return(await this.client.get(`/notebook/${this.notebookId}/mail`)).data}async enable(){return(await this.client.put(`/notebook/${this.notebookId}/mail`)).data}async disable(){await this.client.delete(`/notebook/${this.notebookId}/mail`)}async list(e={}){return this.client.get(`/notebook/${this.notebookId}/mails${sf(e)}`)}async get(e){return(await this.client.get(`/notebook/${this.notebookId}/mails/${encodeURIComponent(e)}`)).data}async delete(e){await this.client.delete(`/notebook/${this.notebookId}/mails/${encodeURIComponent(e)}`)}};function sf(r){let e=new URLSearchParams;for(let[i,t]of Object.entries(r))(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&e.set(i,String(t));let n=e.toString();return n===""?"":`?${n}`}return mf(Ib);})();
|
|
69
69
|
/*! Bundled license information:
|
|
70
70
|
|
|
71
71
|
reconnecting-websocket/dist/reconnecting-websocket-mjs.js:
|