@highstate/designer 0.9.19 → 0.9.21

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 (79) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BODfYi5x.js → 0vdwhauO.js} +1 -1
  3. package/.output/public/_nuxt/{i3Pf1NPu.js → 16S73JW8.js} +1 -1
  4. package/.output/public/_nuxt/{CasefD2V.js → 30BaVrUW.js} +1 -1
  5. package/.output/public/_nuxt/{O074qcLn.js → 4xMt1p0i.js} +1 -1
  6. package/.output/public/_nuxt/{DuztTtWK.js → 99ZxcQMo.js} +1 -1
  7. package/.output/public/_nuxt/{DarxiN41.js → B0nz2Zze.js} +1 -1
  8. package/.output/public/_nuxt/{T7hNoCXG.js → B3nLPexT.js} +1 -1
  9. package/.output/public/_nuxt/{BkhU0P2a.js → B5zoSt72.js} +1 -1
  10. package/.output/public/_nuxt/{koatKMQr.js → B9WOzG0F.js} +1 -1
  11. package/.output/public/_nuxt/{DFPGdAue.js → BElWqKFK.js} +1 -1
  12. package/.output/public/_nuxt/{DEKgA0CD.js → BG77JRvd.js} +1 -1
  13. package/.output/public/_nuxt/{Ck1nftBx.js → BJKzranL.js} +1 -1
  14. package/.output/public/_nuxt/{00PavPNr.js → BVAgVeex.js} +1 -1
  15. package/.output/public/_nuxt/{D9qQxcz2.js → BZHZ48I0.js} +1 -1
  16. package/.output/public/_nuxt/{C39wRh4i.js → BhSkG2vO.js} +1 -1
  17. package/.output/public/_nuxt/{BSVaCi82.js → BwzWClQo.js} +1 -1
  18. package/.output/public/_nuxt/{CAEVHbCq.js → C6uyQOiX.js} +1 -1
  19. package/.output/public/_nuxt/{DO3LUuFM.js → CEFQZJTy.js} +1 -1
  20. package/.output/public/_nuxt/{Bj2v5zwu.js → CFUixvV0.js} +1 -1
  21. package/.output/public/_nuxt/{C28Ky4mM.js → CIUVrxWu.js} +1 -1
  22. package/.output/public/_nuxt/{CBdGpnmw.js → CKzYRRNc.js} +1 -1
  23. package/.output/public/_nuxt/{mwDqsUrW.js → CRUo-mN3.js} +1 -1
  24. package/.output/public/_nuxt/{DLQCiJf0.js → CTv1udg1.js} +1 -1
  25. package/.output/public/_nuxt/{BLPLmiCg.js → CYlq2lca.js} +1 -1
  26. package/.output/public/_nuxt/{Dy4MTz6g.js → Ca9HO25U.js} +1 -1
  27. package/.output/public/_nuxt/{CzVLS6f1.js → Ccxf70XJ.js} +1 -1
  28. package/.output/public/_nuxt/{DP4clH6m.js → Cl-6nwYp.js} +1 -1
  29. package/.output/public/_nuxt/{_d0M4KuU.js → CmFtdvwG.js} +1 -1
  30. package/.output/public/_nuxt/{DxOL29Up.js → CmuRgu4O.js} +1 -1
  31. package/.output/public/_nuxt/{DcrT2YVS.js → CoKQIzln.js} +1 -1
  32. package/.output/public/_nuxt/{ttev5MDP.js → CqQ7SoEc.js} +1 -1
  33. package/.output/public/_nuxt/{24pzIZRr.js → Ct0zHWLj.js} +1 -1
  34. package/.output/public/_nuxt/{CND6o3oI.js → CwG_vXR4.js} +1 -1
  35. package/.output/public/_nuxt/{kFPB2rqp.js → D2m36GEB.js} +1 -1
  36. package/.output/public/_nuxt/{fqUPtzRv.js → D5PsJ332.js} +1 -1
  37. package/.output/public/_nuxt/{CHdpI9cE.js → D84_luhw.js} +1 -1
  38. package/.output/public/_nuxt/{D9rAj-Tm.js → DCUYnw8H.js} +1 -1
  39. package/.output/public/_nuxt/{DYtuF1mO.js → DEkEne1_.js} +1 -1
  40. package/.output/public/_nuxt/{B8z64P5r.js → DIndX_i2.js} +1 -1
  41. package/.output/public/_nuxt/{HgwTqqUo.js → DJF4kszA.js} +1 -1
  42. package/.output/public/_nuxt/{JokPmHXv.js → DKH4orv1.js} +1 -1
  43. package/.output/public/_nuxt/{BH2j9ZdL.js → DLPcFaxm.js} +1 -1
  44. package/.output/public/_nuxt/{CIv7p5Hd.js → DMGzSUEV.js} +3 -3
  45. package/.output/public/_nuxt/{BjQbGaFu.js → DRbOBnYP.js} +1 -1
  46. package/.output/public/_nuxt/{UczlX-c9.js → DRzHUuts.js} +1 -1
  47. package/.output/public/_nuxt/{CF5B4EM_.js → DSvoz_Rr.js} +1 -1
  48. package/.output/public/_nuxt/DUPtXNCV.js +1 -0
  49. package/.output/public/_nuxt/{DjVGtenp.js → DUcPQWXO.js} +1 -1
  50. package/.output/public/_nuxt/{BLIjXRbp.js → DdEkqLVb.js} +1 -1
  51. package/.output/public/_nuxt/{DLaRxjQz.js → DlUEcgLY.js} +1 -1
  52. package/.output/public/_nuxt/{BhWccYlK.js → DlgqOs51.js} +21 -21
  53. package/.output/public/_nuxt/{DoLmvh98.js → DljtJUzO.js} +1 -1
  54. package/.output/public/_nuxt/{DbnWrFmt.js → Dp61CxCP.js} +1 -1
  55. package/.output/public/_nuxt/{DDCXd-ua.js → DqHZqf4r.js} +1 -1
  56. package/.output/public/_nuxt/{DTnN7l_n.js → Dvr3wuZa.js} +1 -1
  57. package/.output/public/_nuxt/{v9bSWb7m.js → DwnIsmZ-.js} +1 -1
  58. package/.output/public/_nuxt/{BeBKEPaV.js → K7mdFSQD.js} +1 -1
  59. package/.output/public/_nuxt/{DInZfUJa.js → KGX_yR9z.js} +1 -1
  60. package/.output/public/_nuxt/{D2AD0cA7.js → PcM58xPJ.js} +1 -1
  61. package/.output/public/_nuxt/{D1TquUAQ.js → SAlV5_cT.js} +1 -1
  62. package/.output/public/_nuxt/{Bwy6lXZI.js → _4xG4Sg4.js} +1 -1
  63. package/.output/public/_nuxt/{B2umP1rN.js → asZV6334.js} +1 -1
  64. package/.output/public/_nuxt/builds/latest.json +1 -1
  65. package/.output/public/_nuxt/builds/meta/c2b04ef2-f7ef-48dc-aa48-5d4dfa26c410.json +1 -0
  66. package/.output/public/_nuxt/{DwmUhPpj.js → cf-ossUw.js} +1 -1
  67. package/.output/public/_nuxt/{graph-resolver-DwBTX8MB.js → graph-resolver-r_0JlXH_.js} +5 -5
  68. package/.output/public/_nuxt/{DIpLW5D5.js → ngiZ_K3q.js} +1 -1
  69. package/.output/public/_nuxt/{N0qQ3IYs.js → pD_CwtY4.js} +1 -1
  70. package/.output/public/_nuxt/{Bq9zGKGH.js → pGIbX2RQ.js} +1 -1
  71. package/.output/public/_nuxt/{JJ2MHRK2.js → rmtV6Y0T.js} +1 -1
  72. package/.output/public/_nuxt/{COCm9MC_.js → un-_PcAo.js} +1 -1
  73. package/.output/public/_nuxt/{DPWtH2b9.js → uwIuMFjJ.js} +1 -1
  74. package/.output/public/_nuxt/{vuetify.uXRHzFBB.css → vuetify.B9hb7bXd.css} +1 -1
  75. package/.output/server/index.mjs +1340 -1340
  76. package/.output/server/package.json +1 -1
  77. package/package.json +7 -9
  78. package/.output/public/_nuxt/BEFlL3Zb.js +0 -1
  79. package/.output/public/_nuxt/builds/meta/c89eb61d-80e1-4ca1-b13e-521c420f664e.json +0 -1
@@ -26,7 +26,7 @@ const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var
26
26
  path: iss.path ? [${an(f)}, ...iss.path] : [${an(f)}]
27
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>
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 Le(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(),Le(),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:Le,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(`
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
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(`
31
31
  `)?Et(r,t):r.includes(`
32
32
  `)?`
@@ -156,20 +156,20 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
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:Le(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Le(),multiple:Le(),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:Le().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ip=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Le(),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:Le()});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:Le().default(!1),forceUpdateChildren:Le().default(!1),destroyDependentInstances:Le().default(!0),invokeDestroyTriggers:Le().default(!0),deleteUnreachableResources:Le().default(!1),forceDeleteState:Le().default(!1),allowPartialCompositeInstanceUpdate:Le().default(!1),allowPartialCompositeInstanceDestruction:Le().default(!1),refresh:Le().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:Le(),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 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};/*!
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 Fe(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:Fe(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(Fe(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 Re=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Re,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Fe(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?`
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
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
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`,Re=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Re}.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:Re,opts:Ve,self:Fe}=A,{RULES:Ce}=Fe;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),Re||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(),Re());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 Re(){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 Fe=me.exec(A);if(!Fe)throw new Error(`Invalid JSON-pointer: ${A}`);const Ce=+Fe[1];if(ne=Fe[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 Re=ne.split("/");for(const Fe of Re)Fe&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Fe))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Fe,Ce){return`Cannot access ${Fe} ${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,Re,Ve,Fe,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:(Re=K.messages)!==null&&Re!==void 0?Re:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Fe=K.schemaId)!==null&&Fe!==void 0?Fe:"$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 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},
169
169
  missingProperty: ${h},
170
170
  depsCount: ${d},
171
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}":
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(Re){this._childLevel=(Re._childLevel|0)+1,this.bindings=A,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Re._logEvent.bindings,A)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Re){return me.call(this,se,...Re)},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})},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"})};