@highstate/designer 0.9.21 → 0.9.23

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.
Files changed (72) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DEkEne1_.js → B0DwtIiW.js} +1 -1
  3. package/.output/public/_nuxt/{CEFQZJTy.js → B189csPj.js} +1 -1
  4. package/.output/public/_nuxt/{BElWqKFK.js → B5Eo-Ujz.js} +1 -1
  5. package/.output/public/_nuxt/{Ccxf70XJ.js → B5LlFtQf.js} +1 -1
  6. package/.output/public/_nuxt/{CmuRgu4O.js → B9mqi9z7.js} +1 -1
  7. package/.output/public/_nuxt/{BwzWClQo.js → B9t6gCA0.js} +1 -1
  8. package/.output/public/_nuxt/{K7mdFSQD.js → BF7lERe4.js} +1 -1
  9. package/.output/public/_nuxt/{DqHZqf4r.js → BIUo-Bxf.js} +1 -1
  10. package/.output/public/_nuxt/{BG77JRvd.js → BIaCZ37Q.js} +1 -1
  11. package/.output/public/_nuxt/{DUPtXNCV.js → BR84xh6o.js} +1 -1
  12. package/.output/public/_nuxt/{un-_PcAo.js → BRz27G3j.js} +1 -1
  13. package/.output/public/_nuxt/{Dvr3wuZa.js → BTHtjCvv.js} +1 -1
  14. package/.output/public/_nuxt/{SAlV5_cT.js → BWTftWoG.js} +1 -1
  15. package/.output/public/_nuxt/{DRzHUuts.js → BdBhgVvK.js} +1 -1
  16. package/.output/public/_nuxt/{D5PsJ332.js → BflOb3zh.js} +1 -1
  17. package/.output/public/_nuxt/{DljtJUzO.js → BjfuCvsP.js} +1 -1
  18. package/.output/public/_nuxt/{pGIbX2RQ.js → BkGCFSTP.js} +1 -1
  19. package/.output/public/_nuxt/{DlgqOs51.js → Bkak_ypl.js} +40 -40
  20. package/.output/public/_nuxt/{DUcPQWXO.js → BoC8E-T9.js} +1 -1
  21. package/.output/public/_nuxt/{CKzYRRNc.js → BpPu1KhW.js} +1 -1
  22. package/.output/public/_nuxt/{DCUYnw8H.js → BuEUFExJ.js} +1 -1
  23. package/.output/public/_nuxt/{rmtV6Y0T.js → Bv2mtDTo.js} +1 -1
  24. package/.output/public/_nuxt/{BVAgVeex.js → BvMxGlog.js} +1 -1
  25. package/.output/public/_nuxt/{CTv1udg1.js → BxRWCLFh.js} +1 -1
  26. package/.output/public/_nuxt/{CwG_vXR4.js → Bzy3U_4D.js} +1 -1
  27. package/.output/public/_nuxt/{CYlq2lca.js → C2OahqVS.js} +1 -1
  28. package/.output/public/_nuxt/{DdEkqLVb.js → C2nQTzN4.js} +1 -1
  29. package/.output/public/_nuxt/{CqQ7SoEc.js → C4_hyZfA.js} +1 -1
  30. package/.output/public/_nuxt/{DRbOBnYP.js → C53Fxxsk.js} +1 -1
  31. package/.output/public/_nuxt/{BhSkG2vO.js → CCWo5rW7.js} +1 -1
  32. package/.output/public/_nuxt/{DIndX_i2.js → CPa4tq4x.js} +1 -1
  33. package/.output/public/_nuxt/{BJKzranL.js → CW46IvFj.js} +1 -1
  34. package/.output/public/_nuxt/{cf-ossUw.js → CWazJ566.js} +1 -1
  35. package/.output/public/_nuxt/{pD_CwtY4.js → CcdbamqU.js} +1 -1
  36. package/.output/public/_nuxt/{DlUEcgLY.js → CdAJz8Zf.js} +1 -1
  37. package/.output/public/_nuxt/{Dp61CxCP.js → CgrnwBjj.js} +1 -1
  38. package/.output/public/_nuxt/{16S73JW8.js → ChL5CFGQ.js} +1 -1
  39. package/.output/public/_nuxt/{DLPcFaxm.js → ChgcJmVR.js} +1 -1
  40. package/.output/public/_nuxt/{4xMt1p0i.js → CxOwNk56.js} +1 -1
  41. package/.output/public/_nuxt/{BZHZ48I0.js → Cz0mhusi.js} +1 -1
  42. package/.output/public/_nuxt/{Ct0zHWLj.js → D8BPl5Ng.js} +1 -1
  43. package/.output/public/_nuxt/{Cl-6nwYp.js → DATYi_ZW.js} +1 -1
  44. package/.output/public/_nuxt/{30BaVrUW.js → DGGZlK_j.js} +1 -1
  45. package/.output/public/_nuxt/{CRUo-mN3.js → DKuR9WtZ.js} +1 -1
  46. package/.output/public/_nuxt/{C6uyQOiX.js → DcuosykK.js} +1 -1
  47. package/.output/public/_nuxt/{CIUVrxWu.js → DeoaNYc1.js} +1 -1
  48. package/.output/public/_nuxt/{D2m36GEB.js → DeupYvpN.js} +1 -1
  49. package/.output/public/_nuxt/{DJF4kszA.js → Dfmtf7xs.js} +1 -1
  50. package/.output/public/_nuxt/{CmFtdvwG.js → DgGsslqu.js} +1 -1
  51. package/.output/public/_nuxt/{CoKQIzln.js → DoW4m9dD.js} +1 -1
  52. package/.output/public/_nuxt/{CFUixvV0.js → DoodpQpa.js} +1 -1
  53. package/.output/public/_nuxt/{DwnIsmZ-.js → DqjoH-x_.js} +1 -1
  54. package/.output/public/_nuxt/{ngiZ_K3q.js → DqrkUst7.js} +1 -1
  55. package/.output/public/_nuxt/{KGX_yR9z.js → DrqQhYAT.js} +1 -1
  56. package/.output/public/_nuxt/{B3nLPexT.js → EPq4mQZK.js} +1 -1
  57. package/.output/public/_nuxt/{DKH4orv1.js → EozEqmut.js} +1 -1
  58. package/.output/public/_nuxt/{asZV6334.js → Jx-0SCro.js} +1 -1
  59. package/.output/public/_nuxt/{DMGzSUEV.js → K9ySVciZ.js} +1 -1
  60. package/.output/public/_nuxt/{DSvoz_Rr.js → LfqdzYdw.js} +1 -1
  61. package/.output/public/_nuxt/{uwIuMFjJ.js → LzkmrMfu.js} +1 -1
  62. package/.output/public/_nuxt/{0vdwhauO.js → TwvQJIWC.js} +1 -1
  63. package/.output/public/_nuxt/{Ca9HO25U.js → V5hR3Nor.js} +1 -1
  64. package/.output/public/_nuxt/{B0nz2Zze.js → b-Mr8ypy.js} +1 -1
  65. package/.output/public/_nuxt/builds/latest.json +1 -1
  66. package/.output/public/_nuxt/builds/meta/59532fa9-bbe6-423e-8fdc-69d5821c94aa.json +1 -0
  67. package/.output/public/_nuxt/{B5zoSt72.js → f9NuEumg.js} +1 -1
  68. package/.output/public/_nuxt/{graph-resolver-r_0JlXH_.js → graph-resolver-3Wc6wUO6.js} +40 -40
  69. package/.output/public/_nuxt/{_4xG4Sg4.js → iZKo0eie.js} +1 -1
  70. package/.output/server/index.mjs +1214 -1214
  71. package/package.json +5 -5
  72. package/.output/public/_nuxt/builds/meta/c2b04ef2-f7ef-48dc-aa48-5d4dfa26c410.json +0 -1
@@ -1,7 +1,7 @@
1
- const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var d;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(d=a._zod).traits??(d.traits=new Set),a._zod.traits.add(e),t(a,c);for(const u in s.prototype)u in a||Object.defineProperty(a,u,{value:s.prototype[u].bind(a)});a._zod.constr=s,a._zod.def=c}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var c;const d=r?.Parent?new o:this;i(d,a),(c=d._zod).deferred??(c.deferred=[]);for(const u of d._zod.deferred)u();return d}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const Ic=Symbol("zod_brand");class gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ti={};function Xe(e){return e&&Object.assign(ti,e),ti}function Zp(e){return e}function Mp(e){return e}function qp(e){}function Vp(e){throw new Error}function Kp(e){}function jo(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function W(e,t="|"){return e.map(r=>fe(r)).join(t)}function Ec(e,t){return typeof t=="bigint"?t.toString():t}function mi(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ht(e){return e==null}function gi(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Nc(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return o%s/10**n}function $e(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function kn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Jp(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Gp(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Wp(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function an(e){return JSON.stringify(e)}const Ao=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Zn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Oc=mi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mn(e){if(Zn(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Zn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Hp(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Xp=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ni=new Set(["string","number","symbol"]),xc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function V(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Yp(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ac={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]},zc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tc(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Pc(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Dc(e,t){if(!Mn(t))throw new Error("Invalid input to extend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return kn(this,"shape",i),i},checks:[]};return $t(e,r)}function Uc(e,t){return $t(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return kn(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Cc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return $t(t,{...t._zod.def,shape:n,checks:[]})}function Bc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return $t(t,{...t._zod.def,shape:n,checks:[]})}function fn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function st(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Un(e){return typeof e=="string"?e:e?.message}function pt(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=Un(e.inst?._zod.def?.error?.(e))??Un(t?.error?.(e))??Un(r.customError?.(e))??Un(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function vi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Qp(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}class em{constructor(...t){}}var tm=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:zc,Class:em,NUMBER_FORMAT_RANGES:Ac,aborted:fn,allowsEval:Oc,assert:Kp,assertEqual:Zp,assertIs:qp,assertNever:Vp,assertNotEqual:Mp,assignProp:kn,cached:mi,captureStackTrace:Ao,cleanEnum:Qp,cleanRegex:gi,clone:$t,createTransparentProxy:Yp,defineLazy:$e,esc:an,escapeRegex:Xt,extend:Dc,finalizeIssue:pt,floatSafeRemainder:Nc,getElementAtPath:Jp,getEnumValues:jo,getLengthableOrigin:vi,getParsedType:Xp,getSizableOrigin:yi,isObject:Zn,isPlainObject:Mn,issue:yn,joinValues:W,jsonStringifyReplacer:Ec,merge:Uc,normalizeParams:V,nullish:Ht,numKeys:Hp,omit:Pc,optionalKeys:jc,partial:Cc,pick:Tc,prefixIssues:st,primitiveTypes:xc,promiseAllObject:Gp,propertyKeyTypes:ni,randomString:Wp,required:Bc,stringifyPrimitive:fe,unwrapMessage:Un});const Rc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Ec,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zo=D("$ZodError",Rc),Hn=D("$ZodError",Rc,{Parent:Error});function To(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Po(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let a=i,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(s))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return n(e),i}function Fc(e,t){const r=t||function(o){return o.message},i={errors:[]},n=(o,s=[])=>{var a,c;for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(u=>n({issues:u},d.path));else if(d.code==="invalid_key")n({issues:d.issues},d.path);else if(d.code==="invalid_element")n({issues:d.issues},d.path);else{const u=[...s,...d.path];if(u.length===0){i.errors.push(r(d));continue}let h=i,y=0;for(;y<u.length;){const _=u[y],b=y===u.length-1;typeof _=="string"?(h.properties??(h.properties={}),(a=h.properties)[_]??(a[_]={errors:[]}),h=h.properties[_]):(h.items??(h.items=[]),(c=h.items)[_]??(c[_]={errors:[]}),h=h.items[_]),b&&h.errors.push(r(d)),y++}}};return n(e),i}function Lc(e){const t=[];for(const r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Zc(e){const t=[],r=[...e.issues].sort((i,n)=>i.path.length-n.path.length);for(const i of r)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${Lc(i.path)}`);return t.join(`
2
- `)}const Do=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gn;if(s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw Ao(a,n?.callee),a}return s.value},go=Do(Hn),Uo=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw Ao(a,n?.callee),a}return s.value},yo=Uo(Hn),Co=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new gn;return o.issues.length?{success:!1,error:new(e??zo)(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},Mc=Co(Hn),Bo=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},qc=Bo(Hn),Vc=/^[cC][^\s-]{8,}$/,Kc=/^[0-9a-z]+$/,Jc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gc=/^[0-9a-vA-V]{20}$/,Wc=/^[A-Za-z0-9]{27}$/,Hc=/^[a-zA-Z0-9_-]{21}$/,Xc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nm=/^[-+]?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)?)??$/,Yc=/^([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})$/,vn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,rm=vn(4),im=vn(6),om=vn(7),Qc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sm=/^[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])?)*$/,am=/^(([^<>()\[\]\\.,;:\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,}))$/,um=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,cm=/^[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])?)*$/,lm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function el(){return new RegExp(lm,"u")}const tl=/^(?:(?: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])$/,nl=/^(([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})$/,rl=/^((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])$/,il=/^(([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])$/,ol=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ro=/^[A-Za-z0-9_-]*$/,sl=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,fm=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,al=/^\+(?:[0-9]){6,14}[0-9]$/,ul="(?:(?:\\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])))",cl=new RegExp(`^${ul}$`);function ll(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function fl(e){return new RegExp(`^${ll(e)}$`)}function dl(e){const t=ll({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${ul}T(?:${i})$`)}const hl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pl=/^\d+n?$/,ml=/^\d+$/,gl=/^-?\d+(?:\.\d+)?/i,yl=/true|false/i,vl=/null/i,$l=/undefined/i,bl=/^[^A-Z]*$/,_l=/^[^a-z]*$/;var wl=Object.freeze({__proto__:null,base64:ol,base64url:Ro,bigint:pl,boolean:yl,browserEmail:cm,cidrv4:rl,cidrv6:il,cuid:Vc,cuid2:Kc,date:cl,datetime:dl,domain:fm,duration:Xc,e164:al,email:Qc,emoji:el,extendedDuration:nm,guid:Yc,hostname:sl,html5Email:sm,integer:ml,ipv4:tl,ipv6:nl,ksuid:Wc,lowercase:bl,nanoid:Hc,null:vl,number:gl,rfc5322Email:am,string:hl,time:fl,ulid:Jc,undefined:$l,unicodeEmail:um,uppercase:_l,uuid:vn,uuid4:rm,uuid6:im,uuid7:om,xid:Gc});const Ue=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),kl={number:"number",bigint:"bigint",object:"date"},Fo=D("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);const r=kl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lo=D("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);const r=kl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sl=D("$ZodCheckMultipleOf",(e,t)=>{Ue.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Nc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Il=D("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Ac[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=o,r&&(a.pattern=ml)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),El=D("$ZodCheckBigIntFormat",(e,t)=>{Ue.init(e,t);const[r,i]=zc[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Nl=D("$ZodCheckMaxSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:yi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Ol=D("$ZodCheckMinSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:yi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),xl=D("$ZodCheckSizeEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const s=o>t.size;i.issues.push({origin:yi(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),jl=D("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const s=vi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Al=D("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const s=vi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),zl=D("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const s=vi(n),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Xn=D("$ZodCheckStringFormat",(e,t)=>{var r,i;Ue.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Tl=D("$ZodCheckRegex",(e,t)=>{Xn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Pl=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=bl),Xn.init(e,t)}),Dl=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_l),Xn.init(e,t)}),Ul=D("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);const r=Xt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Cl=D("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`^${Xt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Bl=D("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`.*${Xt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function ja(e,t,r){e.issues.length&&t.issues.push(...st(r,e.issues))}const Rl=D("$ZodCheckProperty",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>ja(n,r,t.property));ja(i,r,t.property)}}),Fl=D("$ZodCheckMimeType",(e,t)=>{Ue.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e})}}),Ll=D("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Zl{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
1
+ const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var d;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(d=a._zod).traits??(d.traits=new Set),a._zod.traits.add(e),t(a,c);for(const u in s.prototype)u in a||Object.defineProperty(a,u,{value:s.prototype[u].bind(a)});a._zod.constr=s,a._zod.def=c}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var c;const d=r?.Parent?new o:this;i(d,a),(c=d._zod).deferred??(c.deferred=[]);for(const u of d._zod.deferred)u();return d}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const Ic=Symbol("zod_brand");class gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ti={};function Xe(e){return e&&Object.assign(ti,e),ti}function Mp(e){return e}function qp(e){return e}function Vp(e){}function Kp(e){throw new Error}function Jp(e){}function jo(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function W(e,t="|"){return e.map(r=>fe(r)).join(t)}function Ec(e,t){return typeof t=="bigint"?t.toString():t}function mi(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ht(e){return e==null}function gi(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Nc(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return o%s/10**n}function $e(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function kn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Gp(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Wp(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Hp(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function an(e){return JSON.stringify(e)}const Ao=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Zn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Oc=mi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mn(e){if(Zn(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Zn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xp(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Yp=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ni=new Set(["string","number","symbol"]),xc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function V(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Qp(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ac={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]},zc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tc(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Pc(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Dc(e,t){if(!Mn(t))throw new Error("Invalid input to extend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return kn(this,"shape",i),i},checks:[]};return $t(e,r)}function Uc(e,t){return $t(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return kn(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Cc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return $t(t,{...t._zod.def,shape:n,checks:[]})}function Bc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return $t(t,{...t._zod.def,shape:n,checks:[]})}function fn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ot(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Un(e){return typeof e=="string"?e:e?.message}function pt(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=Un(e.inst?._zod.def?.error?.(e))??Un(t?.error?.(e))??Un(r.customError?.(e))??Un(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function vi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function em(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}class tm{constructor(...t){}}var nm=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:zc,Class:tm,NUMBER_FORMAT_RANGES:Ac,aborted:fn,allowsEval:Oc,assert:Jp,assertEqual:Mp,assertIs:Vp,assertNever:Kp,assertNotEqual:qp,assignProp:kn,cached:mi,captureStackTrace:Ao,cleanEnum:em,cleanRegex:gi,clone:$t,createTransparentProxy:Qp,defineLazy:$e,esc:an,escapeRegex:Xt,extend:Dc,finalizeIssue:pt,floatSafeRemainder:Nc,getElementAtPath:Gp,getEnumValues:jo,getLengthableOrigin:vi,getParsedType:Yp,getSizableOrigin:yi,isObject:Zn,isPlainObject:Mn,issue:yn,joinValues:W,jsonStringifyReplacer:Ec,merge:Uc,normalizeParams:V,nullish:Ht,numKeys:Xp,omit:Pc,optionalKeys:jc,partial:Cc,pick:Tc,prefixIssues:ot,primitiveTypes:xc,promiseAllObject:Wp,propertyKeyTypes:ni,randomString:Hp,required:Bc,stringifyPrimitive:fe,unwrapMessage:Un});const Rc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Ec,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zo=D("$ZodError",Rc),Hn=D("$ZodError",Rc,{Parent:Error});function To(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Po(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let a=i,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(s))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return n(e),i}function Fc(e,t){const r=t||function(o){return o.message},i={errors:[]},n=(o,s=[])=>{var a,c;for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(u=>n({issues:u},d.path));else if(d.code==="invalid_key")n({issues:d.issues},d.path);else if(d.code==="invalid_element")n({issues:d.issues},d.path);else{const u=[...s,...d.path];if(u.length===0){i.errors.push(r(d));continue}let h=i,y=0;for(;y<u.length;){const _=u[y],b=y===u.length-1;typeof _=="string"?(h.properties??(h.properties={}),(a=h.properties)[_]??(a[_]={errors:[]}),h=h.properties[_]):(h.items??(h.items=[]),(c=h.items)[_]??(c[_]={errors:[]}),h=h.items[_]),b&&h.errors.push(r(d)),y++}}};return n(e),i}function Lc(e){const t=[];for(const r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Zc(e){const t=[],r=[...e.issues].sort((i,n)=>i.path.length-n.path.length);for(const i of r)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${Lc(i.path)}`);return t.join(`
2
+ `)}const Do=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gn;if(s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw Ao(a,n?.callee),a}return s.value},go=Do(Hn),Uo=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw Ao(a,n?.callee),a}return s.value},yo=Uo(Hn),Co=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new gn;return o.issues.length?{success:!1,error:new(e??zo)(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},Mc=Co(Hn),Bo=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},qc=Bo(Hn),Vc=/^[cC][^\s-]{8,}$/,Kc=/^[0-9a-z]+$/,Jc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gc=/^[0-9a-vA-V]{20}$/,Wc=/^[A-Za-z0-9]{27}$/,Hc=/^[a-zA-Z0-9_-]{21}$/,Xc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rm=/^[-+]?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)?)??$/,Yc=/^([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})$/,vn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,im=vn(4),om=vn(6),sm=vn(7),Qc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,am=/^[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])?)*$/,um=/^(([^<>()\[\]\\.,;:\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,}))$/,cm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lm=/^[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])?)*$/,fm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function el(){return new RegExp(fm,"u")}const tl=/^(?:(?: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])$/,nl=/^(([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})$/,rl=/^((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])$/,il=/^(([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])$/,ol=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ro=/^[A-Za-z0-9_-]*$/,sl=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,dm=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,al=/^\+(?:[0-9]){6,14}[0-9]$/,ul="(?:(?:\\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])))",cl=new RegExp(`^${ul}$`);function ll(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function fl(e){return new RegExp(`^${ll(e)}$`)}function dl(e){const t=ll({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${ul}T(?:${i})$`)}const hl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pl=/^\d+n?$/,ml=/^\d+$/,gl=/^-?\d+(?:\.\d+)?/i,yl=/true|false/i,vl=/null/i,$l=/undefined/i,bl=/^[^A-Z]*$/,_l=/^[^a-z]*$/;var wl=Object.freeze({__proto__:null,base64:ol,base64url:Ro,bigint:pl,boolean:yl,browserEmail:lm,cidrv4:rl,cidrv6:il,cuid:Vc,cuid2:Kc,date:cl,datetime:dl,domain:dm,duration:Xc,e164:al,email:Qc,emoji:el,extendedDuration:rm,guid:Yc,hostname:sl,html5Email:am,integer:ml,ipv4:tl,ipv6:nl,ksuid:Wc,lowercase:bl,nanoid:Hc,null:vl,number:gl,rfc5322Email:um,string:hl,time:fl,ulid:Jc,undefined:$l,unicodeEmail:cm,uppercase:_l,uuid:vn,uuid4:im,uuid6:om,uuid7:sm,xid:Gc});const Ue=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),kl={number:"number",bigint:"bigint",object:"date"},Fo=D("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);const r=kl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lo=D("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);const r=kl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sl=D("$ZodCheckMultipleOf",(e,t)=>{Ue.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Nc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Il=D("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Ac[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=o,r&&(a.pattern=ml)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),El=D("$ZodCheckBigIntFormat",(e,t)=>{Ue.init(e,t);const[r,i]=zc[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Nl=D("$ZodCheckMaxSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:yi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Ol=D("$ZodCheckMinSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:yi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),xl=D("$ZodCheckSizeEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const s=o>t.size;i.issues.push({origin:yi(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),jl=D("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const s=vi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Al=D("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const s=vi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),zl=D("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Ht(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const s=vi(n),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Xn=D("$ZodCheckStringFormat",(e,t)=>{var r,i;Ue.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Tl=D("$ZodCheckRegex",(e,t)=>{Xn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Pl=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=bl),Xn.init(e,t)}),Dl=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_l),Xn.init(e,t)}),Ul=D("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);const r=Xt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Cl=D("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`^${Xt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Bl=D("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`.*${Xt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function ja(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues))}const Rl=D("$ZodCheckProperty",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>ja(n,r,t.property));ja(i,r,t.property)}}),Fl=D("$ZodCheckMimeType",(e,t)=>{Ue.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e})}}),Ll=D("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Zl{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
3
3
  `).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(const s of o)this.content.push(s)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
4
- `))}}const Ml={major:4,minor:0,patch:5},ue=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ml;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(o,s,a)=>{let c=fn(o),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,y=u._zod.check(o);if(y instanceof Promise&&a?.async===!1)throw new gn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,o.issues.length!==h&&(c||(c=fn(o,h)))});else{if(o.issues.length===h)continue;c||(c=fn(o,h))}}return d?d.then(()=>o):o};e._zod.run=(o,s)=>{const a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new gn;return a.then(c=>n(c,i,s))}return n(a,i,s)}}e["~standard"]={validate:n=>{try{const o=Mc(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qc(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Yn=D("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hl(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ne=D("$ZodStringFormat",(e,t)=>{Xn.init(e,t),Yn.init(e,t)}),ql=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yc),Ne.init(e,t)}),Vl=D("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=vn(i))}else t.pattern??(t.pattern=vn());Ne.init(e,t)}),Kl=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qc),Ne.init(e,t)}),Jl=D("$ZodURL",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{try{const i=r.value,n=new URL(i),o=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:sl.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!i.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Gl=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=el()),Ne.init(e,t)}),Wl=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Hc),Ne.init(e,t)}),Hl=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vc),Ne.init(e,t)}),Xl=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Kc),Ne.init(e,t)}),Yl=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Jc),Ne.init(e,t)}),Ql=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gc),Ne.init(e,t)}),ef=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wc),Ne.init(e,t)}),tf=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dl(t)),Ne.init(e,t)}),nf=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cl),Ne.init(e,t)}),rf=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=fl(t)),Ne.init(e,t)}),of=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xc),Ne.init(e,t)}),sf=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),af=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),uf=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rl),Ne.init(e,t)}),cf=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=il),Ne.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Zo(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const lf=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ol),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Zo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ff(e){if(!Ro.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Zo(r)}const df=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ro),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{ff(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),hf=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=al),Ne.init(e,t)});function pf(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const mf=D("$ZodJWT",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{pf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),gf=D("$ZodCustomStringFormat",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Mo=D("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??gl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),yf=D("$ZodNumber",(e,t)=>{Il.init(e,t),Mo.init(e,t)}),qo=D("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=yl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Vo=D("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=pl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),vf=D("$ZodBigInt",(e,t)=>{El.init(e,t),Vo.init(e,t)}),$f=D("$ZodSymbol",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),bf=D("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=$l,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),_f=D("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=vl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),wf=D("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),ri=D("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),kf=D("$ZodNever",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Sf=D("$ZodVoid",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),If=D("$ZodDate",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Aa(e,t,r){e.issues.length&&t.issues.push(...st(r,e.issues)),t.value[r]=e.value}const Ko=D("$ZodArray",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let s=0;s<n.length;s++){const a=n[s],c=t.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(d=>Aa(d,r,s))):Aa(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function or(e,t,r){e.issues.length&&t.issues.push(...st(r,e.issues)),t.value[r]=e.value}function za(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...st(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const Ef=D("$ZodObject",(e,t)=>{ue.init(e,t);const r=mi(()=>{const h=Object.keys(t.shape);for(const _ of h)if(!(t.shape[_]instanceof ue))throw new Error(`Invalid element at key "${_}": expected a Zod schema`);const y=jc(t.shape);return{shape:t.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(y)}});$e(e._zod,"propValues",()=>{const h=t.shape,y={};for(const _ in h){const b=h[_]._zod;if(b.values){y[_]??(y[_]=new Set);for(const g of b.values)y[_].add(g)}}return y});const i=h=>{const y=new Zl(["shape","payload","ctx"]),_=r.value,b=f=>{const v=an(f);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");const g=Object.create(null);let m=0;for(const f of _.keys)g[f]=`key_${m++}`;y.write("const newResult = {}");for(const f of _.keys)if(_.optionalKeys.has(f)){const v=g[f];y.write(`const ${v} = ${b(f)};`);const S=an(f);y.write(`
4
+ `))}}const Ml={major:4,minor:0,patch:5},ue=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ml;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(o,s,a)=>{let c=fn(o),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,y=u._zod.check(o);if(y instanceof Promise&&a?.async===!1)throw new gn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,o.issues.length!==h&&(c||(c=fn(o,h)))});else{if(o.issues.length===h)continue;c||(c=fn(o,h))}}return d?d.then(()=>o):o};e._zod.run=(o,s)=>{const a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new gn;return a.then(c=>n(c,i,s))}return n(a,i,s)}}e["~standard"]={validate:n=>{try{const o=Mc(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qc(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Yn=D("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hl(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ne=D("$ZodStringFormat",(e,t)=>{Xn.init(e,t),Yn.init(e,t)}),ql=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yc),Ne.init(e,t)}),Vl=D("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=vn(i))}else t.pattern??(t.pattern=vn());Ne.init(e,t)}),Kl=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qc),Ne.init(e,t)}),Jl=D("$ZodURL",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{try{const i=r.value,n=new URL(i),o=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:sl.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!i.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Gl=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=el()),Ne.init(e,t)}),Wl=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Hc),Ne.init(e,t)}),Hl=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vc),Ne.init(e,t)}),Xl=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Kc),Ne.init(e,t)}),Yl=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Jc),Ne.init(e,t)}),Ql=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gc),Ne.init(e,t)}),ef=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wc),Ne.init(e,t)}),tf=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dl(t)),Ne.init(e,t)}),nf=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cl),Ne.init(e,t)}),rf=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=fl(t)),Ne.init(e,t)}),of=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xc),Ne.init(e,t)}),sf=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),af=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),uf=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rl),Ne.init(e,t)}),cf=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=il),Ne.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Zo(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const lf=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ol),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Zo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ff(e){if(!Ro.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Zo(r)}const df=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ro),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{ff(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),hf=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=al),Ne.init(e,t)});function pf(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const mf=D("$ZodJWT",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{pf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),gf=D("$ZodCustomStringFormat",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Mo=D("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??gl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),yf=D("$ZodNumber",(e,t)=>{Il.init(e,t),Mo.init(e,t)}),qo=D("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=yl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Vo=D("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=pl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),vf=D("$ZodBigInt",(e,t)=>{El.init(e,t),Vo.init(e,t)}),$f=D("$ZodSymbol",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),bf=D("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=$l,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),_f=D("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=vl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),wf=D("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),ri=D("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),kf=D("$ZodNever",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Sf=D("$ZodVoid",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),If=D("$ZodDate",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Aa(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const Ko=D("$ZodArray",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let s=0;s<n.length;s++){const a=n[s],c=t.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(d=>Aa(d,r,s))):Aa(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function or(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}function za(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...ot(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const Ef=D("$ZodObject",(e,t)=>{ue.init(e,t);const r=mi(()=>{const h=Object.keys(t.shape);for(const _ of h)if(!(t.shape[_]instanceof ue))throw new Error(`Invalid element at key "${_}": expected a Zod schema`);const y=jc(t.shape);return{shape:t.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(y)}});$e(e._zod,"propValues",()=>{const h=t.shape,y={};for(const _ in h){const b=h[_]._zod;if(b.values){y[_]??(y[_]=new Set);for(const g of b.values)y[_].add(g)}}return y});const i=h=>{const y=new Zl(["shape","payload","ctx"]),_=r.value,b=f=>{const v=an(f);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");const g=Object.create(null);let m=0;for(const f of _.keys)g[f]=`key_${m++}`;y.write("const newResult = {}");for(const f of _.keys)if(_.optionalKeys.has(f)){const v=g[f];y.write(`const ${v} = ${b(f)};`);const S=an(f);y.write(`
5
5
  if (${v}.issues.length) {
6
6
  if (input[${S}] === undefined) {
7
7
  if (${S} in input) {
@@ -24,10 +24,10 @@ const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var
24
24
  if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
25
25
  ...iss,
26
26
  path: iss.path ? [${an(f)}, ...iss.path] : [${an(f)}]
27
- })));`),y.write(`newResult[${an(f)}] = ${v}.value`)}y.write("payload.value = newResult;"),y.write("return payload;");const $=y.compile();return(f,v)=>$(h,f,v)};let n;const o=Zn,s=!ti.jitless,c=s&&Oc.value,d=t.catchall;let u;e._zod.parse=(h,y)=>{u??(u=r.value);const _=h.value;if(!o(_))return h.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),h;const b=[];if(s&&c&&y?.async===!1&&y.jitless!==!0)n||(n=i(t.shape)),h=n(h,y);else{h.value={};const v=u.shape;for(const S of u.keys){const E=v[S],I=E._zod.run({value:_[S],issues:[]},y),O=E._zod.optin==="optional"&&E._zod.optout==="optional";I instanceof Promise?b.push(I.then(j=>O?za(j,h,S,_):or(j,h,S))):O?za(I,h,S,_):or(I,h,S)}}if(!d)return b.length?Promise.all(b).then(()=>h):h;const g=[],m=u.keySet,$=d._zod,f=$.def.type;for(const v of Object.keys(_)){if(m.has(v))continue;if(f==="never"){g.push(v);continue}const S=$.run({value:_[v],issues:[]},y);S instanceof Promise?b.push(S.then(E=>or(E,h,v))):or(S,h,v)}return g.length&&h.issues.push({code:"unrecognized_keys",keys:g,input:_,inst:e}),b.length?Promise.all(b).then(()=>h):h}});function Ta(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>pt(o,i,Xe())))}),t}const Jo=D("$ZodUnion",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),$e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>gi(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const s of t.options){const a=s._zod.run({value:r.value,issues:[]},i);if(a instanceof Promise)o.push(a),n=!0;else{if(a.issues.length===0)return a;o.push(a)}}return n?Promise.all(o).then(s=>Ta(s,r,e,i)):Ta(o,r,e,i)}}),Nf=D("$ZodDiscriminatedUnion",(e,t)=>{Jo.init(e,t);const r=e._zod.parse;$e(e._zod,"propValues",()=>{const n={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(const d of c)n[a].add(d)}}return n});const i=mi(()=>{const n=t.options,o=new Map;for(const s of n){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(n,o)=>{const s=n.value;if(!Zn(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),n)}}),Of=D("$ZodIntersection",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,d])=>Pa(r,c,d)):Pa(r,o,s)}});function vo(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mn(e)&&Mn(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const s=vo(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],s=vo(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Pa(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),fn(e))return e;const i=vo(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const $i=D("$ZodTuple",(e,t)=>{ue.init(e,t);const r=t.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const a=[];if(!t.rest){const d=s.length>r.length,u=s.length<i-1;if(d||u)return n.issues.push({input:s,inst:e,origin:"array",...d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(const d of r){if(c++,c>=s.length&&c>=i)continue;const u=d._zod.run({value:s[c],issues:[]},o);u instanceof Promise?a.push(u.then(h=>sr(h,n,c))):sr(u,n,c)}if(t.rest){const d=s.slice(r.length);for(const u of d){c++;const h=t.rest._zod.run({value:u,issues:[]},o);h instanceof Promise?a.push(h.then(y=>sr(y,n,c))):sr(h,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function sr(e,t,r){e.issues.length&&t.issues.push(...st(r,e.issues)),t.value[r]=e.value}const xf=D("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Mn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;r.value={};for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){const d=t.valueType._zod.run({value:n[c],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...st(c,u.issues)),r.value[c]=u.value})):(d.issues.length&&r.issues.push(...st(c,d.issues)),r.value[c]=d.value)}let a;for(const c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__")continue;const a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(d=>pt(d,i,Xe())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...st(s,d.issues)),r.value[a.value]=d.value})):(c.issues.length&&r.issues.push(...st(s,c.issues)),r.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),jf=D("$ZodMap",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[s,a]of n){const c=t.keyType._zod.run({value:s,issues:[]},i),d=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([u,h])=>{Da(u,h,r,s,n,e,i)})):Da(c,d,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Da(e,t,r,i,n,o,s){e.issues.length&&(ni.has(typeof i)?r.issues.push(...st(i,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:e.issues.map(a=>pt(a,s,Xe()))})),t.issues.length&&(ni.has(typeof i)?r.issues.push(...st(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>pt(a,s,Xe()))})),r.value.set(e.value,t.value)}const Af=D("$ZodSet",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const s of n){const a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(c=>Ua(c,r))):Ua(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ua(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const zf=D("$ZodEnum",(e,t)=>{ue.init(e,t);const r=jo(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>ni.has(typeof i)).map(i=>typeof i=="string"?Xt(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),Tf=D("$ZodLiteral",(e,t)=>{ue.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Xt(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),Pf=D("$ZodFile",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Go=D("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new gn;return r.value=n,r}}),Df=D("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,i):r.value===void 0?r:t.innerType._zod.run(r,i)}),Uf=D("$ZodNullable",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)}|null)$`):void 0}),$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Cf=D("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ca(o,t)):Ca(n,t)}});function Ca(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bf=D("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Rf=D("$ZodNonOptional",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ba(o,e)):Ba(n,e)}});function Ba(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ff=D("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Lf=D("$ZodCatch",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>pt(s,i,Xe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>pt(o,i,Xe()))},input:r.value}),r.issues=[]),r)}}),Zf=D("$ZodNaN",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Wo=D("$ZodPipe",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>t.in._zod.values),$e(e._zod,"optin",()=>t.in._zod.optin),$e(e._zod,"optout",()=>t.out._zod.optout),$e(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Ra(o,t,i)):Ra(n,t,i)}});function Ra(e,t,r){return fn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const Mf=D("$ZodReadonly",(e,t)=>{ue.init(e,t),$e(e._zod,"propValues",()=>t.innerType._zod.propValues),$e(e._zod,"values",()=>t.innerType._zod.values),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Fa):Fa(n)}});function Fa(e){return e.value=Object.freeze(e.value),e}const qf=D("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);const r=[];for(const i of t.parts)if(i instanceof ue){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||xc.has(typeof i))r.push(Xt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Vf=D("$ZodPromise",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Kf=D("$ZodLazy",(e,t)=>{ue.init(e,t),$e(e._zod,"innerType",()=>t.getter()),$e(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),$e(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),$e(e._zod,"optin",()=>e._zod.innerType._zod.optin),$e(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Jf=D("$ZodCustom",(e,t)=>{Ue.init(e,t),ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>La(o,r,i,e));La(n,r,i,e)}});function La(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(yn(n))}}const dm=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${fe(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function hm(){return{localeError:dm()}}const pm=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${fe(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function mm(){return{localeError:pm()}}function Za(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const gm=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${fe(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function ym(){return{localeError:gm()}}const vm=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${fe(n.values[0])}`:`Opció invàlida: s'esperava una de ${W(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function $m(){return{localeError:vm()}}const bm=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${fe(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function _m(){return{localeError:bm()}}const wm=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${fe(n.values[0])}`:`Ungültige Option: erwartet eine von ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function km(){return{localeError:wm()}}const Sm=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Im=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Sm(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${fe(i.values[0])}`:`Invalid option: expected one of ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${W(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Gf(){return{localeError:Im()}}const Em=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Nm=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${Em(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${fe(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${W(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function Om(){return{localeError:Nm()}}const xm=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${fe(n.values[0])}`:`Opción inválida: se esperaba una de ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function jm(){return{localeError:xm()}}const Am=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${n.expected} می‌بود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: می‌بایست ${fe(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${W(n.values,"|")} می‌بود`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${W(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function zm(){return{localeError:Am()}}const Tm=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${fe(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Pm(){return{localeError:Tm()}}const Dm=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${fe(n.values[0])} attendu`:`Option invalide : une valeur parmi ${W(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${W(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Um(){return{localeError:Dm()}}const Cm=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${fe(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${W(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Bm(){return{localeError:Cm()}}const Rm=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${fe(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${s.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${W(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function Fm(){return{localeError:Rm()}}const Lm=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${fe(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function Zm(){return{localeError:Lm()}}const Mm=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${fe(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function qm(){return{localeError:Mm()}}const Vm=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${fe(n.values[0])}`:`Opzione non valida: atteso uno tra ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${W(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Km(){return{localeError:Vm()}}const Jm=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${fe(n.values[0])}が期待されました`:`無効な選択: ${W(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",s=t(n.origin);return s?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",s=t(n.origin);return s?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${W(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Gm(){return{localeError:Jm()}}const Wm=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${fe(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Hm(){return{localeError:Wm()}}const Xm=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${fe(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${W(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{const o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Ym(){return{localeError:Xm()}}const Qm=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${fe(n.values[0])}`:`Грешана опција: се очекува една ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function eg(){return{localeError:Qm()}}const tg=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${fe(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function ng(){return{localeError:tg()}}const rg=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${fe(n.values[0])}`:`Ongeldige optie: verwacht één van ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function ig(){return{localeError:rg()}}const og=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${fe(n.values[0])}`:`Ugyldig valg: forventet en av ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function sg(){return{localeError:og()}}const ag=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${fe(n.values[0])}`:`Fâsit tercih: mûteberler ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ug(){return{localeError:ag()}}const cg=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${fe(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${W(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${W(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function lg(){return{localeError:cg()}}const fg=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${fe(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function dg(){return{localeError:fg()}}const hg=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${fe(n.values[0])}`:`Opção inválida: esperada uma das ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function pg(){return{localeError:hg()}}function Ma(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const mg=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${fe(n.values[0])}`:`Неверный вариант: ожидалось одно из ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function gg(){return{localeError:mg()}}const yg=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${fe(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function vg(){return{localeError:yg()}}const $g=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${fe(n.values[0])}`:`Ogiltigt val: förväntade en av ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function bg(){return{localeError:$g()}}const _g=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${fe(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function wg(){return{localeError:_g()}}const kg=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${fe(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(n.origin);return s?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",s=t(n.origin);return s?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Sg(){return{localeError:kg()}}const Ig=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Eg=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${Ig(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${fe(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${W(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Ng(){return{localeError:Eg()}}const Og=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${fe(n.values[0])}`:`Неправильна опція: очікується одне з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Занадто мале: очікується, що ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function xg(){return{localeError:Og()}}const jg=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${fe(n.values[0])} متوقع تھا`:`غلط آپشن: ${W(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Ag(){return{localeError:jg()}}const zg=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${fe(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function Tg(){return{localeError:zg()}}const Pg=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${fe(n.values[0])}`:`无效选项:期望以下之一 ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Dg(){return{localeError:Pg()}}const Ug=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${fe(n.values[0])}`:`無效的選項:預期為以下其中之一 ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${s.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${W(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Cg(){return{localeError:Ug()}}var Wf=Object.freeze({__proto__:null,ar:hm,az:mm,be:ym,ca:$m,cs:_m,de:km,en:Gf,eo:Om,es:jm,fa:zm,fi:Pm,fr:Um,frCA:Bm,he:Fm,hu:Zm,id:qm,it:Km,ja:Gm,kh:Hm,ko:Ym,mk:eg,ms:ng,nl:ig,no:sg,ota:ug,pl:dg,ps:lg,pt:pg,ru:gg,sl:vg,sv:bg,ta:wg,th:Sg,tr:Ng,ua:xg,ur:Ag,vi:Tg,zhCN:Dg,zhTW:Cg});const Hf=Symbol("ZodOutput"),Xf=Symbol("ZodInput");class Ho{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function Xo(){return new Ho}const qt=Xo();function Yf(e,t){return new e({type:"string",...V(t)})}function Qf(e,t){return new e({type:"string",coerce:!0,...V(t)})}function Yo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function Qo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function rs(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function is(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function os(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function ss(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function as(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function us(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function cs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function ls(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function fs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function ds(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function hs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function ps(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function ms(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function gs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function ys(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function vs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}const ed={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function td(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function nd(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function rd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function id(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function od(e,t){return new e({type:"number",checks:[],...V(t)})}function sd(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function ad(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function ud(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function ld(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...V(t)})}function fd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...V(t)})}function dd(e,t){return new e({type:"boolean",...V(t)})}function hd(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function pd(e,t){return new e({type:"bigint",...V(t)})}function md(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function gd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function yd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function vd(e,t){return new e({type:"symbol",...V(t)})}function $d(e,t){return new e({type:"undefined",...V(t)})}function bd(e,t){return new e({type:"null",...V(t)})}function _d(e){return new e({type:"any"})}function oi(e){return new e({type:"unknown"})}function wd(e,t){return new e({type:"never",...V(t)})}function kd(e,t){return new e({type:"void",...V(t)})}function Sd(e,t){return new e({type:"date",...V(t)})}function Id(e,t){return new e({type:"date",coerce:!0,...V(t)})}function Ed(e,t){return new e({type:"nan",...V(t)})}function Jt(e,t){return new Fo({check:"less_than",...V(t),value:e,inclusive:!1})}function ht(e,t){return new Fo({check:"less_than",...V(t),value:e,inclusive:!0})}function Gt(e,t){return new Lo({check:"greater_than",...V(t),value:e,inclusive:!1})}function nt(e,t){return new Lo({check:"greater_than",...V(t),value:e,inclusive:!0})}function Nd(e){return Gt(0,e)}function Od(e){return Jt(0,e)}function xd(e){return ht(0,e)}function jd(e){return nt(0,e)}function qn(e,t){return new Sl({check:"multiple_of",...V(t),value:e})}function bi(e,t){return new Nl({check:"max_size",...V(t),maximum:e})}function Vn(e,t){return new Ol({check:"min_size",...V(t),minimum:e})}function $s(e,t){return new xl({check:"size_equals",...V(t),size:e})}function _i(e,t){return new jl({check:"max_length",...V(t),maximum:e})}function $n(e,t){return new Al({check:"min_length",...V(t),minimum:e})}function wi(e,t){return new zl({check:"length_equals",...V(t),length:e})}function bs(e,t){return new Tl({check:"string_format",format:"regex",...V(t),pattern:e})}function _s(e){return new Pl({check:"string_format",format:"lowercase",...V(e)})}function ws(e){return new Dl({check:"string_format",format:"uppercase",...V(e)})}function ks(e,t){return new Ul({check:"string_format",format:"includes",...V(t),includes:e})}function Ss(e,t){return new Cl({check:"string_format",format:"starts_with",...V(t),prefix:e})}function Is(e,t){return new Bl({check:"string_format",format:"ends_with",...V(t),suffix:e})}function Ad(e,t,r){return new Rl({check:"property",property:e,schema:t,...V(r)})}function Es(e,t){return new Fl({check:"mime_type",mime:e,...V(t)})}function Yt(e){return new Ll({check:"overwrite",tx:e})}function Ns(e){return Yt(t=>t.normalize(e))}function Os(){return Yt(e=>e.trim())}function xs(){return Yt(e=>e.toLowerCase())}function js(){return Yt(e=>e.toUpperCase())}function As(e,t,r){return new e({type:"array",element:t,...V(r)})}function Bg(e,t,r){return new e({type:"union",options:t,...V(r)})}function Rg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...V(i)})}function Fg(e,t,r){return new e({type:"intersection",left:t,right:r})}function zd(e,t,r,i){const n=r instanceof ue,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...V(o)})}function Lg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...V(i)})}function Zg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...V(i)})}function Mg(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function qg(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...V(r)})}function Vg(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function Kg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function Td(e,t){return new e({type:"file",...V(t)})}function Jg(e,t){return new e({type:"transform",transform:t})}function Gg(e,t){return new e({type:"optional",innerType:t})}function Wg(e,t){return new e({type:"nullable",innerType:t})}function Hg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function Xg(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function Yg(e,t){return new e({type:"success",innerType:t})}function Qg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ey(e,t,r){return new e({type:"pipe",in:t,out:r})}function ty(e,t){return new e({type:"readonly",innerType:t})}function ny(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function ry(e,t){return new e({type:"lazy",getter:t})}function iy(e,t){return new e({type:"promise",innerType:t})}function Pd(e,t,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Dd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function Ud(e,t){const r=V(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));const o=new Set(i),s=new Set(n),a=e.Pipe??Wo,c=e.Boolean??qo,d=e.String??Yn,u=e.Transform??Go,h=new u({type:"transform",transform:(b,g)=>{let m=b;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:s.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:g.value,inst:h}),{})},error:r.error}),y=new a({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new a({type:"pipe",in:y,out:new c({type:"boolean",error:r.error}),error:r.error})}function Cd(e,t,r,i={}){const n=V(i),o={...V(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}class Bd{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?go(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=t(...n);return this._def.output?go(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await yo(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await t(...n);return this._def.output?yo(this._def.output,o,void 0,{callee:r}):o};return r}input(...t){const r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new $i({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){const r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}}function Rd(e){return new Bd({type:"function",input:Array.isArray(e?.input)?zd($i,e?.input):e?.input??As(Ko,oi(ri)),output:e?.output??oi(ri)})}class $o{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??qt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var i;const n=t._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);const c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...r,schemaPath:[...r.schemaPath,t],path:r.path},y=t._zod.parent;if(y)a.ref=y,this.process(y,h),this.seen.get(y).isParent=!0;else{const _=a.schema;switch(n.type){case"string":{const b=_;b.type="string";const{minimum:g,maximum:m,format:$,patterns:f,contentEncoding:v}=t._zod.bag;if(typeof g=="number"&&(b.minLength=g),typeof m=="number"&&(b.maxLength=m),$&&(b.format=o[$]??$,b.format===""&&delete b.format),v&&(b.contentEncoding=v),f&&f.size>0){const S=[...f];S.length===1?b.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(E=>({...this.target==="draft-7"?{type:"string"}:{},pattern:E.source}))])}break}case"number":{const b=_,{minimum:g,maximum:m,format:$,multipleOf:f,exclusiveMaximum:v,exclusiveMinimum:S}=t._zod.bag;typeof $=="string"&&$.includes("int")?b.type="integer":b.type="number",typeof S=="number"&&(b.exclusiveMinimum=S),typeof g=="number"&&(b.minimum=g,typeof S=="number"&&(S>=g?delete b.minimum:delete b.exclusiveMinimum)),typeof v=="number"&&(b.exclusiveMaximum=v),typeof m=="number"&&(b.maximum=m,typeof v=="number"&&(v<=m?delete b.maximum:delete b.exclusiveMaximum)),typeof f=="number"&&(b.multipleOf=f);break}case"boolean":{const b=_;b.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{_.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{_.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const b=_,{minimum:g,maximum:m}=t._zod.bag;typeof g=="number"&&(b.minItems=g),typeof m=="number"&&(b.maxItems=m),b.type="array",b.items=this.process(n.element,{...h,path:[...h.path,"items"]});break}case"object":{const b=_;b.type="object",b.properties={};const g=n.shape;for(const f in g)b.properties[f]=this.process(g[f],{...h,path:[...h.path,"properties",f]});const m=new Set(Object.keys(g)),$=new Set([...m].filter(f=>{const v=n.shape[f]._zod;return this.io==="input"?v.optin===void 0:v.optout===void 0}));$.size>0&&(b.required=Array.from($)),n.catchall?._zod.def.type==="never"?b.additionalProperties=!1:n.catchall?n.catchall&&(b.additionalProperties=this.process(n.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(b.additionalProperties=!1);break}case"union":{const b=_;b.anyOf=n.options.map((g,m)=>this.process(g,{...h,path:[...h.path,"anyOf",m]}));break}case"intersection":{const b=_,g=this.process(n.left,{...h,path:[...h.path,"allOf",0]}),m=this.process(n.right,{...h,path:[...h.path,"allOf",1]}),$=v=>"allOf"in v&&Object.keys(v).length===1,f=[...$(g)?g.allOf:[g],...$(m)?m.allOf:[m]];b.allOf=f;break}case"tuple":{const b=_;b.type="array";const g=n.items.map((f,v)=>this.process(f,{...h,path:[...h.path,"prefixItems",v]}));if(this.target==="draft-2020-12"?b.prefixItems=g:b.items=g,n.rest){const f=this.process(n.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?b.items=f:b.additionalItems=f}n.rest&&(b.items=this.process(n.rest,{...h,path:[...h.path,"items"]}));const{minimum:m,maximum:$}=t._zod.bag;typeof m=="number"&&(b.minItems=m),typeof $=="number"&&(b.maxItems=$);break}case"record":{const b=_;b.type="object",b.propertyNames=this.process(n.keyType,{...h,path:[...h.path,"propertyNames"]}),b.additionalProperties=this.process(n.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const b=_,g=jo(n.entries);g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),b.enum=g;break}case"literal":{const b=_,g=[];for(const m of n.values)if(m===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(m))}else g.push(m);if(g.length!==0)if(g.length===1){const m=g[0];b.type=m===null?"null":typeof m,b.const=m}else g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),g.every(m=>typeof m=="boolean")&&(b.type="string"),g.every(m=>m===null)&&(b.type="null"),b.enum=g;break}case"file":{const b=_,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:m,maximum:$,mime:f}=t._zod.bag;m!==void 0&&(g.minLength=m),$!==void 0&&(g.maxLength=$),f?f.length===1?(g.contentMediaType=f[0],Object.assign(b,g)):b.anyOf=f.map(v=>({...g,contentMediaType:v})):Object.assign(b,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const b=this.process(n.innerType,h);_.anyOf=[b,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"success":{const b=_;b.type="boolean";break}case"default":{this.process(n.innerType,h),a.ref=n.innerType,_.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,h),a.ref=n.innerType,this.io==="input"&&(_._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,h),a.ref=n.innerType;let b;try{b=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}_.default=b;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const b=_,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=g.source;break}case"pipe":{const b=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(b,h),a.ref=b;break}case"readonly":{this.process(n.innerType,h),a.ref=n.innerType,_.readOnly=!0;break}case"promise":{this.process(n.innerType,h),a.ref=n.innerType;break}case"optional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"lazy":{const b=t._zod.innerType;this.process(b,h),a.ref=b;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const d=this.metadataRegistry.get(t);return d&&Object.assign(a.schema,d),this.io==="input"&&Be(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){const i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=u=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const g=i.external.registry.get(u[0])?.id,m=i.external.uri??(f=>f);if(g)return{ref:m(g)};const $=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=$,{defId:$,ref:`${m("__shared")}#/${h}/${$}`}}if(u[1]===n)return{ref:"#"};const _=`#/${h}/`,b=u[1].schema.id??`__schema${this.counter++}`;return{defId:b,ref:_+b}},s=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:y,defId:_}=o(u);h.def={...h.schema},_&&(h.defId=_);const b=h.schema;for(const g in b)delete b[g];b.$ref=y};if(i.cycles==="throw")for(const u of this.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
27
+ })));`),y.write(`newResult[${an(f)}] = ${v}.value`)}y.write("payload.value = newResult;"),y.write("return payload;");const $=y.compile();return(f,v)=>$(h,f,v)};let n;const o=Zn,s=!ti.jitless,c=s&&Oc.value,d=t.catchall;let u;e._zod.parse=(h,y)=>{u??(u=r.value);const _=h.value;if(!o(_))return h.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),h;const b=[];if(s&&c&&y?.async===!1&&y.jitless!==!0)n||(n=i(t.shape)),h=n(h,y);else{h.value={};const v=u.shape;for(const S of u.keys){const E=v[S],I=E._zod.run({value:_[S],issues:[]},y),O=E._zod.optin==="optional"&&E._zod.optout==="optional";I instanceof Promise?b.push(I.then(j=>O?za(j,h,S,_):or(j,h,S))):O?za(I,h,S,_):or(I,h,S)}}if(!d)return b.length?Promise.all(b).then(()=>h):h;const g=[],m=u.keySet,$=d._zod,f=$.def.type;for(const v of Object.keys(_)){if(m.has(v))continue;if(f==="never"){g.push(v);continue}const S=$.run({value:_[v],issues:[]},y);S instanceof Promise?b.push(S.then(E=>or(E,h,v))):or(S,h,v)}return g.length&&h.issues.push({code:"unrecognized_keys",keys:g,input:_,inst:e}),b.length?Promise.all(b).then(()=>h):h}});function Ta(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>pt(o,i,Xe())))}),t}const Jo=D("$ZodUnion",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),$e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>gi(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const s of t.options){const a=s._zod.run({value:r.value,issues:[]},i);if(a instanceof Promise)o.push(a),n=!0;else{if(a.issues.length===0)return a;o.push(a)}}return n?Promise.all(o).then(s=>Ta(s,r,e,i)):Ta(o,r,e,i)}}),Nf=D("$ZodDiscriminatedUnion",(e,t)=>{Jo.init(e,t);const r=e._zod.parse;$e(e._zod,"propValues",()=>{const n={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(const d of c)n[a].add(d)}}return n});const i=mi(()=>{const n=t.options,o=new Map;for(const s of n){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(n,o)=>{const s=n.value;if(!Zn(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),n)}}),Of=D("$ZodIntersection",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,d])=>Pa(r,c,d)):Pa(r,o,s)}});function vo(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mn(e)&&Mn(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const s=vo(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],s=vo(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Pa(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),fn(e))return e;const i=vo(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const $i=D("$ZodTuple",(e,t)=>{ue.init(e,t);const r=t.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const a=[];if(!t.rest){const d=s.length>r.length,u=s.length<i-1;if(d||u)return n.issues.push({input:s,inst:e,origin:"array",...d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(const d of r){if(c++,c>=s.length&&c>=i)continue;const u=d._zod.run({value:s[c],issues:[]},o);u instanceof Promise?a.push(u.then(h=>sr(h,n,c))):sr(u,n,c)}if(t.rest){const d=s.slice(r.length);for(const u of d){c++;const h=t.rest._zod.run({value:u,issues:[]},o);h instanceof Promise?a.push(h.then(y=>sr(y,n,c))):sr(h,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function sr(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const xf=D("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Mn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;r.value={};for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){const d=t.valueType._zod.run({value:n[c],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...ot(c,u.issues)),r.value[c]=u.value})):(d.issues.length&&r.issues.push(...ot(c,d.issues)),r.value[c]=d.value)}let a;for(const c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__")continue;const a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(d=>pt(d,i,Xe())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...ot(s,d.issues)),r.value[a.value]=d.value})):(c.issues.length&&r.issues.push(...ot(s,c.issues)),r.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),jf=D("$ZodMap",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[s,a]of n){const c=t.keyType._zod.run({value:s,issues:[]},i),d=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([u,h])=>{Da(u,h,r,s,n,e,i)})):Da(c,d,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Da(e,t,r,i,n,o,s){e.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:e.issues.map(a=>pt(a,s,Xe()))})),t.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>pt(a,s,Xe()))})),r.value.set(e.value,t.value)}const Af=D("$ZodSet",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const s of n){const a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(c=>Ua(c,r))):Ua(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ua(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const zf=D("$ZodEnum",(e,t)=>{ue.init(e,t);const r=jo(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>ni.has(typeof i)).map(i=>typeof i=="string"?Xt(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),Tf=D("$ZodLiteral",(e,t)=>{ue.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Xt(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),Pf=D("$ZodFile",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Go=D("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new gn;return r.value=n,r}}),Df=D("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,i):r.value===void 0?r:t.innerType._zod.run(r,i)}),Uf=D("$ZodNullable",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)}|null)$`):void 0}),$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Cf=D("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ca(o,t)):Ca(n,t)}});function Ca(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bf=D("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Rf=D("$ZodNonOptional",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ba(o,e)):Ba(n,e)}});function Ba(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ff=D("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Lf=D("$ZodCatch",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>pt(s,i,Xe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>pt(o,i,Xe()))},input:r.value}),r.issues=[]),r)}}),Zf=D("$ZodNaN",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Wo=D("$ZodPipe",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>t.in._zod.values),$e(e._zod,"optin",()=>t.in._zod.optin),$e(e._zod,"optout",()=>t.out._zod.optout),$e(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Ra(o,t,i)):Ra(n,t,i)}});function Ra(e,t,r){return fn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const Mf=D("$ZodReadonly",(e,t)=>{ue.init(e,t),$e(e._zod,"propValues",()=>t.innerType._zod.propValues),$e(e._zod,"values",()=>t.innerType._zod.values),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Fa):Fa(n)}});function Fa(e){return e.value=Object.freeze(e.value),e}const qf=D("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);const r=[];for(const i of t.parts)if(i instanceof ue){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||xc.has(typeof i))r.push(Xt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Vf=D("$ZodPromise",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Kf=D("$ZodLazy",(e,t)=>{ue.init(e,t),$e(e._zod,"innerType",()=>t.getter()),$e(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),$e(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),$e(e._zod,"optin",()=>e._zod.innerType._zod.optin),$e(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Jf=D("$ZodCustom",(e,t)=>{Ue.init(e,t),ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>La(o,r,i,e));La(n,r,i,e)}});function La(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(yn(n))}}const hm=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${fe(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function pm(){return{localeError:hm()}}const mm=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${fe(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function gm(){return{localeError:mm()}}function Za(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const ym=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${fe(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function vm(){return{localeError:ym()}}const $m=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${fe(n.values[0])}`:`Opció invàlida: s'esperava una de ${W(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function bm(){return{localeError:$m()}}const _m=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${fe(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function wm(){return{localeError:_m()}}const km=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${fe(n.values[0])}`:`Ungültige Option: erwartet eine von ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function Sm(){return{localeError:km()}}const Im=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Em=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Im(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${fe(i.values[0])}`:`Invalid option: expected one of ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${W(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Gf(){return{localeError:Em()}}const Nm=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Om=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${Nm(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${fe(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${W(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function xm(){return{localeError:Om()}}const jm=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${fe(n.values[0])}`:`Opción inválida: se esperaba una de ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function Am(){return{localeError:jm()}}const zm=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${n.expected} می‌بود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: می‌بایست ${fe(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${W(n.values,"|")} می‌بود`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${W(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Tm(){return{localeError:zm()}}const Pm=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${fe(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Dm(){return{localeError:Pm()}}const Um=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${fe(n.values[0])} attendu`:`Option invalide : une valeur parmi ${W(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${W(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Cm(){return{localeError:Um()}}const Bm=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${fe(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${W(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Rm(){return{localeError:Bm()}}const Fm=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${fe(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${s.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${W(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function Lm(){return{localeError:Fm()}}const Zm=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${fe(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function Mm(){return{localeError:Zm()}}const qm=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${fe(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Vm(){return{localeError:qm()}}const Km=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${fe(n.values[0])}`:`Opzione non valida: atteso uno tra ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${W(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Jm(){return{localeError:Km()}}const Gm=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${fe(n.values[0])}が期待されました`:`無効な選択: ${W(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",s=t(n.origin);return s?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",s=t(n.origin);return s?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${W(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Wm(){return{localeError:Gm()}}const Hm=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${fe(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Xm(){return{localeError:Hm()}}const Ym=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${fe(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${W(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{const o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Qm(){return{localeError:Ym()}}const eg=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${fe(n.values[0])}`:`Грешана опција: се очекува една ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function tg(){return{localeError:eg()}}const ng=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${fe(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function rg(){return{localeError:ng()}}const ig=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${fe(n.values[0])}`:`Ongeldige optie: verwacht één van ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function og(){return{localeError:ig()}}const sg=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${fe(n.values[0])}`:`Ugyldig valg: forventet en av ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function ag(){return{localeError:sg()}}const ug=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${fe(n.values[0])}`:`Fâsit tercih: mûteberler ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function cg(){return{localeError:ug()}}const lg=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${fe(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${W(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${W(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function fg(){return{localeError:lg()}}const dg=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${fe(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function hg(){return{localeError:dg()}}const pg=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${fe(n.values[0])}`:`Opção inválida: esperada uma das ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function mg(){return{localeError:pg()}}function Ma(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const gg=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${fe(n.values[0])}`:`Неверный вариант: ожидалось одно из ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function yg(){return{localeError:gg()}}const vg=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${fe(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function $g(){return{localeError:vg()}}const bg=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${fe(n.values[0])}`:`Ogiltigt val: förväntade en av ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function _g(){return{localeError:bg()}}const wg=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${fe(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function kg(){return{localeError:wg()}}const Sg=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${fe(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(n.origin);return s?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",s=t(n.origin);return s?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Ig(){return{localeError:Sg()}}const Eg=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Ng=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${Eg(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${fe(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${W(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Og(){return{localeError:Ng()}}const xg=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${fe(n.values[0])}`:`Неправильна опція: очікується одне з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Занадто мале: очікується, що ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function jg(){return{localeError:xg()}}const Ag=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${fe(n.values[0])} متوقع تھا`:`غلط آپشن: ${W(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function zg(){return{localeError:Ag()}}const Tg=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${fe(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function Pg(){return{localeError:Tg()}}const Dg=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${fe(n.values[0])}`:`无效选项:期望以下之一 ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Ug(){return{localeError:Dg()}}const Cg=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${fe(n.values[0])}`:`無效的選項:預期為以下其中之一 ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${s.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${W(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Bg(){return{localeError:Cg()}}var Wf=Object.freeze({__proto__:null,ar:pm,az:gm,be:vm,ca:bm,cs:wm,de:Sm,en:Gf,eo:xm,es:Am,fa:Tm,fi:Dm,fr:Cm,frCA:Rm,he:Lm,hu:Mm,id:Vm,it:Jm,ja:Wm,kh:Xm,ko:Qm,mk:tg,ms:rg,nl:og,no:ag,ota:cg,pl:hg,ps:fg,pt:mg,ru:yg,sl:$g,sv:_g,ta:kg,th:Ig,tr:Og,ua:jg,ur:zg,vi:Pg,zhCN:Ug,zhTW:Bg});const Hf=Symbol("ZodOutput"),Xf=Symbol("ZodInput");class Ho{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function Xo(){return new Ho}const qt=Xo();function Yf(e,t){return new e({type:"string",...V(t)})}function Qf(e,t){return new e({type:"string",coerce:!0,...V(t)})}function Yo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function Qo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function rs(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function is(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function os(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function ss(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function as(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function us(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function cs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function ls(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function fs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function ds(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function hs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function ps(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function ms(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function gs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function ys(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function vs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}const ed={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function td(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function nd(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function rd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function id(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function od(e,t){return new e({type:"number",checks:[],...V(t)})}function sd(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function ad(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function ud(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function ld(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...V(t)})}function fd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...V(t)})}function dd(e,t){return new e({type:"boolean",...V(t)})}function hd(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function pd(e,t){return new e({type:"bigint",...V(t)})}function md(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function gd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function yd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function vd(e,t){return new e({type:"symbol",...V(t)})}function $d(e,t){return new e({type:"undefined",...V(t)})}function bd(e,t){return new e({type:"null",...V(t)})}function _d(e){return new e({type:"any"})}function oi(e){return new e({type:"unknown"})}function wd(e,t){return new e({type:"never",...V(t)})}function kd(e,t){return new e({type:"void",...V(t)})}function Sd(e,t){return new e({type:"date",...V(t)})}function Id(e,t){return new e({type:"date",coerce:!0,...V(t)})}function Ed(e,t){return new e({type:"nan",...V(t)})}function Jt(e,t){return new Fo({check:"less_than",...V(t),value:e,inclusive:!1})}function ht(e,t){return new Fo({check:"less_than",...V(t),value:e,inclusive:!0})}function Gt(e,t){return new Lo({check:"greater_than",...V(t),value:e,inclusive:!1})}function nt(e,t){return new Lo({check:"greater_than",...V(t),value:e,inclusive:!0})}function Nd(e){return Gt(0,e)}function Od(e){return Jt(0,e)}function xd(e){return ht(0,e)}function jd(e){return nt(0,e)}function qn(e,t){return new Sl({check:"multiple_of",...V(t),value:e})}function bi(e,t){return new Nl({check:"max_size",...V(t),maximum:e})}function Vn(e,t){return new Ol({check:"min_size",...V(t),minimum:e})}function $s(e,t){return new xl({check:"size_equals",...V(t),size:e})}function _i(e,t){return new jl({check:"max_length",...V(t),maximum:e})}function $n(e,t){return new Al({check:"min_length",...V(t),minimum:e})}function wi(e,t){return new zl({check:"length_equals",...V(t),length:e})}function bs(e,t){return new Tl({check:"string_format",format:"regex",...V(t),pattern:e})}function _s(e){return new Pl({check:"string_format",format:"lowercase",...V(e)})}function ws(e){return new Dl({check:"string_format",format:"uppercase",...V(e)})}function ks(e,t){return new Ul({check:"string_format",format:"includes",...V(t),includes:e})}function Ss(e,t){return new Cl({check:"string_format",format:"starts_with",...V(t),prefix:e})}function Is(e,t){return new Bl({check:"string_format",format:"ends_with",...V(t),suffix:e})}function Ad(e,t,r){return new Rl({check:"property",property:e,schema:t,...V(r)})}function Es(e,t){return new Fl({check:"mime_type",mime:e,...V(t)})}function Yt(e){return new Ll({check:"overwrite",tx:e})}function Ns(e){return Yt(t=>t.normalize(e))}function Os(){return Yt(e=>e.trim())}function xs(){return Yt(e=>e.toLowerCase())}function js(){return Yt(e=>e.toUpperCase())}function As(e,t,r){return new e({type:"array",element:t,...V(r)})}function Rg(e,t,r){return new e({type:"union",options:t,...V(r)})}function Fg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...V(i)})}function Lg(e,t,r){return new e({type:"intersection",left:t,right:r})}function zd(e,t,r,i){const n=r instanceof ue,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...V(o)})}function Zg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...V(i)})}function Mg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...V(i)})}function qg(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function Vg(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...V(r)})}function Kg(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function Jg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function Td(e,t){return new e({type:"file",...V(t)})}function Gg(e,t){return new e({type:"transform",transform:t})}function Wg(e,t){return new e({type:"optional",innerType:t})}function Hg(e,t){return new e({type:"nullable",innerType:t})}function Xg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function Yg(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function Qg(e,t){return new e({type:"success",innerType:t})}function ey(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ty(e,t,r){return new e({type:"pipe",in:t,out:r})}function ny(e,t){return new e({type:"readonly",innerType:t})}function ry(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function iy(e,t){return new e({type:"lazy",getter:t})}function oy(e,t){return new e({type:"promise",innerType:t})}function Pd(e,t,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Dd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function Ud(e,t){const r=V(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));const o=new Set(i),s=new Set(n),a=e.Pipe??Wo,c=e.Boolean??qo,d=e.String??Yn,u=e.Transform??Go,h=new u({type:"transform",transform:(b,g)=>{let m=b;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:s.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:g.value,inst:h}),{})},error:r.error}),y=new a({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new a({type:"pipe",in:y,out:new c({type:"boolean",error:r.error}),error:r.error})}function Cd(e,t,r,i={}){const n=V(i),o={...V(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}class Bd{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?go(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=t(...n);return this._def.output?go(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await yo(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await t(...n);return this._def.output?yo(this._def.output,o,void 0,{callee:r}):o};return r}input(...t){const r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new $i({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){const r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}}function Rd(e){return new Bd({type:"function",input:Array.isArray(e?.input)?zd($i,e?.input):e?.input??As(Ko,oi(ri)),output:e?.output??oi(ri)})}class $o{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??qt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var i;const n=t._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);const c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...r,schemaPath:[...r.schemaPath,t],path:r.path},y=t._zod.parent;if(y)a.ref=y,this.process(y,h),this.seen.get(y).isParent=!0;else{const _=a.schema;switch(n.type){case"string":{const b=_;b.type="string";const{minimum:g,maximum:m,format:$,patterns:f,contentEncoding:v}=t._zod.bag;if(typeof g=="number"&&(b.minLength=g),typeof m=="number"&&(b.maxLength=m),$&&(b.format=o[$]??$,b.format===""&&delete b.format),v&&(b.contentEncoding=v),f&&f.size>0){const S=[...f];S.length===1?b.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(E=>({...this.target==="draft-7"?{type:"string"}:{},pattern:E.source}))])}break}case"number":{const b=_,{minimum:g,maximum:m,format:$,multipleOf:f,exclusiveMaximum:v,exclusiveMinimum:S}=t._zod.bag;typeof $=="string"&&$.includes("int")?b.type="integer":b.type="number",typeof S=="number"&&(b.exclusiveMinimum=S),typeof g=="number"&&(b.minimum=g,typeof S=="number"&&(S>=g?delete b.minimum:delete b.exclusiveMinimum)),typeof v=="number"&&(b.exclusiveMaximum=v),typeof m=="number"&&(b.maximum=m,typeof v=="number"&&(v<=m?delete b.maximum:delete b.exclusiveMaximum)),typeof f=="number"&&(b.multipleOf=f);break}case"boolean":{const b=_;b.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{_.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{_.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const b=_,{minimum:g,maximum:m}=t._zod.bag;typeof g=="number"&&(b.minItems=g),typeof m=="number"&&(b.maxItems=m),b.type="array",b.items=this.process(n.element,{...h,path:[...h.path,"items"]});break}case"object":{const b=_;b.type="object",b.properties={};const g=n.shape;for(const f in g)b.properties[f]=this.process(g[f],{...h,path:[...h.path,"properties",f]});const m=new Set(Object.keys(g)),$=new Set([...m].filter(f=>{const v=n.shape[f]._zod;return this.io==="input"?v.optin===void 0:v.optout===void 0}));$.size>0&&(b.required=Array.from($)),n.catchall?._zod.def.type==="never"?b.additionalProperties=!1:n.catchall?n.catchall&&(b.additionalProperties=this.process(n.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(b.additionalProperties=!1);break}case"union":{const b=_;b.anyOf=n.options.map((g,m)=>this.process(g,{...h,path:[...h.path,"anyOf",m]}));break}case"intersection":{const b=_,g=this.process(n.left,{...h,path:[...h.path,"allOf",0]}),m=this.process(n.right,{...h,path:[...h.path,"allOf",1]}),$=v=>"allOf"in v&&Object.keys(v).length===1,f=[...$(g)?g.allOf:[g],...$(m)?m.allOf:[m]];b.allOf=f;break}case"tuple":{const b=_;b.type="array";const g=n.items.map((f,v)=>this.process(f,{...h,path:[...h.path,"prefixItems",v]}));if(this.target==="draft-2020-12"?b.prefixItems=g:b.items=g,n.rest){const f=this.process(n.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?b.items=f:b.additionalItems=f}n.rest&&(b.items=this.process(n.rest,{...h,path:[...h.path,"items"]}));const{minimum:m,maximum:$}=t._zod.bag;typeof m=="number"&&(b.minItems=m),typeof $=="number"&&(b.maxItems=$);break}case"record":{const b=_;b.type="object",b.propertyNames=this.process(n.keyType,{...h,path:[...h.path,"propertyNames"]}),b.additionalProperties=this.process(n.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const b=_,g=jo(n.entries);g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),b.enum=g;break}case"literal":{const b=_,g=[];for(const m of n.values)if(m===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(m))}else g.push(m);if(g.length!==0)if(g.length===1){const m=g[0];b.type=m===null?"null":typeof m,b.const=m}else g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),g.every(m=>typeof m=="boolean")&&(b.type="string"),g.every(m=>m===null)&&(b.type="null"),b.enum=g;break}case"file":{const b=_,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:m,maximum:$,mime:f}=t._zod.bag;m!==void 0&&(g.minLength=m),$!==void 0&&(g.maxLength=$),f?f.length===1?(g.contentMediaType=f[0],Object.assign(b,g)):b.anyOf=f.map(v=>({...g,contentMediaType:v})):Object.assign(b,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const b=this.process(n.innerType,h);_.anyOf=[b,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"success":{const b=_;b.type="boolean";break}case"default":{this.process(n.innerType,h),a.ref=n.innerType,_.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,h),a.ref=n.innerType,this.io==="input"&&(_._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,h),a.ref=n.innerType;let b;try{b=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}_.default=b;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const b=_,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=g.source;break}case"pipe":{const b=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(b,h),a.ref=b;break}case"readonly":{this.process(n.innerType,h),a.ref=n.innerType,_.readOnly=!0;break}case"promise":{this.process(n.innerType,h),a.ref=n.innerType;break}case"optional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"lazy":{const b=t._zod.innerType;this.process(b,h),a.ref=b;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const d=this.metadataRegistry.get(t);return d&&Object.assign(a.schema,d),this.io==="input"&&Be(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){const i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=u=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const g=i.external.registry.get(u[0])?.id,m=i.external.uri??(f=>f);if(g)return{ref:m(g)};const $=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=$,{defId:$,ref:`${m("__shared")}#/${h}/${$}`}}if(u[1]===n)return{ref:"#"};const _=`#/${h}/`,b=u[1].schema.id??`__schema${this.counter++}`;return{defId:b,ref:_+b}},s=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:y,defId:_}=o(u);h.def={...h.schema},_&&(h.defId=_);const b=h.schema;for(const g in b)delete b[g];b.$ref=y};if(i.cycles==="throw")for(const u of this.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
28
28
 
29
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const h=u[1];if(t===u[0]){s(u);continue}if(i.external){const _=i.external.registry.get(u[0])?.id;if(t!==u[0]&&_){s(u);continue}}if(this.metadataRegistry.get(u[0])?.id){s(u);continue}if(h.cycle){s(u);continue}if(h.count>1&&i.reused==="ref"){s(u);continue}}const a=(u,h)=>{const y=this.seen.get(u),_=y.def??y.schema,b={..._};if(y.ref===null)return;const g=y.ref;if(y.ref=null,g){a(g,h);const m=this.seen.get(g).schema;m.$ref&&h.target==="draft-7"?(_.allOf=_.allOf??[],_.allOf.push(m)):(Object.assign(_,m),Object.assign(_,b))}y.isParent||this.override({zodSchema:u,jsonSchema:_,path:y.path??[]})};for(const u of[...this.seen.entries()].reverse())a(u[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),i.external?.uri){const u=i.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(u)}Object.assign(c,n.def);const d=i.external?.defs??{};for(const u of this.seen.entries()){const h=u[1];h.def&&h.defId&&(d[h.defId]=h.def)}i.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function Fd(e,t){if(e instanceof Ho){const i=new $o(t),n={};for(const a of e._idmap.entries()){const[c,d]=a;i.process(d)}const o={},s={registry:e,uri:t?.uri,defs:n};for(const a of e._idmap.entries()){const[c,d]=a;o[c]=i.emit(d,{...t,external:s})}if(Object.keys(n).length>0){const a=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[a]:n}}return{schemas:o}}const r=new $o(t);return r.process(e),r.emit(e,t)}function Be(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Be(n.element,r);case"object":{for(const o in n.shape)if(Be(n.shape[o],r))return!0;return!1}case"union":{for(const o of n.options)if(Be(o,r))return!0;return!1}case"intersection":return Be(n.left,r)||Be(n.right,r);case"tuple":{for(const o of n.items)if(Be(o,r))return!0;return!!(n.rest&&Be(n.rest,r))}case"record":return Be(n.keyType,r)||Be(n.valueType,r);case"map":return Be(n.keyType,r)||Be(n.valueType,r);case"set":return Be(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Be(n.innerType,r);case"lazy":return Be(n.getter(),r);case"default":return Be(n.innerType,r);case"prefault":return Be(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Be(n.in,r)||Be(n.out,r);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${n.type}`)}var oy=Object.freeze({__proto__:null}),sy=Object.freeze({__proto__:null,$ZodAny:wf,$ZodArray:Ko,$ZodAsyncError:gn,$ZodBase64:lf,$ZodBase64URL:df,$ZodBigInt:Vo,$ZodBigIntFormat:vf,$ZodBoolean:qo,$ZodCIDRv4:uf,$ZodCIDRv6:cf,$ZodCUID:Hl,$ZodCUID2:Xl,$ZodCatch:Lf,$ZodCheck:Ue,$ZodCheckBigIntFormat:El,$ZodCheckEndsWith:Bl,$ZodCheckGreaterThan:Lo,$ZodCheckIncludes:Ul,$ZodCheckLengthEquals:zl,$ZodCheckLessThan:Fo,$ZodCheckLowerCase:Pl,$ZodCheckMaxLength:jl,$ZodCheckMaxSize:Nl,$ZodCheckMimeType:Fl,$ZodCheckMinLength:Al,$ZodCheckMinSize:Ol,$ZodCheckMultipleOf:Sl,$ZodCheckNumberFormat:Il,$ZodCheckOverwrite:Ll,$ZodCheckProperty:Rl,$ZodCheckRegex:Tl,$ZodCheckSizeEquals:xl,$ZodCheckStartsWith:Cl,$ZodCheckStringFormat:Xn,$ZodCheckUpperCase:Dl,$ZodCustom:Jf,$ZodCustomStringFormat:gf,$ZodDate:If,$ZodDefault:Cf,$ZodDiscriminatedUnion:Nf,$ZodE164:hf,$ZodEmail:Kl,$ZodEmoji:Gl,$ZodEnum:zf,$ZodError:zo,$ZodFile:Pf,$ZodFunction:Bd,$ZodGUID:ql,$ZodIPv4:sf,$ZodIPv6:af,$ZodISODate:nf,$ZodISODateTime:tf,$ZodISODuration:of,$ZodISOTime:rf,$ZodIntersection:Of,$ZodJWT:mf,$ZodKSUID:ef,$ZodLazy:Kf,$ZodLiteral:Tf,$ZodMap:jf,$ZodNaN:Zf,$ZodNanoID:Wl,$ZodNever:kf,$ZodNonOptional:Rf,$ZodNull:_f,$ZodNullable:Uf,$ZodNumber:Mo,$ZodNumberFormat:yf,$ZodObject:Ef,$ZodOptional:Df,$ZodPipe:Wo,$ZodPrefault:Bf,$ZodPromise:Vf,$ZodReadonly:Mf,$ZodRealError:Hn,$ZodRecord:xf,$ZodRegistry:Ho,$ZodSet:Af,$ZodString:Yn,$ZodStringFormat:Ne,$ZodSuccess:Ff,$ZodSymbol:$f,$ZodTemplateLiteral:qf,$ZodTransform:Go,$ZodTuple:$i,$ZodType:ue,$ZodULID:Yl,$ZodURL:Jl,$ZodUUID:Vl,$ZodUndefined:bf,$ZodUnion:Jo,$ZodUnknown:ri,$ZodVoid:Sf,$ZodXID:Ql,$brand:Ic,$constructor:D,$input:Xf,$output:Hf,Doc:Zl,JSONSchema:oy,JSONSchemaGenerator:$o,NEVER:Sc,TimePrecision:ed,_any:_d,_array:As,_base64:ms,_base64url:gs,_bigint:pd,_boolean:dd,_catch:Qg,_cidrv4:hs,_cidrv6:ps,_coercedBigint:md,_coercedBoolean:hd,_coercedDate:Id,_coercedNumber:sd,_coercedString:Qf,_cuid:ss,_cuid2:as,_custom:Pd,_date:Sd,_default:Hg,_discriminatedUnion:Rg,_e164:ys,_email:Yo,_emoji:is,_endsWith:Is,_enum:qg,_file:Td,_float32:ud,_float64:cd,_gt:Gt,_gte:nt,_guid:ii,_includes:ks,_int:ad,_int32:ld,_int64:gd,_intersection:Fg,_ipv4:fs,_ipv6:ds,_isoDate:nd,_isoDateTime:td,_isoDuration:id,_isoTime:rd,_jwt:vs,_ksuid:ls,_lazy:ry,_length:wi,_literal:Kg,_lowercase:_s,_lt:Jt,_lte:ht,_map:Zg,_max:ht,_maxLength:_i,_maxSize:bi,_mime:Es,_min:nt,_minLength:$n,_minSize:Vn,_multipleOf:qn,_nan:Ed,_nanoid:os,_nativeEnum:Vg,_negative:Od,_never:wd,_nonnegative:jd,_nonoptional:Xg,_nonpositive:xd,_normalize:Ns,_null:bd,_nullable:Wg,_number:od,_optional:Gg,_overwrite:Yt,_parse:Do,_parseAsync:Uo,_pipe:ey,_positive:Nd,_promise:iy,_property:Ad,_readonly:ty,_record:Lg,_refine:Dd,_regex:bs,_safeParse:Co,_safeParseAsync:Bo,_set:Mg,_size:$s,_startsWith:Ss,_string:Yf,_stringFormat:Cd,_stringbool:Ud,_success:Yg,_symbol:vd,_templateLiteral:ny,_toLowerCase:xs,_toUpperCase:js,_transform:Jg,_trim:Os,_tuple:zd,_uint32:fd,_uint64:yd,_ulid:us,_undefined:$d,_union:Bg,_unknown:oi,_uppercase:ws,_url:rs,_uuid:Qo,_uuidv4:es,_uuidv6:ts,_uuidv7:ns,_void:kd,_xid:cs,clone:$t,config:Xe,flattenError:To,formatError:Po,function:Rd,globalConfig:ti,globalRegistry:qt,isValidBase64:Zo,isValidBase64URL:ff,isValidJWT:pf,locales:Wf,parse:go,parseAsync:yo,prettifyError:Zc,regexes:wl,registry:Xo,safeParse:Mc,safeParseAsync:qc,toDotPath:Lc,toJSONSchema:Fd,treeifyError:Fc,util:tm,version:Ml});const zs=D("ZodISODateTime",(e,t)=>{tf.init(e,t),Oe.init(e,t)});function Ld(e){return td(zs,e)}const Ts=D("ZodISODate",(e,t)=>{nf.init(e,t),Oe.init(e,t)});function Zd(e){return nd(Ts,e)}const Ps=D("ZodISOTime",(e,t)=>{rf.init(e,t),Oe.init(e,t)});function Md(e){return rd(Ps,e)}const Ds=D("ZodISODuration",(e,t)=>{of.init(e,t),Oe.init(e,t)});function qd(e){return id(Ds,e)}var ay=Object.freeze({__proto__:null,ZodISODate:Ts,ZodISODateTime:zs,ZodISODuration:Ds,ZodISOTime:Ps,date:Zd,datetime:Ld,duration:qd,time:Md});const Vd=(e,t)=>{zo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Po(e,r)},flatten:{value:r=>To(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},uy=D("ZodError",Vd),Qn=D("ZodError",Vd,{Parent:Error}),Kd=Do(Qn),Jd=Uo(Qn),Gd=Co(Qn),Wd=Bo(Qn),de=D("ZodType",(e,t)=>(ue.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>$t(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>Kd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Gd(e,r,i),e.parseAsync=async(r,i)=>Jd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wd(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(zh(r,i)),e.superRefine=r=>e.check(Th(r)),e.overwrite=r=>e.check(Yt(r)),e.optional=()=>ai(e),e.nullable=()=>ui(e),e.nullish=()=>ai(ui(e)),e.nonoptional=r=>bh(e,r),e.array=()=>qe(e),e.or=r=>xt([e,r]),e.and=r=>ch(e,r),e.transform=r=>ci(e,oa(r)),e.default=r=>yh(e,r),e.prefault=r=>$h(e,r),e.catch=r=>kh(e,r),e.pipe=r=>ci(e,r),e.readonly=()=>Eh(e),e.describe=r=>{const i=e.clone();return qt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return qt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qt.get(e);const i=e.clone();return qt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Us=D("_ZodString",(e,t)=>{Yn.init(e,t),de.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(bs(...i)),e.includes=(...i)=>e.check(ks(...i)),e.startsWith=(...i)=>e.check(Ss(...i)),e.endsWith=(...i)=>e.check(Is(...i)),e.min=(...i)=>e.check($n(...i)),e.max=(...i)=>e.check(_i(...i)),e.length=(...i)=>e.check(wi(...i)),e.nonempty=(...i)=>e.check($n(1,...i)),e.lowercase=i=>e.check(_s(i)),e.uppercase=i=>e.check(ws(i)),e.trim=()=>e.check(Os()),e.normalize=(...i)=>e.check(Ns(...i)),e.toLowerCase=()=>e.check(xs()),e.toUpperCase=()=>e.check(js())}),ki=D("ZodString",(e,t)=>{Yn.init(e,t),Us.init(e,t),e.email=r=>e.check(Yo(Cs,r)),e.url=r=>e.check(rs(Bs,r)),e.jwt=r=>e.check(vs(Qs,r)),e.emoji=r=>e.check(is(Rs,r)),e.guid=r=>e.check(ii(si,r)),e.uuid=r=>e.check(Qo(It,r)),e.uuidv4=r=>e.check(es(It,r)),e.uuidv6=r=>e.check(ts(It,r)),e.uuidv7=r=>e.check(ns(It,r)),e.nanoid=r=>e.check(os(Fs,r)),e.guid=r=>e.check(ii(si,r)),e.cuid=r=>e.check(ss(Ls,r)),e.cuid2=r=>e.check(as(Zs,r)),e.ulid=r=>e.check(us(Ms,r)),e.base64=r=>e.check(ms(Hs,r)),e.base64url=r=>e.check(gs(Xs,r)),e.xid=r=>e.check(cs(qs,r)),e.ksuid=r=>e.check(ls(Vs,r)),e.ipv4=r=>e.check(fs(Ks,r)),e.ipv6=r=>e.check(ds(Js,r)),e.cidrv4=r=>e.check(hs(Gs,r)),e.cidrv6=r=>e.check(ps(Ws,r)),e.e164=r=>e.check(ys(Ys,r)),e.datetime=r=>e.check(Ld(r)),e.date=r=>e.check(Zd(r)),e.time=r=>e.check(Md(r)),e.duration=r=>e.check(qd(r))});function q(e){return Yf(ki,e)}const Oe=D("ZodStringFormat",(e,t)=>{Ne.init(e,t),Us.init(e,t)}),Cs=D("ZodEmail",(e,t)=>{Kl.init(e,t),Oe.init(e,t)});function cy(e){return Yo(Cs,e)}const si=D("ZodGUID",(e,t)=>{ql.init(e,t),Oe.init(e,t)});function ly(e){return ii(si,e)}const It=D("ZodUUID",(e,t)=>{Vl.init(e,t),Oe.init(e,t)});function fy(e){return Qo(It,e)}function dy(e){return es(It,e)}function hy(e){return ts(It,e)}function py(e){return ns(It,e)}const Bs=D("ZodURL",(e,t)=>{Jl.init(e,t),Oe.init(e,t)});function Hd(e){return rs(Bs,e)}const Rs=D("ZodEmoji",(e,t)=>{Gl.init(e,t),Oe.init(e,t)});function my(e){return is(Rs,e)}const Fs=D("ZodNanoID",(e,t)=>{Wl.init(e,t),Oe.init(e,t)});function gy(e){return os(Fs,e)}const Ls=D("ZodCUID",(e,t)=>{Hl.init(e,t),Oe.init(e,t)});function yy(e){return ss(Ls,e)}const Zs=D("ZodCUID2",(e,t)=>{Xl.init(e,t),Oe.init(e,t)});function be(e){return as(Zs,e)}const Ms=D("ZodULID",(e,t)=>{Yl.init(e,t),Oe.init(e,t)});function vy(e){return us(Ms,e)}const qs=D("ZodXID",(e,t)=>{Ql.init(e,t),Oe.init(e,t)});function $y(e){return cs(qs,e)}const Vs=D("ZodKSUID",(e,t)=>{ef.init(e,t),Oe.init(e,t)});function by(e){return ls(Vs,e)}const Ks=D("ZodIPv4",(e,t)=>{sf.init(e,t),Oe.init(e,t)});function _y(e){return fs(Ks,e)}const Js=D("ZodIPv6",(e,t)=>{af.init(e,t),Oe.init(e,t)});function wy(e){return ds(Js,e)}const Gs=D("ZodCIDRv4",(e,t)=>{uf.init(e,t),Oe.init(e,t)});function ky(e){return hs(Gs,e)}const Ws=D("ZodCIDRv6",(e,t)=>{cf.init(e,t),Oe.init(e,t)});function Sy(e){return ps(Ws,e)}const Hs=D("ZodBase64",(e,t)=>{lf.init(e,t),Oe.init(e,t)});function Iy(e){return ms(Hs,e)}const Xs=D("ZodBase64URL",(e,t)=>{df.init(e,t),Oe.init(e,t)});function Ey(e){return gs(Xs,e)}const Ys=D("ZodE164",(e,t)=>{hf.init(e,t),Oe.init(e,t)});function Ny(e){return ys(Ys,e)}const Qs=D("ZodJWT",(e,t)=>{mf.init(e,t),Oe.init(e,t)});function Oy(e){return vs(Qs,e)}const Xd=D("ZodCustomStringFormat",(e,t)=>{gf.init(e,t),Oe.init(e,t)});function xy(e,t,r={}){return Cd(Xd,e,t,r)}const Si=D("ZodNumber",(e,t)=>{Mo.init(e,t),de.init(e,t),e.gt=(i,n)=>e.check(Gt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Jt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.int=i=>e.check(bo(i)),e.safe=i=>e.check(bo(i)),e.positive=i=>e.check(Gt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Jt(0,i)),e.nonpositive=i=>e.check(ht(0,i)),e.multipleOf=(i,n)=>e.check(qn(i,n)),e.step=(i,n)=>e.check(qn(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ke(e){return od(Si,e)}const Sn=D("ZodNumberFormat",(e,t)=>{yf.init(e,t),Si.init(e,t)});function bo(e){return ad(Sn,e)}function jy(e){return ud(Sn,e)}function Ay(e){return cd(Sn,e)}function zy(e){return ld(Sn,e)}function Ty(e){return fd(Sn,e)}const Ii=D("ZodBoolean",(e,t)=>{qo.init(e,t),de.init(e,t)});function Re(e){return dd(Ii,e)}const Ei=D("ZodBigInt",(e,t)=>{Vo.init(e,t),de.init(e,t),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.gt=(i,n)=>e.check(Gt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Jt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.positive=i=>e.check(Gt(BigInt(0),i)),e.negative=i=>e.check(Jt(BigInt(0),i)),e.nonpositive=i=>e.check(ht(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(qn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Py(e){return pd(Ei,e)}const ea=D("ZodBigIntFormat",(e,t)=>{vf.init(e,t),Ei.init(e,t)});function Dy(e){return gd(ea,e)}function Uy(e){return yd(ea,e)}const Yd=D("ZodSymbol",(e,t)=>{$f.init(e,t),de.init(e,t)});function Cy(e){return vd(Yd,e)}const Qd=D("ZodUndefined",(e,t)=>{bf.init(e,t),de.init(e,t)});function By(e){return $d(Qd,e)}const eh=D("ZodNull",(e,t)=>{_f.init(e,t),de.init(e,t)});function th(e){return bd(eh,e)}const nh=D("ZodAny",(e,t)=>{wf.init(e,t),de.init(e,t)});function Ry(){return _d(nh)}const rh=D("ZodUnknown",(e,t)=>{ri.init(e,t),de.init(e,t)});function Ct(){return oi(rh)}const ih=D("ZodNever",(e,t)=>{kf.init(e,t),de.init(e,t)});function Ni(e){return wd(ih,e)}const oh=D("ZodVoid",(e,t)=>{Sf.init(e,t),de.init(e,t)});function Fy(e){return kd(oh,e)}const ta=D("ZodDate",(e,t)=>{If.init(e,t),de.init(e,t),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(ht(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Ie(e){return Sd(ta,e)}const sh=D("ZodArray",(e,t)=>{Ko.init(e,t),de.init(e,t),e.element=t.element,e.min=(r,i)=>e.check($n(r,i)),e.nonempty=r=>e.check($n(1,r)),e.max=(r,i)=>e.check(_i(r,i)),e.length=(r,i)=>e.check(wi(r,i)),e.unwrap=()=>e.element});function qe(e,t){return As(sh,e,t)}function Ly(e){const t=e._zod.def.shape;return ve(Object.keys(t))}const Oi=D("ZodObject",(e,t)=>{Ef.init(e,t),de.init(e,t),$e(e,"shape",()=>t.shape),e.keyof=()=>bt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ct()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ct()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ni()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Dc(e,r),e.merge=r=>Uc(e,r),e.pick=r=>Tc(e,r),e.omit=r=>Pc(e,r),e.partial=(...r)=>Cc(sa,e,r[0]),e.required=(...r)=>Bc(aa,e,r[0])});function H(e,t){const r={type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},...V(t)};return new Oi(r)}function Zy(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ni(),...V(t)})}function My(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ct(),...V(t)})}const na=D("ZodUnion",(e,t)=>{Jo.init(e,t),de.init(e,t),e.options=t.options});function xt(e,t){return new na({type:"union",options:e,...V(t)})}const ah=D("ZodDiscriminatedUnion",(e,t)=>{na.init(e,t),Nf.init(e,t)});function jt(e,t,r){return new ah({type:"union",options:t,discriminator:e,...V(r)})}const uh=D("ZodIntersection",(e,t)=>{Of.init(e,t),de.init(e,t)});function ch(e,t){return new uh({type:"intersection",left:e,right:t})}const lh=D("ZodTuple",(e,t)=>{$i.init(e,t),de.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function qy(e,t,r){const i=t instanceof ue,n=i?r:t,o=i?t:null;return new lh({type:"tuple",items:e,rest:o,...V(n)})}const ra=D("ZodRecord",(e,t)=>{xf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ze(e,t,r){return new ra({type:"record",keyType:e,valueType:t,...V(r)})}function Vy(e,t,r){return new ra({type:"record",keyType:xt([e,Ni()]),valueType:t,...V(r)})}const fh=D("ZodMap",(e,t)=>{jf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ky(e,t,r){return new fh({type:"map",keyType:e,valueType:t,...V(r)})}const dh=D("ZodSet",(e,t)=>{Af.init(e,t),de.init(e,t),e.min=(...r)=>e.check(Vn(...r)),e.nonempty=r=>e.check(Vn(1,r)),e.max=(...r)=>e.check(bi(...r)),e.size=(...r)=>e.check($s(...r))});function Jy(e,t){return new dh({type:"set",valueType:e,...V(t)})}const Kn=D("ZodEnum",(e,t)=>{zf.init(e,t),de.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Kn({...t,checks:[],...V(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Kn({...t,checks:[],...V(n),entries:o})}});function bt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Kn({type:"enum",entries:r,...V(t)})}function Gy(e,t){return new Kn({type:"enum",entries:e,...V(t)})}const hh=D("ZodLiteral",(e,t)=>{Tf.init(e,t),de.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ve(e,t){return new hh({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}const ph=D("ZodFile",(e,t)=>{Pf.init(e,t),de.init(e,t),e.min=(r,i)=>e.check(Vn(r,i)),e.max=(r,i)=>e.check(bi(r,i)),e.mime=(r,i)=>e.check(Es(Array.isArray(r)?r:[r],i))});function Wy(e){return Td(ph,e)}const ia=D("ZodTransform",(e,t)=>{Go.init(e,t),de.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(yn(o,r.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(yn(s))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function oa(e){return new ia({type:"transform",transform:e})}const sa=D("ZodOptional",(e,t)=>{Df.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new sa({type:"optional",innerType:e})}const mh=D("ZodNullable",(e,t)=>{Uf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ui(e){return new mh({type:"nullable",innerType:e})}function Hy(e){return ai(ui(e))}const gh=D("ZodDefault",(e,t)=>{Cf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yh(e,t){return new gh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const vh=D("ZodPrefault",(e,t)=>{Bf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new vh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const aa=D("ZodNonOptional",(e,t)=>{Rf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bh(e,t){return new aa({type:"nonoptional",innerType:e,...V(t)})}const _h=D("ZodSuccess",(e,t)=>{Ff.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xy(e){return new _h({type:"success",innerType:e})}const wh=D("ZodCatch",(e,t)=>{Lf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kh(e,t){return new wh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sh=D("ZodNaN",(e,t)=>{Zf.init(e,t),de.init(e,t)});function Yy(e){return Ed(Sh,e)}const ua=D("ZodPipe",(e,t)=>{Wo.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function ci(e,t){return new ua({type:"pipe",in:e,out:t})}const Ih=D("ZodReadonly",(e,t)=>{Mf.init(e,t),de.init(e,t)});function Eh(e){return new Ih({type:"readonly",innerType:e})}const Nh=D("ZodTemplateLiteral",(e,t)=>{qf.init(e,t),de.init(e,t)});function Rn(e,t){return new Nh({type:"template_literal",parts:e,...V(t)})}const Oh=D("ZodLazy",(e,t)=>{Kf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function xh(e){return new Oh({type:"lazy",getter:e})}const jh=D("ZodPromise",(e,t)=>{Vf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Qy(e){return new jh({type:"promise",innerType:e})}const xi=D("ZodCustom",(e,t)=>{Jf.init(e,t),de.init(e,t)});function Ah(e){const t=new Ue({check:"custom"});return t._zod.check=e,t}function bn(e,t){return Pd(xi,e??(()=>!0),t)}function zh(e,t={}){return Dd(xi,e,t)}function Th(e){const t=Ah(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(yn(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(yn(n))}},e(r.value,r)));return t}function Ph(e,t={error:`Input not instance of ${e.name}`}){const r=new xi({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...V(t)});return r._zod.bag.Class=e,r}const ev=(...e)=>Ud({Pipe:ua,Boolean:Ii,String:ki,Transform:ia},...e);function tv(e){const t=xh(()=>xt([q(e),Ke(),Re(),th(),qe(t),Ze(q(),t)]));return t}function nv(e,t){return ci(oa(e),t)}const rv={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 iv(e){Xe({customError:e})}function ov(){return Xe().customError}var _o;_o||(_o={});function sv(e){return Qf(ki,e)}function av(e){return sd(Si,e)}function Dh(e){return hd(Ii,e)}function uv(e){return md(Ei,e)}function cv(e){return Id(ta,e)}var lv=Object.freeze({__proto__:null,bigint:uv,boolean:Dh,date:cv,number:av,string:sv});Xe(Gf());var Dt=Object.freeze({__proto__:null,$brand:Ic,$input:Xf,$output:Hf,NEVER:Sc,TimePrecision:ed,ZodAny:nh,ZodArray:sh,ZodBase64:Hs,ZodBase64URL:Xs,ZodBigInt:Ei,ZodBigIntFormat:ea,ZodBoolean:Ii,ZodCIDRv4:Gs,ZodCIDRv6:Ws,ZodCUID:Ls,ZodCUID2:Zs,ZodCatch:wh,ZodCustom:xi,ZodCustomStringFormat:Xd,ZodDate:ta,ZodDefault:gh,ZodDiscriminatedUnion:ah,ZodE164:Ys,ZodEmail:Cs,ZodEmoji:Rs,ZodEnum:Kn,ZodError:uy,ZodFile:ph,get ZodFirstPartyTypeKind(){return _o},ZodGUID:si,ZodIPv4:Ks,ZodIPv6:Js,ZodISODate:Ts,ZodISODateTime:zs,ZodISODuration:Ds,ZodISOTime:Ps,ZodIntersection:uh,ZodIssueCode:rv,ZodJWT:Qs,ZodKSUID:Vs,ZodLazy:Oh,ZodLiteral:hh,ZodMap:fh,ZodNaN:Sh,ZodNanoID:Fs,ZodNever:ih,ZodNonOptional:aa,ZodNull:eh,ZodNullable:mh,ZodNumber:Si,ZodNumberFormat:Sn,ZodObject:Oi,ZodOptional:sa,ZodPipe:ua,ZodPrefault:vh,ZodPromise:jh,ZodReadonly:Ih,ZodRealError:Qn,ZodRecord:ra,ZodSet:dh,ZodString:ki,ZodStringFormat:Oe,ZodSuccess:_h,ZodSymbol:Yd,ZodTemplateLiteral:Nh,ZodTransform:ia,ZodTuple:lh,ZodType:de,ZodULID:Ms,ZodURL:Bs,ZodUUID:It,ZodUndefined:Qd,ZodUnion:na,ZodUnknown:rh,ZodVoid:oh,ZodXID:qs,_ZodString:Us,_default:yh,any:Ry,array:qe,base64:Iy,base64url:Ey,bigint:Py,boolean:Re,catch:kh,check:Ah,cidrv4:ky,cidrv6:Sy,clone:$t,coerce:lv,config:Xe,core:sy,cuid:yy,cuid2:be,custom:bn,date:Ie,discriminatedUnion:jt,e164:Ny,email:cy,emoji:my,endsWith:Is,enum:bt,file:Wy,flattenError:To,float32:jy,float64:Ay,formatError:Po,function:Rd,getErrorMap:ov,globalRegistry:qt,gt:Gt,gte:nt,guid:ly,includes:ks,instanceof:Ph,int:bo,int32:zy,int64:Dy,intersection:ch,ipv4:_y,ipv6:wy,iso:ay,json:tv,jwt:Oy,keyof:Ly,ksuid:by,lazy:xh,length:wi,literal:ve,locales:Wf,looseObject:My,lowercase:_s,lt:Jt,lte:ht,map:Ky,maxLength:_i,maxSize:bi,mime:Es,minLength:$n,minSize:Vn,multipleOf:qn,nan:Yy,nanoid:gy,nativeEnum:Gy,negative:Od,never:Ni,nonnegative:jd,nonoptional:bh,nonpositive:xd,normalize:Ns,null:th,nullable:ui,nullish:Hy,number:Ke,object:H,optional:ai,overwrite:Yt,parse:Kd,parseAsync:Jd,partialRecord:Vy,pipe:ci,positive:Nd,prefault:$h,preprocess:nv,prettifyError:Zc,promise:Qy,property:Ad,readonly:Eh,record:Ze,refine:zh,regex:bs,regexes:wl,registry:Xo,safeParse:Gd,safeParseAsync:Wd,set:Jy,setErrorMap:iv,size:$s,startsWith:Ss,strictObject:Zy,string:q,stringFormat:xy,stringbool:ev,success:Xy,superRefine:Th,symbol:Cy,templateLiteral:Rn,toJSONSchema:Fd,toLowerCase:xs,toUpperCase:js,transform:oa,treeifyError:Fc,trim:Os,tuple:qy,uint32:Ty,uint64:Uy,ulid:vy,undefined:By,union:xt,unknown:Ct,uppercase:ws,url:Hd,uuid:fy,uuidv4:dy,uuidv6:hy,uuidv7:py,void:Fy,xid:$y});function fv(e,t,r){let i=n=>e(n,...t);return r===void 0?i:Object.assign(i,{lazy:r,lazyArgs:t})}function Uh(e,t,r){let i=e.length-t.length;if(i===0)return e(...t);if(i===1)return fv(e,t,r);throw new Error("Wrong number of arguments")}var Ch={done:!1,hasNext:!1};function qa(e,...t){let r=e,i=t.map(o=>"lazy"in o?dv(o):void 0),n=0;for(;n<t.length;){if(i[n]===void 0||!hv(r)){let c=t[n];r=c(r),n+=1;continue}let o=[];for(let c=n;c<t.length;c++){let d=i[c];if(d===void 0||(o.push(d),d.isSingle))break}let s=[];for(let c of r)if(Bh(c,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,n+=o.length}return r}function Bh(e,t,r){if(r.length===0)return t.push(e),!1;let i=e,n=Ch,o=!1;for(let[s,a]of r.entries()){let{index:c,items:d}=a;if(d.push(i),n=a(i,c,d),a.index+=1,n.hasNext){if(n.hasMany??!1){for(let u of n.next)if(Bh(u,t,r.slice(s+1)))return!0;return o}i=n.next}if(!n.hasNext)break;n.done&&(o=!0)}return n.hasNext&&t.push(i),o}function dv(e){let{lazy:t,lazyArgs:r}=e,i=t(...r);return Object.assign(i,{isSingle:t.single??!1,index:0,items:[]})}function hv(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function pv(e,t){let r=t.length-e.length;if(r===1){let[i,...n]=t;return qa(i,{lazy:e,lazyArgs:n})}if(r===0){let i={lazy:e,lazyArgs:t};return Object.assign(n=>qa(n,i),i)}throw new Error("Wrong number of arguments")}function mv(...e){return pv(gv,e)}function gv(){let e=new Set;return t=>e.has(t)?Ch:(e.add(t),{done:!1,hasNext:!0,next:t})}function yv(...e){return Uh(vv,e)}function vv(e,t){let r={};for(let[i,n]of Object.entries(e)){let o=t(n,i,e);r[i]=o}return r}function $v(...e){return Uh(Object.fromEntries,e)}const ca=Symbol.for("yaml.alias"),wo=Symbol.for("yaml.document"),Ut=Symbol.for("yaml.map"),Rh=Symbol.for("yaml.pair"),vt=Symbol.for("yaml.scalar"),In=Symbol.for("yaml.seq"),ut=Symbol.for("yaml.node.type"),Qt=e=>!!e&&typeof e=="object"&&e[ut]===ca,ji=e=>!!e&&typeof e=="object"&&e[ut]===wo,er=e=>!!e&&typeof e=="object"&&e[ut]===Ut,De=e=>!!e&&typeof e=="object"&&e[ut]===Rh,Ee=e=>!!e&&typeof e=="object"&&e[ut]===vt,tr=e=>!!e&&typeof e=="object"&&e[ut]===In;function Te(e){if(e&&typeof e=="object")switch(e[ut]){case Ut:case In:return!0}return!1}function Pe(e){if(e&&typeof e=="object")switch(e[ut]){case ca:case Ut:case vt:case In:return!0}return!1}const Fh=e=>(Ee(e)||Te(e))&&!!e.anchor,Mt=Symbol("break visit"),bv=Symbol("skip children"),Fn=Symbol("remove node");function En(e,t){const r=_v(t);ji(e)?un(null,e.contents,r,Object.freeze([e]))===Fn&&(e.contents=null):un(null,e,r,Object.freeze([]))}En.BREAK=Mt;En.SKIP=bv;En.REMOVE=Fn;function un(e,t,r,i){const n=wv(e,t,r,i);if(Pe(n)||De(n))return kv(e,i,n),un(e,n,r,i);if(typeof n!="symbol"){if(Te(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){const s=un(o,t.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===Mt)return Mt;s===Fn&&(t.items.splice(o,1),o-=1)}}}else if(De(t)){i=Object.freeze(i.concat(t));const o=un("key",t.key,r,i);if(o===Mt)return Mt;o===Fn&&(t.key=null);const s=un("value",t.value,r,i);if(s===Mt)return Mt;s===Fn&&(t.value=null)}}return n}function _v(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function wv(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(er(t))return r.Map?.(e,t,i);if(tr(t))return r.Seq?.(e,t,i);if(De(t))return r.Pair?.(e,t,i);if(Ee(t))return r.Scalar?.(e,t,i);if(Qt(t))return r.Alias?.(e,t,i)}function kv(e,t,r){const i=t[t.length-1];if(Te(i))i.items[e]=r;else if(De(i))e==="key"?i.key=r:i.value=r;else if(ji(i))i.contents=r;else{const n=Qt(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}const Sv={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Iv=e=>e.replace(/[!,[\]{}]/g,t=>Sv[t]);class We{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,t),this.tags=Object.assign({},We.defaultTags,r)}clone(){const t=new We(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[o,s]=i;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}const[,i,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);const o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[r,i]of Object.entries(this.tags))if(t.startsWith(i))return r+Iv(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let n;if(t&&i.length>0&&Pe(t.contents)){const o={};En(t.contents,(s,a)=>{Pe(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(const[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!t||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
30
- `)}}We.defaultYaml={explicit:!1,version:"1.2"};We.defaultTags={"!!":"tag:yaml.org,2002:"};function Lh(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function Zh(e){const t=new Set;return En(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function Mh(e,t){for(let r=1;;++r){const i=`${e}${r}`;if(!t.has(i))return i}}function Ev(e,t){const r=[],i=new Map;let n=null;return{onAnchor:o=>{r.push(o),n??(n=Zh(e));const s=Mh(t,n);return n.add(s),s},setAnchors:()=>{for(const o of r){const s=i.get(o);if(typeof s=="object"&&s.anchor&&(Ee(s.node)||Te(s.node)))s.node.anchor=s.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}function cn(e,t,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){const s=i[n],a=cn(e,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(const n of Array.from(i.keys())){const o=i.get(n),s=cn(e,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(const n of Array.from(i)){const o=cn(e,i,n,n);o===void 0?i.delete(n):o!==n&&(i.delete(n),i.add(o))}else for(const[n,o]of Object.entries(i)){const s=cn(e,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return e.call(t,r,i)}function at(e,t,r){if(Array.isArray(e))return e.map((i,n)=>at(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!Fh(e))return e.toJSON(t,r);const i={aliasCount:0,count:1,res:void 0};r.anchors.set(e,i),r.onCreate=o=>{i.res=o,delete r.onCreate};const n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}class la{constructor(t){Object.defineProperty(this,ut,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!ji(t))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=at(this,"",s);if(typeof n=="function")for(const{count:c,res:d}of s.anchors.values())n(d,c);return typeof o=="function"?cn(o,{"":a},"",a):a}}class fa extends la{constructor(t){super(ca),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],En(t,{Node:(o,s)=>{(Qt(s)||Fh(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(const o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(t,r){if(!r)return{source:this.source};const{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(at(s,null,r),a=i.get(s)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Xr(n,s,i)),a.count*a.aliasCount>o)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(t,r,i){const n=`*${this.source}`;if(t){if(Lh(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${n} `}return n}}function Xr(e,t,r){if(Qt(t)){const i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(Te(t)){let i=0;for(const n of t.items){const o=Xr(e,n,r);o>i&&(i=o)}return i}else if(De(t)){const i=Xr(e,t.key,r),n=Xr(e,t.value,r);return Math.max(i,n)}return 1}const qh=e=>!e||typeof e!="function"&&typeof e!="object";class le extends la{constructor(t){super(vt),this.value=t}toJSON(t,r){return r?.keep?this.value:at(this.value,t,r)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const Nv="tag:yaml.org,2002:";function Ov(e,t,r){if(t){const i=r.filter(o=>o.tag===t),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(i=>i.identify?.(e)&&!i.format)}function Jn(e,t,r){if(ji(e)&&(e=e.contents),Pe(e))return e;if(De(e)){const h=r.schema[Ut].createNode?.(r.schema,null,r);return h.items.push(e),h}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r;let c;if(i&&e&&typeof e=="object"){if(c=a.get(e),c)return c.anchor??(c.anchor=n(e)),new fa(c.anchor);c={anchor:null,node:null},a.set(e,c)}t?.startsWith("!!")&&(t=Nv+t.slice(2));let d=Ov(e,t,s.tags);if(!d){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const h=new le(e);return c&&(c.node=h),h}d=e instanceof Map?s[Ut]:Symbol.iterator in Object(e)?s[In]:s[Ut]}o&&(o(d),delete r.onTagObj);const u=d?.createNode?d.createNode(r.schema,e,r):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(r.schema,e,r):new le(e);return t?u.tag=t:d.default||(u.tag=d.tag),c&&(c.node=u),u}function li(e,t,r){let i=r;for(let n=t.length-1;n>=0;--n){const o=t[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return Jn(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Cn=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Vh extends la{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(i=>Pe(i)||De(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Cn(t))this.add(r);else{const[i,...n]=t,o=this.get(i,!0);if(Te(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(t){const[r,...i]=t;if(i.length===0)return this.delete(r);const n=this.get(r,!0);if(Te(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(t,r){const[i,...n]=t,o=this.get(i,!0);return n.length===0?!r&&Ee(o)?o.value:o:Te(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!De(r))return!1;const i=r.value;return i==null||t&&Ee(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[r,...i]=t;if(i.length===0)return this.has(r);const n=this.get(r,!0);return Te(n)?n.hasIn(i):!1}setIn(t,r){const[i,...n]=t;if(n.length===0)this.set(i,r);else{const o=this.get(i,!0);if(Te(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}}const xv=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Et(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Vt=(e,t,r)=>e.endsWith(`
29
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const h=u[1];if(t===u[0]){s(u);continue}if(i.external){const _=i.external.registry.get(u[0])?.id;if(t!==u[0]&&_){s(u);continue}}if(this.metadataRegistry.get(u[0])?.id){s(u);continue}if(h.cycle){s(u);continue}if(h.count>1&&i.reused==="ref"){s(u);continue}}const a=(u,h)=>{const y=this.seen.get(u),_=y.def??y.schema,b={..._};if(y.ref===null)return;const g=y.ref;if(y.ref=null,g){a(g,h);const m=this.seen.get(g).schema;m.$ref&&h.target==="draft-7"?(_.allOf=_.allOf??[],_.allOf.push(m)):(Object.assign(_,m),Object.assign(_,b))}y.isParent||this.override({zodSchema:u,jsonSchema:_,path:y.path??[]})};for(const u of[...this.seen.entries()].reverse())a(u[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),i.external?.uri){const u=i.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(u)}Object.assign(c,n.def);const d=i.external?.defs??{};for(const u of this.seen.entries()){const h=u[1];h.def&&h.defId&&(d[h.defId]=h.def)}i.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function Fd(e,t){if(e instanceof Ho){const i=new $o(t),n={};for(const a of e._idmap.entries()){const[c,d]=a;i.process(d)}const o={},s={registry:e,uri:t?.uri,defs:n};for(const a of e._idmap.entries()){const[c,d]=a;o[c]=i.emit(d,{...t,external:s})}if(Object.keys(n).length>0){const a=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[a]:n}}return{schemas:o}}const r=new $o(t);return r.process(e),r.emit(e,t)}function Be(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Be(n.element,r);case"object":{for(const o in n.shape)if(Be(n.shape[o],r))return!0;return!1}case"union":{for(const o of n.options)if(Be(o,r))return!0;return!1}case"intersection":return Be(n.left,r)||Be(n.right,r);case"tuple":{for(const o of n.items)if(Be(o,r))return!0;return!!(n.rest&&Be(n.rest,r))}case"record":return Be(n.keyType,r)||Be(n.valueType,r);case"map":return Be(n.keyType,r)||Be(n.valueType,r);case"set":return Be(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Be(n.innerType,r);case"lazy":return Be(n.getter(),r);case"default":return Be(n.innerType,r);case"prefault":return Be(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Be(n.in,r)||Be(n.out,r);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${n.type}`)}var sy=Object.freeze({__proto__:null}),ay=Object.freeze({__proto__:null,$ZodAny:wf,$ZodArray:Ko,$ZodAsyncError:gn,$ZodBase64:lf,$ZodBase64URL:df,$ZodBigInt:Vo,$ZodBigIntFormat:vf,$ZodBoolean:qo,$ZodCIDRv4:uf,$ZodCIDRv6:cf,$ZodCUID:Hl,$ZodCUID2:Xl,$ZodCatch:Lf,$ZodCheck:Ue,$ZodCheckBigIntFormat:El,$ZodCheckEndsWith:Bl,$ZodCheckGreaterThan:Lo,$ZodCheckIncludes:Ul,$ZodCheckLengthEquals:zl,$ZodCheckLessThan:Fo,$ZodCheckLowerCase:Pl,$ZodCheckMaxLength:jl,$ZodCheckMaxSize:Nl,$ZodCheckMimeType:Fl,$ZodCheckMinLength:Al,$ZodCheckMinSize:Ol,$ZodCheckMultipleOf:Sl,$ZodCheckNumberFormat:Il,$ZodCheckOverwrite:Ll,$ZodCheckProperty:Rl,$ZodCheckRegex:Tl,$ZodCheckSizeEquals:xl,$ZodCheckStartsWith:Cl,$ZodCheckStringFormat:Xn,$ZodCheckUpperCase:Dl,$ZodCustom:Jf,$ZodCustomStringFormat:gf,$ZodDate:If,$ZodDefault:Cf,$ZodDiscriminatedUnion:Nf,$ZodE164:hf,$ZodEmail:Kl,$ZodEmoji:Gl,$ZodEnum:zf,$ZodError:zo,$ZodFile:Pf,$ZodFunction:Bd,$ZodGUID:ql,$ZodIPv4:sf,$ZodIPv6:af,$ZodISODate:nf,$ZodISODateTime:tf,$ZodISODuration:of,$ZodISOTime:rf,$ZodIntersection:Of,$ZodJWT:mf,$ZodKSUID:ef,$ZodLazy:Kf,$ZodLiteral:Tf,$ZodMap:jf,$ZodNaN:Zf,$ZodNanoID:Wl,$ZodNever:kf,$ZodNonOptional:Rf,$ZodNull:_f,$ZodNullable:Uf,$ZodNumber:Mo,$ZodNumberFormat:yf,$ZodObject:Ef,$ZodOptional:Df,$ZodPipe:Wo,$ZodPrefault:Bf,$ZodPromise:Vf,$ZodReadonly:Mf,$ZodRealError:Hn,$ZodRecord:xf,$ZodRegistry:Ho,$ZodSet:Af,$ZodString:Yn,$ZodStringFormat:Ne,$ZodSuccess:Ff,$ZodSymbol:$f,$ZodTemplateLiteral:qf,$ZodTransform:Go,$ZodTuple:$i,$ZodType:ue,$ZodULID:Yl,$ZodURL:Jl,$ZodUUID:Vl,$ZodUndefined:bf,$ZodUnion:Jo,$ZodUnknown:ri,$ZodVoid:Sf,$ZodXID:Ql,$brand:Ic,$constructor:D,$input:Xf,$output:Hf,Doc:Zl,JSONSchema:sy,JSONSchemaGenerator:$o,NEVER:Sc,TimePrecision:ed,_any:_d,_array:As,_base64:ms,_base64url:gs,_bigint:pd,_boolean:dd,_catch:ey,_cidrv4:hs,_cidrv6:ps,_coercedBigint:md,_coercedBoolean:hd,_coercedDate:Id,_coercedNumber:sd,_coercedString:Qf,_cuid:ss,_cuid2:as,_custom:Pd,_date:Sd,_default:Xg,_discriminatedUnion:Fg,_e164:ys,_email:Yo,_emoji:is,_endsWith:Is,_enum:Vg,_file:Td,_float32:ud,_float64:cd,_gt:Gt,_gte:nt,_guid:ii,_includes:ks,_int:ad,_int32:ld,_int64:gd,_intersection:Lg,_ipv4:fs,_ipv6:ds,_isoDate:nd,_isoDateTime:td,_isoDuration:id,_isoTime:rd,_jwt:vs,_ksuid:ls,_lazy:iy,_length:wi,_literal:Jg,_lowercase:_s,_lt:Jt,_lte:ht,_map:Mg,_max:ht,_maxLength:_i,_maxSize:bi,_mime:Es,_min:nt,_minLength:$n,_minSize:Vn,_multipleOf:qn,_nan:Ed,_nanoid:os,_nativeEnum:Kg,_negative:Od,_never:wd,_nonnegative:jd,_nonoptional:Yg,_nonpositive:xd,_normalize:Ns,_null:bd,_nullable:Hg,_number:od,_optional:Wg,_overwrite:Yt,_parse:Do,_parseAsync:Uo,_pipe:ty,_positive:Nd,_promise:oy,_property:Ad,_readonly:ny,_record:Zg,_refine:Dd,_regex:bs,_safeParse:Co,_safeParseAsync:Bo,_set:qg,_size:$s,_startsWith:Ss,_string:Yf,_stringFormat:Cd,_stringbool:Ud,_success:Qg,_symbol:vd,_templateLiteral:ry,_toLowerCase:xs,_toUpperCase:js,_transform:Gg,_trim:Os,_tuple:zd,_uint32:fd,_uint64:yd,_ulid:us,_undefined:$d,_union:Rg,_unknown:oi,_uppercase:ws,_url:rs,_uuid:Qo,_uuidv4:es,_uuidv6:ts,_uuidv7:ns,_void:kd,_xid:cs,clone:$t,config:Xe,flattenError:To,formatError:Po,function:Rd,globalConfig:ti,globalRegistry:qt,isValidBase64:Zo,isValidBase64URL:ff,isValidJWT:pf,locales:Wf,parse:go,parseAsync:yo,prettifyError:Zc,regexes:wl,registry:Xo,safeParse:Mc,safeParseAsync:qc,toDotPath:Lc,toJSONSchema:Fd,treeifyError:Fc,util:nm,version:Ml});const zs=D("ZodISODateTime",(e,t)=>{tf.init(e,t),Oe.init(e,t)});function Ld(e){return td(zs,e)}const Ts=D("ZodISODate",(e,t)=>{nf.init(e,t),Oe.init(e,t)});function Zd(e){return nd(Ts,e)}const Ps=D("ZodISOTime",(e,t)=>{rf.init(e,t),Oe.init(e,t)});function Md(e){return rd(Ps,e)}const Ds=D("ZodISODuration",(e,t)=>{of.init(e,t),Oe.init(e,t)});function qd(e){return id(Ds,e)}var uy=Object.freeze({__proto__:null,ZodISODate:Ts,ZodISODateTime:zs,ZodISODuration:Ds,ZodISOTime:Ps,date:Zd,datetime:Ld,duration:qd,time:Md});const Vd=(e,t)=>{zo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Po(e,r)},flatten:{value:r=>To(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},cy=D("ZodError",Vd),Qn=D("ZodError",Vd,{Parent:Error}),Kd=Do(Qn),Jd=Uo(Qn),Gd=Co(Qn),Wd=Bo(Qn),de=D("ZodType",(e,t)=>(ue.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>$t(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>Kd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Gd(e,r,i),e.parseAsync=async(r,i)=>Jd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wd(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(zh(r,i)),e.superRefine=r=>e.check(Th(r)),e.overwrite=r=>e.check(Yt(r)),e.optional=()=>ai(e),e.nullable=()=>ui(e),e.nullish=()=>ai(ui(e)),e.nonoptional=r=>bh(e,r),e.array=()=>qe(e),e.or=r=>xt([e,r]),e.and=r=>ch(e,r),e.transform=r=>ci(e,oa(r)),e.default=r=>yh(e,r),e.prefault=r=>$h(e,r),e.catch=r=>kh(e,r),e.pipe=r=>ci(e,r),e.readonly=()=>Eh(e),e.describe=r=>{const i=e.clone();return qt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return qt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qt.get(e);const i=e.clone();return qt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Us=D("_ZodString",(e,t)=>{Yn.init(e,t),de.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(bs(...i)),e.includes=(...i)=>e.check(ks(...i)),e.startsWith=(...i)=>e.check(Ss(...i)),e.endsWith=(...i)=>e.check(Is(...i)),e.min=(...i)=>e.check($n(...i)),e.max=(...i)=>e.check(_i(...i)),e.length=(...i)=>e.check(wi(...i)),e.nonempty=(...i)=>e.check($n(1,...i)),e.lowercase=i=>e.check(_s(i)),e.uppercase=i=>e.check(ws(i)),e.trim=()=>e.check(Os()),e.normalize=(...i)=>e.check(Ns(...i)),e.toLowerCase=()=>e.check(xs()),e.toUpperCase=()=>e.check(js())}),ki=D("ZodString",(e,t)=>{Yn.init(e,t),Us.init(e,t),e.email=r=>e.check(Yo(Cs,r)),e.url=r=>e.check(rs(Bs,r)),e.jwt=r=>e.check(vs(Qs,r)),e.emoji=r=>e.check(is(Rs,r)),e.guid=r=>e.check(ii(si,r)),e.uuid=r=>e.check(Qo(It,r)),e.uuidv4=r=>e.check(es(It,r)),e.uuidv6=r=>e.check(ts(It,r)),e.uuidv7=r=>e.check(ns(It,r)),e.nanoid=r=>e.check(os(Fs,r)),e.guid=r=>e.check(ii(si,r)),e.cuid=r=>e.check(ss(Ls,r)),e.cuid2=r=>e.check(as(Zs,r)),e.ulid=r=>e.check(us(Ms,r)),e.base64=r=>e.check(ms(Hs,r)),e.base64url=r=>e.check(gs(Xs,r)),e.xid=r=>e.check(cs(qs,r)),e.ksuid=r=>e.check(ls(Vs,r)),e.ipv4=r=>e.check(fs(Ks,r)),e.ipv6=r=>e.check(ds(Js,r)),e.cidrv4=r=>e.check(hs(Gs,r)),e.cidrv6=r=>e.check(ps(Ws,r)),e.e164=r=>e.check(ys(Ys,r)),e.datetime=r=>e.check(Ld(r)),e.date=r=>e.check(Zd(r)),e.time=r=>e.check(Md(r)),e.duration=r=>e.check(qd(r))});function q(e){return Yf(ki,e)}const Oe=D("ZodStringFormat",(e,t)=>{Ne.init(e,t),Us.init(e,t)}),Cs=D("ZodEmail",(e,t)=>{Kl.init(e,t),Oe.init(e,t)});function ly(e){return Yo(Cs,e)}const si=D("ZodGUID",(e,t)=>{ql.init(e,t),Oe.init(e,t)});function fy(e){return ii(si,e)}const It=D("ZodUUID",(e,t)=>{Vl.init(e,t),Oe.init(e,t)});function dy(e){return Qo(It,e)}function hy(e){return es(It,e)}function py(e){return ts(It,e)}function my(e){return ns(It,e)}const Bs=D("ZodURL",(e,t)=>{Jl.init(e,t),Oe.init(e,t)});function Hd(e){return rs(Bs,e)}const Rs=D("ZodEmoji",(e,t)=>{Gl.init(e,t),Oe.init(e,t)});function gy(e){return is(Rs,e)}const Fs=D("ZodNanoID",(e,t)=>{Wl.init(e,t),Oe.init(e,t)});function yy(e){return os(Fs,e)}const Ls=D("ZodCUID",(e,t)=>{Hl.init(e,t),Oe.init(e,t)});function vy(e){return ss(Ls,e)}const Zs=D("ZodCUID2",(e,t)=>{Xl.init(e,t),Oe.init(e,t)});function be(e){return as(Zs,e)}const Ms=D("ZodULID",(e,t)=>{Yl.init(e,t),Oe.init(e,t)});function $y(e){return us(Ms,e)}const qs=D("ZodXID",(e,t)=>{Ql.init(e,t),Oe.init(e,t)});function by(e){return cs(qs,e)}const Vs=D("ZodKSUID",(e,t)=>{ef.init(e,t),Oe.init(e,t)});function _y(e){return ls(Vs,e)}const Ks=D("ZodIPv4",(e,t)=>{sf.init(e,t),Oe.init(e,t)});function wy(e){return fs(Ks,e)}const Js=D("ZodIPv6",(e,t)=>{af.init(e,t),Oe.init(e,t)});function ky(e){return ds(Js,e)}const Gs=D("ZodCIDRv4",(e,t)=>{uf.init(e,t),Oe.init(e,t)});function Sy(e){return hs(Gs,e)}const Ws=D("ZodCIDRv6",(e,t)=>{cf.init(e,t),Oe.init(e,t)});function Iy(e){return ps(Ws,e)}const Hs=D("ZodBase64",(e,t)=>{lf.init(e,t),Oe.init(e,t)});function Ey(e){return ms(Hs,e)}const Xs=D("ZodBase64URL",(e,t)=>{df.init(e,t),Oe.init(e,t)});function Ny(e){return gs(Xs,e)}const Ys=D("ZodE164",(e,t)=>{hf.init(e,t),Oe.init(e,t)});function Oy(e){return ys(Ys,e)}const Qs=D("ZodJWT",(e,t)=>{mf.init(e,t),Oe.init(e,t)});function xy(e){return vs(Qs,e)}const Xd=D("ZodCustomStringFormat",(e,t)=>{gf.init(e,t),Oe.init(e,t)});function jy(e,t,r={}){return Cd(Xd,e,t,r)}const Si=D("ZodNumber",(e,t)=>{Mo.init(e,t),de.init(e,t),e.gt=(i,n)=>e.check(Gt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Jt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.int=i=>e.check(bo(i)),e.safe=i=>e.check(bo(i)),e.positive=i=>e.check(Gt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Jt(0,i)),e.nonpositive=i=>e.check(ht(0,i)),e.multipleOf=(i,n)=>e.check(qn(i,n)),e.step=(i,n)=>e.check(qn(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ke(e){return od(Si,e)}const Sn=D("ZodNumberFormat",(e,t)=>{yf.init(e,t),Si.init(e,t)});function bo(e){return ad(Sn,e)}function Ay(e){return ud(Sn,e)}function zy(e){return cd(Sn,e)}function Ty(e){return ld(Sn,e)}function Py(e){return fd(Sn,e)}const Ii=D("ZodBoolean",(e,t)=>{qo.init(e,t),de.init(e,t)});function Re(e){return dd(Ii,e)}const Ei=D("ZodBigInt",(e,t)=>{Vo.init(e,t),de.init(e,t),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.gt=(i,n)=>e.check(Gt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Jt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.positive=i=>e.check(Gt(BigInt(0),i)),e.negative=i=>e.check(Jt(BigInt(0),i)),e.nonpositive=i=>e.check(ht(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(qn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Dy(e){return pd(Ei,e)}const ea=D("ZodBigIntFormat",(e,t)=>{vf.init(e,t),Ei.init(e,t)});function Uy(e){return gd(ea,e)}function Cy(e){return yd(ea,e)}const Yd=D("ZodSymbol",(e,t)=>{$f.init(e,t),de.init(e,t)});function By(e){return vd(Yd,e)}const Qd=D("ZodUndefined",(e,t)=>{bf.init(e,t),de.init(e,t)});function Ry(e){return $d(Qd,e)}const eh=D("ZodNull",(e,t)=>{_f.init(e,t),de.init(e,t)});function th(e){return bd(eh,e)}const nh=D("ZodAny",(e,t)=>{wf.init(e,t),de.init(e,t)});function Fy(){return _d(nh)}const rh=D("ZodUnknown",(e,t)=>{ri.init(e,t),de.init(e,t)});function Ct(){return oi(rh)}const ih=D("ZodNever",(e,t)=>{kf.init(e,t),de.init(e,t)});function Ni(e){return wd(ih,e)}const oh=D("ZodVoid",(e,t)=>{Sf.init(e,t),de.init(e,t)});function Ly(e){return kd(oh,e)}const ta=D("ZodDate",(e,t)=>{If.init(e,t),de.init(e,t),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(ht(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Ie(e){return Sd(ta,e)}const sh=D("ZodArray",(e,t)=>{Ko.init(e,t),de.init(e,t),e.element=t.element,e.min=(r,i)=>e.check($n(r,i)),e.nonempty=r=>e.check($n(1,r)),e.max=(r,i)=>e.check(_i(r,i)),e.length=(r,i)=>e.check(wi(r,i)),e.unwrap=()=>e.element});function qe(e,t){return As(sh,e,t)}function Zy(e){const t=e._zod.def.shape;return ve(Object.keys(t))}const Oi=D("ZodObject",(e,t)=>{Ef.init(e,t),de.init(e,t),$e(e,"shape",()=>t.shape),e.keyof=()=>bt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ct()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ct()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ni()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Dc(e,r),e.merge=r=>Uc(e,r),e.pick=r=>Tc(e,r),e.omit=r=>Pc(e,r),e.partial=(...r)=>Cc(sa,e,r[0]),e.required=(...r)=>Bc(aa,e,r[0])});function H(e,t){const r={type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},...V(t)};return new Oi(r)}function My(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ni(),...V(t)})}function qy(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ct(),...V(t)})}const na=D("ZodUnion",(e,t)=>{Jo.init(e,t),de.init(e,t),e.options=t.options});function xt(e,t){return new na({type:"union",options:e,...V(t)})}const ah=D("ZodDiscriminatedUnion",(e,t)=>{na.init(e,t),Nf.init(e,t)});function jt(e,t,r){return new ah({type:"union",options:t,discriminator:e,...V(r)})}const uh=D("ZodIntersection",(e,t)=>{Of.init(e,t),de.init(e,t)});function ch(e,t){return new uh({type:"intersection",left:e,right:t})}const lh=D("ZodTuple",(e,t)=>{$i.init(e,t),de.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vy(e,t,r){const i=t instanceof ue,n=i?r:t,o=i?t:null;return new lh({type:"tuple",items:e,rest:o,...V(n)})}const ra=D("ZodRecord",(e,t)=>{xf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ze(e,t,r){return new ra({type:"record",keyType:e,valueType:t,...V(r)})}function Ky(e,t,r){return new ra({type:"record",keyType:xt([e,Ni()]),valueType:t,...V(r)})}const fh=D("ZodMap",(e,t)=>{jf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Jy(e,t,r){return new fh({type:"map",keyType:e,valueType:t,...V(r)})}const dh=D("ZodSet",(e,t)=>{Af.init(e,t),de.init(e,t),e.min=(...r)=>e.check(Vn(...r)),e.nonempty=r=>e.check(Vn(1,r)),e.max=(...r)=>e.check(bi(...r)),e.size=(...r)=>e.check($s(...r))});function Gy(e,t){return new dh({type:"set",valueType:e,...V(t)})}const Kn=D("ZodEnum",(e,t)=>{zf.init(e,t),de.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Kn({...t,checks:[],...V(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Kn({...t,checks:[],...V(n),entries:o})}});function bt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Kn({type:"enum",entries:r,...V(t)})}function Wy(e,t){return new Kn({type:"enum",entries:e,...V(t)})}const hh=D("ZodLiteral",(e,t)=>{Tf.init(e,t),de.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ve(e,t){return new hh({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}const ph=D("ZodFile",(e,t)=>{Pf.init(e,t),de.init(e,t),e.min=(r,i)=>e.check(Vn(r,i)),e.max=(r,i)=>e.check(bi(r,i)),e.mime=(r,i)=>e.check(Es(Array.isArray(r)?r:[r],i))});function Hy(e){return Td(ph,e)}const ia=D("ZodTransform",(e,t)=>{Go.init(e,t),de.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(yn(o,r.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(yn(s))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function oa(e){return new ia({type:"transform",transform:e})}const sa=D("ZodOptional",(e,t)=>{Df.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new sa({type:"optional",innerType:e})}const mh=D("ZodNullable",(e,t)=>{Uf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ui(e){return new mh({type:"nullable",innerType:e})}function Xy(e){return ai(ui(e))}const gh=D("ZodDefault",(e,t)=>{Cf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yh(e,t){return new gh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const vh=D("ZodPrefault",(e,t)=>{Bf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new vh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const aa=D("ZodNonOptional",(e,t)=>{Rf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bh(e,t){return new aa({type:"nonoptional",innerType:e,...V(t)})}const _h=D("ZodSuccess",(e,t)=>{Ff.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yy(e){return new _h({type:"success",innerType:e})}const wh=D("ZodCatch",(e,t)=>{Lf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kh(e,t){return new wh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sh=D("ZodNaN",(e,t)=>{Zf.init(e,t),de.init(e,t)});function Qy(e){return Ed(Sh,e)}const ua=D("ZodPipe",(e,t)=>{Wo.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function ci(e,t){return new ua({type:"pipe",in:e,out:t})}const Ih=D("ZodReadonly",(e,t)=>{Mf.init(e,t),de.init(e,t)});function Eh(e){return new Ih({type:"readonly",innerType:e})}const Nh=D("ZodTemplateLiteral",(e,t)=>{qf.init(e,t),de.init(e,t)});function Rn(e,t){return new Nh({type:"template_literal",parts:e,...V(t)})}const Oh=D("ZodLazy",(e,t)=>{Kf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function xh(e){return new Oh({type:"lazy",getter:e})}const jh=D("ZodPromise",(e,t)=>{Vf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ev(e){return new jh({type:"promise",innerType:e})}const xi=D("ZodCustom",(e,t)=>{Jf.init(e,t),de.init(e,t)});function Ah(e){const t=new Ue({check:"custom"});return t._zod.check=e,t}function bn(e,t){return Pd(xi,e??(()=>!0),t)}function zh(e,t={}){return Dd(xi,e,t)}function Th(e){const t=Ah(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(yn(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(yn(n))}},e(r.value,r)));return t}function Ph(e,t={error:`Input not instance of ${e.name}`}){const r=new xi({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...V(t)});return r._zod.bag.Class=e,r}const tv=(...e)=>Ud({Pipe:ua,Boolean:Ii,String:ki,Transform:ia},...e);function nv(e){const t=xh(()=>xt([q(e),Ke(),Re(),th(),qe(t),Ze(q(),t)]));return t}function rv(e,t){return ci(oa(e),t)}const iv={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 ov(e){Xe({customError:e})}function sv(){return Xe().customError}var _o;_o||(_o={});function av(e){return Qf(ki,e)}function uv(e){return sd(Si,e)}function Dh(e){return hd(Ii,e)}function cv(e){return md(Ei,e)}function lv(e){return Id(ta,e)}var fv=Object.freeze({__proto__:null,bigint:cv,boolean:Dh,date:lv,number:uv,string:av});Xe(Gf());var Dt=Object.freeze({__proto__:null,$brand:Ic,$input:Xf,$output:Hf,NEVER:Sc,TimePrecision:ed,ZodAny:nh,ZodArray:sh,ZodBase64:Hs,ZodBase64URL:Xs,ZodBigInt:Ei,ZodBigIntFormat:ea,ZodBoolean:Ii,ZodCIDRv4:Gs,ZodCIDRv6:Ws,ZodCUID:Ls,ZodCUID2:Zs,ZodCatch:wh,ZodCustom:xi,ZodCustomStringFormat:Xd,ZodDate:ta,ZodDefault:gh,ZodDiscriminatedUnion:ah,ZodE164:Ys,ZodEmail:Cs,ZodEmoji:Rs,ZodEnum:Kn,ZodError:cy,ZodFile:ph,get ZodFirstPartyTypeKind(){return _o},ZodGUID:si,ZodIPv4:Ks,ZodIPv6:Js,ZodISODate:Ts,ZodISODateTime:zs,ZodISODuration:Ds,ZodISOTime:Ps,ZodIntersection:uh,ZodIssueCode:iv,ZodJWT:Qs,ZodKSUID:Vs,ZodLazy:Oh,ZodLiteral:hh,ZodMap:fh,ZodNaN:Sh,ZodNanoID:Fs,ZodNever:ih,ZodNonOptional:aa,ZodNull:eh,ZodNullable:mh,ZodNumber:Si,ZodNumberFormat:Sn,ZodObject:Oi,ZodOptional:sa,ZodPipe:ua,ZodPrefault:vh,ZodPromise:jh,ZodReadonly:Ih,ZodRealError:Qn,ZodRecord:ra,ZodSet:dh,ZodString:ki,ZodStringFormat:Oe,ZodSuccess:_h,ZodSymbol:Yd,ZodTemplateLiteral:Nh,ZodTransform:ia,ZodTuple:lh,ZodType:de,ZodULID:Ms,ZodURL:Bs,ZodUUID:It,ZodUndefined:Qd,ZodUnion:na,ZodUnknown:rh,ZodVoid:oh,ZodXID:qs,_ZodString:Us,_default:yh,any:Fy,array:qe,base64:Ey,base64url:Ny,bigint:Dy,boolean:Re,catch:kh,check:Ah,cidrv4:Sy,cidrv6:Iy,clone:$t,coerce:fv,config:Xe,core:ay,cuid:vy,cuid2:be,custom:bn,date:Ie,discriminatedUnion:jt,e164:Oy,email:ly,emoji:gy,endsWith:Is,enum:bt,file:Hy,flattenError:To,float32:Ay,float64:zy,formatError:Po,function:Rd,getErrorMap:sv,globalRegistry:qt,gt:Gt,gte:nt,guid:fy,includes:ks,instanceof:Ph,int:bo,int32:Ty,int64:Uy,intersection:ch,ipv4:wy,ipv6:ky,iso:uy,json:nv,jwt:xy,keyof:Zy,ksuid:_y,lazy:xh,length:wi,literal:ve,locales:Wf,looseObject:qy,lowercase:_s,lt:Jt,lte:ht,map:Jy,maxLength:_i,maxSize:bi,mime:Es,minLength:$n,minSize:Vn,multipleOf:qn,nan:Qy,nanoid:yy,nativeEnum:Wy,negative:Od,never:Ni,nonnegative:jd,nonoptional:bh,nonpositive:xd,normalize:Ns,null:th,nullable:ui,nullish:Xy,number:Ke,object:H,optional:ai,overwrite:Yt,parse:Kd,parseAsync:Jd,partialRecord:Ky,pipe:ci,positive:Nd,prefault:$h,preprocess:rv,prettifyError:Zc,promise:ev,property:Ad,readonly:Eh,record:Ze,refine:zh,regex:bs,regexes:wl,registry:Xo,safeParse:Gd,safeParseAsync:Wd,set:Gy,setErrorMap:ov,size:$s,startsWith:Ss,strictObject:My,string:q,stringFormat:jy,stringbool:tv,success:Yy,superRefine:Th,symbol:By,templateLiteral:Rn,toJSONSchema:Fd,toLowerCase:xs,toUpperCase:js,transform:oa,treeifyError:Fc,trim:Os,tuple:Vy,uint32:Py,uint64:Cy,ulid:$y,undefined:Ry,union:xt,unknown:Ct,uppercase:ws,url:Hd,uuid:dy,uuidv4:hy,uuidv6:py,uuidv7:my,void:Ly,xid:by});function dv(e,t,r){let i=n=>e(n,...t);return r===void 0?i:Object.assign(i,{lazy:r,lazyArgs:t})}function Uh(e,t,r){let i=e.length-t.length;if(i===0)return e(...t);if(i===1)return dv(e,t,r);throw new Error("Wrong number of arguments")}var Ch={done:!1,hasNext:!1};function qa(e,...t){let r=e,i=t.map(o=>"lazy"in o?hv(o):void 0),n=0;for(;n<t.length;){if(i[n]===void 0||!pv(r)){let c=t[n];r=c(r),n+=1;continue}let o=[];for(let c=n;c<t.length;c++){let d=i[c];if(d===void 0||(o.push(d),d.isSingle))break}let s=[];for(let c of r)if(Bh(c,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,n+=o.length}return r}function Bh(e,t,r){if(r.length===0)return t.push(e),!1;let i=e,n=Ch,o=!1;for(let[s,a]of r.entries()){let{index:c,items:d}=a;if(d.push(i),n=a(i,c,d),a.index+=1,n.hasNext){if(n.hasMany??!1){for(let u of n.next)if(Bh(u,t,r.slice(s+1)))return!0;return o}i=n.next}if(!n.hasNext)break;n.done&&(o=!0)}return n.hasNext&&t.push(i),o}function hv(e){let{lazy:t,lazyArgs:r}=e,i=t(...r);return Object.assign(i,{isSingle:t.single??!1,index:0,items:[]})}function pv(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function mv(e,t){let r=t.length-e.length;if(r===1){let[i,...n]=t;return qa(i,{lazy:e,lazyArgs:n})}if(r===0){let i={lazy:e,lazyArgs:t};return Object.assign(n=>qa(n,i),i)}throw new Error("Wrong number of arguments")}function gv(...e){return mv(yv,e)}function yv(){let e=new Set;return t=>e.has(t)?Ch:(e.add(t),{done:!1,hasNext:!0,next:t})}function vv(...e){return Uh($v,e)}function $v(e,t){let r={};for(let[i,n]of Object.entries(e)){let o=t(n,i,e);r[i]=o}return r}function bv(...e){return Uh(Object.fromEntries,e)}const ca=Symbol.for("yaml.alias"),wo=Symbol.for("yaml.document"),Ut=Symbol.for("yaml.map"),Rh=Symbol.for("yaml.pair"),vt=Symbol.for("yaml.scalar"),In=Symbol.for("yaml.seq"),at=Symbol.for("yaml.node.type"),Qt=e=>!!e&&typeof e=="object"&&e[at]===ca,ji=e=>!!e&&typeof e=="object"&&e[at]===wo,er=e=>!!e&&typeof e=="object"&&e[at]===Ut,De=e=>!!e&&typeof e=="object"&&e[at]===Rh,Ee=e=>!!e&&typeof e=="object"&&e[at]===vt,tr=e=>!!e&&typeof e=="object"&&e[at]===In;function Te(e){if(e&&typeof e=="object")switch(e[at]){case Ut:case In:return!0}return!1}function Pe(e){if(e&&typeof e=="object")switch(e[at]){case ca:case Ut:case vt:case In:return!0}return!1}const Fh=e=>(Ee(e)||Te(e))&&!!e.anchor,Mt=Symbol("break visit"),_v=Symbol("skip children"),Fn=Symbol("remove node");function En(e,t){const r=wv(t);ji(e)?un(null,e.contents,r,Object.freeze([e]))===Fn&&(e.contents=null):un(null,e,r,Object.freeze([]))}En.BREAK=Mt;En.SKIP=_v;En.REMOVE=Fn;function un(e,t,r,i){const n=kv(e,t,r,i);if(Pe(n)||De(n))return Sv(e,i,n),un(e,n,r,i);if(typeof n!="symbol"){if(Te(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){const s=un(o,t.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===Mt)return Mt;s===Fn&&(t.items.splice(o,1),o-=1)}}}else if(De(t)){i=Object.freeze(i.concat(t));const o=un("key",t.key,r,i);if(o===Mt)return Mt;o===Fn&&(t.key=null);const s=un("value",t.value,r,i);if(s===Mt)return Mt;s===Fn&&(t.value=null)}}return n}function wv(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function kv(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(er(t))return r.Map?.(e,t,i);if(tr(t))return r.Seq?.(e,t,i);if(De(t))return r.Pair?.(e,t,i);if(Ee(t))return r.Scalar?.(e,t,i);if(Qt(t))return r.Alias?.(e,t,i)}function Sv(e,t,r){const i=t[t.length-1];if(Te(i))i.items[e]=r;else if(De(i))e==="key"?i.key=r:i.value=r;else if(ji(i))i.contents=r;else{const n=Qt(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}const Iv={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ev=e=>e.replace(/[!,[\]{}]/g,t=>Iv[t]);class We{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,t),this.tags=Object.assign({},We.defaultTags,r)}clone(){const t=new We(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[o,s]=i;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}const[,i,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);const o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[r,i]of Object.entries(this.tags))if(t.startsWith(i))return r+Ev(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let n;if(t&&i.length>0&&Pe(t.contents)){const o={};En(t.contents,(s,a)=>{Pe(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(const[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!t||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
30
+ `)}}We.defaultYaml={explicit:!1,version:"1.2"};We.defaultTags={"!!":"tag:yaml.org,2002:"};function Lh(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function Zh(e){const t=new Set;return En(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function Mh(e,t){for(let r=1;;++r){const i=`${e}${r}`;if(!t.has(i))return i}}function Nv(e,t){const r=[],i=new Map;let n=null;return{onAnchor:o=>{r.push(o),n??(n=Zh(e));const s=Mh(t,n);return n.add(s),s},setAnchors:()=>{for(const o of r){const s=i.get(o);if(typeof s=="object"&&s.anchor&&(Ee(s.node)||Te(s.node)))s.node.anchor=s.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}function cn(e,t,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){const s=i[n],a=cn(e,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(const n of Array.from(i.keys())){const o=i.get(n),s=cn(e,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(const n of Array.from(i)){const o=cn(e,i,n,n);o===void 0?i.delete(n):o!==n&&(i.delete(n),i.add(o))}else for(const[n,o]of Object.entries(i)){const s=cn(e,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return e.call(t,r,i)}function st(e,t,r){if(Array.isArray(e))return e.map((i,n)=>st(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!Fh(e))return e.toJSON(t,r);const i={aliasCount:0,count:1,res:void 0};r.anchors.set(e,i),r.onCreate=o=>{i.res=o,delete r.onCreate};const n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}class la{constructor(t){Object.defineProperty(this,at,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!ji(t))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=st(this,"",s);if(typeof n=="function")for(const{count:c,res:d}of s.anchors.values())n(d,c);return typeof o=="function"?cn(o,{"":a},"",a):a}}class fa extends la{constructor(t){super(ca),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],En(t,{Node:(o,s)=>{(Qt(s)||Fh(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(const o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(t,r){if(!r)return{source:this.source};const{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(st(s,null,r),a=i.get(s)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Xr(n,s,i)),a.count*a.aliasCount>o)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(t,r,i){const n=`*${this.source}`;if(t){if(Lh(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${n} `}return n}}function Xr(e,t,r){if(Qt(t)){const i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(Te(t)){let i=0;for(const n of t.items){const o=Xr(e,n,r);o>i&&(i=o)}return i}else if(De(t)){const i=Xr(e,t.key,r),n=Xr(e,t.value,r);return Math.max(i,n)}return 1}const qh=e=>!e||typeof e!="function"&&typeof e!="object";class le extends la{constructor(t){super(vt),this.value=t}toJSON(t,r){return r?.keep?this.value:st(this.value,t,r)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const Ov="tag:yaml.org,2002:";function xv(e,t,r){if(t){const i=r.filter(o=>o.tag===t),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(i=>i.identify?.(e)&&!i.format)}function Jn(e,t,r){if(ji(e)&&(e=e.contents),Pe(e))return e;if(De(e)){const h=r.schema[Ut].createNode?.(r.schema,null,r);return h.items.push(e),h}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r;let c;if(i&&e&&typeof e=="object"){if(c=a.get(e),c)return c.anchor??(c.anchor=n(e)),new fa(c.anchor);c={anchor:null,node:null},a.set(e,c)}t?.startsWith("!!")&&(t=Ov+t.slice(2));let d=xv(e,t,s.tags);if(!d){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const h=new le(e);return c&&(c.node=h),h}d=e instanceof Map?s[Ut]:Symbol.iterator in Object(e)?s[In]:s[Ut]}o&&(o(d),delete r.onTagObj);const u=d?.createNode?d.createNode(r.schema,e,r):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(r.schema,e,r):new le(e);return t?u.tag=t:d.default||(u.tag=d.tag),c&&(c.node=u),u}function li(e,t,r){let i=r;for(let n=t.length-1;n>=0;--n){const o=t[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return Jn(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Cn=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Vh extends la{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(i=>Pe(i)||De(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Cn(t))this.add(r);else{const[i,...n]=t,o=this.get(i,!0);if(Te(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(t){const[r,...i]=t;if(i.length===0)return this.delete(r);const n=this.get(r,!0);if(Te(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(t,r){const[i,...n]=t,o=this.get(i,!0);return n.length===0?!r&&Ee(o)?o.value:o:Te(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!De(r))return!1;const i=r.value;return i==null||t&&Ee(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[r,...i]=t;if(i.length===0)return this.has(r);const n=this.get(r,!0);return Te(n)?n.hasIn(i):!1}setIn(t,r){const[i,...n]=t;if(n.length===0)this.set(i,r);else{const o=this.get(i,!0);if(Te(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}}const jv=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Et(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Vt=(e,t,r)=>e.endsWith(`
31
31
  `)?Et(r,t):r.includes(`
32
32
  `)?`
33
33
  `+Et(r,t):(e.endsWith(" ")?"":" ")+r,Kh="flow",ko="block",Yr="quoted";function Ai(e,t,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!n||n<0)return e;n<o&&(o=0);const c=Math.max(1+o,1+n-t.length);if(e.length<=c)return e;const d=[],u={};let h=n-t.length;typeof i=="number"&&(i>n-Math.max(2,o)?d.push(0):h=n-i);let y,_,b=!1,g=-1,m=-1,$=-1;r===ko&&(g=Va(e,g,t.length),g!==-1&&(h=g+c));for(let v;v=e[g+=1];){if(r===Yr&&v==="\\"){switch(m=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}$=g}if(v===`
@@ -36,7 +36,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36
36
  `&&S!==" "&&(y=g)}if(g>=h)if(y)d.push(y),h=y+c,y=void 0;else if(r===Yr){for(;_===" "||_===" ";)_=v,v=e[g+=1],b=!0;const S=g>$+1?g-2:m-1;if(u[S])return e;d.push(S),u[S]=!0,h=S+c,y=void 0}else b=!0}_=v}if(b&&a&&a(),d.length===0)return e;s&&s();let f=e.slice(0,d[0]);for(let v=0;v<d.length;++v){const S=d[v],E=d[v+1]||e.length;S===0?f=`
37
37
  ${t}${e.slice(0,E)}`:(r===Yr&&u[S]&&(f+=`${e[S]}\\`),f+=`
38
38
  ${t}${e.slice(S+1,E)}`)}return f}function Va(e,t,r){let i=t,n=t+1,o=e[n];for(;o===" "||o===" ";)if(t<n+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
39
- `);i=t,n=t+1,o=e[n]}return i}const zi=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ti=e=>/^(%|---|\.\.\.)/m.test(e);function jv(e,t,r){if(!t||t<0)return!1;const i=t-r,n=e.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(e[o]===`
39
+ `);i=t,n=t+1,o=e[n]}return i}const zi=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ti=e=>/^(%|---|\.\.\.)/m.test(e);function Av(e,t,r){if(!t||t<0)return!1;const i=t-r,n=e.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(e[o]===`
40
40
  `){if(o-s>i)return!0;if(s=o+1,n-s<=i)return!1}return!0}function Ln(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:i}=t,n=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Ti(e)?" ":"");let s="",a=0;for(let c=0,d=r[c];d;d=r[++c])if(d===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,d="\\"),d==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);const u=r.substr(c+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(s+=r.slice(a,c)+`
41
41
 
42
42
  `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)s+=`
@@ -45,7 +45,7 @@ ${t}${e.slice(S+1,E)}`)}return f}function Va(e,t,r){let i=t,n=t+1,o=e[n];for(;o=
45
45
  ${r}`)+"'";return t.implicitKey?i:Ai(i,r,Kh,zi(t,!1))}function ln(e,t){const{singleQuote:r}=t.options;let i;if(r===!1)i=Ln;else{const n=e.includes('"'),o=e.includes("'");n&&!o?i=So:o&&!n?i=Ln:i=r?So:Ln}return i(e,t)}let Io;try{Io=new RegExp(`(^|(?<!
46
46
  ))
47
47
  +(?!
48
- |$)`,"g")}catch{Io=/\n+(?!\n|$)/g}function Qr({comment:e,type:t,value:r},i,n,o){const{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return ln(r,i);const d=i.indent||(i.forceBlockIndent||Ti(r)?" ":""),u=s==="literal"?!0:s==="folded"||t===le.BLOCK_FOLDED?!1:t===le.BLOCK_LITERAL?!0:!jv(r,c,d.length);if(!r)return u?`|
48
+ |$)`,"g")}catch{Io=/\n+(?!\n|$)/g}function Qr({comment:e,type:t,value:r},i,n,o){const{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return ln(r,i);const d=i.indent||(i.forceBlockIndent||Ti(r)?" ":""),u=s==="literal"?!0:s==="folded"||t===le.BLOCK_FOLDED?!1:t===le.BLOCK_LITERAL?!0:!Av(r,c,d.length);if(!r)return u?`|
49
49
  `:`>
50
50
  `;let h,y;for(y=r.length;y>0;--y){const E=r[y-1];if(E!==`
51
51
  `&&E!==" "&&E!==" ")break}let _=r.substring(y);const b=_.indexOf(`
@@ -54,12 +54,12 @@ ${r}`)+"'";return t.implicitKey?i:Ai(i,r,Kh,zi(t,!1))}function ln(e,t){const{sin
54
54
  `)$=m;else break}let f=r.substring(0,$<m?$+1:m);f&&(r=r.substring(f.length),f=f.replace(/\n+/g,`$&${d}`));let S=(g?d?"2":"1":"")+h;if(e&&(S+=" "+a(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){const E=r.replace(/\n+/g,`
55
55
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let I=!1;const O=zi(i,!0);s!=="folded"&&t!==le.BLOCK_FOLDED&&(O.onOverflow=()=>{I=!0});const j=Ai(`${f}${E}${_}`,d,ko,O);if(!I)return`>${S}
56
56
  ${d}${j}`}return r=r.replace(/\n+/g,`$&${d}`),`|${S}
57
- ${d}${f}${r}${_}`}function Av(e,t,r,i){const{type:n,value:o}=e,{actualString:s,implicitKey:a,indent:c,indentStep:d,inFlow:u}=t;if(a&&o.includes(`
57
+ ${d}${f}${r}${_}`}function zv(e,t,r,i){const{type:n,value:o}=e,{actualString:s,implicitKey:a,indent:c,indentStep:d,inFlow:u}=t;if(a&&o.includes(`
58
58
  `)||u&&/[[\]{},]/.test(o))return ln(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
59
59
  `)?ln(o,t):Qr(e,t,r,i);if(!a&&!u&&n!==le.PLAIN&&o.includes(`
60
60
  `))return Qr(e,t,r,i);if(Ti(o)){if(c==="")return t.forceBlockIndent=!0,Qr(e,t,r,i);if(a&&c===d)return ln(o,t)}const h=o.replace(/\n+/g,`$&
61
- ${c}`);if(s){const y=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(h),{compat:_,tags:b}=t.doc.schema;if(b.some(y)||_?.some(y))return ln(o,t)}return a?h:Ai(h,c,Kh,zi(t,!1))}function da(e,t,r,i){const{implicitKey:n,inFlow:o}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return n||o?ln(s.value,t):Qr(s,t,r,i);case le.QUOTE_DOUBLE:return Ln(s.value,t);case le.QUOTE_SINGLE:return So(s.value,t);case le.PLAIN:return Av(s,t,r,i);default:return null}};let d=c(a);if(d===null){const{defaultKeyType:u,defaultStringType:h}=t.options,y=n&&u||h;if(d=c(y),d===null)throw new Error(`Unsupported default string type ${y}`)}return d}function Jh(e,t){const r=Object.assign({blockQuote:!0,commentString:xv,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function zv(e,t){if(t.tag){const n=e.filter(o=>o.tag===t.tag);if(n.length>0)return n.find(o=>o.format===t.format)??n[0]}let r,i;if(Ee(t)){i=t.value;let n=e.filter(o=>o.identify?.(i));if(n.length>1){const o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===t.format)??n.find(o=>!o.format)}else i=t,r=e.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){const n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function Tv(e,t,{anchors:r,doc:i}){if(!i.directives)return"";const n=[],o=(Ee(e)||Te(e))&&e.anchor;o&&Lh(o)&&(r.add(o),n.push(`&${o}`));const s=e.tag??(t.default?null:t.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function _n(e,t,r,i){if(De(e))return e.toString(t,r,i);if(Qt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n;const o=Pe(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=zv(t.doc.schema.tags,o));const s=Tv(o,n,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const a=typeof n.stringify=="function"?n.stringify(o,t,r,i):Ee(o)?da(o,t,r,i):o.toString(t,r,i);return s?Ee(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
62
- ${t.indent}${a}`:a}function Pv({key:e,value:t},r,i,n){const{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:d,indentSeq:u,simpleKeys:h}}=r;let y=Pe(e)&&e.comment||null;if(h){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Te(e)||!Pe(e)&&typeof e=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let _=!h&&(!e||y&&t==null&&!r.inFlow||Te(e)||(Ee(e)?e.type===le.BLOCK_FOLDED||e.type===le.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!_&&(h||!o),indent:a+c});let b=!1,g=!1,m=_n(e,r,()=>b=!0,()=>g=!0);if(!_&&!r.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(r.inFlow){if(o||t==null)return b&&i&&i(),m===""?"?":_?`? ${m}`:m}else if(o&&!h||t==null&&_)return m=`? ${m}`,y&&!b?m+=Vt(m,r.indent,d(y)):g&&n&&n(),m;b&&(y=null),_?(y&&(m+=Vt(m,r.indent,d(y))),m=`? ${m}
61
+ ${c}`);if(s){const y=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(h),{compat:_,tags:b}=t.doc.schema;if(b.some(y)||_?.some(y))return ln(o,t)}return a?h:Ai(h,c,Kh,zi(t,!1))}function da(e,t,r,i){const{implicitKey:n,inFlow:o}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return n||o?ln(s.value,t):Qr(s,t,r,i);case le.QUOTE_DOUBLE:return Ln(s.value,t);case le.QUOTE_SINGLE:return So(s.value,t);case le.PLAIN:return zv(s,t,r,i);default:return null}};let d=c(a);if(d===null){const{defaultKeyType:u,defaultStringType:h}=t.options,y=n&&u||h;if(d=c(y),d===null)throw new Error(`Unsupported default string type ${y}`)}return d}function Jh(e,t){const r=Object.assign({blockQuote:!0,commentString:jv,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function Tv(e,t){if(t.tag){const n=e.filter(o=>o.tag===t.tag);if(n.length>0)return n.find(o=>o.format===t.format)??n[0]}let r,i;if(Ee(t)){i=t.value;let n=e.filter(o=>o.identify?.(i));if(n.length>1){const o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===t.format)??n.find(o=>!o.format)}else i=t,r=e.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){const n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function Pv(e,t,{anchors:r,doc:i}){if(!i.directives)return"";const n=[],o=(Ee(e)||Te(e))&&e.anchor;o&&Lh(o)&&(r.add(o),n.push(`&${o}`));const s=e.tag??(t.default?null:t.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function _n(e,t,r,i){if(De(e))return e.toString(t,r,i);if(Qt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n;const o=Pe(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=Tv(t.doc.schema.tags,o));const s=Pv(o,n,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const a=typeof n.stringify=="function"?n.stringify(o,t,r,i):Ee(o)?da(o,t,r,i):o.toString(t,r,i);return s?Ee(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
62
+ ${t.indent}${a}`:a}function Dv({key:e,value:t},r,i,n){const{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:d,indentSeq:u,simpleKeys:h}}=r;let y=Pe(e)&&e.comment||null;if(h){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Te(e)||!Pe(e)&&typeof e=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let _=!h&&(!e||y&&t==null&&!r.inFlow||Te(e)||(Ee(e)?e.type===le.BLOCK_FOLDED||e.type===le.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!_&&(h||!o),indent:a+c});let b=!1,g=!1,m=_n(e,r,()=>b=!0,()=>g=!0);if(!_&&!r.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(r.inFlow){if(o||t==null)return b&&i&&i(),m===""?"?":_?`? ${m}`:m}else if(o&&!h||t==null&&_)return m=`? ${m}`,y&&!b?m+=Vt(m,r.indent,d(y)):g&&n&&n(),m;b&&(y=null),_?(y&&(m+=Vt(m,r.indent,d(y))),m=`? ${m}
63
63
  ${a}:`):(m=`${m}:`,y&&(m+=Vt(m,r.indent,d(y))));let $,f,v;Pe(t)?($=!!t.spaceBefore,f=t.commentBefore,v=t.comment):($=!1,f=null,v=null,t&&typeof t=="object"&&(t=s.createNode(t))),r.implicitKey=!1,!_&&!y&&Ee(t)&&(r.indentAtStart=m.length+1),g=!1,!u&&c.length>=2&&!r.inFlow&&!_&&tr(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let S=!1;const E=_n(t,r,()=>S=!0,()=>g=!0);let I=" ";if(y||$||f){if(I=$?`
64
64
  `:"",f){const O=d(f);I+=`
65
65
  ${Et(O,r.indent)}`}E===""&&!r.inFlow?I===`
@@ -69,32 +69,32 @@ ${Et(O,r.indent)}`}E===""&&!r.inFlow?I===`
69
69
  ${r.indent}`}else if(!_&&Te(t)){const O=E[0],j=E.indexOf(`
70
70
  `),L=j!==-1,G=r.inFlow??t.flow??t.items.length===0;if(L||!G){let Y=!1;if(L&&(O==="&"||O==="!")){let Q=E.indexOf(" ");O==="&"&&Q!==-1&&Q<j&&E[Q+1]==="!"&&(Q=E.indexOf(" ",Q+1)),(Q===-1||j<Q)&&(Y=!0)}Y||(I=`
71
71
  ${r.indent}`)}}else(E===""||E[0]===`
72
- `)&&(I="");return m+=I+E,r.inFlow?S&&i&&i():v&&!S?m+=Vt(m,r.indent,d(v)):g&&n&&n(),m}function Gh(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const ar="<<",Nt={identify:e=>e===ar||typeof e=="symbol"&&e.description===ar,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new le(Symbol(ar)),{addToJSMap:Wh}),stringify:()=>ar},Dv=(e,t)=>(Nt.identify(t)||Ee(t)&&(!t.type||t.type===le.PLAIN)&&Nt.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Nt.tag&&r.default);function Wh(e,t,r){if(r=e&&Qt(r)?r.resolve(e.doc):r,tr(r))for(const i of r.items)Ji(e,t,i);else if(Array.isArray(r))for(const i of r)Ji(e,t,i);else Ji(e,t,r)}function Ji(e,t,r){const i=e&&Qt(r)?r.resolve(e.doc):r;if(!er(i))throw new Error("Merge sources must be maps or map aliases");const n=i.toJSON(null,e,Map);for(const[o,s]of n)t instanceof Map?t.has(o)||t.set(o,s):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Hh(e,t,{key:r,value:i}){if(Pe(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(Dv(e,r))Wh(e,t,i);else{const n=at(r,"",e);if(t instanceof Map)t.set(n,at(i,n,e));else if(t instanceof Set)t.add(n);else{const o=Uv(r,n,e),s=at(i,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function Uv(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Pe(e)&&r?.doc){const i=Jh(r.doc,{});i.anchors=new Set;for(const o of r.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;const n=e.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),Gh(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}function ha(e,t,r){const i=Jn(e,void 0,r),n=Jn(t,void 0,r);return new He(i,n)}class He{constructor(t,r=null){Object.defineProperty(this,ut,{value:Rh}),this.key=t,this.value=r}clone(t){let{key:r,value:i}=this;return Pe(r)&&(r=r.clone(t)),Pe(i)&&(i=i.clone(t)),new He(r,i)}toJSON(t,r){const i=r?.mapAsMap?new Map:{};return Hh(r,i,this)}toString(t,r,i){return t?.doc?Pv(this,t,r,i):JSON.stringify(this)}}function Xh(e,t,r){return(t.inFlow??e.flow?Bv:Cv)(e,t,r)}function Cv({comment:e,items:t},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){const{indent:c,options:{commentString:d}}=r,u=Object.assign({},r,{indent:o,type:null});let h=!1;const y=[];for(let b=0;b<t.length;++b){const g=t[b];let m=null;if(Pe(g))!h&&g.spaceBefore&&y.push(""),fi(r,y,g.commentBefore,h),g.comment&&(m=g.comment);else if(De(g)){const f=Pe(g.key)?g.key:null;f&&(!h&&f.spaceBefore&&y.push(""),fi(r,y,f.commentBefore,h))}h=!1;let $=_n(g,u,()=>m=null,()=>h=!0);m&&($+=Vt($,o,d(m))),h&&m&&(h=!1),y.push(i+$)}let _;if(y.length===0)_=n.start+n.end;else{_=y[0];for(let b=1;b<y.length;++b){const g=y[b];_+=g?`
72
+ `)&&(I="");return m+=I+E,r.inFlow?S&&i&&i():v&&!S?m+=Vt(m,r.indent,d(v)):g&&n&&n(),m}function Gh(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const ar="<<",Nt={identify:e=>e===ar||typeof e=="symbol"&&e.description===ar,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new le(Symbol(ar)),{addToJSMap:Wh}),stringify:()=>ar},Uv=(e,t)=>(Nt.identify(t)||Ee(t)&&(!t.type||t.type===le.PLAIN)&&Nt.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Nt.tag&&r.default);function Wh(e,t,r){if(r=e&&Qt(r)?r.resolve(e.doc):r,tr(r))for(const i of r.items)Ji(e,t,i);else if(Array.isArray(r))for(const i of r)Ji(e,t,i);else Ji(e,t,r)}function Ji(e,t,r){const i=e&&Qt(r)?r.resolve(e.doc):r;if(!er(i))throw new Error("Merge sources must be maps or map aliases");const n=i.toJSON(null,e,Map);for(const[o,s]of n)t instanceof Map?t.has(o)||t.set(o,s):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Hh(e,t,{key:r,value:i}){if(Pe(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(Uv(e,r))Wh(e,t,i);else{const n=st(r,"",e);if(t instanceof Map)t.set(n,st(i,n,e));else if(t instanceof Set)t.add(n);else{const o=Cv(r,n,e),s=st(i,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function Cv(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Pe(e)&&r?.doc){const i=Jh(r.doc,{});i.anchors=new Set;for(const o of r.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;const n=e.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),Gh(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}function ha(e,t,r){const i=Jn(e,void 0,r),n=Jn(t,void 0,r);return new He(i,n)}class He{constructor(t,r=null){Object.defineProperty(this,at,{value:Rh}),this.key=t,this.value=r}clone(t){let{key:r,value:i}=this;return Pe(r)&&(r=r.clone(t)),Pe(i)&&(i=i.clone(t)),new He(r,i)}toJSON(t,r){const i=r?.mapAsMap?new Map:{};return Hh(r,i,this)}toString(t,r,i){return t?.doc?Dv(this,t,r,i):JSON.stringify(this)}}function Xh(e,t,r){return(t.inFlow??e.flow?Rv:Bv)(e,t,r)}function Bv({comment:e,items:t},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){const{indent:c,options:{commentString:d}}=r,u=Object.assign({},r,{indent:o,type:null});let h=!1;const y=[];for(let b=0;b<t.length;++b){const g=t[b];let m=null;if(Pe(g))!h&&g.spaceBefore&&y.push(""),fi(r,y,g.commentBefore,h),g.comment&&(m=g.comment);else if(De(g)){const f=Pe(g.key)?g.key:null;f&&(!h&&f.spaceBefore&&y.push(""),fi(r,y,f.commentBefore,h))}h=!1;let $=_n(g,u,()=>m=null,()=>h=!0);m&&($+=Vt($,o,d(m))),h&&m&&(h=!1),y.push(i+$)}let _;if(y.length===0)_=n.start+n.end;else{_=y[0];for(let b=1;b<y.length;++b){const g=y[b];_+=g?`
73
73
  ${c}${g}`:`
74
74
  `}}return e?(_+=`
75
- `+Et(d(e),c),a&&a()):h&&s&&s(),_}function Bv({items:e},t,{flowChars:r,itemIndent:i}){const{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;i+=o;const c=Object.assign({},t,{indent:i,inFlow:!0,type:null});let d=!1,u=0;const h=[];for(let b=0;b<e.length;++b){const g=e[b];let m=null;if(Pe(g))g.spaceBefore&&h.push(""),fi(t,h,g.commentBefore,!1),g.comment&&(m=g.comment);else if(De(g)){const f=Pe(g.key)?g.key:null;f&&(f.spaceBefore&&h.push(""),fi(t,h,f.commentBefore,!1),f.comment&&(d=!0));const v=Pe(g.value)?g.value:null;v?(v.comment&&(m=v.comment),v.commentBefore&&(d=!0)):g.value==null&&f?.comment&&(m=f.comment)}m&&(d=!0);let $=_n(g,c,()=>m=null);b<e.length-1&&($+=","),m&&($+=Vt($,i,a(m))),!d&&(h.length>u||$.includes(`
75
+ `+Et(d(e),c),a&&a()):h&&s&&s(),_}function Rv({items:e},t,{flowChars:r,itemIndent:i}){const{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;i+=o;const c=Object.assign({},t,{indent:i,inFlow:!0,type:null});let d=!1,u=0;const h=[];for(let b=0;b<e.length;++b){const g=e[b];let m=null;if(Pe(g))g.spaceBefore&&h.push(""),fi(t,h,g.commentBefore,!1),g.comment&&(m=g.comment);else if(De(g)){const f=Pe(g.key)?g.key:null;f&&(f.spaceBefore&&h.push(""),fi(t,h,f.commentBefore,!1),f.comment&&(d=!0));const v=Pe(g.value)?g.value:null;v?(v.comment&&(m=v.comment),v.commentBefore&&(d=!0)):g.value==null&&f?.comment&&(m=f.comment)}m&&(d=!0);let $=_n(g,c,()=>m=null);b<e.length-1&&($+=","),m&&($+=Vt($,i,a(m))),!d&&(h.length>u||$.includes(`
76
76
  `))&&(d=!0),h.push($),u=h.length}const{start:y,end:_}=r;if(h.length===0)return y+_;if(!d){const b=h.reduce((g,m)=>g+m.length+2,2);d=t.options.lineWidth>0&&b>t.options.lineWidth}if(d){let b=y;for(const g of h)b+=g?`
77
77
  ${o}${n}${g}`:`
78
78
  `;return`${b}
79
- ${n}${_}`}else return`${y}${s}${h.join(" ")}${s}${_}`}function fi({indent:e,options:{commentString:t}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){const o=Et(t(i),e);r.push(o.trimStart())}}function Kt(e,t){const r=Ee(t)?t.value:t;for(const i of e)if(De(i)&&(i.key===t||i.key===r||Ee(i.key)&&i.key.value===r))return i}class ot extends Vh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ut,t),this.items=[]}static from(t,r,i){const{keepUndefined:n,replacer:o}=i,s=new this(t),a=(c,d)=>{if(typeof o=="function")d=o.call(r,c,d);else if(Array.isArray(o)&&!o.includes(c))return;(d!==void 0||n)&&s.items.push(ha(c,d,i))};if(r instanceof Map)for(const[c,d]of r)a(c,d);else if(r&&typeof r=="object")for(const c of Object.keys(r))a(c,r[c]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,r){let i;De(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new He(t,t?.value):i=new He(t.key,t.value);const n=Kt(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Ee(n.value)&&qh(i.value)?n.value.value=i.value:n.value=i.value}else if(o){const s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(t){const r=Kt(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){const n=Kt(this.items,t)?.value;return(!r&&Ee(n)?n.value:n)??void 0}has(t){return!!Kt(this.items,t)}set(t,r){this.add(new He(t,r),!0)}toJSON(t,r,i){const n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(const o of this.items)Hh(r,n,o);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(const n of this.items)if(!De(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Xh(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}}const Nn={collection:"map",default:!0,nodeClass:ot,tag:"tag:yaml.org,2002:map",resolve(e,t){return er(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>ot.from(e,t,r)};class Wt extends Vh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(In,t),this.items=[]}add(t){this.items.push(t)}delete(t){const r=ur(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){const i=ur(t);if(typeof i!="number")return;const n=this.items[i];return!r&&Ee(n)?n.value:n}has(t){const r=ur(t);return typeof r=="number"&&r<this.items.length}set(t,r){const i=ur(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);const n=this.items[i];Ee(n)&&qh(r)?n.value=r:this.items[i]=r}toJSON(t,r){const i=[];r?.onCreate&&r.onCreate(i);let n=0;for(const o of this.items)i.push(at(o,String(n++),r));return i}toString(t,r,i){return t?Xh(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){const c=r instanceof Set?a:String(s++);a=n.call(r,c,a)}o.items.push(Jn(a,void 0,i))}}return o}}function ur(e){let t=Ee(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const On={collection:"seq",default:!0,nodeClass:Wt,tag:"tag:yaml.org,2002:seq",resolve(e,t){return tr(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>Wt.from(e,t,r)},Pi={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),da(e,t,r,i)}},Di={identify:e=>e==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new le(null),stringify:({source:e},t)=>typeof e=="string"&&Di.test.test(e)?e:t.options.nullStr},pa={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new le(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&pa.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};function mt({format:e,minFractionDigits:t,tag:r,value:i}){if(typeof i=="bigint")return String(i);const n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=JSON.stringify(i);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=t-(o.length-s-1);for(;a-- >0;)o+="0"}return o}const Yh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mt},Qh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():mt(e)}},ep={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new le(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:mt},Ui=e=>typeof e=="bigint"||Number.isInteger(e),ma=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function tp(e,t,r){const{value:i}=e;return Ui(i)&&i>=0?r+i.toString(t):mt(e)}const np={identify:e=>Ui(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>ma(e,2,8,r),stringify:e=>tp(e,8,"0o")},rp={identify:Ui,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>ma(e,0,10,r),stringify:mt},ip={identify:e=>Ui(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>ma(e,2,16,r),stringify:e=>tp(e,16,"0x")},Rv=[Nn,On,Pi,Di,pa,np,rp,ip,Yh,Qh,ep];function Ka(e){return typeof e=="bigint"||Number.isInteger(e)}const cr=({value:e})=>JSON.stringify(e),Fv=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:cr},{identify:e=>e==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:cr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:cr},{identify:Ka,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ka(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:cr}],Lv={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Zv=[Nn,On].concat(Fv,Lv),ga={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const r=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},i,n,o){if(!r)return"";const s=r;let a;if(typeof btoa=="function"){let c="";for(let d=0;d<s.length;++d)c+=String.fromCharCode(s[d]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=le.BLOCK_LITERAL),t!==le.QUOTE_DOUBLE){const c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),d=Math.ceil(a.length/c),u=new Array(d);for(let h=0,y=0;h<d;++h,y+=c)u[h]=a.substr(y,c);a=u.join(t===le.BLOCK_LITERAL?`
79
+ ${n}${_}`}else return`${y}${s}${h.join(" ")}${s}${_}`}function fi({indent:e,options:{commentString:t}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){const o=Et(t(i),e);r.push(o.trimStart())}}function Kt(e,t){const r=Ee(t)?t.value:t;for(const i of e)if(De(i)&&(i.key===t||i.key===r||Ee(i.key)&&i.key.value===r))return i}class it extends Vh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ut,t),this.items=[]}static from(t,r,i){const{keepUndefined:n,replacer:o}=i,s=new this(t),a=(c,d)=>{if(typeof o=="function")d=o.call(r,c,d);else if(Array.isArray(o)&&!o.includes(c))return;(d!==void 0||n)&&s.items.push(ha(c,d,i))};if(r instanceof Map)for(const[c,d]of r)a(c,d);else if(r&&typeof r=="object")for(const c of Object.keys(r))a(c,r[c]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,r){let i;De(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new He(t,t?.value):i=new He(t.key,t.value);const n=Kt(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Ee(n.value)&&qh(i.value)?n.value.value=i.value:n.value=i.value}else if(o){const s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(t){const r=Kt(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){const n=Kt(this.items,t)?.value;return(!r&&Ee(n)?n.value:n)??void 0}has(t){return!!Kt(this.items,t)}set(t,r){this.add(new He(t,r),!0)}toJSON(t,r,i){const n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(const o of this.items)Hh(r,n,o);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(const n of this.items)if(!De(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Xh(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}}const Nn={collection:"map",default:!0,nodeClass:it,tag:"tag:yaml.org,2002:map",resolve(e,t){return er(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>it.from(e,t,r)};class Wt extends Vh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(In,t),this.items=[]}add(t){this.items.push(t)}delete(t){const r=ur(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){const i=ur(t);if(typeof i!="number")return;const n=this.items[i];return!r&&Ee(n)?n.value:n}has(t){const r=ur(t);return typeof r=="number"&&r<this.items.length}set(t,r){const i=ur(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);const n=this.items[i];Ee(n)&&qh(r)?n.value=r:this.items[i]=r}toJSON(t,r){const i=[];r?.onCreate&&r.onCreate(i);let n=0;for(const o of this.items)i.push(st(o,String(n++),r));return i}toString(t,r,i){return t?Xh(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){const c=r instanceof Set?a:String(s++);a=n.call(r,c,a)}o.items.push(Jn(a,void 0,i))}}return o}}function ur(e){let t=Ee(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const On={collection:"seq",default:!0,nodeClass:Wt,tag:"tag:yaml.org,2002:seq",resolve(e,t){return tr(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>Wt.from(e,t,r)},Pi={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),da(e,t,r,i)}},Di={identify:e=>e==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new le(null),stringify:({source:e},t)=>typeof e=="string"&&Di.test.test(e)?e:t.options.nullStr},pa={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new le(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&pa.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};function mt({format:e,minFractionDigits:t,tag:r,value:i}){if(typeof i=="bigint")return String(i);const n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=JSON.stringify(i);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=t-(o.length-s-1);for(;a-- >0;)o+="0"}return o}const Yh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mt},Qh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():mt(e)}},ep={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new le(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:mt},Ui=e=>typeof e=="bigint"||Number.isInteger(e),ma=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function tp(e,t,r){const{value:i}=e;return Ui(i)&&i>=0?r+i.toString(t):mt(e)}const np={identify:e=>Ui(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>ma(e,2,8,r),stringify:e=>tp(e,8,"0o")},rp={identify:Ui,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>ma(e,0,10,r),stringify:mt},ip={identify:e=>Ui(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>ma(e,2,16,r),stringify:e=>tp(e,16,"0x")},Fv=[Nn,On,Pi,Di,pa,np,rp,ip,Yh,Qh,ep];function Ka(e){return typeof e=="bigint"||Number.isInteger(e)}const cr=({value:e})=>JSON.stringify(e),Lv=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:cr},{identify:e=>e==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:cr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:cr},{identify:Ka,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ka(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:cr}],Zv={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Mv=[Nn,On].concat(Lv,Zv),ga={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const r=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},i,n,o){if(!r)return"";const s=r;let a;if(typeof btoa=="function"){let c="";for(let d=0;d<s.length;++d)c+=String.fromCharCode(s[d]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=le.BLOCK_LITERAL),t!==le.QUOTE_DOUBLE){const c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),d=Math.ceil(a.length/c),u=new Array(d);for(let h=0,y=0;h<d;++h,y+=c)u[h]=a.substr(y,c);a=u.join(t===le.BLOCK_LITERAL?`
80
80
  `:" ")}return da({comment:e,type:t,value:a},i,n,o)}};function op(e,t){if(tr(e))for(let r=0;r<e.items.length;++r){let i=e.items[r];if(!De(i)){if(er(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");const n=i.items[0]||new He(new le(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
81
81
  ${n.key.commentBefore}`:i.commentBefore),i.comment){const o=n.value??n.key;o.comment=o.comment?`${i.comment}
82
- ${o.comment}`:i.comment}i=n}e.items[r]=De(i)?i:new He(i)}}else t("Expected a sequence for this tag");return e}function sp(e,t,r){const{replacer:i}=r,n=new Wt(e);n.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof i=="function"&&(s=i.call(t,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const d=Object.keys(s);if(d.length===1)a=d[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else a=s;n.items.push(ha(a,c,r))}return n}const ya={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:op,createNode:sp};class dn extends Wt{constructor(){super(),this.add=ot.prototype.add.bind(this),this.delete=ot.prototype.delete.bind(this),this.get=ot.prototype.get.bind(this),this.has=ot.prototype.has.bind(this),this.set=ot.prototype.set.bind(this),this.tag=dn.tag}toJSON(t,r){if(!r)return super.toJSON(t);const i=new Map;r?.onCreate&&r.onCreate(i);for(const n of this.items){let o,s;if(De(n)?(o=at(n.key,"",r),s=at(n.value,o,r)):o=at(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(t,r,i){const n=sp(t,r,i),o=new this;return o.items=n.items,o}}dn.tag="tag:yaml.org,2002:omap";const va={collection:"seq",identify:e=>e instanceof Map,nodeClass:dn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=op(e,t),i=[];for(const{key:n}of r.items)Ee(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new dn,r)},createNode:(e,t,r)=>dn.from(e,t,r)};function ap({value:e,source:t},r){return t&&(e?up:cp).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const up={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new le(!0),stringify:ap},cp={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new le(!1),stringify:ap},Mv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mt},qv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():mt(e)}},Vv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new le(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){const i=e.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:mt},nr=e=>typeof e=="bigint"||Number.isInteger(e);function Ci(e,t,r,{intAsBigInt:i}){const n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return n==="-"?BigInt(-1)*s:s}const o=parseInt(e,r);return n==="-"?-1*o:o}function $a(e,t,r){const{value:i}=e;if(nr(i)){const n=i.toString(t);return i<0?"-"+r+n.substr(1):r+n}return mt(e)}const Kv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Ci(e,2,2,r),stringify:e=>$a(e,2,"0b")},Jv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Ci(e,1,8,r),stringify:e=>$a(e,8,"0")},Gv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Ci(e,0,10,r),stringify:mt},Wv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Ci(e,2,16,r),stringify:e=>$a(e,16,"0x")};class hn extends ot{constructor(t){super(t),this.tag=hn.tag}add(t){let r;De(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new He(t.key,null):r=new He(t,null),Kt(this.items,r.key)||this.items.push(r)}get(t,r){const i=Kt(this.items,t);return!r&&De(i)?Ee(i.key)?i.key.value:i.key:i}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const i=Kt(this.items,t);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new He(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(ha(s,null,i));return o}}hn.tag="tag:yaml.org,2002:set";const ba={collection:"map",identify:e=>e instanceof Set,nodeClass:hn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>hn.from(e,t,r),resolve(e,t){if(er(e)){if(e.hasAllNullValues(!0))return Object.assign(new hn,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function _a(e,t){const r=e[0],i=r==="-"||r==="+"?e.substring(1):e,n=s=>t?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function lp(e){let{value:t}=e,r=s=>s;if(typeof t=="bigint")r=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return mt(e);let i="";t<0&&(i="-",t*=r(-1));const n=r(60),o=[t%n];return t<60?o.unshift(0):(t=(t-o[0])/n,o.unshift(t%n),t>=60&&(t=(t-o[0])/n,o.unshift(t))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const fp={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>_a(e,r),stringify:lp},dp={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>_a(e,!1),stringify:lp},Bi={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Bi.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,i,n,o,s,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let d=Date.UTC(r,i-1,n,o||0,s||0,a||0,c);const u=t[8];if(u&&u!=="Z"){let h=_a(u,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Ja=[Nn,On,Pi,Di,up,cp,Kv,Jv,Gv,Wv,Mv,qv,Vv,ga,Nt,va,ya,ba,fp,dp,Bi],Ga=new Map([["core",Rv],["failsafe",[Nn,On,Pi]],["json",Zv],["yaml11",Ja],["yaml-1.1",Ja]]),Wa={binary:ga,bool:pa,float:ep,floatExp:Qh,floatNaN:Yh,floatTime:dp,int:rp,intHex:ip,intOct:np,intTime:fp,map:Nn,merge:Nt,null:Di,omap:va,pairs:ya,seq:On,set:ba,timestamp:Bi},Hv={"tag:yaml.org,2002:binary":ga,"tag:yaml.org,2002:merge":Nt,"tag:yaml.org,2002:omap":va,"tag:yaml.org,2002:pairs":ya,"tag:yaml.org,2002:set":ba,"tag:yaml.org,2002:timestamp":Bi};function Gi(e,t,r){const i=Ga.get(t);if(i&&!e)return r&&!i.includes(Nt)?i.concat(Nt):i.slice();let n=i;if(!n)if(Array.isArray(e))n=[];else{const o=Array.from(Ga.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)n=n.concat(o);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(Nt)),n.reduce((o,s)=>{const a=typeof s=="string"?Wa[s]:s;if(!a){const c=JSON.stringify(s),d=Object.keys(Wa).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${d}`)}return o.includes(a)||o.push(a),o},[])}const Xv=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class wa{constructor({compat:t,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(t)?Gi(t,"compat"):t?Gi(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?Hv:{},this.tags=Gi(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Ut,{value:Nn}),Object.defineProperty(this,vt,{value:Pi}),Object.defineProperty(this,In,{value:On}),this.sortMapEntries=typeof s=="function"?s:s===!0?Xv:null}clone(){const t=Object.create(wa.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function Yv(e,t){const r=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const c=e.directives.toString(e);c?(r.push(c),i=!0):e.directives.docStart&&(i=!0)}i&&r.push("---");const n=Jh(e,t),{commentString:o}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");const c=o(e.commentBefore);r.unshift(Et(c,""))}let s=!1,a=null;if(e.contents){if(Pe(e.contents)){if(e.contents.spaceBefore&&i&&r.push(""),e.contents.commentBefore){const u=o(e.contents.commentBefore);r.push(Et(u,""))}n.forceBlockIndent=!!e.comment,a=e.contents.comment}const c=a?void 0:()=>s=!0;let d=_n(e.contents,n,()=>a=null,c);a&&(d+=Vt(d,"",o(a))),(d[0]==="|"||d[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${d}`:r.push(d)}else r.push(_n(e.contents,n));if(e.directives?.docEnd)if(e.comment){const c=o(e.comment);c.includes(`
82
+ ${o.comment}`:i.comment}i=n}e.items[r]=De(i)?i:new He(i)}}else t("Expected a sequence for this tag");return e}function sp(e,t,r){const{replacer:i}=r,n=new Wt(e);n.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof i=="function"&&(s=i.call(t,String(o++),s));let a,c;if(Array.isArray(s))if(s.length===2)a=s[0],c=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const d=Object.keys(s);if(d.length===1)a=d[0],c=s[a];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else a=s;n.items.push(ha(a,c,r))}return n}const ya={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:op,createNode:sp};class dn extends Wt{constructor(){super(),this.add=it.prototype.add.bind(this),this.delete=it.prototype.delete.bind(this),this.get=it.prototype.get.bind(this),this.has=it.prototype.has.bind(this),this.set=it.prototype.set.bind(this),this.tag=dn.tag}toJSON(t,r){if(!r)return super.toJSON(t);const i=new Map;r?.onCreate&&r.onCreate(i);for(const n of this.items){let o,s;if(De(n)?(o=st(n.key,"",r),s=st(n.value,o,r)):o=st(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(t,r,i){const n=sp(t,r,i),o=new this;return o.items=n.items,o}}dn.tag="tag:yaml.org,2002:omap";const va={collection:"seq",identify:e=>e instanceof Map,nodeClass:dn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=op(e,t),i=[];for(const{key:n}of r.items)Ee(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new dn,r)},createNode:(e,t,r)=>dn.from(e,t,r)};function ap({value:e,source:t},r){return t&&(e?up:cp).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const up={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new le(!0),stringify:ap},cp={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new le(!1),stringify:ap},qv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:mt},Vv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():mt(e)}},Kv={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new le(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){const i=e.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:mt},nr=e=>typeof e=="bigint"||Number.isInteger(e);function Ci(e,t,r,{intAsBigInt:i}){const n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return n==="-"?BigInt(-1)*s:s}const o=parseInt(e,r);return n==="-"?-1*o:o}function $a(e,t,r){const{value:i}=e;if(nr(i)){const n=i.toString(t);return i<0?"-"+r+n.substr(1):r+n}return mt(e)}const Jv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Ci(e,2,2,r),stringify:e=>$a(e,2,"0b")},Gv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Ci(e,1,8,r),stringify:e=>$a(e,8,"0")},Wv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Ci(e,0,10,r),stringify:mt},Hv={identify:nr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Ci(e,2,16,r),stringify:e=>$a(e,16,"0x")};class hn extends it{constructor(t){super(t),this.tag=hn.tag}add(t){let r;De(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new He(t.key,null):r=new He(t,null),Kt(this.items,r.key)||this.items.push(r)}get(t,r){const i=Kt(this.items,t);return!r&&De(i)?Ee(i.key)?i.key.value:i.key:i}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const i=Kt(this.items,t);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new He(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(ha(s,null,i));return o}}hn.tag="tag:yaml.org,2002:set";const ba={collection:"map",identify:e=>e instanceof Set,nodeClass:hn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>hn.from(e,t,r),resolve(e,t){if(er(e)){if(e.hasAllNullValues(!0))return Object.assign(new hn,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function _a(e,t){const r=e[0],i=r==="-"||r==="+"?e.substring(1):e,n=s=>t?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function lp(e){let{value:t}=e,r=s=>s;if(typeof t=="bigint")r=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return mt(e);let i="";t<0&&(i="-",t*=r(-1));const n=r(60),o=[t%n];return t<60?o.unshift(0):(t=(t-o[0])/n,o.unshift(t%n),t>=60&&(t=(t-o[0])/n,o.unshift(t))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const fp={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>_a(e,r),stringify:lp},dp={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>_a(e,!1),stringify:lp},Bi={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Bi.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,i,n,o,s,a]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let d=Date.UTC(r,i-1,n,o||0,s||0,a||0,c);const u=t[8];if(u&&u!=="Z"){let h=_a(u,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Ja=[Nn,On,Pi,Di,up,cp,Jv,Gv,Wv,Hv,qv,Vv,Kv,ga,Nt,va,ya,ba,fp,dp,Bi],Ga=new Map([["core",Fv],["failsafe",[Nn,On,Pi]],["json",Mv],["yaml11",Ja],["yaml-1.1",Ja]]),Wa={binary:ga,bool:pa,float:ep,floatExp:Qh,floatNaN:Yh,floatTime:dp,int:rp,intHex:ip,intOct:np,intTime:fp,map:Nn,merge:Nt,null:Di,omap:va,pairs:ya,seq:On,set:ba,timestamp:Bi},Xv={"tag:yaml.org,2002:binary":ga,"tag:yaml.org,2002:merge":Nt,"tag:yaml.org,2002:omap":va,"tag:yaml.org,2002:pairs":ya,"tag:yaml.org,2002:set":ba,"tag:yaml.org,2002:timestamp":Bi};function Gi(e,t,r){const i=Ga.get(t);if(i&&!e)return r&&!i.includes(Nt)?i.concat(Nt):i.slice();let n=i;if(!n)if(Array.isArray(e))n=[];else{const o=Array.from(Ga.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)n=n.concat(o);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(Nt)),n.reduce((o,s)=>{const a=typeof s=="string"?Wa[s]:s;if(!a){const c=JSON.stringify(s),d=Object.keys(Wa).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${d}`)}return o.includes(a)||o.push(a),o},[])}const Yv=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class wa{constructor({compat:t,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(t)?Gi(t,"compat"):t?Gi(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?Xv:{},this.tags=Gi(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Ut,{value:Nn}),Object.defineProperty(this,vt,{value:Pi}),Object.defineProperty(this,In,{value:On}),this.sortMapEntries=typeof s=="function"?s:s===!0?Yv:null}clone(){const t=Object.create(wa.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function Qv(e,t){const r=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const c=e.directives.toString(e);c?(r.push(c),i=!0):e.directives.docStart&&(i=!0)}i&&r.push("---");const n=Jh(e,t),{commentString:o}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");const c=o(e.commentBefore);r.unshift(Et(c,""))}let s=!1,a=null;if(e.contents){if(Pe(e.contents)){if(e.contents.spaceBefore&&i&&r.push(""),e.contents.commentBefore){const u=o(e.contents.commentBefore);r.push(Et(u,""))}n.forceBlockIndent=!!e.comment,a=e.contents.comment}const c=a?void 0:()=>s=!0;let d=_n(e.contents,n,()=>a=null,c);a&&(d+=Vt(d,"",o(a))),(d[0]==="|"||d[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${d}`:r.push(d)}else r.push(_n(e.contents,n));if(e.directives?.docEnd)if(e.comment){const c=o(e.comment);c.includes(`
83
83
  `)?(r.push("..."),r.push(Et(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=e.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(Et(o(c),"")))}return r.join(`
84
84
  `)+`
85
- `}class Ri{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ut,{value:wo});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new We({version:s}),this.setSchema(s,i),this.contents=t===void 0?null:this.createNode(t,n,i)}clone(){const t=Object.create(Ri.prototype,{[ut]:{value:wo}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Pe(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){en(this.contents)&&this.contents.add(t)}addIn(t,r){en(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){const i=Zh(this);t.anchor=!r||i.has(r)?Mh(r||"a",i):r}return new fa(t.anchor)}createNode(t,r,i){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){const m=f=>typeof f=="number"||f instanceof String||f instanceof Number,$=r.filter(m).map(String);$.length>0&&(r=r.concat($)),n=r}else i===void 0&&r&&(i=r,r=void 0);const{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:d,tag:u}=i??{},{onAnchor:h,setAnchors:y,sourceObjects:_}=Ev(this,s||"a"),b={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:d,replacer:n,schema:this.schema,sourceObjects:_},g=Jn(t,u,b);return a&&Te(g)&&(g.flow=!0),y(),g}createPair(t,r,i={}){const n=this.createNode(t,null,i),o=this.createNode(r,null,i);return new He(n,o)}delete(t){return en(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Cn(t)?this.contents==null?!1:(this.contents=null,!0):en(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Te(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Cn(t)?!r&&Ee(this.contents)?this.contents.value:this.contents:Te(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Te(this.contents)?this.contents.has(t):!1}hasIn(t){return Cn(t)?this.contents!==void 0:Te(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=li(this.schema,[t],r):en(this.contents)&&this.contents.set(t,r)}setIn(t,r){Cn(t)?this.contents=r:this.contents==null?this.contents=li(this.schema,Array.from(t),r):en(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new We({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new We({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const n=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new wa(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=at(this.contents,r??"",a);if(typeof o=="function")for(const{count:d,res:u}of a.anchors.values())o(u,d);return typeof s=="function"?cn(s,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Yv(this,t)}}function en(e){if(Te(e))return!0;throw new Error("Expected a YAML collection as document contents")}class hp extends Error{constructor(t,r,i,n){super(),this.name=t,this.code=i,this.message=n,this.pos=r}}class Bn extends hp{constructor(t,r,i){super("YAMLParseError",t,r,i)}}class Qv extends hp{constructor(t,r,i){super("YAMLWarning",t,r,i)}}const Ha=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>t.linePos(a));const{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){const a=Math.min(o-39,s.length-79);s="…"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"…"),i>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`…
85
+ `}class Ri{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,at,{value:wo});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new We({version:s}),this.setSchema(s,i),this.contents=t===void 0?null:this.createNode(t,n,i)}clone(){const t=Object.create(Ri.prototype,{[at]:{value:wo}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Pe(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){en(this.contents)&&this.contents.add(t)}addIn(t,r){en(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){const i=Zh(this);t.anchor=!r||i.has(r)?Mh(r||"a",i):r}return new fa(t.anchor)}createNode(t,r,i){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){const m=f=>typeof f=="number"||f instanceof String||f instanceof Number,$=r.filter(m).map(String);$.length>0&&(r=r.concat($)),n=r}else i===void 0&&r&&(i=r,r=void 0);const{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:d,tag:u}=i??{},{onAnchor:h,setAnchors:y,sourceObjects:_}=Nv(this,s||"a"),b={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:d,replacer:n,schema:this.schema,sourceObjects:_},g=Jn(t,u,b);return a&&Te(g)&&(g.flow=!0),y(),g}createPair(t,r,i={}){const n=this.createNode(t,null,i),o=this.createNode(r,null,i);return new He(n,o)}delete(t){return en(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Cn(t)?this.contents==null?!1:(this.contents=null,!0):en(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Te(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Cn(t)?!r&&Ee(this.contents)?this.contents.value:this.contents:Te(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Te(this.contents)?this.contents.has(t):!1}hasIn(t){return Cn(t)?this.contents!==void 0:Te(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=li(this.schema,[t],r):en(this.contents)&&this.contents.set(t,r)}setIn(t,r){Cn(t)?this.contents=r:this.contents==null?this.contents=li(this.schema,Array.from(t),r):en(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new We({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new We({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const n=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new wa(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=st(this.contents,r??"",a);if(typeof o=="function")for(const{count:d,res:u}of a.anchors.values())o(u,d);return typeof s=="function"?cn(s,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Qv(this,t)}}function en(e){if(Te(e))return!0;throw new Error("Expected a YAML collection as document contents")}class hp extends Error{constructor(t,r,i,n){super(),this.name=t,this.code=i,this.message=n,this.pos=r}}class Bn extends hp{constructor(t,r,i){super("YAMLParseError",t,r,i)}}class e0 extends hp{constructor(t,r,i){super("YAMLWarning",t,r,i)}}const Ha=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>t.linePos(a));const{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){const a=Math.min(o-39,s.length-79);s="…"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"…"),i>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`…
86
86
  `),s=a+s}if(/[^ ]/.test(s)){let a=1;const c=r.linePos[1];c&&c.line===i&&c.col>n&&(a=Math.max(1,Math.min(c.col-n,80-o)));const d=" ".repeat(o)+"^".repeat(a);r.message+=`:
87
87
 
88
88
  ${s}
89
89
  ${d}
90
90
  `}};function wn(e,{flow:t,indicator:r,next:i,offset:n,onError:o,parentIndent:s,startOnNewline:a}){let c=!1,d=a,u=a,h="",y="",_=!1,b=!1,g=null,m=null,$=null,f=null,v=null,S=null,E=null;for(const j of e)switch(b&&(j.type!=="space"&&j.type!=="newline"&&j.type!=="comma"&&o(j.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),g&&(d&&j.type!=="comment"&&j.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),j.type){case"space":!t&&(r!=="doc-start"||i?.type!=="flow-collection")&&j.source.includes(" ")&&(g=j),u=!0;break;case"comment":{u||o(j,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const L=j.source.substring(1)||" ";h?h+=y+L:h=L,y="",d=!1;break}case"newline":d?h?h+=j.source:(!S||r!=="seq-item-ind")&&(c=!0):y+=j.source,d=!0,_=!0,(m||$)&&(f=j),u=!0;break;case"anchor":m&&o(j,"MULTIPLE_ANCHORS","A node can have at most one anchor"),j.source.endsWith(":")&&o(j.offset+j.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=j,E??(E=j.offset),d=!1,u=!1,b=!0;break;case"tag":{$&&o(j,"MULTIPLE_TAGS","A node can have at most one tag"),$=j,E??(E=j.offset),d=!1,u=!1,b=!0;break}case r:(m||$)&&o(j,"BAD_PROP_ORDER",`Anchors and tags must be after the ${j.source} indicator`),S&&o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.source} in ${t??"collection"}`),S=j,d=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(t){v&&o(j,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=j,d=!1,u=!1;break}default:o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.type} token`),d=!1,u=!1}const I=e[e.length-1],O=I?I.offset+I.source.length:n;return b&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(d&&g.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:S,spaceBefore:c,comment:h,hasNewline:_,anchor:m,tag:$,newlineAfterProp:f,end:O,start:E??O}}function Gn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
91
- `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const r of t.start)if(r.type==="newline")return!0;if(t.sep){for(const r of t.sep)if(r.type==="newline")return!0}if(Gn(t.key)||Gn(t.value))return!0}return!1;default:return!0}}function Eo(e,t,r){if(t?.type==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Gn(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function pp(e,t,r){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const n=typeof i=="function"?i:(o,s)=>o===s||Ee(o)&&Ee(s)&&o.value===s.value;return t.some(o=>n(o.key,r))}const Xa="All mapping items must start at the same column";function e0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??ot,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,d=null;for(const u of i.items){const{start:h,key:y,sep:_,value:b}=u,g=wn(h,{indicator:"explicit-key-ind",next:y??_?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),m=!g.found;if(m){if(y&&(y.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==i.indent&&n(c,"BAD_INDENT",Xa)),!g.anchor&&!g.tag&&!_){d=g.end,g.comment&&(a.comment?a.comment+=`
91
+ `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const r of t.start)if(r.type==="newline")return!0;if(t.sep){for(const r of t.sep)if(r.type==="newline")return!0}if(Gn(t.key)||Gn(t.value))return!0}return!1;default:return!0}}function Eo(e,t,r){if(t?.type==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Gn(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function pp(e,t,r){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const n=typeof i=="function"?i:(o,s)=>o===s||Ee(o)&&Ee(s)&&o.value===s.value;return t.some(o=>n(o.key,r))}const Xa="All mapping items must start at the same column";function t0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??it,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,d=null;for(const u of i.items){const{start:h,key:y,sep:_,value:b}=u,g=wn(h,{indicator:"explicit-key-ind",next:y??_?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),m=!g.found;if(m){if(y&&(y.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==i.indent&&n(c,"BAD_INDENT",Xa)),!g.anchor&&!g.tag&&!_){d=g.end,g.comment&&(a.comment?a.comment+=`
92
92
  `+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||Gn(y))&&n(y??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==i.indent&&n(c,"BAD_INDENT",Xa);r.atKey=!0;const $=g.end,f=y?e(r,y,g,n):t(r,$,h,null,g,n);r.schema.compat&&Eo(i.indent,y,n),r.atKey=!1,pp(r,a.items,f)&&n($,"DUPLICATE_KEY","Map keys must be unique");const v=wn(_??[],{indicator:"map-value-ind",next:b,offset:f.range[2],onError:n,parentIndent:i.indent,startOnNewline:!y||y.type==="block-scalar"});if(c=v.end,v.found){m&&(b?.type==="block-map"&&!v.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<v.found.offset-1024&&n(f.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const S=b?e(r,b,v,n):t(r,c,_,null,v,n);r.schema.compat&&Eo(i.indent,b,n),c=S.range[2];const E=new He(f,S);r.options.keepSourceTokens&&(E.srcToken=u),a.items.push(E)}else{m&&n(f.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(f.comment?f.comment+=`
93
- `+v.comment:f.comment=v.comment);const S=new He(f);r.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return d&&d<c&&n(d,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,d??c],a}function t0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??Wt,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,d=null;for(const{start:u,value:h}of i.items){const y=wn(u,{indicator:"seq-item-ind",next:h,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||h)h&&h.type==="block-seq"?n(y.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{d=y.end,y.comment&&(a.comment=y.comment);continue}const _=h?e(r,h,y,n):t(r,y.end,u,null,y,n);r.schema.compat&&Eo(i.indent,h,n),c=_.range[2],a.items.push(_)}return a.range=[i.offset,c,d??c],a}function rr(e,t,r,i){let n="";if(e){let o=!1,s="";for(const a of e){const{source:c,type:d}=a;switch(d){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=c.substring(1)||" ";n?n+=s+u:n=u,s="";break}case"newline":n&&(s+=c),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}t+=c.length}}return{comment:n,offset:t}}const Wi="Block collections are not allowed within flow collections",Hi=e=>e&&(e.type==="block-map"||e.type==="block-seq");function n0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=i.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?ot:Wt),d=new c(r.schema);d.flow=!0;const u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=i.offset+i.start.source.length;for(let m=0;m<i.items.length;++m){const $=i.items[m],{start:f,key:v,sep:S,value:E}=$,I=wn(f,{flow:a,indicator:"explicit-key-ind",next:v??S?.[0],offset:h,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!S&&!E){m===0&&I.comma?n(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<i.items.length-1&&n(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),I.comment&&(d.comment?d.comment+=`
93
+ `+v.comment:f.comment=v.comment);const S=new He(f);r.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return d&&d<c&&n(d,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,c,d??c],a}function n0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??Wt,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,d=null;for(const{start:u,value:h}of i.items){const y=wn(u,{indicator:"seq-item-ind",next:h,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||h)h&&h.type==="block-seq"?n(y.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{d=y.end,y.comment&&(a.comment=y.comment);continue}const _=h?e(r,h,y,n):t(r,y.end,u,null,y,n);r.schema.compat&&Eo(i.indent,h,n),c=_.range[2],a.items.push(_)}return a.range=[i.offset,c,d??c],a}function rr(e,t,r,i){let n="";if(e){let o=!1,s="";for(const a of e){const{source:c,type:d}=a;switch(d){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=c.substring(1)||" ";n?n+=s+u:n=u,s="";break}case"newline":n&&(s+=c),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}t+=c.length}}return{comment:n,offset:t}}const Wi="Block collections are not allowed within flow collections",Hi=e=>e&&(e.type==="block-map"||e.type==="block-seq");function r0({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=i.start.source==="{",a=s?"flow map":"flow sequence",c=o?.nodeClass??(s?it:Wt),d=new c(r.schema);d.flow=!0;const u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=i.offset+i.start.source.length;for(let m=0;m<i.items.length;++m){const $=i.items[m],{start:f,key:v,sep:S,value:E}=$,I=wn(f,{flow:a,indicator:"explicit-key-ind",next:v??S?.[0],offset:h,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!S&&!E){m===0&&I.comma?n(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<i.items.length-1&&n(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),I.comment&&(d.comment?d.comment+=`
94
94
  `+I.comment:d.comment=I.comment),h=I.end;continue}!s&&r.options.strict&&Gn(v)&&n(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)I.comma&&n(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(I.comma||n(I.start,"MISSING_CHAR",`Missing , between ${a} items`),I.comment){let O="";e:for(const j of f)switch(j.type){case"comma":case"space":break;case"comment":O=j.source.substring(1);break e;default:break e}if(O){let j=d.items[d.items.length-1];De(j)&&(j=j.value??j.key),j.comment?j.comment+=`
95
95
  `+O:j.comment=O,I.comment=I.comment.substring(O.length+1)}}if(!s&&!S&&!I.found){const O=E?e(r,E,I,n):t(r,I.end,S,null,I,n);d.items.push(O),h=O.range[2],Hi(E)&&n(O.range,"BLOCK_IN_FLOW",Wi)}else{r.atKey=!0;const O=I.end,j=v?e(r,v,I,n):t(r,O,f,null,I,n);Hi(v)&&n(j.range,"BLOCK_IN_FLOW",Wi),r.atKey=!1;const L=wn(S??[],{flow:a,indicator:"map-value-ind",next:E,offset:j.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(L.found){if(!s&&!I.found&&r.options.strict){if(S)for(const Q of S){if(Q===L.found)break;if(Q.type==="newline"){n(Q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}I.start<L.found.offset-1024&&n(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else E&&("source"in E&&E.source&&E.source[0]===":"?n(E,"MISSING_CHAR",`Missing space after : in ${a}`):n(L.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const G=E?e(r,E,L,n):L.found?t(r,L.end,S,null,L,n):null;G?Hi(E)&&n(G.range,"BLOCK_IN_FLOW",Wi):L.comment&&(j.comment?j.comment+=`
96
- `+L.comment:j.comment=L.comment);const Y=new He(j,G);if(r.options.keepSourceTokens&&(Y.srcToken=$),s){const Q=d;pp(r,Q.items,j)&&n(O,"DUPLICATE_KEY","Map keys must be unique"),Q.items.push(Y)}else{const Q=new ot(r.schema);Q.flow=!0,Q.items.push(Y);const oe=(G??j).range;Q.range=[j.range[0],oe[1],oe[2]],d.items.push(Q)}h=G?G.range[2]:L.end}}const y=s?"}":"]",[_,...b]=i.end;let g=h;if(_&&_.source===y)g=_.offset+_.source.length;else{const m=a[0].toUpperCase()+a.substring(1),$=u?`${m} must end with a ${y}`:`${m} in block collection must be sufficiently indented and end with a ${y}`;n(h,u?"MISSING_CHAR":"BAD_INDENT",$),_&&_.source.length!==1&&b.unshift(_)}if(b.length>0){const m=rr(b,g,r.options.strict,n);m.comment&&(d.comment?d.comment+=`
97
- `+m.comment:d.comment=m.comment),d.range=[i.offset,g,m.offset]}else d.range=[i.offset,g,g];return d}function Xi(e,t,r,i,n,o){const s=r.type==="block-map"?e0(e,t,r,i,o):r.type==="block-seq"?t0(e,t,r,i,o):n0(e,t,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function r0(e,t,r,i,n){const o=i.tag,s=o?t.directives.tagName(o.source,y=>n(o,"TAG_RESOLVE_FAILED",y)):null;if(r.type==="block-seq"){const{anchor:y,newlineAfterProp:_}=i,b=y&&o?y.offset>o.offset?y:o:y??o;b&&(!_||_.offset<b.offset)&&n(b,"MISSING_CHAR","Missing newline after block sequence props")}const a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===ot.tagName&&a==="map"||s===Wt.tagName&&a==="seq")return Xi(e,t,r,n,s);let c=t.schema.tags.find(y=>y.tag===s&&y.collection===a);if(!c){const y=t.schema.knownTags[s];if(y&&y.collection===a)t.schema.tags.push(Object.assign({},y,{default:!1})),c=y;else return y?n(o,"BAD_COLLECTION_TYPE",`${y.tag} used for ${a} collection, but expects ${y.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Xi(e,t,r,n,s)}const d=Xi(e,t,r,n,s,c),u=c.resolve?.(d,y=>n(o,"TAG_RESOLVE_FAILED",y),t.options)??d,h=Pe(u)?u:new le(u);return h.range=d.range,h.tag=s,c?.format&&(h.format=c.format),h}function i0(e,t,r){const i=t.offset,n=o0(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};const o=n.mode===">"?le.BLOCK_FOLDED:le.BLOCK_LITERAL,s=t.source?s0(t.source):[];let a=s.length;for(let g=s.length-1;g>=0;--g){const m=s[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){const g=n.chomp==="+"&&s.length>0?`
96
+ `+L.comment:j.comment=L.comment);const Y=new He(j,G);if(r.options.keepSourceTokens&&(Y.srcToken=$),s){const Q=d;pp(r,Q.items,j)&&n(O,"DUPLICATE_KEY","Map keys must be unique"),Q.items.push(Y)}else{const Q=new it(r.schema);Q.flow=!0,Q.items.push(Y);const oe=(G??j).range;Q.range=[j.range[0],oe[1],oe[2]],d.items.push(Q)}h=G?G.range[2]:L.end}}const y=s?"}":"]",[_,...b]=i.end;let g=h;if(_&&_.source===y)g=_.offset+_.source.length;else{const m=a[0].toUpperCase()+a.substring(1),$=u?`${m} must end with a ${y}`:`${m} in block collection must be sufficiently indented and end with a ${y}`;n(h,u?"MISSING_CHAR":"BAD_INDENT",$),_&&_.source.length!==1&&b.unshift(_)}if(b.length>0){const m=rr(b,g,r.options.strict,n);m.comment&&(d.comment?d.comment+=`
97
+ `+m.comment:d.comment=m.comment),d.range=[i.offset,g,m.offset]}else d.range=[i.offset,g,g];return d}function Xi(e,t,r,i,n,o){const s=r.type==="block-map"?t0(e,t,r,i,o):r.type==="block-seq"?n0(e,t,r,i,o):r0(e,t,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function i0(e,t,r,i,n){const o=i.tag,s=o?t.directives.tagName(o.source,y=>n(o,"TAG_RESOLVE_FAILED",y)):null;if(r.type==="block-seq"){const{anchor:y,newlineAfterProp:_}=i,b=y&&o?y.offset>o.offset?y:o:y??o;b&&(!_||_.offset<b.offset)&&n(b,"MISSING_CHAR","Missing newline after block sequence props")}const a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===it.tagName&&a==="map"||s===Wt.tagName&&a==="seq")return Xi(e,t,r,n,s);let c=t.schema.tags.find(y=>y.tag===s&&y.collection===a);if(!c){const y=t.schema.knownTags[s];if(y&&y.collection===a)t.schema.tags.push(Object.assign({},y,{default:!1})),c=y;else return y?n(o,"BAD_COLLECTION_TYPE",`${y.tag} used for ${a} collection, but expects ${y.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Xi(e,t,r,n,s)}const d=Xi(e,t,r,n,s,c),u=c.resolve?.(d,y=>n(o,"TAG_RESOLVE_FAILED",y),t.options)??d,h=Pe(u)?u:new le(u);return h.range=d.range,h.tag=s,c?.format&&(h.format=c.format),h}function o0(e,t,r){const i=t.offset,n=s0(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};const o=n.mode===">"?le.BLOCK_FOLDED:le.BLOCK_LITERAL,s=t.source?a0(t.source):[];let a=s.length;for(let g=s.length-1;g>=0;--g){const m=s[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){const g=n.chomp==="+"&&s.length>0?`
98
98
  `.repeat(Math.max(1,s.length-1)):"";let m=i+n.length;return t.source&&(m+=t.source.length),{value:g,type:o,comment:n.comment,range:[i,m,m]}}let c=t.indent+n.indent,d=t.offset+n.length,u=0;for(let g=0;g<a;++g){const[m,$]=s[g];if($===""||$==="\r")n.indent===0&&m.length>c&&(c=m.length);else{m.length<c&&r(d+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=m.length),u=g,c===0&&!e.atRoot&&r(d,"BAD_INDENT","Block scalar values in collections must be indented");break}d+=m.length+$.length+1}for(let g=s.length-1;g>=a;--g)s[g][0].length>c&&(a=g+1);let h="",y="",_=!1;for(let g=0;g<u;++g)h+=s[g][0].slice(c)+`
99
99
  `;for(let g=u;g<a;++g){let[m,$]=s[g];d+=m.length+$.length+1;const f=$[$.length-1]==="\r";if(f&&($=$.slice(0,-1)),$&&m.length<c){const S=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(d-$.length-(f?2:1),"BAD_INDENT",S),m=""}o===le.BLOCK_LITERAL?(h+=y+m.slice(c)+$,y=`
100
100
  `):m.length>c||$[0]===" "?(y===" "?y=`
@@ -109,33 +109,33 @@ ${d}
109
109
  `+s[g][0].slice(c);h[h.length-1]!==`
110
110
  `&&(h+=`
111
111
  `);break;default:h+=`
112
- `}const b=i+n.length+t.source.length;return{value:h,type:o,comment:n.comment,range:[i,b,b]}}function o0({offset:e,props:t},r,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:n}=t[0],o=n[0];let s=0,a="",c=-1;for(let y=1;y<n.length;++y){const _=n[y];if(!a&&(_==="-"||_==="+"))a=_;else{const b=Number(_);!s&&b?s=b:c===-1&&(c=e+y)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let d=!1,u="",h=n.length;for(let y=1;y<t.length;++y){const _=t[y];switch(_.type){case"space":d=!0;case"newline":h+=_.source.length;break;case"comment":r&&!d&&i(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=_.source.length,u=_.source.substring(1);break;case"error":i(_,"UNEXPECTED_TOKEN",_.message),h+=_.source.length;break;default:{const b=`Unexpected token in block scalar header: ${_.type}`;i(_,"UNEXPECTED_TOKEN",b);const g=_.source;g&&typeof g=="string"&&(h+=g.length)}}}return{mode:o,indent:s,chomp:a,comment:u,length:h}}function s0(e){const t=e.split(/\n( *)/),r=t[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)o.push([t[s],t[s+1]]);return o}function a0(e,t,r){const{offset:i,type:n,source:o,end:s}=e;let a,c;const d=(y,_,b)=>r(i+y,_,b);switch(n){case"scalar":a=le.PLAIN,c=u0(o,d);break;case"single-quoted-scalar":a=le.QUOTE_SINGLE,c=c0(o,d);break;case"double-quoted-scalar":a=le.QUOTE_DOUBLE,c=l0(o,d);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}const u=i+o.length,h=rr(s,u,t,r);return{value:c,type:a,comment:h.comment,range:[i,u,h.offset]}}function u0(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),mp(e)}function c0(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),mp(e.slice(1,-1)).replace(/''/g,"'")}function mp(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
112
+ `}const b=i+n.length+t.source.length;return{value:h,type:o,comment:n.comment,range:[i,b,b]}}function s0({offset:e,props:t},r,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:n}=t[0],o=n[0];let s=0,a="",c=-1;for(let y=1;y<n.length;++y){const _=n[y];if(!a&&(_==="-"||_==="+"))a=_;else{const b=Number(_);!s&&b?s=b:c===-1&&(c=e+y)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let d=!1,u="",h=n.length;for(let y=1;y<t.length;++y){const _=t[y];switch(_.type){case"space":d=!0;case"newline":h+=_.source.length;break;case"comment":r&&!d&&i(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=_.source.length,u=_.source.substring(1);break;case"error":i(_,"UNEXPECTED_TOKEN",_.message),h+=_.source.length;break;default:{const b=`Unexpected token in block scalar header: ${_.type}`;i(_,"UNEXPECTED_TOKEN",b);const g=_.source;g&&typeof g=="string"&&(h+=g.length)}}}return{mode:o,indent:s,chomp:a,comment:u,length:h}}function a0(e){const t=e.split(/\n( *)/),r=t[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)o.push([t[s],t[s+1]]);return o}function u0(e,t,r){const{offset:i,type:n,source:o,end:s}=e;let a,c;const d=(y,_,b)=>r(i+y,_,b);switch(n){case"scalar":a=le.PLAIN,c=c0(o,d);break;case"single-quoted-scalar":a=le.QUOTE_SINGLE,c=l0(o,d);break;case"double-quoted-scalar":a=le.QUOTE_DOUBLE,c=f0(o,d);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}const u=i+o.length,h=rr(s,u,t,r);return{value:c,type:a,comment:h.comment,range:[i,u,h.offset]}}function c0(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),mp(e)}function l0(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),mp(e.slice(1,-1)).replace(/''/g,"'")}function mp(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
113
113
  `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
114
114
  `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let n=i[1],o=" ",s=t.lastIndex;for(r.lastIndex=s;i=r.exec(e);)i[1]===""?o===`
115
115
  `?n+=o:o=`
116
- `:(n+=o+i[1],o=" "),s=r.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(e),n+o+(i?.[1]??"")}function l0(e,t){let r="";for(let i=1;i<e.length-1;++i){const n=e[i];if(!(n==="\r"&&e[i+1]===`
116
+ `:(n+=o+i[1],o=" "),s=r.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(e),n+o+(i?.[1]??"")}function f0(e,t){let r="";for(let i=1;i<e.length-1;++i){const n=e[i];if(!(n==="\r"&&e[i+1]===`
117
117
  `))if(n===`
118
- `){const{fold:o,offset:s}=f0(e,i);r+=o,i=s}else if(n==="\\"){let o=e[++i];const s=d0[o];if(s)r+=s;else if(o===`
118
+ `){const{fold:o,offset:s}=d0(e,i);r+=o,i=s}else if(n==="\\"){let o=e[++i];const s=h0[o];if(s)r+=s;else if(o===`
119
119
  `)for(o=e[i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="\r"&&e[i+1]===`
120
- `)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){const a={x:2,u:4,U:8}[o];r+=h0(e,i+1,a,t),i+=a}else{const a=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){const o=i;let s=e[i+1];for(;s===" "||s===" ";)s=e[++i+1];s!==`
120
+ `)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){const a={x:2,u:4,U:8}[o];r+=p0(e,i+1,a,t),i+=a}else{const a=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){const o=i;let s=e[i+1];for(;s===" "||s===" ";)s=e[++i+1];s!==`
121
121
  `&&!(s==="\r"&&e[i+2]===`
122
- `)&&(r+=i>o?e.slice(o,i+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function f0(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===`
122
+ `)&&(r+=i>o?e.slice(o,i+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function d0(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===`
123
123
  `||i==="\r")&&!(i==="\r"&&e[t+2]!==`
124
124
  `);)i===`
125
125
  `&&(r+=`
126
- `),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}const d0={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
127
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function h0(e,t,r,i){const n=e.substr(t,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(s)){const a=e.substr(t-2,r+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}function gp(e,t,r,i){const{value:n,type:o,comment:s,range:a}=t.type==="block-scalar"?i0(e,t,i):a0(t,e.options.strict,i),c=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;let d;e.options.stringKeys&&e.atKey?d=e.schema[vt]:c?d=p0(e.schema,n,c,r,i):t.type==="scalar"?d=m0(e,n,t,i):d=e.schema[vt];let u;try{const h=d.resolve(n,y=>i(r??t,"TAG_RESOLVE_FAILED",y),e.options);u=Ee(h)?h:new le(h)}catch(h){const y=h instanceof Error?h.message:String(h);i(r??t,"TAG_RESOLVE_FAILED",y),u=new le(n)}return u.range=a,u.source=n,o&&(u.type=o),c&&(u.tag=c),d.format&&(u.format=d.format),s&&(u.comment=s),u}function p0(e,t,r,i,n){if(r==="!")return e[vt];const o=[];for(const a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(const a of o)if(a.test?.test(t))return a;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[vt])}function m0({atKey:e,directives:t,schema:r},i,n,o){const s=r.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(i))||r[vt];if(r.compat){const a=r.compat.find(c=>c.default&&c.test?.test(i))??r[vt];if(s.tag!==a.tag){const c=t.tagString(s.tag),d=t.tagString(a.tag),u=`Value may be parsed as either ${c} or ${d}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return s}function g0(e,t,r){if(t){r??(r=t.length);for(let i=r-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}const y0={composeNode:yp,composeEmptyNode:ka};function yp(e,t,r,i){const n=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r;let d,u=!0;switch(t.type){case"alias":d=v0(e,t,i),(a||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=gp(e,t,c,i),a&&(d.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=r0(y0,e,t,r,i),a&&(d.anchor=a.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",h),d=ka(e,t.offset,void 0,null,r,i),u=!1}}return a&&d.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Ee(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(d.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&u&&(d.srcToken=t),d}function ka(e,t,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},d){const u={type:"scalar",offset:g0(t,r,i),indent:-1,source:""},h=gp(e,u,a,d);return s&&(h.anchor=s.source.substring(1),h.anchor===""&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=c),h}function v0({options:e},{offset:t,source:r,end:i},n){const o=new fa(r.substring(1));o.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,a=rr(i,s,e.strict,n);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}function $0(e,t,{offset:r,start:i,value:n,end:o},s){const a=Object.assign({_directives:t},e),c=new Ri(void 0,a),d={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=wn(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?yp(d,n,u,s):ka(d,u.end,i,null,u,s);const h=c.contents.range[2],y=rr(o,h,!1,s);return y.comment&&(c.comment=y.comment),c.range=[r,h,y.offset],c}function An(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function Ya(e){let t="",r=!1,i=!1;for(let n=0;n<e.length;++n){const o=e[n];switch(o[0]){case"#":t+=(t===""?"":i?`
126
+ `),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}const h0={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
127
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function p0(e,t,r,i){const n=e.substr(t,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(s)){const a=e.substr(t-2,r+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}function gp(e,t,r,i){const{value:n,type:o,comment:s,range:a}=t.type==="block-scalar"?o0(e,t,i):u0(t,e.options.strict,i),c=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;let d;e.options.stringKeys&&e.atKey?d=e.schema[vt]:c?d=m0(e.schema,n,c,r,i):t.type==="scalar"?d=g0(e,n,t,i):d=e.schema[vt];let u;try{const h=d.resolve(n,y=>i(r??t,"TAG_RESOLVE_FAILED",y),e.options);u=Ee(h)?h:new le(h)}catch(h){const y=h instanceof Error?h.message:String(h);i(r??t,"TAG_RESOLVE_FAILED",y),u=new le(n)}return u.range=a,u.source=n,o&&(u.type=o),c&&(u.tag=c),d.format&&(u.format=d.format),s&&(u.comment=s),u}function m0(e,t,r,i,n){if(r==="!")return e[vt];const o=[];for(const a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(const a of o)if(a.test?.test(t))return a;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[vt])}function g0({atKey:e,directives:t,schema:r},i,n,o){const s=r.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(i))||r[vt];if(r.compat){const a=r.compat.find(c=>c.default&&c.test?.test(i))??r[vt];if(s.tag!==a.tag){const c=t.tagString(s.tag),d=t.tagString(a.tag),u=`Value may be parsed as either ${c} or ${d}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return s}function y0(e,t,r){if(t){r??(r=t.length);for(let i=r-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}const v0={composeNode:yp,composeEmptyNode:ka};function yp(e,t,r,i){const n=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r;let d,u=!0;switch(t.type){case"alias":d=$0(e,t,i),(a||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=gp(e,t,c,i),a&&(d.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=i0(v0,e,t,r,i),a&&(d.anchor=a.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",h),d=ka(e,t.offset,void 0,null,r,i),u=!1}}return a&&d.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Ee(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(d.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&u&&(d.srcToken=t),d}function ka(e,t,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},d){const u={type:"scalar",offset:y0(t,r,i),indent:-1,source:""},h=gp(e,u,a,d);return s&&(h.anchor=s.source.substring(1),h.anchor===""&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=c),h}function $0({options:e},{offset:t,source:r,end:i},n){const o=new fa(r.substring(1));o.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,a=rr(i,s,e.strict,n);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}function b0(e,t,{offset:r,start:i,value:n,end:o},s){const a=Object.assign({_directives:t},e),c=new Ri(void 0,a),d={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=wn(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?yp(d,n,u,s):ka(d,u.end,i,null,u,s);const h=c.contents.range[2],y=rr(o,h,!1,s);return y.comment&&(c.comment=y.comment),c.range=[r,h,y.offset],c}function An(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function Ya(e){let t="",r=!1,i=!1;for(let n=0;n<e.length;++n){const o=e[n];switch(o[0]){case"#":t+=(t===""?"":i?`
128
128
 
129
129
  `:`
130
- `)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":e[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:t,afterEmptyLine:i}}class b0{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{const s=An(r);o?this.warnings.push(new Qv(s,i,n)):this.errors.push(new Bn(s,i,n))},this.directives=new We({version:t.version||"1.2"}),this.options=t}decorate(t,r){const{comment:i,afterEmptyLine:n}=Ya(this.prelude);if(i){const o=t.contents;if(r)t.comment=t.comment?`${t.comment}
130
+ `)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":e[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:t,afterEmptyLine:i}}class _0{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{const s=An(r);o?this.warnings.push(new e0(s,i,n)):this.errors.push(new Bn(s,i,n))},this.directives=new We({version:t.version||"1.2"}),this.options=t}decorate(t,r){const{comment:i,afterEmptyLine:n}=Ya(this.prelude);if(i){const o=t.contents;if(r)t.comment=t.comment?`${t.comment}
131
131
  ${i}`:i;else if(n||t.directives.docStart||!o)t.commentBefore=i;else if(Te(o)&&!o.flow&&o.items.length>0){let s=o.items[0];De(s)&&(s=s.key);const a=s.commentBefore;s.commentBefore=a?`${i}
132
132
  ${a}`:i}else{const s=o.commentBefore;o.commentBefore=s?`${i}
133
- ${s}`:i}}r?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ya(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,i=-1){for(const n of t)yield*this.next(n);yield*this.end(r,i)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(r,i,n)=>{const o=An(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const r=$0(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Bn(An(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new Bn(An(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const r=rr(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const i=this.doc.comment;this.doc.comment=i?`${i}
134
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Bn(An(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),n=new Ri(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}}const vp="\uFEFF",$p="",bp="",No="";function _0(e){switch(e){case vp:return"byte-order-mark";case $p:return"doc-mode";case bp:return"flow-error-end";case No:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
133
+ ${s}`:i}}r?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ya(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,i=-1){for(const n of t)yield*this.next(n);yield*this.end(r,i)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(r,i,n)=>{const o=An(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const r=b0(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Bn(An(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new Bn(An(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const r=rr(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const i=this.doc.comment;this.doc.comment=i?`${i}
134
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Bn(An(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),n=new Ri(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}}const vp="\uFEFF",$p="",bp="",No="";function w0(e){switch(e){case vp:return"byte-order-mark";case $p:return"doc-mode";case bp:return"flow-error-end";case No:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
135
135
  `:case`\r
136
136
  `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function lt(e){switch(e){case void 0:case" ":case`
137
- `:case"\r":case" ":return!0;default:return!1}}const Qa=new Set("0123456789ABCDEFabcdef"),w0=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),lr=new Set(",[]{}"),k0=new Set(` ,[]{}
138
- \r `),Yi=e=>!e||k0.has(e);class S0{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===`
137
+ `:case"\r":case" ":return!0;default:return!1}}const Qa=new Set("0123456789ABCDEFabcdef"),k0=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),lr=new Set(",[]{}"),S0=new Set(` ,[]{}
138
+ \r `),Yi=e=>!e||S0.has(e);class I0{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===`
139
139
  `?!0:r==="\r"?this.buffer[t+1]===`
140
140
  `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+t];if(r==="\r"){const n=this.buffer[i+t+1];if(n===`
141
141
  `||!n&&!this.atEnd)return t+i+1}return r===`
@@ -150,26 +150,26 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
150
150
  `&&o>=this.pos&&o+1+r>a)t=o;else break}while(!0);return yield No,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){const o=this.buffer[i+1];if(lt(o)||t&&lr.has(o))break;r=i}else if(lt(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
151
151
  `?(i+=1,n=`
152
152
  `,o=this.buffer[i+1]):r=i),o==="#"||t&&lr.has(o))break;if(n===`
153
- `){const s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(t&&lr.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield No,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Yi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(lt(r)||t&&lr.has(r))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!lt(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(w0.has(r))r=this.buffer[++t];else if(r==="%"&&Qa.has(this.buffer[t+1])&&Qa.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
153
+ `){const s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(t&&lr.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield No,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Yi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(lt(r)||t&&lr.has(r))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!lt(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(k0.has(r))r=this.buffer[++t];else if(r==="%"&&Qa.has(this.buffer[t+1])&&Qa.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
154
154
  `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
155
- `?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||t&&i===" ");const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(t){let r=this.pos,i=this.buffer[r];for(;!t(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class I0{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,i=this.lineStarts.length;for(;r<i;){const o=r+i>>1;this.lineStarts[o]<t?r=o+1:i=o}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};const n=this.lineStarts[r-1];return{line:r,col:t-n+1}}}}function Pt(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function eu(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function _p(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function tn(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function tu(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Pt(t.start,"explicit-key-ind")&&!Pt(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,_p(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class E0{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new S0,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const i of this.lexer.lex(t,r))yield*this.next(i);r||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const r=_0(t);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&tu(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{const n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{const n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&eu(n.start)===-1&&(r.indent===0||n.start.every(o=>o.type!=="comment"||o.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{eu(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const r=fr(this.peek(2)),i=tn(r);let n;t.end?(n=t.end,n.push(this.sourceToken),delete t.end):n=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
155
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||t&&i===" ");const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(t){let r=this.pos,i=this.buffer[r];for(;!t(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class E0{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,i=this.lineStarts.length;for(;r<i;){const o=r+i>>1;this.lineStarts[o]<t?r=o+1:i=o}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};const n=this.lineStarts[r-1];return{line:r,col:t-n+1}}}}function Pt(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function eu(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function _p(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function tn(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function tu(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Pt(t.start,"explicit-key-ind")&&!Pt(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,_p(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class N0{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new I0,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const i of this.lexer.lex(t,r))yield*this.next(i);r||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const r=w0(t);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&tu(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{const n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{const n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&eu(n.start)===-1&&(r.indent===0||n.start.every(o=>o.type!=="comment"||o.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{eu(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const r=fr(this.peek(2)),i=tn(r);let n;t.end?(n=t.end,n.push(this.sourceToken),delete t.end):n=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
156
156
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
157
157
  `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(n&&r.sep&&!r.value){const s=[];for(let a=0;a<r.sep.length;++a){const c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Pt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(_p(r.key)&&!Pt(r.sep,"newline")){const s=tn(r.start),a=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(Pt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const s=tn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?t.items.push({start:o,key:null,sep:[this.sourceToken]}):Pt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);n||r.value?(t.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Pt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||Pt(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const n=fr(i),o=tn(n);tu(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(`
158
158
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
159
- `,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function N0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new I0||null,prettyErrors:t}}function O0(e,t={}){const{lineCounter:r,prettyErrors:i}=N0(t),n=new E0(r?.addNewLine),o=new b0(t);let s=null;for(const a of o.compose(n.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function x0(e,t,r){let i;const n=O0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var Ye=H({title:q().optional(),globalTitle:q().optional(),description:q().optional(),color:q().optional(),icon:q().optional(),iconColor:q().optional(),avatarUrl:q().optional(),secondaryIcon:q().optional(),secondaryIconColor:q().optional()}),rt=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),j0=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),A0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Qi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var z0=Symbol("runtimeSchema"),wp=bt(["composite","unit"]),kp=H({schema:bn(),[z0]:Ph(de).optional(),required:Re(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Re(),multiple:Re(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:wp,args:Ze(Qi,kp),inputs:Ze(Qi,nu),outputs:Ze(Qi,nu),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:q().optional(),defaultNamePrefix:q()}),definitionHash:Ke()}),Sp=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),pn=H({instanceId:Ot,output:q()}),Oo=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(pn)).optional(),hubInputs:Ze(q(),qe(Oo)).optional(),injectionInputs:qe(Oo).optional(),position:Sp.optional()}),eo=H({id:Ot,kind:wp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(pn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(pn)).optional(),resolvedOutputs:Ze(q(),qe(pn)).optional()}),D0=H({position:Sp.optional(),inputs:qe(pn).optional(),injectionInputs:qe(Oo).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),hash:q(),meta:rt.optional()}),F0=xt([H({type:ve("embedded"),isBinary:Re().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ip=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Re(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:L0.optional()});var Z0=kp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),M0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:M0,secrets:Dt.record(Dt.string(),Z0)});function Sa(e){return"source"in e}var Ep=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ip).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Ep});var Np=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ip})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Np.array()});var q0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:q0});var V0=H({name:q()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),pn.array()),invokedTriggers:V0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function K0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=x0(t.data.value);return ru.set(e,i),i}jt("type",[H({type:ve("host")})]);const J0={id:"q8xbilhwpsn65zjlv5kz44qh"},G0={id:"n0rfvpl9o77iqf29ff4kk5gf"},W0={id:"pmn9y901jeiz2ydh93045l39"},H0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(J0.id),modelStorageId:be().default(H0.id),libraryId:be().default(G0.id),pulumiBackendId:be().default(W0.id),meta:rt});H({id:q(),name:dt,meta:rt,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...A0.shape});const X0=H({encryptedIdentities:qe(q()),hasPasskey:Re()});jt("type",[H({type:ve("locked"),unlockSuite:X0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);H({id:q(),meta:Ye,recipient:q()});const Y0=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(Y0).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),Q0=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:rt,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:rt,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:rt,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const e$=H({stateId:be(),meta:rt,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:e$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:eo.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:eo.array().optional(),updatedGhostInstances:eo.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const t$=bt(["destroy","update","refresh"]),n$=H({id:Ot,parentId:q().optional(),message:q()}),r$=H({type:t$,instances:qe(n$)}),i$=H({forceUpdateDependencies:Re().default(!1),forceUpdateChildren:Re().default(!1),destroyDependentInstances:Re().default(!0),invokeDestroyTriggers:Re().default(!0),deleteUnreachableResources:Re().default(!1),forceDeleteState:Re().default(!1),allowPartialCompositeInstanceUpdate:Re().default(!1),allowPartialCompositeInstanceDestruction:Re().default(!1),refresh:Re().default(!1),debug:Re().default(!1)}).partial(),Op=bt(["update","preview","destroy","recreate","refresh"]),o$=bt(["pending","running","failing","completed","failed","cancelled"]),xp=Ye.pick({title:!0,description:!0});H({projectId:q(),type:Op,instanceIds:qe(Ot).min(1),options:i$.partial().optional(),meta:xp.optional(),plan:r$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:Op,status:o$,meta:xp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const s$=H({id:be(),meta:rt,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...s$.shape,content:qe(Np)});H({id:be(),meta:j0,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const a$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:rt,startedAt:Ie(),finishedAt:Ie().nullable()});const u$=H({id:be(),name:q().nullable(),meta:rt,status:a$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...u$.shape,spec:Ep});H({id:be(),meta:rt,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const jp=bt(["password","passkey"]),Ap=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:Ap,type:jp,encryptedIdentity:q(),recipient:q()});H({id:be(),type:jp,meta:Ap,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const c$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:rt,status:c$,enabled:Re(),apiKeyId:q(),apiKeyMeta:Q0,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:rt,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Li{constructor(t,r,i,n){this.nodes=t,this.logger=r,this.outputHandler=i,this.dependentSetHandler=n}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(t){this.workset.add(t)}addAllNodesToWorkset(){for(const t of this.nodes.keys())this.workset.add(t)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(t){const r=this.outputMap.get(t);if(!r)throw new Error(`Output for node ${t} is not available`);return r}getDependents(t){const r=this.dependentMap.get(t);return r?Array.from(r):[]}invalidate(t){const r=[t];for(;r.length>0;){const i=r.pop();if(!this.nodes.has(i))continue;this.outputMap.delete(i),this.workset.add(i);const n=this.dependentMap.get(i);if(n)for(const o of n)this.outputMap.has(o)&&r.push(o)}}invalidateSingle(t){this.nodes.has(t)&&(this.outputMap.delete(t),this.workset.add(t))}async process(t){for(;this.workset.size>0;){const r=this.workset.values().next().value,i=[{nodeId:r,resolved:!1,dependencies:[]}];for(;i.length>0;){const n=i[i.length-1],{nodeId:o,resolved:s}=n,a=this.nodes.get(o);if(!a){this.logger.warn({nodeId:o},"node not found in the graph, skipping"),i.pop();continue}if(this.outputMap.has(o)){i.pop();continue}if(!s){n.dependencies=mv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class l$ extends Li{getNodeDependencies(t){const r=[];if(t.kind==="hub"){for(const i of t.hub.inputs??[])r.push(`instance:${i.instanceId}`);for(const i of t.hub.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}for(const i of Object.values(t.instance.inputs??{}))for(const n of i)r.push(`instance:${n.instanceId}`);for(const i of Object.values(t.instance.hubInputs??{}))for(const n of i)r.push(`hub:${n.hubId}`);for(const i of t.instance.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}processNode(t){const r=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.instanceId}`);if(!h)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(h.kind!=="instance")throw new Error("Expected instance node");return{component:h.component,resolvedInputs:h.resolvedInputs[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:yv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.type})):(this.logger.warn({msg:"input not found in the component",inputName:h,component:t.component}),[])}),resolvedOutputs:t.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const n=new Map,o=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(Sa(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=$v(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var zp={},Zi={};Zi.byteLength=h$;Zi.toByteArray=m$;Zi.fromByteArray=v$;var yt=[],it=[],f$=typeof Uint8Array<"u"?Uint8Array:Array,to="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var nn=0,d$=to.length;nn<d$;++nn)yt[nn]=to[nn],it[to.charCodeAt(nn)]=nn;it[45]=62;it[95]=63;function Tp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function h$(e){var t=Tp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function p$(e,t,r){return(t+r)*3/4-r}function m$(e){var t,r=Tp(e),i=r[0],n=r[1],o=new f$(p$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=it[e.charCodeAt(c)]<<18|it[e.charCodeAt(c+1)]<<12|it[e.charCodeAt(c+2)]<<6|it[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=it[e.charCodeAt(c)]<<2|it[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=it[e.charCodeAt(c)]<<10|it[e.charCodeAt(c+1)]<<4|it[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function g$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function y$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(g$(i));return n.join("")}function v$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(y$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,n),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[r+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
159
+ `,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function O0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new E0||null,prettyErrors:t}}function x0(e,t={}){const{lineCounter:r,prettyErrors:i}=O0(t),n=new N0(r?.addNewLine),o=new _0(t);let s=null;for(const a of o.compose(n.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function j0(e,t,r){let i;const n=x0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var Ye=H({title:q().optional(),globalTitle:q().optional(),description:q().optional(),color:q().optional(),icon:q().optional(),iconColor:q().optional(),avatarUrl:q().optional(),secondaryIcon:q().optional(),secondaryIconColor:q().optional()}),ut=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),wp=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),A0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Qi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var z0=Symbol("runtimeSchema"),kp=bt(["composite","unit"]),Sp=H({schema:bn(),[z0]:Ph(de).optional(),required:Re(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Re(),multiple:Re(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:kp,args:Ze(Qi,Sp),inputs:Ze(Qi,nu),outputs:Ze(Qi,nu),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:q().optional(),defaultNamePrefix:q()}),definitionHash:Ke()}),Ip=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),pn=H({instanceId:Ot,output:q()}),Oo=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(pn)).optional(),hubInputs:Ze(q(),qe(Oo)).optional(),injectionInputs:qe(Oo).optional(),position:Ip.optional()}),eo=H({id:Ot,kind:kp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(pn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(pn)).optional(),resolvedOutputs:Ze(q(),qe(pn)).optional()}),D0=H({position:Ip.optional(),inputs:qe(pn).optional(),injectionInputs:qe(Oo).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),hash:q(),meta:ut.optional()}),F0=xt([H({type:ve("embedded"),isBinary:Re().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ep=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Re(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:L0.optional()});var Z0=Sp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),M0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:M0,secrets:Dt.record(Dt.string(),Z0)});function Sa(e){return"source"in e}var Np=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ep).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Np});var Op=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ep})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Op.array()});var q0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:q0});var V0=H({name:q()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),pn.array()),invokedTriggers:V0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function K0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=j0(t.data.value);return ru.set(e,i),i}jt("type",[H({type:ve("host")})]);const J0={id:"q8xbilhwpsn65zjlv5kz44qh"},G0={id:"n0rfvpl9o77iqf29ff4kk5gf"},W0={id:"pmn9y901jeiz2ydh93045l39"},H0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(J0.id),modelStorageId:be().default(H0.id),libraryId:be().default(G0.id),pulumiBackendId:be().default(W0.id),meta:ut});H({id:q(),name:dt,meta:ut,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...A0.shape});const X0=H({encryptedIdentities:qe(q()),hasPasskey:Re()});jt("type",[H({type:ve("locked"),unlockSuite:X0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);H({id:q(),meta:Ye,recipient:q()});const Y0=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(Y0).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),Q0=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:ut,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:ut,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:ut,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const e$=H({stateId:be(),meta:ut,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:e$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:eo.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:eo.array().optional(),updatedGhostInstances:eo.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const t$=bt(["destroy","update","refresh"]),n$=H({id:Ot,parentId:q().optional(),message:q()}),r$=H({type:t$,instances:qe(n$)}),i$=H({forceUpdateDependencies:Re().default(!1),forceUpdateChildren:Re().default(!1),destroyDependentInstances:Re().default(!0),invokeDestroyTriggers:Re().default(!0),deleteUnreachableResources:Re().default(!1),forceDeleteState:Re().default(!1),allowPartialCompositeInstanceUpdate:Re().default(!1),allowPartialCompositeInstanceDestruction:Re().default(!1),refresh:Re().default(!1),debug:Re().default(!1)}).partial(),xp=bt(["update","preview","destroy","recreate","refresh"]),o$=bt(["pending","running","failing","completed","failed","cancelled"]),jp=Ye.pick({title:!0,description:!0}).required({title:!0});H({projectId:q(),type:xp,instanceIds:qe(Ot).min(1),options:i$.partial().optional(),meta:jp,plan:r$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:xp,status:o$,meta:jp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const s$=H({id:be(),meta:ut,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...s$.shape,content:qe(Op)});H({id:be(),meta:wp,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const a$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:wp,startedAt:Ie(),finishedAt:Ie().nullable()});const u$=H({id:be(),name:q().nullable(),meta:ut,status:a$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...u$.shape,spec:Np});H({id:be(),meta:ut,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const Ap=bt(["password","passkey"]),zp=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:zp,type:Ap,encryptedIdentity:q(),recipient:q()});H({id:be(),type:Ap,meta:zp,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const c$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:ut,status:c$,enabled:Re(),apiKeyId:q(),apiKeyMeta:Q0,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:ut,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Li{constructor(t,r,i,n){this.nodes=t,this.logger=r,this.outputHandler=i,this.dependentSetHandler=n}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(t){this.workset.add(t)}addAllNodesToWorkset(){for(const t of this.nodes.keys())this.workset.add(t)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(t){const r=this.outputMap.get(t);if(!r)throw new Error(`Output for node ${t} is not available`);return r}getDependents(t){const r=this.dependentMap.get(t);return r?Array.from(r):[]}invalidate(t){const r=[t];for(;r.length>0;){const i=r.pop();if(!this.nodes.has(i))continue;this.outputMap.delete(i),this.workset.add(i);const n=this.dependentMap.get(i);if(n)for(const o of n)this.outputMap.has(o)&&r.push(o)}}invalidateSingle(t){this.nodes.has(t)&&(this.outputMap.delete(t),this.workset.add(t))}async process(t){for(;this.workset.size>0;){const r=this.workset.values().next().value,i=[{nodeId:r,resolved:!1,dependencies:[]}];for(;i.length>0;){const n=i[i.length-1],{nodeId:o,resolved:s}=n,a=this.nodes.get(o);if(!a){this.logger.warn({nodeId:o},"node not found in the graph, skipping"),i.pop();continue}if(this.outputMap.has(o)){i.pop();continue}if(!s){n.dependencies=gv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class l$ extends Li{getNodeDependencies(t){const r=[];if(t.kind==="hub"){for(const i of t.hub.inputs??[])r.push(`instance:${i.instanceId}`);for(const i of t.hub.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}for(const i of Object.values(t.instance.inputs??{}))for(const n of i)r.push(`instance:${n.instanceId}`);for(const i of Object.values(t.instance.hubInputs??{}))for(const n of i)r.push(`hub:${n.hubId}`);for(const i of t.instance.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}processNode(t){const r=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.instanceId}`);if(!h)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(h.kind!=="instance")throw new Error("Expected instance node");return{component:h.component,resolvedInputs:h.resolvedInputs[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:vv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.type})):(this.logger.warn({msg:"input not found in the component",inputName:h,component:t.component}),[])}),resolvedOutputs:t.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const n=new Map,o=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(Sa(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=bv(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var Tp={},Zi={};Zi.byteLength=h$;Zi.toByteArray=m$;Zi.fromByteArray=v$;var yt=[],rt=[],f$=typeof Uint8Array<"u"?Uint8Array:Array,to="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var nn=0,d$=to.length;nn<d$;++nn)yt[nn]=to[nn],rt[to.charCodeAt(nn)]=nn;rt[45]=62;rt[95]=63;function Pp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function h$(e){var t=Pp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function p$(e,t,r){return(t+r)*3/4-r}function m$(e){var t,r=Pp(e),i=r[0],n=r[1],o=new f$(p$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=rt[e.charCodeAt(c)]<<18|rt[e.charCodeAt(c+1)]<<12|rt[e.charCodeAt(c+2)]<<6|rt[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=rt[e.charCodeAt(c)]<<2|rt[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=rt[e.charCodeAt(c)]<<10|rt[e.charCodeAt(c+1)]<<4|rt[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function g$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function y$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(g$(i));return n.join("")}function v$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(y$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,n),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[r+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
160
160
  * The buffer module from node.js, for the browser.
161
161
  *
162
162
  * @author Feross Aboukhadijeh <https://feross.org>
163
163
  * @license MIT
164
- */(function(e){const t=Zi,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Qe(k,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return u.from(N,l,p);const z=v(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const z=N.write(k,l);return z!==p&&(N=N.slice(0,z)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,z=p.length;for(let C=0,Z=Math.min(N,z);C<Z;++C)if(l[C]!==p[C]){N=l[C],z=p[C];break}return N<z?-1:z<N?1:0},u.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const z=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>z.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(z,C)):o.prototype.set.call(z,Z,C);else if(u.isBuffer(Z))Z.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return z};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let z=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(z)return N?-1:Le(k).length;l=(""+l).toLowerCase(),z=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,z,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),p<0||N>l.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&p>=N)return 0;if(z>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,z>>>=0,C>>>=0,this===l)return 0;let Z=C-z,ge=N-p;const Ae=Math.min(Z,ge),xe=this.slice(z,C),ze=l.slice(p,N);for(let Se=0;Se<Ae;++Se)if(xe[Se]!==ze[Se]){Z=xe[Se],ge=ze[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,z){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=z?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(z)return-1;p=k.length-1}else if(p<0)if(z)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,z);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?z?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,z);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,z){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function Ae(ze,Se){return C===1?ze[Se]:ze.readUInt16BE(Se*C)}let xe;if(z){let ze=-1;for(xe=p;xe<Z;xe++)if(Ae(k,xe)===Ae(l,ze===-1?0:xe-ze)){if(ze===-1&&(ze=xe),xe-ze+1===ge)return ze*C}else ze!==-1&&(xe-=xe-ze),ze=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let ze=!0;for(let Se=0;Se<ge;Se++)if(Ae(k,xe+Se)!==Ae(l,Se)){ze=!1;break}if(ze)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const z=k.length-p;N?(N=Number(N),N>z&&(N=z)):N=z;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return zt(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return zt(Ce(l),k,p,N)}function pe(k,l,p,N){return zt(Je(l),k,p,N)}function R(k,l,p,N){return zt(At(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,z){if(p===void 0)z="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")z=p,N=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(N)?(N=N>>>0,z===void 0&&(z="utf8")):(z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let Z=!1;for(;;)switch(z){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let z=l;for(;z<p;){const C=k[z];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=p){let Ae,xe,ze,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:Ae=k[z+1],(Ae&192)===128&&(Se=(C&31)<<6|Ae&63,Se>127&&(Z=Se));break;case 3:Ae=k[z+1],xe=k[z+2],(Ae&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(Ae&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:Ae=k[z+1],xe=k[z+2],ze=k[z+3],(Ae&192)===128&&(xe&192)===128&&(ze&192)===128&&(Se=(C&15)<<18|(Ae&63)<<12|(xe&63)<<6|ze&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let z="";for(let C=l;C<p;++C)z+=jn[k[C]];return z}function P(k,l,p){const N=k.slice(l,p);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const z=this.subarray(l,p);return Object.setPrototypeOf(z,u.prototype),z};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return z},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l+--p],C=1;for(;p>0&&(C*=256);)z+=this[l+--p]*C;return z},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*p)),z},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=p,C=1,Z=this[l+--z];for(;z>0&&(C*=256);)Z+=this[l+--z]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(z)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,z,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>z||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,z,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,z){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),p>=l.length&&(p=l.length),p||(p=0),z>0&&z<N&&(z=N),z===N||l.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),l.length-p<z-N&&(z=l.length-p+N);const C=z-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,z):o.prototype.set.call(l,this.subarray(N,z),p),C},u.prototype.fill=function(l,p,N,z){if(typeof l=="string"){if(typeof p=="string"?(z=p,p=0,N=this.length):typeof N=="string"&&(z=N,N=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!u.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(l.length===1){const Z=l.charCodeAt(0);(z==="utf8"&&Z<128||z==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,z),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const A={};function U(k,l,p){A[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,z=p;return Number.isInteger(p)&&Math.abs(p)>2**32?z=M(String(p)):typeof p=="bigint"&&(z=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(z=M(z)),z+="n"),N+=` It must be ${l}. Received ${z}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,z,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new A.ERR_OUT_OF_RANGE("value",ge,k)}J(N,z,C)}function ae(k,l){if(typeof k!="number")throw new A.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new A.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let z=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!z){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}z=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),z=p;continue}p=(z-55296<<10|p-56320)+65536}else z&&(l-=3)>-1&&C.push(239,191,189);if(z=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Ce(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function At(k,l){let p,N,z;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,z=p%256,C.push(z),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function zt(k,l,p,N){let z;for(z=0;z<N&&!(z+p>=l.length||z>=k.length);++z)l[z+p]=k[z];return z}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let z=0;z<16;++z)l[N+z]=k[p]+k[z]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(zp);const mn=zp.Buffer;function $$(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const b$=e=>new TextEncoder().encode(e);typeof mn<"u"&&mn.from;function _$(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}function iu(e){return new w$().update(e).digest()}var w$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=$$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^S$[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),k$=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],S$=_$(k$);function I$(e){const t=e.length;let r=0,i=0;for(;i<t;){let n=e.charCodeAt(i++);if((n&4294967168)===0){r++;continue}else if((n&4294965248)===0)r+=2;else{if(n>=55296&&n<=56319&&i<t){const o=e.charCodeAt(i);(o&64512)===56320&&(++i,n=((n&1023)<<10)+(o&1023)+65536)}(n&4294901760)===0?r+=3:r+=4}}return r}function E$(e,t,r){const i=e.length;let n=r,o=0;for(;o<i;){let s=e.charCodeAt(o++);if((s&4294967168)===0){t[n++]=s;continue}else if((s&4294965248)===0)t[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<i){const a=e.charCodeAt(o);(a&64512)===56320&&(++o,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?(t[n++]=s>>12&15|224,t[n++]=s>>6&63|128):(t[n++]=s>>18&7|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128)}t[n++]=s&63|128}}const N$=new TextEncoder,O$=50;function x$(e,t,r){N$.encodeInto(e,t.subarray(r))}function j$(e,t,r){e.length>O$?x$(e,t,r):E$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function A$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Pp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function z$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const T$=-1,P$=4294967296-1,D$=17179869184-1;function U$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=D$)if(t===0&&e<=P$){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e),r}else{const r=e/4294967296,i=e&4294967295,n=new Uint8Array(8),o=new DataView(n.buffer);return o.setUint32(0,t<<2|r&3),o.setUint32(4,i),n}else{const r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),Pp(i,4,e),r}}function C$(e){const t=e.getTime(),r=Math.floor(t/1e3),i=(t-r*1e3)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-n*1e9}}function B$(e){if(e instanceof Date){const t=C$(e);return U$(t)}else return null}function R$(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const r=t.getUint32(0),i=t.getUint32(4),n=(r&3)*4294967296+i,o=r>>>2;return{sec:n,nsec:o}}case 12:{const r=z$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function F$(e){const t=R$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const L$={type:T$,encode:B$,decode:F$};class xo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(L$)}register({type:t,encode:r,decode:i}){if(t>=0)this.encoders[t]=r,this.decoders[t]=i;else{const n=-1-t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=i}}tryToEncode(t,r){for(let i=0;i<this.builtInEncoders.length;i++){const n=this.builtInEncoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=-1-i;return new dr(s,o)}}}for(let i=0;i<this.encoders.length;i++){const n=this.encoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=i;return new dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}xo.defaultCodec=new xo;function Z$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function M$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Z$(e)?new Uint8Array(e):Uint8Array.from(e)}const q$=100,V$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??xo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??q$,this.initialBufferSize=t?.initialBufferSize??V$,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ea({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(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,r)}ensureBufferSizeToWrite(t){const r=this.pos+t;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(t){const r=new ArrayBuffer(t),i=new Uint8Array(r),n=new DataView(r);i.set(this.bytes),this.view=n,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const i=I$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),j$(t,this.bytes,this.pos),this.pos+=i}encodeObject(t,r){const i=this.extensionCodec.tryToEncode(t,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(t))this.encodeArray(t,r);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const r=t.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const i=M$(t);this.writeU8a(i)}encodeArray(t,r){const i=t.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(const n of t)this.doEncode(n,r+1)}countWithoutUndefined(t,r){let i=0;for(const n of r)t[n]!==void 0&&i++;return i}encodeMap(t,r){const i=Object.keys(t);this.sortKeys&&i.sort();const n=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<4294967296)this.writeU8(223),this.writeU32(n);else throw new Error(`Too large map object: ${n}`);for(const o of i){const s=t[o];this.ignoreUndefined&&s===void 0||(this.encodeString(o),this.doEncode(s,r+1))}}encodeExtension(t){if(typeof t.data=="function"){const i=t.data(this.pos+6),n=i.length;if(n>=4294967296)throw new Error(`Too large extension object: ${n}`);this.writeU8(201),this.writeU32(n),this.writeI8(t.type),this.writeU8a(i);return}const r=t.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const r=t.length;this.ensureBufferSizeToWrite(r),this.bytes.set(t,this.pos),this.pos+=r}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),A$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Pp(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function K$(e,t){return new Ea(t).encodeSharedRef(e)}function rn(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class J$ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t??{}))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,resolvedInputs:i,sourceHash:n,state:o}){const s=[];s.push(rn(r.definitionHash)),o?.inputHashNonce&&s.push(rn(o.inputHashNonce)),t.args&&s.push(K$(t.args)),n?s.push(rn(n)):Sa(r)&&this.logger.warn({instanceId:t.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=Object.entries(i).sort(([h],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(mn.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(rn(g.inputHash)),s.push(rn(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(rn(y.outputHash))}return{inputHash:iu(mn.concat(s)),dependencyOutputHash:iu(mn.concat(d)),outputHash:o?.outputHash??0}}}class G$ extends Li{getNodeDependencies(t){if(!t.lastOperationState)return[];const r=new Set;for(const i of Object.values(t.lastOperationState.resolvedInputs))for(const n of i)r.add(n.instanceId);return Array.from(r)}processNode(){}}var hr={exports:{}},no={},wt={},Ft={},ro={},io={},oo={},ou;function hi(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(oo)),oo}var so={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(so)),so}var uu;function ye(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=hi(),r=au();var i=hi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=au();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
165
- `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(io)),io}var he={},cu;function _e(){if(cu)return he;cu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.checkStrictMode=he.getErrorPath=he.Type=he.useFunc=he.setEvaluated=he.evaluatedPropsToName=he.mergeEvaluated=he.eachItem=he.unescapeJsonPointer=he.escapeJsonPointer=he.escapeFragment=he.unescapeFragment=he.schemaRefOrVal=he.schemaHasRulesButRef=he.schemaHasRules=he.checkUnknownRules=he.alwaysValidSchema=he.toHash=void 0;const e=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return pr.default=t,pr}var fu;function Mi(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(ro)),ro}var du;function W$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Mi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Dp(){if(hu)return Lt;hu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getRules=Lt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(n){return typeof n=="string"&&t.has(n)}Lt.isJSONType=r;function i(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return Lt.getRules=i,Lt}var kt={},pu;function Up(){if(pu)return kt;pu=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const s=n.RULES.types[o];return s&&s!==!0&&t(i,s)}kt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}kt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}return kt.shouldUseRule=r,kt}var mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Dp(),t=Up(),r=Mi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
164
+ */(function(e){const t=Zi,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Qe(k,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return u.from(N,l,p);const z=v(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const z=N.write(k,l);return z!==p&&(N=N.slice(0,z)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,z=p.length;for(let C=0,Z=Math.min(N,z);C<Z;++C)if(l[C]!==p[C]){N=l[C],z=p[C];break}return N<z?-1:z<N?1:0},u.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const z=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>z.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(z,C)):o.prototype.set.call(z,Z,C);else if(u.isBuffer(Z))Z.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return z};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let z=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(z)return N?-1:Le(k).length;l=(""+l).toLowerCase(),z=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,z,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),p<0||N>l.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&p>=N)return 0;if(z>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,z>>>=0,C>>>=0,this===l)return 0;let Z=C-z,ge=N-p;const Ae=Math.min(Z,ge),xe=this.slice(z,C),ze=l.slice(p,N);for(let Se=0;Se<Ae;++Se)if(xe[Se]!==ze[Se]){Z=xe[Se],ge=ze[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,z){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=z?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(z)return-1;p=k.length-1}else if(p<0)if(z)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,z);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?z?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,z);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,z){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function Ae(ze,Se){return C===1?ze[Se]:ze.readUInt16BE(Se*C)}let xe;if(z){let ze=-1;for(xe=p;xe<Z;xe++)if(Ae(k,xe)===Ae(l,ze===-1?0:xe-ze)){if(ze===-1&&(ze=xe),xe-ze+1===ge)return ze*C}else ze!==-1&&(xe-=xe-ze),ze=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let ze=!0;for(let Se=0;Se<ge;Se++)if(Ae(k,xe+Se)!==Ae(l,Se)){ze=!1;break}if(ze)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const z=k.length-p;N?(N=Number(N),N>z&&(N=z)):N=z;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return zt(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return zt(Ce(l),k,p,N)}function pe(k,l,p,N){return zt(Je(l),k,p,N)}function R(k,l,p,N){return zt(At(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,z){if(p===void 0)z="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")z=p,N=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(N)?(N=N>>>0,z===void 0&&(z="utf8")):(z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let Z=!1;for(;;)switch(z){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let z=l;for(;z<p;){const C=k[z];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=p){let Ae,xe,ze,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:Ae=k[z+1],(Ae&192)===128&&(Se=(C&31)<<6|Ae&63,Se>127&&(Z=Se));break;case 3:Ae=k[z+1],xe=k[z+2],(Ae&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(Ae&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:Ae=k[z+1],xe=k[z+2],ze=k[z+3],(Ae&192)===128&&(xe&192)===128&&(ze&192)===128&&(Se=(C&15)<<18|(Ae&63)<<12|(xe&63)<<6|ze&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let z="";for(let C=l;C<p;++C)z+=jn[k[C]];return z}function P(k,l,p){const N=k.slice(l,p);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const z=this.subarray(l,p);return Object.setPrototypeOf(z,u.prototype),z};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return z},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l+--p],C=1;for(;p>0&&(C*=256);)z+=this[l+--p]*C;return z},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*p)),z},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=p,C=1,Z=this[l+--z];for(;z>0&&(C*=256);)Z+=this[l+--z]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(z)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,z,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>z||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,z,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,z){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),p>=l.length&&(p=l.length),p||(p=0),z>0&&z<N&&(z=N),z===N||l.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),l.length-p<z-N&&(z=l.length-p+N);const C=z-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,z):o.prototype.set.call(l,this.subarray(N,z),p),C},u.prototype.fill=function(l,p,N,z){if(typeof l=="string"){if(typeof p=="string"?(z=p,p=0,N=this.length):typeof N=="string"&&(z=N,N=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!u.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(l.length===1){const Z=l.charCodeAt(0);(z==="utf8"&&Z<128||z==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,z),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const A={};function U(k,l,p){A[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,z=p;return Number.isInteger(p)&&Math.abs(p)>2**32?z=M(String(p)):typeof p=="bigint"&&(z=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(z=M(z)),z+="n"),N+=` It must be ${l}. Received ${z}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,z,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new A.ERR_OUT_OF_RANGE("value",ge,k)}J(N,z,C)}function ae(k,l){if(typeof k!="number")throw new A.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new A.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let z=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!z){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}z=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),z=p;continue}p=(z-55296<<10|p-56320)+65536}else z&&(l-=3)>-1&&C.push(239,191,189);if(z=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Ce(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function At(k,l){let p,N,z;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,z=p%256,C.push(z),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function zt(k,l,p,N){let z;for(z=0;z<N&&!(z+p>=l.length||z>=k.length);++z)l[z+p]=k[z];return z}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let z=0;z<16;++z)l[N+z]=k[p]+k[z]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(Tp);const mn=Tp.Buffer;function $$(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const b$=e=>new TextEncoder().encode(e);typeof mn<"u"&&mn.from;function _$(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}function iu(e){return new w$().update(e).digest()}var w$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=$$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^S$[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),k$=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],S$=_$(k$);function I$(e){const t=e.length;let r=0,i=0;for(;i<t;){let n=e.charCodeAt(i++);if((n&4294967168)===0){r++;continue}else if((n&4294965248)===0)r+=2;else{if(n>=55296&&n<=56319&&i<t){const o=e.charCodeAt(i);(o&64512)===56320&&(++i,n=((n&1023)<<10)+(o&1023)+65536)}(n&4294901760)===0?r+=3:r+=4}}return r}function E$(e,t,r){const i=e.length;let n=r,o=0;for(;o<i;){let s=e.charCodeAt(o++);if((s&4294967168)===0){t[n++]=s;continue}else if((s&4294965248)===0)t[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<i){const a=e.charCodeAt(o);(a&64512)===56320&&(++o,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?(t[n++]=s>>12&15|224,t[n++]=s>>6&63|128):(t[n++]=s>>18&7|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128)}t[n++]=s&63|128}}const N$=new TextEncoder,O$=50;function x$(e,t,r){N$.encodeInto(e,t.subarray(r))}function j$(e,t,r){e.length>O$?x$(e,t,r):E$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function A$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Dp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function z$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const T$=-1,P$=4294967296-1,D$=17179869184-1;function U$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=D$)if(t===0&&e<=P$){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e),r}else{const r=e/4294967296,i=e&4294967295,n=new Uint8Array(8),o=new DataView(n.buffer);return o.setUint32(0,t<<2|r&3),o.setUint32(4,i),n}else{const r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),Dp(i,4,e),r}}function C$(e){const t=e.getTime(),r=Math.floor(t/1e3),i=(t-r*1e3)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-n*1e9}}function B$(e){if(e instanceof Date){const t=C$(e);return U$(t)}else return null}function R$(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const r=t.getUint32(0),i=t.getUint32(4),n=(r&3)*4294967296+i,o=r>>>2;return{sec:n,nsec:o}}case 12:{const r=z$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function F$(e){const t=R$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const L$={type:T$,encode:B$,decode:F$};class xo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(L$)}register({type:t,encode:r,decode:i}){if(t>=0)this.encoders[t]=r,this.decoders[t]=i;else{const n=-1-t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=i}}tryToEncode(t,r){for(let i=0;i<this.builtInEncoders.length;i++){const n=this.builtInEncoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=-1-i;return new dr(s,o)}}}for(let i=0;i<this.encoders.length;i++){const n=this.encoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=i;return new dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}xo.defaultCodec=new xo;function Z$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function M$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Z$(e)?new Uint8Array(e):Uint8Array.from(e)}const q$=100,V$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??xo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??q$,this.initialBufferSize=t?.initialBufferSize??V$,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ea({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(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,r)}ensureBufferSizeToWrite(t){const r=this.pos+t;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(t){const r=new ArrayBuffer(t),i=new Uint8Array(r),n=new DataView(r);i.set(this.bytes),this.view=n,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const i=I$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),j$(t,this.bytes,this.pos),this.pos+=i}encodeObject(t,r){const i=this.extensionCodec.tryToEncode(t,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(t))this.encodeArray(t,r);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const r=t.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const i=M$(t);this.writeU8a(i)}encodeArray(t,r){const i=t.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(const n of t)this.doEncode(n,r+1)}countWithoutUndefined(t,r){let i=0;for(const n of r)t[n]!==void 0&&i++;return i}encodeMap(t,r){const i=Object.keys(t);this.sortKeys&&i.sort();const n=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<4294967296)this.writeU8(223),this.writeU32(n);else throw new Error(`Too large map object: ${n}`);for(const o of i){const s=t[o];this.ignoreUndefined&&s===void 0||(this.encodeString(o),this.doEncode(s,r+1))}}encodeExtension(t){if(typeof t.data=="function"){const i=t.data(this.pos+6),n=i.length;if(n>=4294967296)throw new Error(`Too large extension object: ${n}`);this.writeU8(201),this.writeU32(n),this.writeI8(t.type),this.writeU8a(i);return}const r=t.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const r=t.length;this.ensureBufferSizeToWrite(r),this.bytes.set(t,this.pos),this.pos+=r}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),A$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Dp(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function K$(e,t){return new Ea(t).encodeSharedRef(e)}function rn(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class J$ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t??{}))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,resolvedInputs:i,sourceHash:n,state:o}){const s=[];s.push(rn(r.definitionHash)),o?.inputHashNonce&&s.push(rn(o.inputHashNonce)),t.args&&s.push(K$(t.args)),n?s.push(rn(n)):Sa(r)&&this.logger.warn({instanceId:t.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=Object.entries(i).sort(([h],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(mn.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(rn(g.inputHash)),s.push(rn(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(rn(y.outputHash))}return{inputHash:iu(mn.concat(s)),dependencyOutputHash:iu(mn.concat(d)),outputHash:o?.outputHash??0}}}class G$ extends Li{getNodeDependencies(t){const r=new Set;for(const i of Object.values(t.resolvedInputs??{}))for(const n of i)r.add(n.instanceId);return Array.from(r)}processNode(){}}var hr={exports:{}},no={},wt={},Ft={},ro={},io={},oo={},ou;function hi(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(oo)),oo}var so={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(so)),so}var uu;function ye(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=hi(),r=au();var i=hi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=au();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
165
+ `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(io)),io}var he={},cu;function _e(){if(cu)return he;cu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.checkStrictMode=he.getErrorPath=he.Type=he.useFunc=he.setEvaluated=he.evaluatedPropsToName=he.mergeEvaluated=he.eachItem=he.unescapeJsonPointer=he.escapeJsonPointer=he.escapeFragment=he.unescapeFragment=he.schemaRefOrVal=he.schemaHasRulesButRef=he.schemaHasRules=he.checkUnknownRules=he.alwaysValidSchema=he.toHash=void 0;const e=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return pr.default=t,pr}var fu;function Mi(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(ro)),ro}var du;function W$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Mi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Up(){if(hu)return Lt;hu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getRules=Lt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(n){return typeof n=="string"&&t.has(n)}Lt.isJSONType=r;function i(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return Lt.getRules=i,Lt}var kt={},pu;function Cp(){if(pu)return kt;pu=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const s=n.RULES.types[o];return s&&s!==!0&&t(i,s)}kt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}kt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}return kt.shouldUseRule=r,kt}var mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Up(),t=Cp(),r=Mi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
166
166
  || (${j} == "string" && ${I} && ${I} == +${I})`).assign(L,(0,i._)`+${I}`);return;case"integer":E.elseIf((0,i._)`${j} === "boolean" || ${I} === null
167
167
  || (${j} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(L,(0,i._)`+${I}`);return;case"boolean":E.elseIf((0,i._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(L,!1).elseIf((0,i._)`${I} === "true" || ${I} === 1`).assign(L,!0);return;case"null":E.elseIf((0,i._)`${I} === "" || ${I} === 0 || ${I} === false`),E.assign(L,null);return;case"array":E.elseIf((0,i._)`${j} === "string" || ${j} === "number"
168
- || ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var zn={},gu;function H$(){if(gu)return zn;gu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,oe=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&oe.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function X$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Mi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function Y$(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},ao,bu;function Cp(){return bu||(bu=1,ao=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),ao}var uo={exports:{}},_u;function Q$(){if(_u)return uo.exports;_u=1;var e=uo.exports=function(i,n,o){typeof n=="function"&&(o=n,n={}),o=n.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(n,s,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,n,o,s,a,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return uo.exports}var wu;function qi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Cp(),r=Q$(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function Vi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=W$(),t=pi(),r=Up(),i=pi(),n=H$(),o=X$(),s=Y$(),a=ye(),c=Rt(),d=qi(),u=_e(),h=Mi();function y(A){if(E(A)&&(O(A),S(A))){m(A);return}_(A,()=>(0,e.topBoolOrEmptySchema)(A))}wt.validateFunctionCode=y;function _({gen:A,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?A.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,a._)`"use strict"; ${f(M,ne)}`),g(A,ne),A.code(ae)}):A.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>A.code(f(M,ne)).code(ae))}function b(A){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(A,U){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,a._)`""`),A.var(c.default.parentData,(0,a._)`undefined`),A.var(c.default.parentDataProperty,(0,a._)`undefined`),A.var(c.default.rootData,c.default.data),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(A){const{schema:U,opts:M,gen:J}=A;_(A,()=>{M.$comment&&U.$comment&&oe(A),G(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(A),j(A),pe(A)})}function $(A){const{gen:U,validateName:M}=A;A.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${A.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${A.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${A.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${A.evaluated}.items`,(0,a._)`undefined`))}function f(A,U){const M=typeof A=="object"&&A[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(A,U){if(E(A)&&(O(A),S(A))){I(A,U);return}(0,e.boolOrEmptySchema)(A,U)}function S({schema:A,self:U}){if(typeof A=="boolean")return!A;for(const M in A)if(U.RULES.all[M])return!0;return!1}function E(A){return typeof A.schema!="boolean"}function I(A,U){const{schema:M,gen:J,opts:ne}=A;ne.$comment&&M.$comment&&oe(A),Y(A),Q(A);const ae=J.const("_errs",c.default.errors);j(A,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(A){(0,u.checkUnknownRules)(A),L(A)}function j(A,U){if(A.opts.jtd)return X(A,[],!1,U);const M=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,M);X(A,M,!J,U)}function L(A){const{schema:U,errSchemaPath:M,opts:J,self:ne}=A;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(A){const{schema:U,opts:M}=A;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function Y(A){const U=A.schema[A.opts.schemaId];U&&(A.baseId=(0,d.resolveUrl)(A.opts.uriResolver,A.baseId,U))}function Q(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:A,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)A.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(A){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=A;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(A),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:A,evaluated:U,props:M,items:J}){M instanceof a.Name&&A.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&A.assign((0,a._)`${U}.items`,J)}function X(A,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=A,{RULES:Ce}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Ce))){ne.block(()=>ee(A,"$ref",Ce.all.$ref.definition));return}Ve.jtd||re(A,U),ne.block(()=>{for(const Je of Ce.rules)At(Je);At(Ce.post)});function At(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(A,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(A)),ne.endIf()):ie(A,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(A,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=A;ne&&(0,n.assignDefaults)(A,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(A,ae.keyword,ae.definition,U.type)})}function re(A,U){A.schemaEnv.meta||!A.opts.strictTypes||(ce(A,U),A.opts.allowUnionTypes||K(A,U),T(A,A.dataTypes))}function ce(A,U){if(U.length){if(!A.dataTypes.length){A.dataTypes=U;return}U.forEach(M=>{P(A.dataTypes,M)||x(A,`type "${M}" not allowed by context "${A.dataTypes.join(",")}"`)}),w(A,U)}}function K(A,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(A,"use allowUnionTypes to allow union type keyword")}function T(A,U){const M=A.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(A.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(A,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(A,U){return A.includes(U)||U==="number"&&A.includes("integer")}function P(A,U){return A.includes(U)||U==="integer"&&A.includes("number")}function w(A,U){const M=[];for(const J of A.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");A.dataTypes=M}function x(A,U){const M=A.schemaEnv.baseId+A.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(A,U,A.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(A,U,M,J){const ne=new B(A,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!te.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ne=A,ae=c.default.rootData}else{const Le=me.exec(A);if(!Le)throw new Error(`Invalid JSON-pointer: ${A}`);const Ce=+Le[1];if(ne=Le[2],ne==="#"){if(Ce>=U)throw new Error(Ve("property/index",Ce));return J[U-Ce]}if(Ce>U)throw new Error(Ve("data",Ce));if(ae=M[U-Ce],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Ce){return`Cannot access ${Le} ${Ce} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Ki(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=qi();class t extends Error{constructor(i,n,o,s){super(s||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=qi(),n=_e(),o=Vi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const eb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tb="Meta-schema for $data reference (JSON AnySchema extension proposal)",nb="object",rb=["$data"],ib={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ob=!1;var sb={$id:eb,description:tb,type:nb,required:rb,properties:ib,additionalProperties:ob},yr={},Tn={exports:{}},co,Nu;function ab(){return Nu||(Nu=1,co={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),co}var lo,Ou;function ub(){if(Ou)return lo;Ou=1;const{HEX:e}=ab(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return lo={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},lo}var fo,xu;function cb(){if(xu)return fo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return fo=$,fo}var ju;function lb(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=ub(),o=cb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var Au;function fb(){if(Au)return yr;Au=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=lb();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var zu;function db(){return zu||(zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Vi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Na(),n=Ki(),o=Dp(),s=Oa(),a=ye(),c=qi(),d=pi(),u=_e(),h=sb,y=fb(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,A,U,M,J,ne,ae,we,Fe,Ve,Le,Ce,At,Je,zt,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(A=K.strictTuples)!==null&&A!==void 0?A:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Ce=K.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(At=K.validateSchema)!==null&&At!==void 0?At:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(zt=K.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,A){await x.call(this,se.$schema);const U=this._addSchema(se,A);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof n.default))throw A;return ee.call(this,A),await te.call(this,A.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function te(se){const A=await me.call(this,se);this.refs[se]||await x.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,F)}async function me(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.normalizeId)(K),this.schemas[K]||this.refs[K]}function O(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(no)),no}var vr={},$r={},br={},Tu;function hb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function pb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Ki(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function mb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=hb(),t=pb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function gb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${s}}`},n={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:s,data:a,schemaCode:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function yb(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:n,data:o,schemaCode:s,it:a}=i,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function vb(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,n=0,o;for(;n<r;)i++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<r&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return i}return Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function $b(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=vb(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function bb(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,t._)`{pattern: ${n}}`},code(n){const{data:o,$data:s,schema:a,schemaCode:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function _b(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Nr.default=r,Nr}var Or={},Zu;function wb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function kb(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return xr.default=r,xr}var jr={},Ar={},qu;function xa(){if(qu)return Ar;qu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Cp();return e.code='require("ajv/dist/runtime/equal").default',Ar.default=e,Ar}var Vu;function Sb(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var zr={},Ku;function Ib(){if(Ku)return zr;Ku=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return zr.default=n,zr}var Tr={},Ju;function Eb(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function Nb(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=gb(),t=yb(),r=$b(),i=bb(),n=_b(),o=wb(),s=kb(),a=Sb(),c=Ib(),d=Eb(),u=[e.default,t.default,r.default,i.default,n.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return _r.default=u,_r}var Pr={},on={},Wu;function Bp(){if(Wu)return on;Wu=1,Object.defineProperty(on,"__esModule",{value:!0}),on.validateAdditionalItems=void 0;const e=ye(),t=_e(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return on.validateAdditionalItems=n,on.default=i,on}var Dr={},sn={},Hu;function Rp(){if(Hu)return sn;Hu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return n(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function n(o,s,a=o.schema){const{gen:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return sn.validateTuple=n,sn.default=i,sn}var Xu;function Ob(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Rp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function xb(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Bp(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function jb(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var ho={},ec;function Ab(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
168
+ || ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var zn={},gu;function H$(){if(gu)return zn;gu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,oe=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&oe.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function X$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Mi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function Y$(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},ao,bu;function Bp(){return bu||(bu=1,ao=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),ao}var uo={exports:{}},_u;function Q$(){if(_u)return uo.exports;_u=1;var e=uo.exports=function(i,n,o){typeof n=="function"&&(o=n,n={}),o=n.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(n,s,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,n,o,s,a,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return uo.exports}var wu;function qi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Bp(),r=Q$(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function Vi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=W$(),t=pi(),r=Cp(),i=pi(),n=H$(),o=X$(),s=Y$(),a=ye(),c=Rt(),d=qi(),u=_e(),h=Mi();function y(A){if(E(A)&&(O(A),S(A))){m(A);return}_(A,()=>(0,e.topBoolOrEmptySchema)(A))}wt.validateFunctionCode=y;function _({gen:A,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?A.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,a._)`"use strict"; ${f(M,ne)}`),g(A,ne),A.code(ae)}):A.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>A.code(f(M,ne)).code(ae))}function b(A){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(A,U){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,a._)`""`),A.var(c.default.parentData,(0,a._)`undefined`),A.var(c.default.parentDataProperty,(0,a._)`undefined`),A.var(c.default.rootData,c.default.data),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(A){const{schema:U,opts:M,gen:J}=A;_(A,()=>{M.$comment&&U.$comment&&oe(A),G(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(A),j(A),pe(A)})}function $(A){const{gen:U,validateName:M}=A;A.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${A.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${A.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${A.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${A.evaluated}.items`,(0,a._)`undefined`))}function f(A,U){const M=typeof A=="object"&&A[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(A,U){if(E(A)&&(O(A),S(A))){I(A,U);return}(0,e.boolOrEmptySchema)(A,U)}function S({schema:A,self:U}){if(typeof A=="boolean")return!A;for(const M in A)if(U.RULES.all[M])return!0;return!1}function E(A){return typeof A.schema!="boolean"}function I(A,U){const{schema:M,gen:J,opts:ne}=A;ne.$comment&&M.$comment&&oe(A),Y(A),Q(A);const ae=J.const("_errs",c.default.errors);j(A,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(A){(0,u.checkUnknownRules)(A),L(A)}function j(A,U){if(A.opts.jtd)return X(A,[],!1,U);const M=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,M);X(A,M,!J,U)}function L(A){const{schema:U,errSchemaPath:M,opts:J,self:ne}=A;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(A){const{schema:U,opts:M}=A;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function Y(A){const U=A.schema[A.opts.schemaId];U&&(A.baseId=(0,d.resolveUrl)(A.opts.uriResolver,A.baseId,U))}function Q(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:A,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)A.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(A){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=A;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(A),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:A,evaluated:U,props:M,items:J}){M instanceof a.Name&&A.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&A.assign((0,a._)`${U}.items`,J)}function X(A,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=A,{RULES:Ce}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Ce))){ne.block(()=>ee(A,"$ref",Ce.all.$ref.definition));return}Ve.jtd||re(A,U),ne.block(()=>{for(const Je of Ce.rules)At(Je);At(Ce.post)});function At(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(A,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(A)),ne.endIf()):ie(A,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(A,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=A;ne&&(0,n.assignDefaults)(A,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(A,ae.keyword,ae.definition,U.type)})}function re(A,U){A.schemaEnv.meta||!A.opts.strictTypes||(ce(A,U),A.opts.allowUnionTypes||K(A,U),T(A,A.dataTypes))}function ce(A,U){if(U.length){if(!A.dataTypes.length){A.dataTypes=U;return}U.forEach(M=>{P(A.dataTypes,M)||x(A,`type "${M}" not allowed by context "${A.dataTypes.join(",")}"`)}),w(A,U)}}function K(A,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(A,"use allowUnionTypes to allow union type keyword")}function T(A,U){const M=A.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(A.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(A,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(A,U){return A.includes(U)||U==="number"&&A.includes("integer")}function P(A,U){return A.includes(U)||U==="integer"&&A.includes("number")}function w(A,U){const M=[];for(const J of A.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");A.dataTypes=M}function x(A,U){const M=A.schemaEnv.baseId+A.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(A,U,A.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(A,U,M,J){const ne=new B(A,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!te.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ne=A,ae=c.default.rootData}else{const Le=me.exec(A);if(!Le)throw new Error(`Invalid JSON-pointer: ${A}`);const Ce=+Le[1];if(ne=Le[2],ne==="#"){if(Ce>=U)throw new Error(Ve("property/index",Ce));return J[U-Ce]}if(Ce>U)throw new Error(Ve("data",Ce));if(ae=M[U-Ce],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Ce){return`Cannot access ${Le} ${Ce} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Ki(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=qi();class t extends Error{constructor(i,n,o,s){super(s||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=qi(),n=_e(),o=Vi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const eb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tb="Meta-schema for $data reference (JSON AnySchema extension proposal)",nb="object",rb=["$data"],ib={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ob=!1;var sb={$id:eb,description:tb,type:nb,required:rb,properties:ib,additionalProperties:ob},yr={},Tn={exports:{}},co,Nu;function ab(){return Nu||(Nu=1,co={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),co}var lo,Ou;function ub(){if(Ou)return lo;Ou=1;const{HEX:e}=ab(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return lo={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},lo}var fo,xu;function cb(){if(xu)return fo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return fo=$,fo}var ju;function lb(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=ub(),o=cb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var Au;function fb(){if(Au)return yr;Au=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=lb();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var zu;function db(){return zu||(zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Vi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Na(),n=Ki(),o=Up(),s=Oa(),a=ye(),c=qi(),d=pi(),u=_e(),h=sb,y=fb(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,A,U,M,J,ne,ae,we,Fe,Ve,Le,Ce,At,Je,zt,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(A=K.strictTuples)!==null&&A!==void 0?A:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Ce=K.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(At=K.validateSchema)!==null&&At!==void 0?At:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(zt=K.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,A){await x.call(this,se.$schema);const U=this._addSchema(se,A);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof n.default))throw A;return ee.call(this,A),await te.call(this,A.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function te(se){const A=await me.call(this,se);this.refs[se]||await x.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,F)}async function me(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.normalizeId)(K),this.schemas[K]||this.refs[K]}function O(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(no)),no}var vr={},$r={},br={},Tu;function hb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function pb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Ki(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function mb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=hb(),t=pb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function gb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${s}}`},n={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:s,data:a,schemaCode:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function yb(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:n,data:o,schemaCode:s,it:a}=i,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function vb(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,n=0,o;for(;n<r;)i++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<r&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return i}return Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function $b(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=vb(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function bb(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,t._)`{pattern: ${n}}`},code(n){const{data:o,$data:s,schema:a,schemaCode:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function _b(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Nr.default=r,Nr}var Or={},Zu;function wb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function kb(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return xr.default=r,xr}var jr={},Ar={},qu;function xa(){if(qu)return Ar;qu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Bp();return e.code='require("ajv/dist/runtime/equal").default',Ar.default=e,Ar}var Vu;function Sb(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var zr={},Ku;function Ib(){if(Ku)return zr;Ku=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return zr.default=n,zr}var Tr={},Ju;function Eb(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function Nb(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=gb(),t=yb(),r=$b(),i=bb(),n=_b(),o=wb(),s=kb(),a=Sb(),c=Ib(),d=Eb(),u=[e.default,t.default,r.default,i.default,n.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return _r.default=u,_r}var Pr={},on={},Wu;function Rp(){if(Wu)return on;Wu=1,Object.defineProperty(on,"__esModule",{value:!0}),on.validateAdditionalItems=void 0;const e=ye(),t=_e(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return on.validateAdditionalItems=n,on.default=i,on}var Dr={},sn={},Hu;function Fp(){if(Hu)return sn;Hu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return n(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function n(o,s,a=o.schema){const{gen:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return sn.validateTuple=n,sn.default=i,sn}var Xu;function Ob(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Fp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function xb(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Rp(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function jb(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var ho={},ec;function Ab(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
169
169
  missingProperty: ${h},
170
170
  depsCount: ${d},
171
- deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(ho)),ho}var Br={},tc;function zb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Fp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),r=Rt(),i=_e(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Tb(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Vi(),t=gt(),r=_e(),i=Fp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Pb(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Db(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=_e(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:n,it:o}=r;if((0,e.alwaysValidSchema)(o,n)){r.fail();return}const s=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Zr.default=t,Zr}var Mr={},sc;function Ub(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Cb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Bb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=_e(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:n,it:o}=r;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=i.name("valid");n.forEach((a,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Rb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Fb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=_e(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:n}){i.if===void 0&&(0,e.checkStrictMode)(n,`"${r}" without "if" is ignored`)}};return Jr.default=t,Jr}var fc;function Lb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Bp(),t=Ob(),r=Rp(),i=xb(),n=jb(),o=Ab(),s=zb(),a=Fp(),c=Tb(),d=Pb(),u=Db(),h=Ub(),y=Cb(),_=Bb(),b=Rb(),g=Fb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function Zb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function Mb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[Zb().default];return Gr.default=t,Gr}var Zt={},pc;function qb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Vb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=mb(),t=Nb(),r=Lb(),i=Mb(),n=qb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Kb(){if(gc)return Pn;gc=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(Pn.DiscrError=e={})),Pn}var yc;function Jb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Kb(),r=Oa(),i=Ki(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Gb="http://json-schema.org/draft-07/schema#",Wb="http://json-schema.org/draft-07/schema#",Hb="Core schema meta-schema",Xb={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Yb=["object","boolean"],Qb={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var e_={$schema:Gb,$id:Wb,title:Hb,definitions:Xb,type:Yb,properties:Qb,default:!0},vc;function t_(){return vc||(vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=db(),i=Vb(),n=Jb(),o=e_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=Vi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Ki();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var n_=t_();const po=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,je={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(je.modifier);const r_=Object.keys(je.color),i_=Object.keys(je.bgColor);[...r_,...i_];function o_(){const e=new Map;for(const[t,r]of Object.entries(je)){for(const[i,n]of Object.entries(r))je[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=je[i],e.set(n[0],n[1]);Object.defineProperty(je,t,{value:r,enumerable:!1})}return Object.defineProperty(je,"codes",{value:e,enumerable:!1}),je.color.close="\x1B[39m",je.bgColor.close="\x1B[49m",je.color.ansi=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(po),je.bgColor.ansi256=bc(po),je.bgColor.ansi16m=_c(po),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));const n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>je.rgbToAnsi256(...je.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}const o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>je.ansi256ToAnsi(je.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>je.ansi256ToAnsi(je.hexToAnsi256(t)),enumerable:!1}}),je}const et=o_();class s_ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,state:i,resolvedInputs:n}){const o=new n_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=K0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(Sa(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
171
+ deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(ho)),ho}var Br={},tc;function zb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Lp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),r=Rt(),i=_e(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Tb(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Vi(),t=gt(),r=_e(),i=Lp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Pb(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Db(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=_e(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:n,it:o}=r;if((0,e.alwaysValidSchema)(o,n)){r.fail();return}const s=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Zr.default=t,Zr}var Mr={},sc;function Ub(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Cb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Bb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=_e(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:n,it:o}=r;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=i.name("valid");n.forEach((a,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Rb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Fb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=_e(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:n}){i.if===void 0&&(0,e.checkStrictMode)(n,`"${r}" without "if" is ignored`)}};return Jr.default=t,Jr}var fc;function Lb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Rp(),t=Ob(),r=Fp(),i=xb(),n=jb(),o=Ab(),s=zb(),a=Lp(),c=Tb(),d=Pb(),u=Db(),h=Ub(),y=Cb(),_=Bb(),b=Rb(),g=Fb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function Zb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function Mb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[Zb().default];return Gr.default=t,Gr}var Zt={},pc;function qb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Vb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=mb(),t=Nb(),r=Lb(),i=Mb(),n=qb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Kb(){if(gc)return Pn;gc=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(Pn.DiscrError=e={})),Pn}var yc;function Jb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Kb(),r=Oa(),i=Ki(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Gb="http://json-schema.org/draft-07/schema#",Wb="http://json-schema.org/draft-07/schema#",Hb="Core schema meta-schema",Xb={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Yb=["object","boolean"],Qb={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var e_={$schema:Gb,$id:Wb,title:Hb,definitions:Xb,type:Yb,properties:Qb,default:!0},vc;function t_(){return vc||(vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=db(),i=Vb(),n=Jb(),o=e_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=Vi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Ki();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var n_=t_();const po=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,je={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(je.modifier);const r_=Object.keys(je.color),i_=Object.keys(je.bgColor);[...r_,...i_];function o_(){const e=new Map;for(const[t,r]of Object.entries(je)){for(const[i,n]of Object.entries(r))je[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=je[i],e.set(n[0],n[1]);Object.defineProperty(je,t,{value:r,enumerable:!1})}return Object.defineProperty(je,"codes",{value:e,enumerable:!1}),je.color.close="\x1B[39m",je.bgColor.close="\x1B[49m",je.color.ansi=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(po),je.bgColor.ansi256=bc(po),je.bgColor.ansi16m=_c(po),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));const n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>je.rgbToAnsi256(...je.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}const o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>je.ansi256ToAnsi(je.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>je.ansi256ToAnsi(je.hexToAnsi256(t)),enumerable:!1}}),je}const et=o_();class s_ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,state:i,resolvedInputs:n}){const o=new n_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=K0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(Sa(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
172
172
  "${et.blueBright.open}${h.input.instanceId}${et.reset.close}" has validation errors`);for(const[d,u]of Object.entries(r.inputs))u.required&&(!n[d]||!n[d].length)&&s.push(`Missing required input "${et.blueBright.open}${d}${et.reset.close}" of type "${et.greenBright.open}${u.type}${et.reset.close}"`);if(s.length===0)return{status:"ok"};const a=(s.length+1).toString().length+2;return{status:"error",errorText:s.map((d,u)=>{const h=d.split(`
173
173
  `),y=`${u+1}. `;return h.map((_,b)=>`${b===0?y:" ".repeat(a)}${_}`).join(`\r
174
174
  `)}).join(`\r
175
- `)}}}const a_={InputResolver:l$,InputHashResolver:J$,ValidationResolver:s_,StateResolver:G$};var Dn={exports:{}},mo,wc;function u_(){if(wc)return mo;wc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}mo=t;function t(r,i,n){var o=n&&n.stringify||e,s=1;if(typeof r=="object"&&r!==null){var a=i.length+s;if(a===1)return r;var c=new Array(a);c[0]=o(r);for(var d=1;d<a;d++)c[d]=o(i[d]);return c.join(" ")}if(typeof r!="string")return r;var u=i.length;if(u===0)return r;for(var h="",y=1-s,_=-1,b=r&&r.length||0,g=0;g<b;){if(r.charCodeAt(g)===37&&g+1<b){switch(_=_>-1?_:0,r.charCodeAt(g+1)){case 100:case 102:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Number(i[y]),_=g+2,g++;break;case 105:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Math.floor(Number(i[y])),_=g+2,g++;break;case 79:case 111:case 106:if(y>=u||i[y]===void 0)break;_<g&&(h+=r.slice(_,g));var m=typeof i[y];if(m==="string"){h+="'"+i[y]+"'",_=g+2,g++;break}if(m==="function"){h+=i[y].name||"<anonymous>",_=g+2,g++;break}h+=o(i[y]),_=g+2,g++;break;case 115:if(y>=u)break;_<g&&(h+=r.slice(_,g)),h+=String(i[y]),_=g+2,g++;break;case 37:_<g&&(h+=r.slice(_,g)),h+="%",_=g+2,g++,y--;break}++y}++g}return _===-1?r:(_<b&&(h+=r.slice(_)),h)}return mo}var kc;function c_(){if(kc)return Dn.exports;kc=1;const e=u_();Dn.exports=u;const t=pe().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:E,errWithCause:E};function i(R,X){return R==="silent"?1/0:X.levels.values[R]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(R,X){const ie={logger:X,parent:R[o]};X[o]=ie}function c(R,X,ie){const re={};X.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||L}),R[n]=re}function d(R,X){return Array.isArray(R)?R.filter(function(re){return re!=="!stdSerializers.err"}):R===!0?Object.keys(X):!1}function u(R){R=R||{},R.browser=R.browser||{};const X=R.browser.transmit;if(X&&typeof X.send!="function")throw Error("pino: transmit option must have a send function");const ie=R.browser.write||t;R.browser.write&&(R.browser.asObject=!0);const re=R.serializers||{},ce=d(R.browser.serialize,re);let K=R.browser.serialize;Array.isArray(R.browser.serialize)&&R.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const T=Object.keys(R.customLevels||{}),F=["error","fatal","warn","info","debug","trace"].concat(T);typeof ie=="function"&&F.forEach(function(se){ie[se]=ie}),(R.enabled===!1||R.browser.disabled)&&(R.level="silent");const P=R.level||"info",w=Object.create(ie);w.log||(w.log=L),c(w,F,ie),a({},w),Object.defineProperty(w,"levelVal",{get:B}),Object.defineProperty(w,"level",{get:ee,set:te});const x={transmit:X,serialize:ce,asObject:R.browser.asObject,asObjectBindingsOnly:R.browser.asObjectBindingsOnly,formatters:R.browser.formatters,levels:F,timestamp:I(R),messageKey:R.messageKey||"msg",onChild:R.onChild||L};w.levels=h(R),w.level=P,w.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=L,w.serializers=re,w._serialize=ce,w._stdErrSerialize=K,w.child=function(...se){return me.call(this,x,...se)},X&&(w._logEvent=S());function B(){return i(this.level,this)}function ee(){return this._level}function te(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,b(this,x,w,"error"),b(this,x,w,"fatal"),b(this,x,w,"warn"),b(this,x,w,"info"),b(this,x,w,"debug"),b(this,x,w,"trace"),T.forEach(A=>{b(this,x,w,A)})}function me(se,A,U){if(!A)throw new Error("missing bindings for child Pino");U=U||{},ce&&A.serializers&&(U.serializers=A.serializers);const M=U.serializers;if(ce&&M){var J=Object.assign({},re,M),ne=R.browser.serialize===!0?Object.keys(J):ce;delete A.serializers,f([A],ne,J,this._stdErrSerialize)}function ae(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=A,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Fe._logEvent.bindings,A)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Fe){return me.call(this,se,...Fe)},we.level=U.level||this.level,se.onChild(we),we}return w}function h(R){const X=R.customLevels||{},ie=Object.assign({},u.levels.values,X),re=Object.assign({},u.levels.labels,y(X));return{values:ie,labels:re}}function y(R){const X={};return Object.keys(R).forEach(function(ie){X[R[ie]]=ie}),X}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:Y,unixTime:Q,isoTime:oe});function _(R){const X=[];R.bindings&&X.push(R.bindings);let ie=R[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&X.push(ie.logger.bindings);return X.reverse()}function b(R,X,ie,re){if(Object.defineProperty(R,re,{value:i(R.level,ie)>i(re,ie)?L:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),R[re]===L){if(!X.transmit)return;const K=X.transmit.level||R.level,T=i(K,ie);if(i(re,ie)<T)return}R[re]=m(R,X,ie,re);const ce=_(R);ce.length!==0&&(R[re]=g(ce,R[re]))}function g(R,X){return function(){return X.apply(this,[...R,...arguments])}}function m(R,X,ie,re){return function(ce){return function(){const T=X.timestamp(),F=new Array(arguments.length),P=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var w=0;w<F.length;w++)F[w]=arguments[w];var x=!1;if(X.serialize&&(f(F,this._serialize,this.serializers,this._stdErrSerialize),x=!0),X.asObject||X.formatters?ce.call(P,...$(this,re,F,T,X)):ce.apply(P,F),X.transmit){const B=X.transmit.level||R._level,ee=i(B,ie),te=i(re,ie);if(te<ee)return;v(this,{ts:T,methodLevel:re,methodValue:te,transmitValue:ie.levels.values[X.transmit.level||R._level],send:X.transmit.send,val:i(R._level,ie)},F,x)}}}(R[n][re])}function $(R,X,ie,re,ce){const{level:K,log:T=B=>B}=ce.formatters||{},F=ie.slice();let P=F[0];const w={};let x=(R._childLevel|0)+1;if(x<1&&(x=1),re&&(w.time=re),K){const B=K(X,R.levels.values[X]);Object.assign(w,B)}else w.level=R.levels.values[X];if(ce.asObjectBindingsOnly){if(P!==null&&typeof P=="object")for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());return[T(w),...F]}else{if(P!==null&&typeof P=="object"){for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());P=F.length?e(F.shift(),F):void 0}else typeof P=="string"&&(P=e(F.shift(),F));return P!==void 0&&(w[ce.messageKey]=P),[T(w)]}}function f(R,X,ie,re){for(const ce in R)if(re&&R[ce]instanceof Error)R[ce]=u.stdSerializers.err(R[ce]);else if(typeof R[ce]=="object"&&!Array.isArray(R[ce])&&X)for(const K in R[ce])X.indexOf(K)>-1&&K in ie&&(R[ce][K]=ie[K](R[ce][K]))}function v(R,X,ie,re=!1){const ce=X.send,K=X.ts,T=X.methodLevel,F=X.methodValue,P=X.val,w=R._logEvent.bindings;re||f(ie,R._serialize||Object.keys(R.serializers),R.serializers,R._stdErrSerialize===void 0?!0:R._stdErrSerialize),R._logEvent.ts=K,R._logEvent.messages=ie.filter(function(x){return w.indexOf(x)===-1}),R._logEvent.level.label=T,R._logEvent.level.value=F,ce(T,R._logEvent,P),R._logEvent=S(w)}function S(R){return{ts:0,messages:[],bindings:R||[],level:{label:"",value:0}}}function E(R){const X={type:R.constructor.name,msg:R.message,stack:R.stack};for(const ie in R)X[ie]===void 0&&(X[ie]=R[ie]);return X}function I(R){return typeof R.timestamp=="function"?R.timestamp:R.timestamp===!1?G:Y}function O(){return{}}function j(R){return R}function L(){}function G(){return!1}function Y(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function pe(){function R(X){return typeof X<"u"&&X}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return R(self)||R(window)||R(this)||{}}}return Dn.exports.default=u,Dn.exports.pino=u,Dn.exports}var l_=c_();const ei=(e,t)=>{e.postMessage(t)},Wn=new Map,f_=async(e,t,r,i,n=!1)=>{if(Wn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=l_.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(d,u)=>{ei(e,{type:"outputs",resolverId:r,items:[{nodeId:d,output:u}]})};let a;n&&(a=(d,u)=>{ei(e,{type:"dependent-set",resolverId:r,nodeId:d,dependents:u&&Array.from(u)})});const c=new a_[i](t,o,s,a);Wn.set(r,{nodes:t,resolver:c,logger:o,abortController:new AbortController}),c.addAllNodesToWorkset(),await c.process(),ei(e,{type:"resolver-ready",resolverId:r})},Lp=(e,t,r)=>{e.abortController.abort(),e.abortController=new AbortController,e.nodes.set(t,r),e.resolver.invalidate(t),e.resolver.process(e.abortController.signal)},d_=(e,t,r)=>{const i=Wn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Lp(i,t,r)},h_=(e,t)=>{const r=Wn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Lp(r,t,void 0)},p_=e=>{Wn.delete(e)};self.onconnect=e=>{const t=e.ports[0];t.onmessage=r=>{const i=r.data;switch(i.type){case"create-resolver":{const n=new Map(Object.entries(i.nodes));f_(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{d_(i.resolverId,i.nodeId,i.node);break}case"delete-input":{h_(i.resolverId,i.nodeId);break}case"dispose-resolver":{p_(i.resolverId);break}}},ei(t,{type:"ready"})};
175
+ `)}}}const a_={InputResolver:l$,InputHashResolver:J$,ValidationResolver:s_,StateResolver:G$};var Dn={exports:{}},mo,wc;function u_(){if(wc)return mo;wc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}mo=t;function t(r,i,n){var o=n&&n.stringify||e,s=1;if(typeof r=="object"&&r!==null){var a=i.length+s;if(a===1)return r;var c=new Array(a);c[0]=o(r);for(var d=1;d<a;d++)c[d]=o(i[d]);return c.join(" ")}if(typeof r!="string")return r;var u=i.length;if(u===0)return r;for(var h="",y=1-s,_=-1,b=r&&r.length||0,g=0;g<b;){if(r.charCodeAt(g)===37&&g+1<b){switch(_=_>-1?_:0,r.charCodeAt(g+1)){case 100:case 102:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Number(i[y]),_=g+2,g++;break;case 105:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Math.floor(Number(i[y])),_=g+2,g++;break;case 79:case 111:case 106:if(y>=u||i[y]===void 0)break;_<g&&(h+=r.slice(_,g));var m=typeof i[y];if(m==="string"){h+="'"+i[y]+"'",_=g+2,g++;break}if(m==="function"){h+=i[y].name||"<anonymous>",_=g+2,g++;break}h+=o(i[y]),_=g+2,g++;break;case 115:if(y>=u)break;_<g&&(h+=r.slice(_,g)),h+=String(i[y]),_=g+2,g++;break;case 37:_<g&&(h+=r.slice(_,g)),h+="%",_=g+2,g++,y--;break}++y}++g}return _===-1?r:(_<b&&(h+=r.slice(_)),h)}return mo}var kc;function c_(){if(kc)return Dn.exports;kc=1;const e=u_();Dn.exports=u;const t=pe().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:E,errWithCause:E};function i(R,X){return R==="silent"?1/0:X.levels.values[R]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(R,X){const ie={logger:X,parent:R[o]};X[o]=ie}function c(R,X,ie){const re={};X.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||L}),R[n]=re}function d(R,X){return Array.isArray(R)?R.filter(function(re){return re!=="!stdSerializers.err"}):R===!0?Object.keys(X):!1}function u(R){R=R||{},R.browser=R.browser||{};const X=R.browser.transmit;if(X&&typeof X.send!="function")throw Error("pino: transmit option must have a send function");const ie=R.browser.write||t;R.browser.write&&(R.browser.asObject=!0);const re=R.serializers||{},ce=d(R.browser.serialize,re);let K=R.browser.serialize;Array.isArray(R.browser.serialize)&&R.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const T=Object.keys(R.customLevels||{}),F=["error","fatal","warn","info","debug","trace"].concat(T);typeof ie=="function"&&F.forEach(function(se){ie[se]=ie}),(R.enabled===!1||R.browser.disabled)&&(R.level="silent");const P=R.level||"info",w=Object.create(ie);w.log||(w.log=L),c(w,F,ie),a({},w),Object.defineProperty(w,"levelVal",{get:B}),Object.defineProperty(w,"level",{get:ee,set:te});const x={transmit:X,serialize:ce,asObject:R.browser.asObject,asObjectBindingsOnly:R.browser.asObjectBindingsOnly,formatters:R.browser.formatters,levels:F,timestamp:I(R),messageKey:R.messageKey||"msg",onChild:R.onChild||L};w.levels=h(R),w.level=P,w.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=L,w.serializers=re,w._serialize=ce,w._stdErrSerialize=K,w.child=function(...se){return me.call(this,x,...se)},X&&(w._logEvent=S());function B(){return i(this.level,this)}function ee(){return this._level}function te(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,b(this,x,w,"error"),b(this,x,w,"fatal"),b(this,x,w,"warn"),b(this,x,w,"info"),b(this,x,w,"debug"),b(this,x,w,"trace"),T.forEach(A=>{b(this,x,w,A)})}function me(se,A,U){if(!A)throw new Error("missing bindings for child Pino");U=U||{},ce&&A.serializers&&(U.serializers=A.serializers);const M=U.serializers;if(ce&&M){var J=Object.assign({},re,M),ne=R.browser.serialize===!0?Object.keys(J):ce;delete A.serializers,f([A],ne,J,this._stdErrSerialize)}function ae(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=A,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Fe._logEvent.bindings,A)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Fe){return me.call(this,se,...Fe)},we.level=U.level||this.level,se.onChild(we),we}return w}function h(R){const X=R.customLevels||{},ie=Object.assign({},u.levels.values,X),re=Object.assign({},u.levels.labels,y(X));return{values:ie,labels:re}}function y(R){const X={};return Object.keys(R).forEach(function(ie){X[R[ie]]=ie}),X}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:Y,unixTime:Q,isoTime:oe});function _(R){const X=[];R.bindings&&X.push(R.bindings);let ie=R[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&X.push(ie.logger.bindings);return X.reverse()}function b(R,X,ie,re){if(Object.defineProperty(R,re,{value:i(R.level,ie)>i(re,ie)?L:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),R[re]===L){if(!X.transmit)return;const K=X.transmit.level||R.level,T=i(K,ie);if(i(re,ie)<T)return}R[re]=m(R,X,ie,re);const ce=_(R);ce.length!==0&&(R[re]=g(ce,R[re]))}function g(R,X){return function(){return X.apply(this,[...R,...arguments])}}function m(R,X,ie,re){return function(ce){return function(){const T=X.timestamp(),F=new Array(arguments.length),P=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var w=0;w<F.length;w++)F[w]=arguments[w];var x=!1;if(X.serialize&&(f(F,this._serialize,this.serializers,this._stdErrSerialize),x=!0),X.asObject||X.formatters?ce.call(P,...$(this,re,F,T,X)):ce.apply(P,F),X.transmit){const B=X.transmit.level||R._level,ee=i(B,ie),te=i(re,ie);if(te<ee)return;v(this,{ts:T,methodLevel:re,methodValue:te,transmitValue:ie.levels.values[X.transmit.level||R._level],send:X.transmit.send,val:i(R._level,ie)},F,x)}}}(R[n][re])}function $(R,X,ie,re,ce){const{level:K,log:T=B=>B}=ce.formatters||{},F=ie.slice();let P=F[0];const w={};let x=(R._childLevel|0)+1;if(x<1&&(x=1),re&&(w.time=re),K){const B=K(X,R.levels.values[X]);Object.assign(w,B)}else w.level=R.levels.values[X];if(ce.asObjectBindingsOnly){if(P!==null&&typeof P=="object")for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());return[T(w),...F]}else{if(P!==null&&typeof P=="object"){for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());P=F.length?e(F.shift(),F):void 0}else typeof P=="string"&&(P=e(F.shift(),F));return P!==void 0&&(w[ce.messageKey]=P),[T(w)]}}function f(R,X,ie,re){for(const ce in R)if(re&&R[ce]instanceof Error)R[ce]=u.stdSerializers.err(R[ce]);else if(typeof R[ce]=="object"&&!Array.isArray(R[ce])&&X)for(const K in R[ce])X.indexOf(K)>-1&&K in ie&&(R[ce][K]=ie[K](R[ce][K]))}function v(R,X,ie,re=!1){const ce=X.send,K=X.ts,T=X.methodLevel,F=X.methodValue,P=X.val,w=R._logEvent.bindings;re||f(ie,R._serialize||Object.keys(R.serializers),R.serializers,R._stdErrSerialize===void 0?!0:R._stdErrSerialize),R._logEvent.ts=K,R._logEvent.messages=ie.filter(function(x){return w.indexOf(x)===-1}),R._logEvent.level.label=T,R._logEvent.level.value=F,ce(T,R._logEvent,P),R._logEvent=S(w)}function S(R){return{ts:0,messages:[],bindings:R||[],level:{label:"",value:0}}}function E(R){const X={type:R.constructor.name,msg:R.message,stack:R.stack};for(const ie in R)X[ie]===void 0&&(X[ie]=R[ie]);return X}function I(R){return typeof R.timestamp=="function"?R.timestamp:R.timestamp===!1?G:Y}function O(){return{}}function j(R){return R}function L(){}function G(){return!1}function Y(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function pe(){function R(X){return typeof X<"u"&&X}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return R(self)||R(window)||R(this)||{}}}return Dn.exports.default=u,Dn.exports.pino=u,Dn.exports}var l_=c_();const ei=(e,t)=>{e.postMessage(t)},Wn=new Map,f_=async(e,t,r,i,n=!1)=>{if(Wn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=l_.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(d,u)=>{ei(e,{type:"outputs",resolverId:r,items:[{nodeId:d,output:u}]})};let a;n&&(a=(d,u)=>{ei(e,{type:"dependent-set",resolverId:r,nodeId:d,dependents:u&&Array.from(u)})});const c=new a_[i](t,o,s,a);Wn.set(r,{nodes:t,resolver:c,logger:o,abortController:new AbortController}),c.addAllNodesToWorkset(),await c.process(),ei(e,{type:"resolver-ready",resolverId:r})},Zp=(e,t,r)=>{e.abortController.abort(),e.abortController=new AbortController,e.nodes.set(t,r),e.resolver.invalidate(t),e.resolver.process(e.abortController.signal)},d_=(e,t,r)=>{const i=Wn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Zp(i,t,r)},h_=(e,t)=>{const r=Wn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Zp(r,t,void 0)},p_=e=>{Wn.delete(e)};self.onconnect=e=>{const t=e.ports[0];t.onmessage=r=>{const i=r.data;switch(i.type){case"create-resolver":{const n=new Map(Object.entries(i.nodes));f_(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{d_(i.resolverId,i.nodeId,i.node);break}case"delete-input":{h_(i.resolverId,i.nodeId);break}case"dispose-resolver":{p_(i.resolverId);break}}},ei(t,{type:"ready"})};