@shumai-one/shumai 0.4.6 → 0.4.7

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 (143) hide show
  1. package/bin/{chunk-1bgsphyz.js → chunk-05tnmf8h.js} +2 -2
  2. package/bin/chunk-0xsgx9ep.js +1 -0
  3. package/bin/{chunk-3d5rm1d1.js → chunk-0ygtayqf.js} +1 -1
  4. package/bin/{chunk-crja7whq.js → chunk-11c93g1m.js} +2 -2
  5. package/bin/chunk-1ajgdv26.js +1 -0
  6. package/bin/{chunk-ba33nf0q.js → chunk-1ntn42d2.js} +3 -3
  7. package/bin/chunk-2kxhdnma.js +3 -0
  8. package/bin/chunk-30dsxm8s.js +1 -0
  9. package/bin/chunk-3b6h719s.js +3 -0
  10. package/bin/{chunk-pdh9bnyj.js → chunk-3g5pyw2e.js} +2 -2
  11. package/bin/{chunk-p75f5pgq.js → chunk-3h9c5ak3.js} +2 -2
  12. package/bin/{chunk-2qjfpmcf.js → chunk-3m5kwcj7.js} +1 -1
  13. package/bin/{chunk-w1wxzqqb.js → chunk-3p1bb08a.js} +2 -2
  14. package/bin/{chunk-6vxzkrsj.js → chunk-3r5yc5wm.js} +4 -4
  15. package/bin/{chunk-sab7tjxw.js → chunk-3tyk9xgf.js} +3 -3
  16. package/bin/{chunk-h9mka9br.js → chunk-4a88wwg2.js} +1 -1
  17. package/bin/{chunk-z08bqvkc.js → chunk-4f5pnnah.js} +14 -14
  18. package/bin/{chunk-dpc11hpd.js → chunk-4jgq9m51.js} +7 -7
  19. package/bin/{chunk-d7fwggt6.js → chunk-4m8gk79m.js} +1 -1
  20. package/bin/{chunk-b9hyc0a1.js → chunk-53vtc74g.js} +2 -2
  21. package/bin/{chunk-1kt5dzjv.js → chunk-58e1a3re.js} +2 -2
  22. package/bin/{chunk-dmvvt8va.js → chunk-5qkwpy8c.js} +2 -2
  23. package/bin/{chunk-07jszkhj.js → chunk-5rk7dyx9.js} +58 -58
  24. package/bin/{chunk-ga3pahzf.js → chunk-5v4s2kp4.js} +1 -1
  25. package/bin/{chunk-v8v8vdf7.js → chunk-5wp37g6w.js} +4 -4
  26. package/bin/{chunk-hs2r9qaw.js → chunk-628k58ek.js} +2 -2
  27. package/bin/{chunk-rp4pc6kz.js → chunk-6kdf411z.js} +1 -1
  28. package/bin/chunk-6ksrrayx.css +1 -0
  29. package/bin/chunk-6rjkbwz6.js +14 -0
  30. package/bin/{chunk-md5pcq46.js → chunk-781990k7.js} +4 -4
  31. package/bin/{chunk-ey3h4sct.js → chunk-887pj9xd.js} +2 -2
  32. package/bin/{chunk-1jybg56e.js → chunk-8b1w6bj9.js} +1 -1
  33. package/bin/{chunk-0wvhahzh.js → chunk-8gna37dd.js} +1 -1
  34. package/bin/{chunk-rmzcarv9.js → chunk-8sf106rq.js} +1 -1
  35. package/bin/{chunk-2jrjwaqr.js → chunk-8ystwvdt.js} +1 -1
  36. package/bin/{chunk-3j5njrpr.js → chunk-9v6eqa3n.js} +2 -2
  37. package/bin/{chunk-rsd164d9.js → chunk-9va1mzeq.js} +1 -1
  38. package/bin/{chunk-kmbjp5kp.js → chunk-an6nsq1t.js} +1 -1
  39. package/bin/{chunk-vzj2j11x.js → chunk-ayq8dskd.js} +1 -1
  40. package/bin/{chunk-y20sbaz5.js → chunk-b0rjvx5g.js} +1 -1
  41. package/bin/chunk-bgm76rzj.js +1 -0
  42. package/bin/chunk-btmxr226.js +1 -0
  43. package/bin/chunk-camzbwqh.js +2 -0
  44. package/bin/{chunk-t350k3s1.js → chunk-ccvjwhqq.js} +1 -1
  45. package/bin/{chunk-pgj2kjnn.js → chunk-dkzyv61a.js} +2 -2
  46. package/bin/{chunk-y56yvezn.js → chunk-dyq6h9ha.js} +1 -1
  47. package/bin/{chunk-teqprbd8.js → chunk-e17daz1x.js} +1 -1
  48. package/bin/{chunk-dbw8c1jj.js → chunk-ebf1r872.js} +4 -4
  49. package/bin/{chunk-2vzzd0q6.js → chunk-ebx3bd4c.js} +1 -1
  50. package/bin/{chunk-161rxeq2.js → chunk-ee3mrvqp.js} +1 -1
  51. package/bin/chunk-fg6zf2gb.js +2 -0
  52. package/bin/{chunk-6y4xkcte.js → chunk-fhazy8f9.js} +1 -1
  53. package/bin/{chunk-gqr5hxhj.js → chunk-fk712d68.js} +1 -1
  54. package/bin/{chunk-afnzb9ne.js → chunk-fvgb6rps.js} +2 -2
  55. package/bin/chunk-g9gmht89.js +2 -0
  56. package/bin/{chunk-1t51fp6n.js → chunk-gf4n4ahk.js} +1 -1
  57. package/bin/{chunk-gcjsw9yp.js → chunk-h3wr8nnk.js} +1 -1
  58. package/bin/chunk-htpjtarr.js +2 -0
  59. package/bin/{chunk-kg8eg9z3.js → chunk-hye75kp0.js} +2 -2
  60. package/bin/{chunk-3tg39jx7.js → chunk-j41mya13.js} +2 -2
  61. package/bin/chunk-j547gtag.js +2 -0
  62. package/bin/{chunk-a4056d0r.js → chunk-jde9r5mj.js} +1 -1
  63. package/bin/chunk-jf4kcad0.js +1 -0
  64. package/bin/{chunk-tgr86ac4.js → chunk-jt04mf5s.js} +1 -1
  65. package/bin/{chunk-hnhdq2wd.js → chunk-k3qypq3x.js} +1 -1
  66. package/bin/chunk-k5hnrtrt.js +1 -0
  67. package/bin/{chunk-mtb9fpj2.js → chunk-k810fstm.js} +1 -1
  68. package/bin/{chunk-3n4224c0.js → chunk-kg2c445x.js} +1 -1
  69. package/bin/{chunk-edqd8evk.js → chunk-kq2qbwx1.js} +1 -1
  70. package/bin/{chunk-7nvk7waw.js → chunk-m2h7a172.js} +1 -1
  71. package/bin/{chunk-brwbhbmc.js → chunk-m638fg4n.js} +5 -5
  72. package/bin/{chunk-3dgahs95.js → chunk-mm1a0zja.js} +1 -1
  73. package/bin/{chunk-hxyg5q2a.js → chunk-njabdtvb.js} +2 -2
  74. package/bin/{chunk-b6q287d1.js → chunk-njqf50vw.js} +1 -1
  75. package/bin/{chunk-47tn3vtg.js → chunk-nn5hyf6f.js} +1 -1
  76. package/bin/{chunk-t7bvde99.js → chunk-nnq8g9yy.js} +3 -3
  77. package/bin/{chunk-8cn7fx40.js → chunk-ny7qjn6s.js} +1 -1
  78. package/bin/{chunk-3d9tfxp4.js → chunk-p5fwjk5c.js} +1 -1
  79. package/bin/{chunk-s05cdax2.js → chunk-pa1fmskf.js} +1 -1
  80. package/bin/{chunk-a796sgcw.js → chunk-pcspeqwq.js} +2 -2
  81. package/bin/{chunk-yfr0hzb7.js → chunk-q1d7x1cc.js} +1 -1
  82. package/bin/{chunk-y1b3ck7m.js → chunk-q45n02fs.js} +1 -1
  83. package/bin/chunk-q6jsw0rr.js +211 -0
  84. package/bin/chunk-qjzyze00.js +1 -0
  85. package/bin/{chunk-2yr5k567.js → chunk-r55htzxr.js} +1 -1
  86. package/bin/{chunk-46wfxyd7.js → chunk-r7e2fmmx.js} +2 -2
  87. package/bin/{chunk-5kvc1gp2.js → chunk-rbagbd0e.js} +1 -1
  88. package/bin/{chunk-dz076sh7.js → chunk-rdscv38p.js} +1 -1
  89. package/bin/chunk-rfhmk32e.js +1 -0
  90. package/bin/{chunk-qs7855cz.js → chunk-rkafv27g.js} +2 -2
  91. package/bin/{chunk-hd6dnnyg.js → chunk-rkqpnyzx.js} +1 -1
  92. package/bin/{chunk-z6jpt0h6.js → chunk-s30fjvzs.js} +3 -3
  93. package/bin/{chunk-dj5a6kkh.js → chunk-s41mgkse.js} +1 -1
  94. package/bin/{chunk-988casfy.js → chunk-s63vj79f.js} +1 -1
  95. package/bin/{chunk-9d0thqcy.js → chunk-t3t7dcfq.js} +1 -1
  96. package/bin/{chunk-gsfcpcye.js → chunk-twyxs4z2.js} +1 -1
  97. package/bin/{chunk-1dqsf5qj.js → chunk-typ46eqd.js} +5 -5
  98. package/bin/chunk-v1sgrg0r.js +1 -0
  99. package/bin/{chunk-j9ks8bd7.js → chunk-vdnmq163.js} +1 -1
  100. package/bin/{chunk-jg2v25d2.js → chunk-vx66rms0.js} +2 -2
  101. package/bin/{chunk-9nvymwqj.js → chunk-wvq717b5.js} +2 -2
  102. package/bin/chunk-xbge27m4.js +1 -0
  103. package/bin/{chunk-ysv80zyb.js → chunk-xca338dw.js} +3 -3
  104. package/bin/chunk-xcsz1wp7.js +1 -0
  105. package/bin/{chunk-ehpfg3km.js → chunk-xznabrt2.js} +1 -1
  106. package/bin/{chunk-pvg3msgw.js → chunk-xzyfnfck.js} +3 -3
  107. package/bin/{chunk-9trnkbtr.js → chunk-ycw3rwhx.js} +3 -3
  108. package/bin/{chunk-qbqym9m6.js → chunk-yqvhgtez.js} +2 -2
  109. package/bin/{chunk-4syt6rn0.js → chunk-yr03tf5r.js} +2 -2
  110. package/bin/{chunk-n3xjwszr.js → chunk-z9jpgxf1.js} +1 -1
  111. package/bin/chunk-zb0az2tq.js +2 -0
  112. package/bin/{chunk-pwkby9h7.js → chunk-zbt4h7n0.js} +1 -1
  113. package/bin/{chunk-kk42xhgz.js → chunk-zcdqsp1e.js} +1 -1
  114. package/bin/chunk-zej27b5c.js +2 -0
  115. package/bin/{chunk-axmd242s.js → chunk-zmjtv19e.js} +1 -1
  116. package/bin/{chunk-7e5z637e.js → chunk-zr11zfwc.js} +1 -1
  117. package/bin/{chunk-k6avge95.js → chunk-zz0522zr.js} +4 -4
  118. package/bin/shumai-app.html +1 -1
  119. package/bin/shumai-app.js +294 -293
  120. package/package.json +7 -7
  121. package/bin/chunk-0c67210c.js +0 -1
  122. package/bin/chunk-2z1pnt7h.js +0 -2
  123. package/bin/chunk-3vmapyk9.js +0 -1
  124. package/bin/chunk-886pnknh.js +0 -3
  125. package/bin/chunk-908pypkr.js +0 -1
  126. package/bin/chunk-952qwf17.js +0 -2
  127. package/bin/chunk-9a2tf0mh.js +0 -2
  128. package/bin/chunk-apfrw0wd.js +0 -3
  129. package/bin/chunk-batadmvr.js +0 -2
  130. package/bin/chunk-bvdvp192.js +0 -1
  131. package/bin/chunk-db1msmdh.js +0 -2
  132. package/bin/chunk-dkx3pmdz.js +0 -1
  133. package/bin/chunk-hacyjx1s.js +0 -1
  134. package/bin/chunk-he5nvmqw.js +0 -1
  135. package/bin/chunk-hyr1vtfp.js +0 -1
  136. package/bin/chunk-jh8q3885.js +0 -211
  137. package/bin/chunk-jzbrt2vk.js +0 -1
  138. package/bin/chunk-nqym3zbs.js +0 -1
  139. package/bin/chunk-sebbjvgv.css +0 -1
  140. package/bin/chunk-t8gv2ekj.js +0 -14
  141. package/bin/chunk-vm5tn0zm.js +0 -2
  142. package/bin/chunk-wmjp8dcm.js +0 -1
  143. package/bin/chunk-wy8dkyxj.js +0 -1
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- import{Oe}from"./chunk-qbqym9m6.js";function Ue(t){let o=Object.values(t).filter((c)=>typeof c==="number");return Object.entries(t).filter(([c,u])=>o.indexOf(+c)===-1).map(([c,u])=>u)}function ft(t,o="|"){return t.map((n)=>ht(n)).join(o)}function we(t,o){if(typeof o==="bigint")return o.toString();return o}function ke(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function eo(t){return t===null||t===void 0}function Me(t){let o=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(o,n)}function to(t,o){let n=t/o,c=Math.round(n),u=4*Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-c)<u)return 0;return n-c}var Qr=Symbol("evaluating");function ro(t,o,n){let c=void 0;Object.defineProperty(t,o,{get(){if(c===Qr)return;if(c===void 0)c=Qr,c=n();return c},set(u){Object.defineProperty(t,o,{value:u})},configurable:!0})}function L(t,o,n){Object.defineProperty(t,o,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ae(...t){let o={};for(let n of t){let c=Object.getOwnPropertyDescriptors(n);Object.assign(o,c)}return Object.defineProperties({},o)}function oo(t){return JSON.stringify(t)}function no(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ge(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var io=ke(()=>{if(B.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(t){return!1}});function me(t){if(ge(t)===!1)return!1;let o=t.constructor;if(o===void 0)return!0;if(typeof o!=="function")return!0;let n=o.prototype;if(ge(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function mt(t){if(me(t))return{...t};if(Array.isArray(t))return[...t];if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);return t}var so=new Set(["string","number","symbol"]);function le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(t,o,n){let c=new t._zod.constr(o??t._zod.def);if(!o||n?.parent)c._zod.parent=t;return c}function S(t){let o=t;if(!o)return{};if(typeof o==="string")return{error:()=>o};if(o?.message!==void 0){if(o?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");o.error=o.message}if(delete o.message,typeof o.error==="string")return{...o,error:()=>o.error};return o}function ht(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function co(t){return Object.keys(t).filter((o)=>t[o]._zod.optin!==void 0&&t[o]._zod.optout==="optional")}var uo=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))();function Sc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={};for(let h of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,h))throw Error(`Unrecognized key: "${String(h)}"`);if(!o[h])continue;L(f,h,n.shape[h])}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Oc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={...t._zod.def.shape};for(let h of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,h))throw Error(`Unrecognized key: "${String(h)}"`);if(!o[h])continue;delete f[h]}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Ic(t,o){if(!me(o))throw Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let p=t._zod.def.shape;for(let f of Reflect.ownKeys(o))if(Object.getOwnPropertyDescriptor(p,f)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=ae(t._zod.def,{get shape(){let p={...t._zod.def.shape,...o};return L(this,"shape",p),p}});return Y(t,u)}function Ec(t,o){if(!me(o))throw Error("Invalid input to safeExtend: expected a plain object");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o};return L(this,"shape",c),c}});return Y(t,n)}function Tc(t,o){if(!o?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o._zod.def.shape};return L(this,"shape",c),c},get catchall(){return o._zod.def.catchall},checks:o._zod.def.checks??[]});return Y(t,n)}function ao(t,o,n,c="partial"){let p=o._zod.def.checks;if(p&&p.length>0)throw Error(`.${c}() cannot be used on object schemas containing refinements`);let h=ae(o._zod.def,{get shape(){let y=o._zod.def.shape,b={...y};if(n)for(let z of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(y,z))throw Error(`Unrecognized key: "${String(z)}"`);if(!n[z])continue;b[z]=t?new t({type:"optional",innerType:y[z]}):y[z]}else for(let z of Reflect.ownKeys(y))b[z]=t?new t({type:"optional",innerType:y[z]}):y[z];return L(this,"shape",b),b},checks:[]});return Y(o,h)}function Ac(t,o,n){let c=ae(o._zod.def,{get shape(){let u=o._zod.def.shape,p={...u};if(n)for(let f of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(p,f))throw Error(`Unrecognized key: "${String(f)}"`);if(!n[f])continue;p[f]=new t({type:"nonoptional",innerType:u[f]})}else for(let f of Reflect.ownKeys(u))p[f]=new t({type:"nonoptional",innerType:u[f]});return L(this,"shape",p),p}});return Y(o,c)}function he(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function lo(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function te(t,o){return o.map((n)=>{var c;return(c=n).path??(c.path=[]),n.path.unshift(t),n})}function $e(t){return typeof t==="string"?t:t?.message}function _t(t,o,n){var c;for(let u=o;u<t.length;u++)(c=t[u]).schema??(c.schema=n)}function ne(t,o,n){var c;let u=t.inst?._zod?.traits;if(u?.has("$ZodType"))if(u.has("$ZodCheck"))(c=t).schema??(c.schema=t.inst);else t.schema=t.inst;let p=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,f=t.message?t.message:$e(t.inst?._zod.def?.error?.(t))??$e(p?.(t))??$e(o?.error?.(t))??$e(n.customError?.(t))??$e(n.localeError?.(t))??"Invalid input",{inst:h,schema:y,continue:b,input:z,...w}=t;if(w.path??(w.path=[]),w.message=f,o?.reportInput)w.input=z;return w}var Nc=/[\uD800-\uDBFF]/;function Je(t){let o=t.length;if(!Nc.test(t))return o;let n=o;for(let c=0;c<o-1;c++)if((t.charCodeAt(c)&64512)===55296&&(t.charCodeAt(c+1)&64512)===56320)n--,c++;return n}function Be(t){if(Array.isArray(t))return"array";if(typeof t==="string")return"string";return"unknown"}function fo(t){let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return o}function _e(...t){let[o,n,c]=t;if(typeof o==="string")return{message:o,code:"custom",input:n,inst:c};return{...o}}function ho(t,o){for(let n in o){let c=Object.getOwnPropertyDescriptor(o,n);if(c.get)Object.defineProperty(t,n,{...c,enumerable:!1});else Cc(t,n,c.value)}}function de(t,o,n,c=!0){return Object.defineProperty(t,o,{configurable:!0,writable:!0,enumerable:c,value:n}),n}function gt(t,o,n){return de(t,o,n,!1)}function Cc(t,o,n){Object.defineProperty(t,o,{configurable:!0,get(){return this==null?n:de(this,o,n.bind(this))},set(c){de(this,o,c)}})}function jc(t,o){let n=Object.getPrototypeOf(t);return o in n?void 0:n}var pt,ue=!1,Rc={configurable:!0,get(){ue=!0;return}};function E(t,o,n){let c=Object.getPrototypeOf(t._zod);if(o in c&&pt!==t._zod){pt=void 0;return}pt=t._zod,Object.defineProperty(c,o,{configurable:!0,get(){Object.defineProperty(this,o,Rc);let u=ue;ue=!1;try{let p=n(this);if(ue)delete this[o];else Object.defineProperty(this,o,{configurable:!0,writable:!0,value:p});return ue=ue||u,p}catch(p){throw delete this[o],ue=ue||u,p}},set(u){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:u})}})}function Dc(t,o,n,c){let u=jc(t,o);if(!u)return;Object.defineProperty(u,o,{configurable:!0,get(){let p={configurable:!0,writable:!0,enumerable:c,value:void 0};return Object.defineProperty(this,o,p),p.value=n(this),Object.defineProperty(this,o,p),p.value},set(p){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:c,value:p})}})}var Lc="~constantCatch";function _o(t){let o=()=>t;return o[Lc]=!0,o}var go,Fr=Object.freeze({status:"aborted"}),xt={value:void 0,enumerable:!1},xo="captureStackTrace"in Error?Error:null;function Fc(t){let o=xo;if(o){let n=o.stackTraceLimit;if(typeof n==="number"){try{o.stackTraceLimit=0}catch{return xo=null,new t}try{return new t}finally{o.stackTraceLimit=n}}}return new t}function v(t,o,n,c){let u={};function p(k){this.def=k,this.constr=w,this.traits=new Set}p.prototype=u;let f=n,h=f&&new WeakSet;function y(k,Z){if(!k._zod){xt.value=new p(Z);try{Object.defineProperty(k,"_zod",xt)}finally{xt.value=void 0}}if(k._zod.traits.has(t))return;if(k._zod.traits.add(t),o(k,Z),h){let O=Object.getPrototypeOf(k),I=k._zod.constr.prototype,J=O;while(J&&J!==I)J=Object.getPrototypeOf(J);let q=J??O;if(!h.has(q))h.add(q),ho(q,f)}let P=w.prototype;for(let O in P){if(!Object.prototype.hasOwnProperty.call(P,O))continue;if(!(O in k))k[O]=P[O].bind(k)}}let b=c?.Parent??Object;class z extends b{}Object.defineProperty(z,"name",{value:t});function w(k){let Z=c?.Parent?Fc(z):this;y(Z,k);let P=Z._zod.deferred;if(P){for(let I of P)I();Z._zod.deferred=void 0}let O=globalThis.__zod_globalConfig?.postProcessor;if(O)O(Z);return Z}return Object.defineProperty(w,"init",{value:y}),Object.defineProperty(w,Symbol.hasInstance,{value:(k)=>{if(c?.Parent&&k instanceof c.Parent)return!0;return k?._zod?.traits?.has(t)}}),Object.defineProperty(w,"name",{value:t}),w}class ie extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ze extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`);this.name="ZodEncodeError"}}(go=globalThis).__zod_globalConfig??(go.__zod_globalConfig={});var B=globalThis.__zod_globalConfig;function W(t){if(t)Object.assign(B,t);return B}function Uc(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,we,2)),t.message}function Mc(t){this._zod.message=t}var Jc={get:Uc,set:Mc,enumerable:!0,configurable:!0},zt={value:void 0,enumerable:!1},vt={value:void 0,enumerable:!1},yo=new WeakSet([Object.prototype,Error.prototype]),bo=(t,o)=>{t.name="$ZodError",zt.value=t._zod,Object.defineProperty(t,"_zod",zt),vt.value=o,Object.defineProperty(t,"issues",vt),zt.value=void 0,vt.value=void 0,Object.defineProperty(t,"message",Jc);let n=Object.getPrototypeOf(t);if(!yo.has(n))yo.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let c=()=>this.message;return Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0})}})},Js=v("$ZodError",bo),$t=v("$ZodError",bo,void 0,{Parent:Error});function Bc(t,o,n){if(!Object.prototype.hasOwnProperty.call(t,o))if(o==="__proto__")Object.defineProperty(t,o,{value:n(),writable:!0,enumerable:!0,configurable:!0});else t[o]=n();return t[o]}function wt(t,o=(n)=>n.message){let n={},c=[];for(let u of t.issues)if(u.path.length>0)Bc(n,u.path[0],()=>[]).push(o(u));else c.push(o(u));return{formErrors:c,fieldErrors:n}}function kt(t,o=(n)=>n.message){let n={_errors:[]},c=(u,p=[])=>{for(let f of u.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map((h)=>c({issues:h},[...p,...f.path]));else if(f.code==="invalid_key")c({issues:f.issues},[...p,...f.path]);else if(f.code==="invalid_element")c({issues:f.issues},[...p,...f.path]);else{let h=[...p,...f.path];if(h.length===0)n._errors.push(o(f));else{let y=n,b=0;while(b<h.length){let z=h[b],w=b===h.length-1;if(z==="_errors"){if(w)y._errors.push(o(f));b++;continue}if(!Object.prototype.hasOwnProperty.call(y,z))Object.defineProperty(y,z,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let k=y[z];if(w)k._errors.push(o(f));y=k,b++}}}};return c(t),n}function Vc(t){let o=[],n=t.map((c)=>typeof c==="object"?c.key:c);for(let c of n)if(typeof c==="number")o.push(`[${c}]`);else if(typeof c==="symbol")o.push(`[${JSON.stringify(String(c))}]`);else if(/[^\w$]/.test(c))o.push(`[${JSON.stringify(c)}]`);else{if(o.length)o.push(".");o.push(c)}return o.join("")}function nf(t){let o=[],n=[...t.issues].sort((c,u)=>(c.path??[]).length-(u.path??[]).length);for(let c of n)if(o.push(`\u2716 ${c.message}`),c.path?.length)o.push(` \u2192 at ${Vc(c.path)}`);return o.join(`
3
- `)}function Ve(t,o){return{callee:o?.callee??t,Err:o?.Err}}var Ke=(t)=>{let o=(n,c,u,p)=>{let f=u?{...u,async:!1}:{async:!1},h=n._zod.run({value:c,issues:[]},f);if(h instanceof Promise)throw new ie;if(h.issues.length){let y=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw dt(y,p?.callee??o),y}return h.value};return o};var We=(t)=>{let o=async(n,c,u,p)=>{let f=u?{...u,async:!0}:{async:!0},h=n._zod.run({value:c,issues:[]},f);if(h instanceof Promise)h=await h;if(h.issues.length){let y=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw dt(y,p?.callee??o),y}return h.value};return o};var Pe=(t)=>(o,n,c)=>{let u=c?{...c,async:!1}:{async:!1},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)throw new ie;return p.issues.length?{success:!1,error:new(t??Js)(p.issues.map((f)=>ne(f,u,W())))}:{success:!0,data:p.value}},zo=Pe($t),Ie=(t)=>async(o,n,c)=>{let u=c?{...c,async:!0}:{async:!0},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)p=await p;return p.issues.length?{success:!1,error:new t(p.issues.map((f)=>ne(f,u,W())))}:{success:!0,data:p.value}},vo=Ie($t);var $o=(t)=>{let o=Ke(t),n=(c,u,p,f)=>{let h=p?{...p,direction:"backward"}:{direction:"backward"};return o(c,u,h,Ve(n,f))};return n};var wo=(t)=>{let o=Ke(t),n=(c,u,p,f)=>o(c,u,p,Ve(n,f));return n};var ko=(t)=>{let o=We(t),n=async(c,u,p,f)=>{let h=p?{...p,direction:"backward"}:{direction:"backward"};return await o(c,u,h,Ve(n,f))};return n};var Zo=(t)=>{let o=We(t),n=async(c,u,p,f)=>await o(c,u,p,Ve(n,f));return n};var Po=(t)=>(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Pe(t)(o,n,u)};var So=(t)=>(o,n,c)=>Pe(t)(o,n,c);var Oo=(t)=>async(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Ie(t)(o,n,u)};var Io=(t)=>async(o,n,c)=>Ie(t)(o,n,c);var Eo=/^[cC][0-9a-z]{6,}$/,To=/^[0-9a-z]+$/,Ao=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,No=/^[0-9a-vA-V]{20}$/,Co=/^[A-Za-z0-9]{27}$/,jo=/^[a-zA-Z0-9_-]{21}$/;function Ro(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var Do=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Lo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pt=(t)=>{if(!t)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Fo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Wc="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Uo(){return new RegExp(Wc,"u")}var Mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var Bo=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ko=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,St=/^[A-Za-z0-9_-]*$/;var Wo=/^https?$/,Go=/^\+[1-9]\d{6,14}$/;var qo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Gc(t){return new RegExp(`^${t}$`)}var Yo=Gc(qo);function Zt(t){return typeof t.precision==="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Xo(t){return new RegExp(`^${Zt(t)}$`)}function Ho(t){let o=["Z"];if(t.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Zt({precision:t.precision,seconds:!0})}(?:${o.join("|")})`,c=t.local?`${n}|${Zt({precision:t.precision})}`:n;return new RegExp(`^${qo}T(?:${c})$`)}var Qo=(t)=>{let o=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${o}$`)},en=/^-?\d+n?$/,Ge=/^-?\d+$/,Ee=/^-?\d+(?:\.\d+)?$/,tn=/^(?:true|false)$/i,rn=/^null$/i;var on=/^[^A-Z]*$/,nn=/^[^a-z]*$/;var M=v("$ZodCheck",(t,o)=>{var n;t._zod??(t._zod={}),t._zod.def=o,(n=t._zod).onattach??(n.onattach=[])});var Ot=(t)=>{let o=t.value;return!eo(o)&&o.length!==void 0},qe={number:"number",bigint:"bigint",object:"date"},It=v("$ZodCheckLessThan",(t,o)=>{M.init(t,o);let n=qe[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(o.value<p)if(o.inclusive)u.maximum=o.value;else u.exclusiveMaximum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value<=o.value:c.value<o.value)return;c.issues.push({origin:qe[typeof c.value]??n,code:"too_big",maximum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),Et=v("$ZodCheckGreaterThan",(t,o)=>{M.init(t,o);let n=qe[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(o.value>p)if(o.inclusive)u.minimum=o.value;else u.exclusiveMinimum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value>=o.value:c.value>o.value)return;c.issues.push({origin:qe[typeof c.value]??n,code:"too_small",minimum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),sn=v("$ZodCheckMultipleOf",(t,o)=>{M.init(t,o),t._zod.onattach.push((n)=>{var c;(c=n._zod.bag).multipleOf??(c.multipleOf=o.value)}),t._zod.check=(n)=>{if(typeof n.value!==typeof o.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?o.value!==BigInt(0)&&n.value%o.value===BigInt(0):to(n.value,o.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:o.value,input:n.value,inst:t,continue:!o.abort})}}),cn=v("$ZodCheckNumberFormat",(t,o)=>{M.init(t,o),o.format=o.format||"float64";let n=o.format?.includes("int"),c=n?"int":"number",[u,p]=uo[o.format];t._zod.onattach.push((f)=>{let h=f._zod.bag;if(h.format=o.format,h.minimum=u,h.maximum=p,n)h.pattern=Ge}),t._zod.check=(f)=>{let h=f.value;if(n){if(!Number.isInteger(h)){f.issues.push({expected:c,format:o.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){if(h>0)f.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});else f.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});return}}if(h<u)f.issues.push({origin:"number",input:h,code:"too_small",minimum:u,inclusive:!0,inst:t,continue:!o.abort});if(h>p)f.issues.push({origin:"number",input:h,code:"too_big",maximum:p,inclusive:!0,inst:t,continue:!o.abort})}});var un=v("$ZodCheckMaxLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.maximum??Number.POSITIVE_INFINITY;if(o.maximum<u)c._zod.bag.maximum=o.maximum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>o.maximum?Je(u):p)<=o.maximum)return;let h=Be(u);c.issues.push({origin:h,code:"too_big",maximum:o.maximum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),an=v("$ZodCheckMinLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(o.minimum>u)c._zod.bag.minimum=o.minimum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>=o.minimum&&p<o.minimum*2?Je(u):p)>=o.minimum)return;let h=Be(u);c.issues.push({origin:h,code:"too_small",minimum:o.minimum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),ln=v("$ZodCheckLengthEquals",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.minimum=o.length,u.maximum=o.length,u.length=o.length}),t._zod.check=(c)=>{let u=c.value,p=u.length,f=typeof u==="string"&&p>=o.length&&p<=o.length*2?Je(u):p;if(f===o.length)return;let h=Be(u),y=f>o.length;c.issues.push({origin:h,...y?{code:"too_big",maximum:o.length}:{code:"too_small",minimum:o.length},inclusive:!0,exact:!0,input:c.value,inst:t,continue:!o.abort})}}),Te=v("$ZodCheckStringFormat",(t,o)=>{var n,c;if(M.init(t,o),t._zod.onattach.push((u)=>{let p=u._zod.bag;if(p.format=o.format,o.pattern)p.patterns??(p.patterns=new Set),p.patterns.add(o.pattern)}),o.pattern)(n=t._zod).check??(n.check=(u)=>{if(o.pattern.lastIndex=0,o.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:o.format,input:u.value,...o.pattern?{pattern:o.pattern.toString()}:{},inst:t,continue:!o.abort})});else(c=t._zod).check??(c.check=()=>{})}),pn=v("$ZodCheckRegex",(t,o)=>{Te.init(t,o),t._zod.check=(n)=>{if(o.pattern.lastIndex=0,o.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:o.pattern.toString(),inst:t,continue:!o.abort})}}),fn=v("$ZodCheckLowerCase",(t,o)=>{o.pattern??(o.pattern=on),Te.init(t,o)}),dn=v("$ZodCheckUpperCase",(t,o)=>{o.pattern??(o.pattern=nn),Te.init(t,o)}),mn=v("$ZodCheckIncludes",(t,o)=>{M.init(t,o);let n=le(o.includes),c=new RegExp(typeof o.position==="number"?`^.{${o.position},}${n}`:n);o.pattern=c,t._zod.onattach.push((u)=>{let p=u._zod.bag;p.patterns??(p.patterns=new Set),p.patterns.add(c)}),t._zod.check=(u)=>{if(u.value.includes(o.includes,o.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:o.includes,input:u.value,inst:t,continue:!o.abort})}}),hn=v("$ZodCheckStartsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`^${le(o.prefix)}.*`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.startsWith(o.prefix))return;c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:o.prefix,input:c.value,inst:t,continue:!o.abort})}}),_n=v("$ZodCheckEndsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`.*${le(o.suffix)}$`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.endsWith(o.suffix))return;c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:o.suffix,input:c.value,inst:t,continue:!o.abort})}});var gn=v("$ZodCheckOverwrite",(t,o)=>{M.init(t,o),t._zod.check=(n)=>{n.value=o.tx(n.value)}});class Tt{constructor(t=[],o={}){this.content=[],this.indent=0,this.args=t,this.closed=o}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t==="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
2
+ import{Oe}from"./chunk-yqvhgtez.js";function Ue(t){let o=Object.values(t).filter((c)=>typeof c==="number");return Object.entries(t).filter(([c,u])=>o.indexOf(+c)===-1).map(([c,u])=>u)}function ft(t,o="|"){return t.map((n)=>ht(n)).join(o)}function we(t,o){if(typeof o==="bigint")return o.toString();return o}function ke(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function eo(t){return t===null||t===void 0}function Me(t){let o=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(o,n)}function to(t,o){let n=t/o,c=Math.round(n),u=4*Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-c)<u)return 0;return n-c}var Qr=Symbol("evaluating");function ro(t,o,n){let c=void 0;Object.defineProperty(t,o,{get(){if(c===Qr)return;if(c===void 0)c=Qr,c=n();return c},set(u){Object.defineProperty(t,o,{value:u})},configurable:!0})}function L(t,o,n){Object.defineProperty(t,o,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ae(...t){let o={};for(let n of t){let c=Object.getOwnPropertyDescriptors(n);Object.assign(o,c)}return Object.defineProperties({},o)}function oo(t){return JSON.stringify(t)}function no(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ge(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var io=ke(()=>{if(B.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(t){return!1}});function me(t){if(ge(t)===!1)return!1;let o=t.constructor;if(o===void 0)return!0;if(typeof o!=="function")return!0;let n=o.prototype;if(ge(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function mt(t){if(me(t))return{...t};if(Array.isArray(t))return[...t];if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);return t}var so=new Set(["string","number","symbol"]);function le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(t,o,n){let c=new t._zod.constr(o??t._zod.def);if(!o||n?.parent)c._zod.parent=t;return c}function S(t){let o=t;if(!o)return{};if(typeof o==="string")return{error:()=>o};if(o?.message!==void 0){if(o?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");o.error=o.message}if(delete o.message,typeof o.error==="string")return{...o,error:()=>o.error};return o}function ht(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function co(t){return Object.keys(t).filter((o)=>t[o]._zod.optin!==void 0&&t[o]._zod.optout==="optional")}var uo=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))();function Pc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={};for(let h of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,h))throw Error(`Unrecognized key: "${String(h)}"`);if(!o[h])continue;L(f,h,n.shape[h])}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Sc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={...t._zod.def.shape};for(let h of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,h))throw Error(`Unrecognized key: "${String(h)}"`);if(!o[h])continue;delete f[h]}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Oc(t,o){if(!me(o))throw Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let p=t._zod.def.shape;for(let f of Reflect.ownKeys(o))if(Object.getOwnPropertyDescriptor(p,f)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=ae(t._zod.def,{get shape(){let p={...t._zod.def.shape,...o};return L(this,"shape",p),p}});return Y(t,u)}function Ic(t,o){if(!me(o))throw Error("Invalid input to safeExtend: expected a plain object");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o};return L(this,"shape",c),c}});return Y(t,n)}function Ec(t,o){if(!o?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o._zod.def.shape};return L(this,"shape",c),c},get catchall(){return o._zod.def.catchall},checks:o._zod.def.checks??[]});return Y(t,n)}function ao(t,o,n,c="partial"){let p=o._zod.def.checks;if(p&&p.length>0)throw Error(`.${c}() cannot be used on object schemas containing refinements`);let h=ae(o._zod.def,{get shape(){let y=o._zod.def.shape,b={...y};if(n)for(let z of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(y,z))throw Error(`Unrecognized key: "${String(z)}"`);if(!n[z])continue;b[z]=t?new t({type:"optional",innerType:y[z]}):y[z]}else for(let z of Reflect.ownKeys(y))b[z]=t?new t({type:"optional",innerType:y[z]}):y[z];return L(this,"shape",b),b},checks:[]});return Y(o,h)}function Tc(t,o,n){let c=ae(o._zod.def,{get shape(){let u=o._zod.def.shape,p={...u};if(n)for(let f of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(p,f))throw Error(`Unrecognized key: "${String(f)}"`);if(!n[f])continue;p[f]=new t({type:"nonoptional",innerType:u[f]})}else for(let f of Reflect.ownKeys(u))p[f]=new t({type:"nonoptional",innerType:u[f]});return L(this,"shape",p),p}});return Y(o,c)}function he(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function lo(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function te(t,o){return o.map((n)=>{var c;return(c=n).path??(c.path=[]),n.path.unshift(t),n})}function $e(t){return typeof t==="string"?t:t?.message}function _t(t,o,n){var c;for(let u=o;u<t.length;u++)(c=t[u]).schema??(c.schema=n)}function ne(t,o,n){var c;let u=t.inst?._zod?.traits;if(u?.has("$ZodType"))if(u.has("$ZodCheck"))(c=t).schema??(c.schema=t.inst);else t.schema=t.inst;let p=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,f=t.message?t.message:$e(t.inst?._zod.def?.error?.(t))??$e(p?.(t))??$e(o?.error?.(t))??$e(n.customError?.(t))??$e(n.localeError?.(t))??"Invalid input",{inst:h,schema:y,continue:b,input:z,...w}=t;if(w.path??(w.path=[]),w.message=f,o?.reportInput)w.input=z;return w}var Ac=/[\uD800-\uDBFF]/;function Je(t){let o=t.length;if(!Ac.test(t))return o;let n=o;for(let c=0;c<o-1;c++)if((t.charCodeAt(c)&64512)===55296&&(t.charCodeAt(c+1)&64512)===56320)n--,c++;return n}function Be(t){if(Array.isArray(t))return"array";if(typeof t==="string")return"string";return"unknown"}function fo(t){let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return o}function _e(...t){let[o,n,c]=t;if(typeof o==="string")return{message:o,code:"custom",input:n,inst:c};return{...o}}function ho(t,o){for(let n in o){let c=Object.getOwnPropertyDescriptor(o,n);if(c.get)Object.defineProperty(t,n,{...c,enumerable:!1});else Nc(t,n,c.value)}}function de(t,o,n,c=!0){return Object.defineProperty(t,o,{configurable:!0,writable:!0,enumerable:c,value:n}),n}function gt(t,o,n){return de(t,o,n,!1)}function Nc(t,o,n){Object.defineProperty(t,o,{configurable:!0,get(){return this==null?n:de(this,o,n.bind(this))},set(c){de(this,o,c)}})}function Cc(t,o){let n=Object.getPrototypeOf(t);return o in n?void 0:n}var pt,ue=!1,jc={configurable:!0,get(){ue=!0;return}};function E(t,o,n){let c=Object.getPrototypeOf(t._zod);if(o in c&&pt!==t._zod){pt=void 0;return}pt=t._zod,Object.defineProperty(c,o,{configurable:!0,get(){Object.defineProperty(this,o,jc);let u=ue;ue=!1;try{let p=n(this);if(ue)delete this[o];else Object.defineProperty(this,o,{configurable:!0,writable:!0,value:p});return ue=ue||u,p}catch(p){throw delete this[o],ue=ue||u,p}},set(u){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:u})}})}function Rc(t,o,n,c){let u=Cc(t,o);if(!u)return;Object.defineProperty(u,o,{configurable:!0,get(){let p={configurable:!0,writable:!0,enumerable:c,value:void 0};return Object.defineProperty(this,o,p),p.value=n(this),Object.defineProperty(this,o,p),p.value},set(p){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:c,value:p})}})}var Dc="~constantCatch";function _o(t){let o=()=>t;return o[Dc]=!0,o}var go,Fr=Object.freeze({status:"aborted"}),xt={value:void 0,enumerable:!1},xo="captureStackTrace"in Error?Error:null;function Lc(t){let o=xo;if(o){let n=o.stackTraceLimit;if(typeof n==="number"){try{o.stackTraceLimit=0}catch{return xo=null,new t}try{return new t}finally{o.stackTraceLimit=n}}}return new t}function v(t,o,n,c){let u={};function p(k){this.def=k,this.constr=w,this.traits=new Set}p.prototype=u;let f=n,h=f&&new WeakSet;function y(k,Z){if(!k._zod){xt.value=new p(Z);try{Object.defineProperty(k,"_zod",xt)}finally{xt.value=void 0}}if(k._zod.traits.has(t))return;if(k._zod.traits.add(t),o(k,Z),h){let O=Object.getPrototypeOf(k),I=k._zod.constr.prototype,J=O;while(J&&J!==I)J=Object.getPrototypeOf(J);let q=J??O;if(!h.has(q))h.add(q),ho(q,f)}let P=w.prototype;for(let O in P){if(!Object.prototype.hasOwnProperty.call(P,O))continue;if(!(O in k))k[O]=P[O].bind(k)}}let b=c?.Parent??Object;class z extends b{}Object.defineProperty(z,"name",{value:t});function w(k){let Z=c?.Parent?Lc(z):this;y(Z,k);let P=Z._zod.deferred;if(P){for(let I of P)I();Z._zod.deferred=void 0}let O=globalThis.__zod_globalConfig?.postProcessor;if(O)O(Z);return Z}return Object.defineProperty(w,"init",{value:y}),Object.defineProperty(w,Symbol.hasInstance,{value:(k)=>{if(c?.Parent&&k instanceof c.Parent)return!0;return k?._zod?.traits?.has(t)}}),Object.defineProperty(w,"name",{value:t}),w}class ie extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ze extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`);this.name="ZodEncodeError"}}(go=globalThis).__zod_globalConfig??(go.__zod_globalConfig={});var B=globalThis.__zod_globalConfig;function W(t){if(t)Object.assign(B,t);return B}function Fc(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,we,2)),t.message}function Uc(t){this._zod.message=t}var Mc={get:Fc,set:Uc,enumerable:!0,configurable:!0},zt={value:void 0,enumerable:!1},vt={value:void 0,enumerable:!1},yo=new WeakSet([Object.prototype,Error.prototype]),bo=(t,o)=>{t.name="$ZodError",zt.value=t._zod,Object.defineProperty(t,"_zod",zt),vt.value=o,Object.defineProperty(t,"issues",vt),zt.value=void 0,vt.value=void 0,Object.defineProperty(t,"message",Mc);let n=Object.getPrototypeOf(t);if(!yo.has(n))yo.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let c=()=>this.message;return Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0})}})},Xs=v("$ZodError",bo),$t=v("$ZodError",bo,void 0,{Parent:Error});function Jc(t,o,n){if(!Object.prototype.hasOwnProperty.call(t,o))if(o==="__proto__")Object.defineProperty(t,o,{value:n(),writable:!0,enumerable:!0,configurable:!0});else t[o]=n();return t[o]}function wt(t,o=(n)=>n.message){let n={},c=[];for(let u of t.issues)if(u.path.length>0)Jc(n,u.path[0],()=>[]).push(o(u));else c.push(o(u));return{formErrors:c,fieldErrors:n}}function kt(t,o=(n)=>n.message){let n={_errors:[]},c=(u,p=[])=>{for(let f of u.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map((h)=>c({issues:h},[...p,...f.path]));else if(f.code==="invalid_key")c({issues:f.issues},[...p,...f.path]);else if(f.code==="invalid_element")c({issues:f.issues},[...p,...f.path]);else{let h=[...p,...f.path];if(h.length===0)n._errors.push(o(f));else{let y=n,b=0;while(b<h.length){let z=h[b],w=b===h.length-1;if(z==="_errors"){if(w)y._errors.push(o(f));b++;continue}if(!Object.prototype.hasOwnProperty.call(y,z))Object.defineProperty(y,z,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let k=y[z];if(w)k._errors.push(o(f));y=k,b++}}}};return c(t),n}function Bc(t){let o=[],n=t.map((c)=>typeof c==="object"?c.key:c);for(let c of n)if(typeof c==="number")o.push(`[${c}]`);else if(typeof c==="symbol")o.push(`[${JSON.stringify(String(c))}]`);else if(/[^\w$]/.test(c))o.push(`[${JSON.stringify(c)}]`);else{if(o.length)o.push(".");o.push(c)}return o.join("")}function sf(t){let o=[],n=[...t.issues].sort((c,u)=>(c.path??[]).length-(u.path??[]).length);for(let c of n)if(o.push(`\u2716 ${c.message}`),c.path?.length)o.push(` \u2192 at ${Bc(c.path)}`);return o.join(`
3
+ `)}function Ve(t,o){return{callee:o?.callee??t,Err:o?.Err}}var Ke=(t)=>{let o=(n,c,u,p)=>{let f=u?{...u,async:!1}:{async:!1},h=n._zod.run({value:c,issues:[]},f);if(h instanceof Promise)throw new ie;if(h.issues.length){let y=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw dt(y,p?.callee??o),y}return h.value};return o};var We=(t)=>{let o=async(n,c,u,p)=>{let f=u?{...u,async:!0}:{async:!0},h=n._zod.run({value:c,issues:[]},f);if(h instanceof Promise)h=await h;if(h.issues.length){let y=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw dt(y,p?.callee??o),y}return h.value};return o};var Pe=(t)=>(o,n,c)=>{let u=c?{...c,async:!1}:{async:!1},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)throw new ie;return p.issues.length?{success:!1,error:new(t??Xs)(p.issues.map((f)=>ne(f,u,W())))}:{success:!0,data:p.value}},zo=Pe($t),Ie=(t)=>async(o,n,c)=>{let u=c?{...c,async:!0}:{async:!0},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)p=await p;return p.issues.length?{success:!1,error:new t(p.issues.map((f)=>ne(f,u,W())))}:{success:!0,data:p.value}},vo=Ie($t);var $o=(t)=>{let o=Ke(t),n=(c,u,p,f)=>{let h=p?{...p,direction:"backward"}:{direction:"backward"};return o(c,u,h,Ve(n,f))};return n};var wo=(t)=>{let o=Ke(t),n=(c,u,p,f)=>o(c,u,p,Ve(n,f));return n};var ko=(t)=>{let o=We(t),n=async(c,u,p,f)=>{let h=p?{...p,direction:"backward"}:{direction:"backward"};return await o(c,u,h,Ve(n,f))};return n};var Zo=(t)=>{let o=We(t),n=async(c,u,p,f)=>await o(c,u,p,Ve(n,f));return n};var Po=(t)=>(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Pe(t)(o,n,u)};var So=(t)=>(o,n,c)=>Pe(t)(o,n,c);var Oo=(t)=>async(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Ie(t)(o,n,u)};var Io=(t)=>async(o,n,c)=>Ie(t)(o,n,c);var Eo=/^[cC][0-9a-z]{6,}$/,To=/^[0-9a-z]+$/,Ao=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,No=/^[0-9a-vA-V]{20}$/,Co=/^[A-Za-z0-9]{27}$/,jo=/^[a-zA-Z0-9_-]{21}$/;function Ro(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var Do=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Lo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pt=(t)=>{if(!t)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Fo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Kc="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Uo(){return new RegExp(Kc,"u")}var Mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var Bo=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ko=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,St=/^[A-Za-z0-9_-]*$/;var Wo=/^https?$/,Go=/^\+[1-9]\d{6,14}$/;var qo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Wc(t){return new RegExp(`^${t}$`)}var Yo=Wc(qo);function Zt(t){return typeof t.precision==="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Xo(t){return new RegExp(`^${Zt(t)}$`)}function Ho(t){let o=["Z"];if(t.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Zt({precision:t.precision,seconds:!0})}(?:${o.join("|")})`,c=t.local?`${n}|${Zt({precision:t.precision})}`:n;return new RegExp(`^${qo}T(?:${c})$`)}var Qo=(t)=>{let o=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${o}$`)},en=/^-?\d+n?$/,Ge=/^-?\d+$/,Ee=/^-?\d+(?:\.\d+)?$/,tn=/^(?:true|false)$/i,rn=/^null$/i;var on=/^[^A-Z]*$/,nn=/^[^a-z]*$/;var M=v("$ZodCheck",(t,o)=>{var n;t._zod??(t._zod={}),t._zod.def=o,(n=t._zod).onattach??(n.onattach=[])});var Ot=(t)=>{let o=t.value;return!eo(o)&&o.length!==void 0},qe={number:"number",bigint:"bigint",object:"date"},It=v("$ZodCheckLessThan",(t,o)=>{M.init(t,o);let n=qe[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(o.value<p)if(o.inclusive)u.maximum=o.value;else u.exclusiveMaximum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value<=o.value:c.value<o.value)return;c.issues.push({origin:qe[typeof c.value]??n,code:"too_big",maximum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),Et=v("$ZodCheckGreaterThan",(t,o)=>{M.init(t,o);let n=qe[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(o.value>p)if(o.inclusive)u.minimum=o.value;else u.exclusiveMinimum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value>=o.value:c.value>o.value)return;c.issues.push({origin:qe[typeof c.value]??n,code:"too_small",minimum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),sn=v("$ZodCheckMultipleOf",(t,o)=>{M.init(t,o),t._zod.onattach.push((n)=>{var c;(c=n._zod.bag).multipleOf??(c.multipleOf=o.value)}),t._zod.check=(n)=>{if(typeof n.value!==typeof o.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?o.value!==BigInt(0)&&n.value%o.value===BigInt(0):to(n.value,o.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:o.value,input:n.value,inst:t,continue:!o.abort})}}),cn=v("$ZodCheckNumberFormat",(t,o)=>{M.init(t,o),o.format=o.format||"float64";let n=o.format?.includes("int"),c=n?"int":"number",[u,p]=uo[o.format];t._zod.onattach.push((f)=>{let h=f._zod.bag;if(h.format=o.format,h.minimum=u,h.maximum=p,n)h.pattern=Ge}),t._zod.check=(f)=>{let h=f.value;if(n){if(!Number.isInteger(h)){f.issues.push({expected:c,format:o.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){if(h>0)f.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});else f.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});return}}if(h<u)f.issues.push({origin:"number",input:h,code:"too_small",minimum:u,inclusive:!0,inst:t,continue:!o.abort});if(h>p)f.issues.push({origin:"number",input:h,code:"too_big",maximum:p,inclusive:!0,inst:t,continue:!o.abort})}});var un=v("$ZodCheckMaxLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.maximum??Number.POSITIVE_INFINITY;if(o.maximum<u)c._zod.bag.maximum=o.maximum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>o.maximum?Je(u):p)<=o.maximum)return;let h=Be(u);c.issues.push({origin:h,code:"too_big",maximum:o.maximum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),an=v("$ZodCheckMinLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(o.minimum>u)c._zod.bag.minimum=o.minimum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>=o.minimum&&p<o.minimum*2?Je(u):p)>=o.minimum)return;let h=Be(u);c.issues.push({origin:h,code:"too_small",minimum:o.minimum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),ln=v("$ZodCheckLengthEquals",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.minimum=o.length,u.maximum=o.length,u.length=o.length}),t._zod.check=(c)=>{let u=c.value,p=u.length,f=typeof u==="string"&&p>=o.length&&p<=o.length*2?Je(u):p;if(f===o.length)return;let h=Be(u),y=f>o.length;c.issues.push({origin:h,...y?{code:"too_big",maximum:o.length}:{code:"too_small",minimum:o.length},inclusive:!0,exact:!0,input:c.value,inst:t,continue:!o.abort})}}),Te=v("$ZodCheckStringFormat",(t,o)=>{var n,c;if(M.init(t,o),t._zod.onattach.push((u)=>{let p=u._zod.bag;if(p.format=o.format,o.pattern)p.patterns??(p.patterns=new Set),p.patterns.add(o.pattern)}),o.pattern)(n=t._zod).check??(n.check=(u)=>{if(o.pattern.lastIndex=0,o.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:o.format,input:u.value,...o.pattern?{pattern:o.pattern.toString()}:{},inst:t,continue:!o.abort})});else(c=t._zod).check??(c.check=()=>{})}),pn=v("$ZodCheckRegex",(t,o)=>{Te.init(t,o),t._zod.check=(n)=>{if(o.pattern.lastIndex=0,o.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:o.pattern.toString(),inst:t,continue:!o.abort})}}),fn=v("$ZodCheckLowerCase",(t,o)=>{o.pattern??(o.pattern=on),Te.init(t,o)}),dn=v("$ZodCheckUpperCase",(t,o)=>{o.pattern??(o.pattern=nn),Te.init(t,o)}),mn=v("$ZodCheckIncludes",(t,o)=>{M.init(t,o);let n=le(o.includes),c=new RegExp(typeof o.position==="number"?`^.{${o.position},}${n}`:n);o.pattern=c,t._zod.onattach.push((u)=>{let p=u._zod.bag;p.patterns??(p.patterns=new Set),p.patterns.add(c)}),t._zod.check=(u)=>{if(u.value.includes(o.includes,o.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:o.includes,input:u.value,inst:t,continue:!o.abort})}}),hn=v("$ZodCheckStartsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`^${le(o.prefix)}.*`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.startsWith(o.prefix))return;c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:o.prefix,input:c.value,inst:t,continue:!o.abort})}}),_n=v("$ZodCheckEndsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`.*${le(o.suffix)}$`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.endsWith(o.suffix))return;c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:o.suffix,input:c.value,inst:t,continue:!o.abort})}});var gn=v("$ZodCheckOverwrite",(t,o)=>{M.init(t,o),t._zod.check=(n)=>{n.value=o.tx(n.value)}});class Tt{constructor(t=[],o={}){this.content=[],this.indent=0,this.args=t,this.closed=o}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t==="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
4
4
  `).filter((p)=>p),c=Math.min(...n.map((p)=>p.length-p.trimStart().length)),u=n.map((p)=>p.slice(c)).map((p)=>" ".repeat(this.indent*2)+p);for(let p of u)this.content.push(p)}compile(){let t=Function,o=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
5
5
  ${o.join(`
6
6
  `)}
7
- };`)(...Object.values(this.closed))}}var yn={major:4,minor:5,patch:4};var A=v("$ZodType",(t,o)=>{var n;t??(t={}),t._zod.def=o,t._zod.bag=t._zod.bag||{},t._zod.version=yn;let c=t._zod.def.checks,u=t._zod.traits.has("$ZodCheck")?[t,...c??[]]:c?.length?[...c]:[];for(let p of u)for(let f of p._zod.onattach)f(t);if(u.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let p=(h,y,b)=>{if(h.memo)return h;let z=he(h),w;for(let k of y){if(k._zod.def.when){if(lo(h))continue;if(!k._zod.def.when(h))continue}else if(z)continue;let Z=h.issues.length,P=k._zod.check(h);if(P instanceof Promise&&b?.async===!1)throw new ie;if(w||P instanceof Promise)w=(w??Promise.resolve()).then(async()=>{if(await P,h.issues.length===Z)return;if(_t(h.issues,Z,t),!z)z=he(h,Z)});else{if(h.issues.length===Z)continue;if(_t(h.issues,Z,t),!z)z=he(h,Z)}}if(w)return w.then(()=>h);return h},f=(h,y,b)=>{if(he(h))return h.aborted=!0,h;let z=p(y,u,b);if(z instanceof Promise){if(b.async===!1)throw new ie;return z.then((w)=>t._zod.parse(w,b))}return t._zod.parse(z,b)};t._zod.run=(h,y)=>{if(y.skipChecks)return t._zod.parse(h,y);if(y.direction==="backward"){let z=t._zod.parse({value:h.value,issues:[]},{...y,skipChecks:!0});if(z instanceof Promise)return z.then((w)=>f(w,h,y));return f(z,h,y)}let b=t._zod.parse(h,y);if(b instanceof Promise){if(y.async===!1)throw new ie;return b.then((z)=>p(z,u,y))}return p(b,u,y)}}},{get "~standard"(){return gt(this,"~standard",Rt(this))},set "~standard"(t){de(this,"~standard",t)}}),bn=(t)=>t.success?{value:t.data}:{issues:t.error?.issues};function Rt(t){return{validate:(o)=>{try{return bn(zo(t,o))}catch(n){return vo(t,o).then(bn)}},vendor:"zod",version:1}}var He=v("$ZodString",(t,o)=>{A.init(t,o),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qo(t._zod.bag),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=String(n.value)}catch(u){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),j=v("$ZodStringFormat",(t,o)=>{Te.init(t,o),He.init(t,o)}),An=v("$ZodGUID",(t,o)=>{o.pattern??(o.pattern=Lo),j.init(t,o)}),Nn=v("$ZodUUID",(t,o)=>{if(o.version){let c={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[o.version];if(c===void 0)throw Error(`Invalid UUID version: "${o.version}"`);o.pattern??(o.pattern=Pt(c))}else o.pattern??(o.pattern=Pt());j.init(t,o)}),Cn=v("$ZodEmail",(t,o)=>{o.pattern??(o.pattern=Fo),j.init(t,o)}),jn=1,Rn=2;function qc(t,o){if(!o.normalize&&o.protocol?.source===Wo.source&&!/^https?:\/\//i.test(t))return jn;try{return new URL(t)}catch{return Rn}}var Yc=/[\t\n\r]/g;function Xc(t){return t.replace(Yc,"")}function Hc(t,o){return o.lastIndex=0,o.test(t.hostname)}function Qc(t,o){return o.lastIndex=0,o.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Dn=v("$ZodURL",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{try{let c=n.value.trim(),u=qc(c,o);if(u===jn){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!o.abort});return}if(u===Rn){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort});return}if(o.hostname&&!Hc(u,o.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:o.hostname.source,input:n.value,inst:t,continue:!o.abort});if(o.protocol&&!Qc(u,o.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:o.protocol.source,input:n.value,inst:t,continue:!o.abort});n.value=o.normalize?u.href:Xc(c);return}catch(c){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort})}}}),Ln=v("$ZodEmoji",(t,o)=>{o.pattern??(o.pattern=Uo()),j.init(t,o)}),Fn=v("$ZodNanoID",(t,o)=>{if(o.length!==void 0&&(!Number.isInteger(o.length)||o.length<1))throw Error(`Invalid nanoid length: ${o.length}`);o.pattern??(o.pattern=o.length===void 0?jo:Ro(o.length)),j.init(t,o)}),Un=v("$ZodCUID",(t,o)=>{o.pattern??(o.pattern=Eo),j.init(t,o)}),Mn=v("$ZodCUID2",(t,o)=>{o.pattern??(o.pattern=To),j.init(t,o)}),Jn=v("$ZodULID",(t,o)=>{o.pattern??(o.pattern=Ao),j.init(t,o)}),Bn=v("$ZodXID",(t,o)=>{o.pattern??(o.pattern=No),j.init(t,o)}),Vn=v("$ZodKSUID",(t,o)=>{o.pattern??(o.pattern=Co),j.init(t,o)}),Kn=v("$ZodISODateTime",(t,o)=>{if(o.pattern??(o.pattern=Ho(o)),j.init(t,o),o.local||o.precision===-1)t._zod.bag.laxFormat=!0,t._zod.onattach.push((n)=>{n._zod.bag.laxFormat=!0})}),Wn=v("$ZodISODate",(t,o)=>{o.pattern??(o.pattern=Yo),j.init(t,o)}),Gn=v("$ZodISOTime",(t,o)=>{o.pattern??(o.pattern=Xo(o)),j.init(t,o)}),qn=v("$ZodISODuration",(t,o)=>{o.pattern??(o.pattern=Do),j.init(t,o)}),Yn=v("$ZodIPv4",(t,o)=>{o.pattern??(o.pattern=Mo),j.init(t,o),t._zod.bag.format="ipv4"}),eu=/^[0-9a-fA-F:.]+$/;function Xn(t){if(!eu.test(t))return!1;try{return new URL(`http://[${t}]`),!0}catch{return!1}}var Hn=v("$ZodIPv6",(t,o)=>{o.pattern??(o.pattern=Jo),j.init(t,o),t._zod.bag.format="ipv6",t._zod.check=(n)=>{if(!Xn(n.value))n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!o.abort})}});var Qn=v("$ZodCIDRv4",(t,o)=>{o.pattern??(o.pattern=Bo),j.init(t,o)});function tu(t){let o=t.split("/");if(o.length!==2)return!1;let[n,c]=o;if(!c)return!1;let u=Number(c);if(`${u}`!==c)return!1;if(u<0||u>128)return!1;return Xn(n)}var ei=v("$ZodCIDRv6",(t,o)=>{o.pattern??(o.pattern=Vo),j.init(t,o),t._zod.check=(n)=>{if(!tu(n.value))n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!o.abort})}});function ti(t){if(t==="")return!0;if(/\s/.test(t))return!1;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var ri=v("$ZodBase64",(t,o)=>{o.pattern??(o.pattern=Ko),j.init(t,o),t._zod.bag.contentEncoding="base64",t._zod.check=(n)=>{if(ti(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!o.abort})}});function ru(t){if(!St.test(t))return!1;let o=t.replace(/[-_]/g,(c)=>c==="-"?"+":"/"),n=o.padEnd(Math.ceil(o.length/4)*4,"=");return ti(n)}var oi=v("$ZodBase64URL",(t,o)=>{o.pattern??(o.pattern=St),j.init(t,o),t._zod.bag.contentEncoding="base64url",t._zod.check=(n)=>{if(ru(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!o.abort})}}),ni=v("$ZodE164",(t,o)=>{o.pattern??(o.pattern=Go),j.init(t,o)});function ou(t,o=null){try{let n=t.split(".");if(n.length!==3)return!1;let[c]=n;if(!c)return!1;let u=JSON.parse(atob(c));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(o&&(!("alg"in u)||u.alg!==o))return!1;return!0}catch{return!1}}var ii=v("$ZodJWT",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{if(ou(n.value,o.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!o.abort})}});var Dt=v("$ZodNumber",(t,o)=>{A.init(t,o),t._zod.pattern=t._zod.bag.pattern??Ee,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Number(n.value)}catch(f){}let u=n.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return n;let p=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?String(u):void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:u,inst:t,...p?{received:p}:{}}),n}}),si=v("$ZodNumberFormat",(t,o)=>{cn.init(t,o),Dt.init(t,o)}),ci=v("$ZodBoolean",(t,o)=>{A.init(t,o),t._zod.pattern=tn,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Boolean(n.value)}catch(p){}let u=n.value;if(typeof u==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:t}),n}}),ui=v("$ZodBigInt",(t,o)=>{A.init(t,o),t._zod.pattern=en,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=BigInt(n.value)}catch(u){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}});var ai=v("$ZodNull",(t,o)=>{A.init(t,o),t._zod.pattern=rn,t._zod.values=new Set([null]),t._zod.parse=(n,c)=>{let u=n.value;if(u===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:u,inst:t}),n}}),li=v("$ZodAny",(t,o)=>{A.init(t,o),t._zod.parse=(n)=>n}),pi=v("$ZodUnknown",(t,o)=>{A.init(t,o),t._zod.parse=(n)=>n}),fi=v("$ZodNever",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),di=v("$ZodVoid",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{let u=n.value;if(typeof u>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:u,inst:t}),n}}),mi=v("$ZodDate",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=new Date(n.value)}catch(h){}let u=n.value,p=u instanceof Date;if(p&&!Number.isNaN(u.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:u,...p?{received:"Invalid Date"}:{},inst:t}),n}});function zn(t,o,n){if(t.issues.length)o.issues.push(...te(n,t.issues));o.value[n]=t.value}var hi=v("$ZodArray",(t,o)=>{A.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!Array.isArray(p))return c.issues.push({expected:"array",code:"invalid_type",input:p,inst:t}),c;c.value=n?n.alloc(t,c,Array(p.length),u):Array(p.length);let f=[];for(let h=0;h<p.length;h++){let y=p[h],b=o.element._zod.run({value:y,issues:[]},u);if(b instanceof Promise)f.push(b.then((z)=>zn(z,c,h)));else zn(b,c,h)}if(f.length)return Promise.all(f).then(()=>c);return c}});function Xe(t,o,n,c,u,p){let f=n in c,h=p==="optional";if(!f&&h&&u==="optional")return;if(t.issues.length){if(u!==void 0&&h&&!f)return;o.issues.push(...te(n,t.issues))}if(!f&&u===void 0){if(!t.issues.length)o.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(t.value===void 0){if(f)o.value[n]=void 0}else o.value[n]=t.value}var nu=[];function gi(t){let o=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),c=n.length?n:nu,u=c.length?[...o,...c]:o;for(let f of u)if(!t.shape?.[f]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(f)}": expected a Zod schema`);let p=co(t.shape);return{...t,allKeys:u,symbolKeys:c,keySet:new Set(o),numKeys:o.length,optionalKeys:new Set(p)}}function xi(t,o,n,c,u,p){let f=[],h=u.keySet,y=u.catchall._zod,b=y.def.type,{optin:z,optout:w}=y;for(let k in o){if(h.has(k))continue;if(k==="__proto__"){if(b==="never")f.push(k);continue}if(b==="never"){f.push(k);continue}let Z=y.run({value:o[k],issues:[]},c);if(Z instanceof Promise)t.push(Z.then((P)=>Xe(P,n,k,o,z,w)));else Xe(Z,n,k,o,z,w)}if(f.length)n.issues.push({code:"unrecognized_keys",keys:f,input:o,inst:p,continue:!0});if(!t.length)return n;return Promise.all(t).then(()=>n)}var Nt=new WeakMap,iu=v("$ZodObject",(t,o)=>{if(A.init(t,o),!Object.getOwnPropertyDescriptor(o,"shape")?.get){let y=o.shape;Nt.set(o,y),Object.defineProperty(o,"shape",{get:()=>{let b={...y};return Object.defineProperty(o,"shape",{value:b}),Nt.set(o,b),b}})}let c=ke(()=>gi(o));E(t,"propValues",(y)=>{let b=y.def.shape,z={};for(let w in b){let k=b[w]._zod;if(k.values){if(!Object.prototype.hasOwnProperty.call(z,w))L(z,w,new Set);for(let Z of k.values)z[w].add(Z);if(k.optin!==void 0)z[w].add(void 0)}}return z});let u=ge,p=o.catchall,f,h=B.memoizer;h?.attach(t),t._zod.parse=(y,b)=>{f??(f=c.value);let z=y.value;if(!u(z))return y.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),y;y.value=h?h.alloc(t,y,{},b):{};let w=[],k=f.shape;for(let Z of f.allKeys){if(Z==="__proto__")continue;let P=k[Z],O=P._zod.optin,I=P._zod.optout,J=P._zod.run({value:z[Z],issues:[]},b);if(J instanceof Promise)w.push(J.then((q)=>Xe(q,y,Z,z,O,I)));else Xe(J,y,Z,z,O,I)}if(!p)return w.length?Promise.all(w).then(()=>y):y;return xi(w,z,y,b,c.value,t)}}),bi=v("$ZodObjectJIT",(t,o)=>{iu.init(t,o);let n=t._zod.parse,c=ke(()=>gi(o)),u=B.memoizer,p=(Z)=>{let P=c.value,O=P.symbolKeys,I=new Tt(["payload","ctx"],{shape:Z,inst:t,memo:u,syms:O}),J=(K)=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,q=(K,R)=>`
7
+ };`)(...Object.values(this.closed))}}var yn={major:4,minor:5,patch:4};var A=v("$ZodType",(t,o)=>{var n;t??(t={}),t._zod.def=o,t._zod.bag=t._zod.bag||{},t._zod.version=yn;let c=t._zod.def.checks,u=t._zod.traits.has("$ZodCheck")?[t,...c??[]]:c?.length?[...c]:[];for(let p of u)for(let f of p._zod.onattach)f(t);if(u.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let p=(h,y,b)=>{if(h.memo)return h;let z=he(h),w;for(let k of y){if(k._zod.def.when){if(lo(h))continue;if(!k._zod.def.when(h))continue}else if(z)continue;let Z=h.issues.length,P=k._zod.check(h);if(P instanceof Promise&&b?.async===!1)throw new ie;if(w||P instanceof Promise)w=(w??Promise.resolve()).then(async()=>{if(await P,h.issues.length===Z)return;if(_t(h.issues,Z,t),!z)z=he(h,Z)});else{if(h.issues.length===Z)continue;if(_t(h.issues,Z,t),!z)z=he(h,Z)}}if(w)return w.then(()=>h);return h},f=(h,y,b)=>{if(he(h))return h.aborted=!0,h;let z=p(y,u,b);if(z instanceof Promise){if(b.async===!1)throw new ie;return z.then((w)=>t._zod.parse(w,b))}return t._zod.parse(z,b)};t._zod.run=(h,y)=>{if(y.skipChecks)return t._zod.parse(h,y);if(y.direction==="backward"){let z=t._zod.parse({value:h.value,issues:[]},{...y,skipChecks:!0});if(z instanceof Promise)return z.then((w)=>f(w,h,y));return f(z,h,y)}let b=t._zod.parse(h,y);if(b instanceof Promise){if(y.async===!1)throw new ie;return b.then((z)=>p(z,u,y))}return p(b,u,y)}}},{get "~standard"(){return gt(this,"~standard",Rt(this))},set "~standard"(t){de(this,"~standard",t)}}),bn=(t)=>t.success?{value:t.data}:{issues:t.error?.issues};function Rt(t){return{validate:(o)=>{try{return bn(zo(t,o))}catch(n){return vo(t,o).then(bn)}},vendor:"zod",version:1}}var He=v("$ZodString",(t,o)=>{A.init(t,o),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qo(t._zod.bag),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=String(n.value)}catch(u){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),j=v("$ZodStringFormat",(t,o)=>{Te.init(t,o),He.init(t,o)}),An=v("$ZodGUID",(t,o)=>{o.pattern??(o.pattern=Lo),j.init(t,o)}),Nn=v("$ZodUUID",(t,o)=>{if(o.version){let c={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[o.version];if(c===void 0)throw Error(`Invalid UUID version: "${o.version}"`);o.pattern??(o.pattern=Pt(c))}else o.pattern??(o.pattern=Pt());j.init(t,o)}),Cn=v("$ZodEmail",(t,o)=>{o.pattern??(o.pattern=Fo),j.init(t,o)}),jn=1,Rn=2;function Gc(t,o){if(!o.normalize&&o.protocol?.source===Wo.source&&!/^https?:\/\//i.test(t))return jn;try{return new URL(t)}catch{return Rn}}var qc=/[\t\n\r]/g;function Yc(t){return t.replace(qc,"")}function Xc(t,o){return o.lastIndex=0,o.test(t.hostname)}function Hc(t,o){return o.lastIndex=0,o.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Dn=v("$ZodURL",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{try{let c=n.value.trim(),u=Gc(c,o);if(u===jn){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!o.abort});return}if(u===Rn){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort});return}if(o.hostname&&!Xc(u,o.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:o.hostname.source,input:n.value,inst:t,continue:!o.abort});if(o.protocol&&!Hc(u,o.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:o.protocol.source,input:n.value,inst:t,continue:!o.abort});n.value=o.normalize?u.href:Yc(c);return}catch(c){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort})}}}),Ln=v("$ZodEmoji",(t,o)=>{o.pattern??(o.pattern=Uo()),j.init(t,o)}),Fn=v("$ZodNanoID",(t,o)=>{if(o.length!==void 0&&(!Number.isInteger(o.length)||o.length<1))throw Error(`Invalid nanoid length: ${o.length}`);o.pattern??(o.pattern=o.length===void 0?jo:Ro(o.length)),j.init(t,o)}),Un=v("$ZodCUID",(t,o)=>{o.pattern??(o.pattern=Eo),j.init(t,o)}),Mn=v("$ZodCUID2",(t,o)=>{o.pattern??(o.pattern=To),j.init(t,o)}),Jn=v("$ZodULID",(t,o)=>{o.pattern??(o.pattern=Ao),j.init(t,o)}),Bn=v("$ZodXID",(t,o)=>{o.pattern??(o.pattern=No),j.init(t,o)}),Vn=v("$ZodKSUID",(t,o)=>{o.pattern??(o.pattern=Co),j.init(t,o)}),Kn=v("$ZodISODateTime",(t,o)=>{if(o.pattern??(o.pattern=Ho(o)),j.init(t,o),o.local||o.precision===-1)t._zod.bag.laxFormat=!0,t._zod.onattach.push((n)=>{n._zod.bag.laxFormat=!0})}),Wn=v("$ZodISODate",(t,o)=>{o.pattern??(o.pattern=Yo),j.init(t,o)}),Gn=v("$ZodISOTime",(t,o)=>{o.pattern??(o.pattern=Xo(o)),j.init(t,o)}),qn=v("$ZodISODuration",(t,o)=>{o.pattern??(o.pattern=Do),j.init(t,o)}),Yn=v("$ZodIPv4",(t,o)=>{o.pattern??(o.pattern=Mo),j.init(t,o),t._zod.bag.format="ipv4"}),Qc=/^[0-9a-fA-F:.]+$/;function Xn(t){if(!Qc.test(t))return!1;try{return new URL(`http://[${t}]`),!0}catch{return!1}}var Hn=v("$ZodIPv6",(t,o)=>{o.pattern??(o.pattern=Jo),j.init(t,o),t._zod.bag.format="ipv6",t._zod.check=(n)=>{if(!Xn(n.value))n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!o.abort})}});var Qn=v("$ZodCIDRv4",(t,o)=>{o.pattern??(o.pattern=Bo),j.init(t,o)});function eu(t){let o=t.split("/");if(o.length!==2)return!1;let[n,c]=o;if(!c)return!1;let u=Number(c);if(`${u}`!==c)return!1;if(u<0||u>128)return!1;return Xn(n)}var ei=v("$ZodCIDRv6",(t,o)=>{o.pattern??(o.pattern=Vo),j.init(t,o),t._zod.check=(n)=>{if(!eu(n.value))n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!o.abort})}});function ti(t){if(t==="")return!0;if(/\s/.test(t))return!1;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var ri=v("$ZodBase64",(t,o)=>{o.pattern??(o.pattern=Ko),j.init(t,o),t._zod.bag.contentEncoding="base64",t._zod.check=(n)=>{if(ti(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!o.abort})}});function tu(t){if(!St.test(t))return!1;let o=t.replace(/[-_]/g,(c)=>c==="-"?"+":"/"),n=o.padEnd(Math.ceil(o.length/4)*4,"=");return ti(n)}var oi=v("$ZodBase64URL",(t,o)=>{o.pattern??(o.pattern=St),j.init(t,o),t._zod.bag.contentEncoding="base64url",t._zod.check=(n)=>{if(tu(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!o.abort})}}),ni=v("$ZodE164",(t,o)=>{o.pattern??(o.pattern=Go),j.init(t,o)});function ru(t,o=null){try{let n=t.split(".");if(n.length!==3)return!1;let[c]=n;if(!c)return!1;let u=JSON.parse(atob(c));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(o&&(!("alg"in u)||u.alg!==o))return!1;return!0}catch{return!1}}var ii=v("$ZodJWT",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{if(ru(n.value,o.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!o.abort})}});var Dt=v("$ZodNumber",(t,o)=>{A.init(t,o),t._zod.pattern=t._zod.bag.pattern??Ee,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Number(n.value)}catch(f){}let u=n.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return n;let p=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?String(u):void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:u,inst:t,...p?{received:p}:{}}),n}}),si=v("$ZodNumberFormat",(t,o)=>{cn.init(t,o),Dt.init(t,o)}),ci=v("$ZodBoolean",(t,o)=>{A.init(t,o),t._zod.pattern=tn,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Boolean(n.value)}catch(p){}let u=n.value;if(typeof u==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:t}),n}}),ui=v("$ZodBigInt",(t,o)=>{A.init(t,o),t._zod.pattern=en,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=BigInt(n.value)}catch(u){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}});var ai=v("$ZodNull",(t,o)=>{A.init(t,o),t._zod.pattern=rn,t._zod.values=new Set([null]),t._zod.parse=(n,c)=>{let u=n.value;if(u===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:u,inst:t}),n}}),li=v("$ZodAny",(t,o)=>{A.init(t,o),t._zod.parse=(n)=>n}),pi=v("$ZodUnknown",(t,o)=>{A.init(t,o),t._zod.parse=(n)=>n}),fi=v("$ZodNever",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),di=v("$ZodVoid",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{let u=n.value;if(typeof u>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:u,inst:t}),n}}),mi=v("$ZodDate",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=new Date(n.value)}catch(h){}let u=n.value,p=u instanceof Date;if(p&&!Number.isNaN(u.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:u,...p?{received:"Invalid Date"}:{},inst:t}),n}});function zn(t,o,n){if(t.issues.length)o.issues.push(...te(n,t.issues));o.value[n]=t.value}var hi=v("$ZodArray",(t,o)=>{A.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!Array.isArray(p))return c.issues.push({expected:"array",code:"invalid_type",input:p,inst:t}),c;c.value=n?n.alloc(t,c,Array(p.length),u):Array(p.length);let f=[];for(let h=0;h<p.length;h++){let y=p[h],b=o.element._zod.run({value:y,issues:[]},u);if(b instanceof Promise)f.push(b.then((z)=>zn(z,c,h)));else zn(b,c,h)}if(f.length)return Promise.all(f).then(()=>c);return c}});function Xe(t,o,n,c,u,p){let f=n in c,h=p==="optional";if(!f&&h&&u==="optional")return;if(t.issues.length){if(u!==void 0&&h&&!f)return;o.issues.push(...te(n,t.issues))}if(!f&&u===void 0){if(!t.issues.length)o.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(t.value===void 0){if(f)o.value[n]=void 0}else o.value[n]=t.value}var ou=[];function gi(t){let o=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),c=n.length?n:ou,u=c.length?[...o,...c]:o;for(let f of u)if(!t.shape?.[f]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(f)}": expected a Zod schema`);let p=co(t.shape);return{...t,allKeys:u,symbolKeys:c,keySet:new Set(o),numKeys:o.length,optionalKeys:new Set(p)}}function xi(t,o,n,c,u,p){let f=[],h=u.keySet,y=u.catchall._zod,b=y.def.type,{optin:z,optout:w}=y;for(let k in o){if(h.has(k))continue;if(k==="__proto__"){if(b==="never")f.push(k);continue}if(b==="never"){f.push(k);continue}let Z=y.run({value:o[k],issues:[]},c);if(Z instanceof Promise)t.push(Z.then((P)=>Xe(P,n,k,o,z,w)));else Xe(Z,n,k,o,z,w)}if(f.length)n.issues.push({code:"unrecognized_keys",keys:f,input:o,inst:p,continue:!0});if(!t.length)return n;return Promise.all(t).then(()=>n)}var Nt=new WeakMap,nu=v("$ZodObject",(t,o)=>{if(A.init(t,o),!Object.getOwnPropertyDescriptor(o,"shape")?.get){let y=o.shape;Nt.set(o,y),Object.defineProperty(o,"shape",{get:()=>{let b={...y};return Object.defineProperty(o,"shape",{value:b}),Nt.set(o,b),b}})}let c=ke(()=>gi(o));E(t,"propValues",(y)=>{let b=y.def.shape,z={};for(let w in b){let k=b[w]._zod;if(k.values){if(!Object.prototype.hasOwnProperty.call(z,w))L(z,w,new Set);for(let Z of k.values)z[w].add(Z);if(k.optin!==void 0)z[w].add(void 0)}}return z});let u=ge,p=o.catchall,f,h=B.memoizer;h?.attach(t),t._zod.parse=(y,b)=>{f??(f=c.value);let z=y.value;if(!u(z))return y.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),y;y.value=h?h.alloc(t,y,{},b):{};let w=[],k=f.shape;for(let Z of f.allKeys){if(Z==="__proto__")continue;let P=k[Z],O=P._zod.optin,I=P._zod.optout,J=P._zod.run({value:z[Z],issues:[]},b);if(J instanceof Promise)w.push(J.then((q)=>Xe(q,y,Z,z,O,I)));else Xe(J,y,Z,z,O,I)}if(!p)return w.length?Promise.all(w).then(()=>y):y;return xi(w,z,y,b,c.value,t)}}),bi=v("$ZodObjectJIT",(t,o)=>{nu.init(t,o);let n=t._zod.parse,c=ke(()=>gi(o)),u=B.memoizer,p=(Z)=>{let P=c.value,O=P.symbolKeys,I=new Tt(["payload","ctx"],{shape:Z,inst:t,memo:u,syms:O}),J=(K)=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,q=(K,R)=>`
8
8
  for (let i = 0; i < ${K}.issues.length; i++) {
9
9
  const iss = ${K}.issues[i];
10
10
  iss.path = iss.path ? [${R}, ...iss.path] : [${R}];
11
11
  payload.issues.push(iss);
12
- }`;I.write("const input = payload.value;");let qr=Object.create(null),kc=0;for(let K of P.allKeys)qr[K]=`key_${kc++}`;I.write(u?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let K of P.allKeys){if(K==="__proto__")continue;let R=qr[K],Q=typeof K==="symbol"?`syms[${O.indexOf(K)}]`:oo(K),lt=`${Q} in input`,Yr=Z[K],Xr=Yr?._zod?.optin,Hr=Xr!==void 0,Zc=Yr?._zod?.optout==="optional";if(I.write(`const ${R} = ${J(Q)};`),Hr&&Zc){let Pc=Xr==="optional"?`${R}_present`:`${R}.value !== undefined || ${R}_present`;I.write(`
12
+ }`;I.write("const input = payload.value;");let qr=Object.create(null),wc=0;for(let K of P.allKeys)qr[K]=`key_${wc++}`;I.write(u?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let K of P.allKeys){if(K==="__proto__")continue;let R=qr[K],Q=typeof K==="symbol"?`syms[${O.indexOf(K)}]`:oo(K),lt=`${Q} in input`,Yr=Z[K],Xr=Yr?._zod?.optin,Hr=Xr!==void 0,kc=Yr?._zod?.optout==="optional";if(I.write(`const ${R} = ${J(Q)};`),Hr&&kc){let Zc=Xr==="optional"?`${R}_present`:`${R}.value !== undefined || ${R}_present`;I.write(`
13
13
  const ${R}_present = ${lt};
14
14
  if (!${R}.issues.length || ${R}_present) {
15
15
  if (${R}.issues.length) {${q(R,Q)}
16
16
  }
17
17
 
18
- if (${Pc}) {
18
+ if (${Zc}) {
19
19
  newResult[${Q}] = ${R}.value;
20
20
  }
21
21
  }
@@ -49,6 +49,6 @@ ${o.join(`
49
49
  newResult[${Q}] = ${R}.value;
50
50
  }
51
51
 
52
- `)}return I.write("payload.value = newResult;"),I.write("return payload;"),I.compile()},f,h=ge,y=!B.jitless,z=y&&io.value,w=o.catchall,k;t._zod.parse=(Z,P)=>{k??(k=c.value);let O=Z.value;if(!h(O))return Z.issues.push({expected:"object",code:"invalid_type",input:O,inst:t}),Z;if(y&&z&&P?.async===!1&&P.jitless!==!0){if(!f)f=p(o.shape);if(Z=f(Z,P),!w)return Z;return xi([],O,Z,P,k,t)}return n(Z,P)}});function vn(t,o,n,c){for(let p of t)if(p.issues.length===0)return o.value=p.value,o;let u=t.filter((p)=>!he(p));if(u.length===1)return o.value=u[0].value,u[0];return o.issues.push({code:"invalid_union",input:o.value,inst:n,errors:t.map((p)=>p.issues.map((f)=>ne(f,c,W())))}),o}var Lt=v("$ZodUnion",(t,o)=>{A.init(t,o),E(t,"optin",(c)=>c.def.options.some((u)=>u._zod.optin==="defaulted")?"defaulted":c.def.options.some((u)=>u._zod.optin!==void 0)?"optional":void 0),E(t,"optout",(c)=>c.def.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),E(t,"values",(c)=>{if(c.def.options.every((u)=>u._zod.values))return new Set(c.def.options.flatMap((u)=>Array.from(u._zod.values)));return}),E(t,"pattern",(c)=>{if(c.def.options.every((u)=>u._zod.pattern)){let u=c.def.options.map((p)=>p._zod.pattern);return new RegExp(`^(${u.map((p)=>Me(p.source)).join("|")})$`)}return});let n=o.options.length===1?o.options[0]._zod.run:null;t._zod.parse=(c,u)=>{if(n)return n(c,u);let p=!1,f=[];for(let h of o.options){let y=h._zod.run({value:c.value,issues:[]},u);if(y instanceof Promise)f.push(y),p=!0;else{if(y.issues.length===0)return y;f.push(y)}}if(!p)return vn(f,c,t,u);return Promise.all(f).then((h)=>vn(h,c,t,u))}});var zi=v("$ZodDiscriminatedUnion",(t,o)=>{o.inclusive=!1,Lt.init(t,o);let n=t._zod.parse;E(t,"propValues",(u)=>{let p={};for(let f of u.def.options){let h=f._zod.propValues;if(!h||Object.keys(h).length===0)throw Error(`Invalid discriminated union option at index "${u.def.options.indexOf(f)}"`);for(let[y,b]of Object.entries(h)){if(!Object.prototype.hasOwnProperty.call(p,y))L(p,y,new Set);for(let z of b)p[y].add(z)}}return p}),o.options.forEach((u,p)=>{let f=Nt.get(u._zod.def);if(f&&!Object.prototype.hasOwnProperty.call(f,o.discriminator))throw Error(`Invalid discriminated union option at index "${p}"`)});let c=ke(()=>{let u=o.options,p=new Map;for(let f of u){let h=f._zod.propValues?.[o.discriminator];if(!h||h.size===0)throw Error(`Invalid discriminated union option at index "${o.options.indexOf(f)}"`);for(let y of h){if(p.has(y))throw Error(`Duplicate discriminator value "${String(y)}"`);p.set(y,f)}}return p});t._zod.parse=(u,p)=>{let f=u.value;if(!ge(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:t}),u;let h=c.value.get(f?.[o.discriminator]);if(h)return h._zod.run(u,p);if(o.unionFallback||p.direction==="backward")return n(u,p);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:o.discriminator,options:Array.from(c.value.keys()),input:f,path:[o.discriminator],inst:t}),u}}),vi=v("$ZodIntersection",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{let u=n.value,p=o.left._zod.run({value:u,issues:[]},c),f=o.right._zod.run({value:u,issues:[]},c);if(p instanceof Promise||f instanceof Promise)return Promise.all([p,f]).then(([y,b])=>$n(n,y,b));return $n(n,p,f)}});function jt(t,o){if(t===o)return{valid:!0,data:t};if(t instanceof Date&&o instanceof Date&&+t===+o)return{valid:!0,data:t};if(me(t)&&me(o)){let n=Object.keys(o),c=Object.keys(t).filter((p)=>n.indexOf(p)!==-1),u={...t,...o};if(Object.prototype.hasOwnProperty.call(u,"__proto__"))delete u.__proto__;for(let p of c){if(p==="__proto__")continue;let f=jt(t[p],o[p]);if(!f.valid)return{valid:!1,mergeErrorPath:[p,...f.mergeErrorPath]};u[p]=f.data}return{valid:!0,data:u}}if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let c=0;c<t.length;c++){let u=t[c],p=o[c],f=jt(u,p);if(!f.valid)return{valid:!1,mergeErrorPath:[c,...f.mergeErrorPath]};n.push(f.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $n(t,o,n){let c=new Map,u,p=new Map,f=(b,z)=>{let w;if(b.code==="unrecognized_keys"&&!b.path?.length)u??(u=b),w=b.keys;else if(b.code==="invalid_key"&&b.origin==="record"&&b.path?.length===1){let k=String(b.path[0]);if(!p.has(k))p.set(k,b);w=[k]}else return!1;for(let k of w){if(!c.has(k))c.set(k,{});c.get(k)[z]=!0}return!0};for(let b of o.issues)if(!f(b,"l"))t.issues.push(b);for(let b of n.issues)if(!f(b,"r"))t.issues.push(b);let h=[...c].filter(([,b])=>b.l&&b.r).map(([b])=>b);if(h.length){let b=u?h.filter((z)=>u.keys.includes(z)):[];if(b.length)t.issues.push({...u,keys:b});for(let z of h)if(!b.includes(z)&&p.has(z))t.issues.push(p.get(z))}let y=jt(o.value,n.value);if(!y.valid){if(he(t))return t;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(y.mergeErrorPath)}`)}return t.value=y.data,t}var $i=v("$ZodTuple",(t,o)=>{A.init(t,o);let n=o.items,c=B.memoizer;c?.attach(t),t._zod.parse=(u,p)=>{let f=u.value;if(!Array.isArray(f))return u.issues.push({input:f,inst:t,expected:"tuple",code:"invalid_type"}),u;u.value=c?c.alloc(t,u,[],p):[];let h=[],y=wn(n,"optin"),b=wn(n,"optout");if(!o.rest){if(f.length<y)return u.issues.push({code:"too_small",minimum:y,inclusive:!0,input:f,inst:t,origin:"array"}),u;if(f.length>n.length)u.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:f,inst:t,origin:"array"})}let z=Array(n.length);for(let w=0;w<n.length;w++){let k=n[w]._zod.run({value:f[w],issues:[]},p);if(k instanceof Promise)h.push(k.then((Z)=>{z[w]=Z}));else z[w]=k}if(o.rest){let w=n.length-1,k=f.slice(n.length);for(let Z of k){w++;let P=o.rest._zod.run({value:Z,issues:[]},p);if(P instanceof Promise)h.push(P.then((O)=>kn(O,u,w)));else kn(P,u,w)}}if(h.length)return Promise.all(h).then(()=>Zn(z,u,n,f,b));return Zn(z,u,n,f,b)}});function wn(t,o){for(let n=t.length-1;n>=0;n--)if(!(o==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function kn(t,o,n){if(t.issues.length)o.issues.push(...te(n,t.issues));o.value[n]=t.value}function Zn(t,o,n,c,u){for(let p=0;p<n.length;p++){let f=t[p],h=p<c.length;if(!h&&p>=u&&n[p]._zod.optin==="optional"){o.value.length=p;break}if(f.issues.length){if(!h&&p>=u){o.value.length=p;break}o.issues.push(...te(p,f.issues))}o.value[p]=f.value}for(let p=o.value.length-1;p>=c.length;p--)if(n[p]._zod.optout==="optional"&&o.value[p]===void 0)o.value.length=p;else break;return o}var wi=v("$ZodRecord",(t,o)=>{A.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!me(p))return c.issues.push({expected:"record",code:"invalid_type",input:p,inst:t}),c;let f=[],h=o.keyType._zod.values;if(h&&!o.partial){c.value=n?n.alloc(t,c,{},u):{};let y=new Set;for(let z of h)if(typeof z==="string"||typeof z==="number"||typeof z==="symbol"){if(y.add(typeof z==="number"?z.toString():z),z==="__proto__")continue;let w=o.keyType._zod.run({value:z,issues:[]},u);if(w instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(w.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:w.issues.map((P)=>ne(P,u,W())),input:z,path:[z],inst:t});continue}let k=w.value;if(k==="__proto__")continue;let Z=o.valueType._zod.run({value:p[z],issues:[]},u);if(Z instanceof Promise)f.push(Z.then((P)=>{if(P.issues.length)c.issues.push(...te(z,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...te(z,Z.issues));c.value[k]=Z.value}}let b;for(let z in p)if(!y.has(z))if(o.mode==="loose"){if(z==="__proto__")continue;c.value[z]=p[z]}else b=b??[],b.push(z);if(b&&b.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:b,continue:!0})}else{c.value=n?n.alloc(t,c,{},u):{};let y;for(let b of Reflect.ownKeys(p)){if(b==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(p,b))continue;let z=o.keyType._zod.run({value:b,issues:[]},u);if(z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof b==="string"&&Ee.test(b)&&z.issues.length){let P=o.keyType._zod.run({value:Number(b),issues:[]},u);if(P instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(P.issues.length===0)z=P}if(z.issues.length){if(o.mode==="loose")c.value[b]=p[b];else if(h)y=y??[],y.push(b);else c.issues.push({code:"invalid_key",origin:"record",issues:z.issues.map((P)=>ne(P,u,W())),input:b,path:[b],inst:t});continue}let k=z.value;if(k==="__proto__")continue;let Z=o.valueType._zod.run({value:p[b],issues:[]},u);if(Z instanceof Promise)f.push(Z.then((P)=>{if(P.issues.length)c.issues.push(...te(b,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...te(b,Z.issues));c.value[k]=Z.value}}if(y&&y.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:y,continue:!0})}if(f.length)return Promise.all(f).then(()=>c);return c}});var ki=v("$ZodEnum",(t,o)=>{A.init(t,o);let n=Ue(o.entries),c=new Set(n);t._zod.values=c;let u=n.filter((p)=>so.has(typeof p));t._zod.pattern=new RegExp(u.length?`^(${u.map((p)=>le(p.toString())).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(p,f)=>{let h=p.value;if(c.has(h))return p;return p.issues.push({code:"invalid_value",values:n,input:h,inst:t}),p}}),Zi=v("$ZodLiteral",(t,o)=>{A.init(t,o);let n=new Set(o.values);t._zod.values=n,t._zod.pattern=new RegExp(o.values.length?`^(${o.values.map((c)=>typeof c==="string"?le(c):c?le(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(c,u)=>{let p=c.value;if(n.has(p))return c;return c.issues.push({code:"invalid_value",values:o.values,input:p,inst:t}),c}});var Pi=v("$ZodTransform",(t,o)=>{A.init(t,o),t._zod.optin="optional",B.memoizer?.guard(t),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);let u=o.transform(n.value,n);if(c.async)return(u instanceof Promise?u:Promise.resolve(u)).then((f)=>(n.value=f,n));if(u instanceof Promise)throw new ie;return n.value=u,n}});function Pn(t,o){return t.value=o.issues.length?void 0:o.value,t}var Ft=v("$ZodOptional",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",E(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c,void 0]):void 0}),E(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)})?$`):void 0}),t._zod.parse=(n,c)=>{if(n.value===void 0){if(o.innerType._zod.optin!=="defaulted")return n;let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>Pn(n,p));return Pn(n,u)}return o.innerType._zod.run(n,c)}}),Si=v("$ZodExactOptional",(t,o)=>{Ft.init(t,o),E(t,"values",(n)=>n.def.innerType._zod.values),E(t,"pattern",(n)=>n.def.innerType._zod.pattern),t._zod.parse=(n,c)=>o.innerType._zod.run(n,c)}),Oi=v("$ZodNullable",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin),E(t,"optout",(n)=>n.def.innerType._zod.optout),E(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)}|null)$`):void 0}),E(t,"values",(n)=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,c)=>{if(n.value===null)return n;return o.innerType._zod.run(n,c)}}),Ii=v("$ZodDefault",(t,o)=>{A.init(t,o),t._zod.optin="defaulted",E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)return n.value=o.defaultValue,n;let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Sn(p,o));return Sn(u,o)}});function Sn(t,o){if(t.value===void 0)t.value=o.defaultValue;return t}var Ei=v("$ZodPrefault",(t,o)=>{A.init(t,o),t._zod.optin="defaulted",E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)n.value=o.defaultValue;return o.innerType._zod.run(n,c)}}),Ti=v("$ZodNonOptional",(t,o)=>{A.init(t,o),E(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c].filter((u)=>u!==void 0)):void 0}),t._zod.parse=(n,c)=>{let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>On(p,t));return On(u,t)}});function On(t,o){if(!t.issues.length&&t.value===void 0)t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:o});return t}function In(t,o,n,c){if(!o.issues.length){if(t.value=o.value,o.memo)t.memo=!0;return t}return t.value=n.catchValue({...o,value:t.value,error:{issues:o.issues.map((u)=>ne(u,c,W()))},input:t.value}),t}var Ni=v("$ZodCatch",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),E(t,"optout",(n)=>n.def.innerType._zod.optout),E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>In(n,p,o,c));return In(n,u,o,c)}});var Ut=v("$ZodPipe",(t,o)=>{A.init(t,o),E(t,"values",(n)=>n.def.in._zod.values),E(t,"optin",(n)=>n.def.in._zod.optin),E(t,"optout",(n)=>n.def.out._zod.optout),E(t,"propValues",(n)=>n.def.in._zod.propValues),t._zod.parse=(n,c)=>{if(c.direction==="backward"){let p=o.out._zod.run(n,c);if(p instanceof Promise)return p.then((f)=>Ye(f,o.in,c));return Ye(p,o.in,c)}let u=o.in._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Ye(p,o.out,c));return Ye(u,o.out,c)}});function Ye(t,o,n){if(t.issues.some((c)=>c.code!=="unrecognized_keys"))return t.aborted=!0,t;return o._zod.run({value:t.value,issues:t.issues},n)}var Ci=v("$ZodPreprocess",(t,o)=>{Ut.init(t,o)}),ji=v("$ZodReadonly",(t,o)=>{A.init(t,o),E(t,"propValues",(n)=>n.def.innerType._zod.propValues),E(t,"values",(n)=>n.def.innerType._zod.values),E(t,"optin",(n)=>n.def.innerType?._zod?.optin),E(t,"optout",(n)=>n.def.innerType?._zod?.optout),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then(En);return En(u)}});function En(t){if(!t.memo)t.value=Object.freeze(t.value);return t}var Ri=v("$ZodLazy",(t,o)=>{A.init(t,o),ro(t._zod,"innerType",()=>{let n=o;if(!n._cachedInner)n._cachedInner=o.getter();return n._cachedInner}),E(t,"pattern",(n)=>n.innerType?._zod?.pattern),E(t,"propValues",(n)=>n.innerType?._zod?.propValues),E(t,"optin",(n)=>n.innerType?._zod?.optin??void 0),E(t,"optout",(n)=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,c)=>t._zod.innerType._zod.run(n,c)}),Di=v("$ZodCustom",(t,o)=>{M.init(t,o),A.init(t,o),t._zod.parse=(n,c)=>n,t._zod.check=(n)=>{let c=n.value,u=o.fn(c);if(u instanceof Promise)return u.then((p)=>Tn(p,n,c,t));Tn(u,n,c,t);return}});function Tn(t,o,n,c){if(!t){let u={code:"custom",input:n,inst:c,path:[...c._zod.def.path??[]],continue:!c._zod.def.abort};if(c._zod.def.params)u.params=c._zod.def.params;o.issues.push(_e(u))}}class Ui extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}}var Jt="~memo",Li=[];function Mt(t){return t.map((o)=>o.path?{...o,path:o.path.slice()}:{...o})}var Fi=new WeakMap;function Mi(t,o){let n=Fi.get(t);if(n!==void 0)return n;if(o.has(t))return!0;o.add(t);let c=!1,u=(h)=>{if(!c&&h?._zod&&Mi(h,o))c=!0},p=t._zod.def,f=p.type;switch(f){case"object":{for(let h of Reflect.ownKeys(p.shape))u(p.shape[h]);u(p.catchall);break}case"array":u(p.element);break;case"tuple":for(let h of p.items)u(h);u(p.rest);break;case"record":case"map":u(p.keyType),u(p.valueType);break;case"set":u(p.valueType);break;case"union":for(let h of p.options)u(h);break;case"intersection":u(p.left),u(p.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":u(p.innerType);break;case"pipe":u(p.in),u(p.out);break;case"function":u(p.input),u(p.output);break;case"lazy":u(t._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let h in p){let y=Object.getOwnPropertyDescriptor(p,h);if(!y||y.get)continue;let b=y.value;if(!b||typeof b!=="object")continue;if(b._zod)u(b);else if(Array.isArray(b))for(let z of b)u(z)}}return o.delete(t),Fi.set(t,c),c}function su(t,o){let n=t.buckets.get(o);if(!n)n=new Map,t.buckets.set(o,n);return n}var Qe,et=[],cu={alloc(t,o,n){let c=Qe;if(!c)return n;Qe=void 0;let u={value:n,issues:null};return c.set(o.value,u),et.push(u),n},guard(t){var o;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let n=t._zod.parse,c=(u,p)=>{if(p.direction!=="backward"&&uu(p,u.value))throw new Ui;return n(u,p)};if(t._zod.parse=c,t._zod.run===n)t._zod.run=c})},attach(t){var o;let n,c,u;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let p=t._zod.parse,f=(h,y)=>{if(n===void 0){if(n=Mi(t,new Set),!n){if(t._zod.parse=p,t._zod.run===f)t._zod.run=p;return p(h,y)}}let b=h.value;if(b===null||typeof b!=="object")return p(h,y);let z=y[Jt];if(!z)z={buckets:new Map,backEdges:void 0},y[Jt]=z;let w;if(c===y)w=u;else w=su(z,t),c=y,u=w;let k=w.get(b);if(k){if(h.value=k.value,k.issues){if(k.issues.length)h.issues.push(...Mt(k.issues))}else h.memo=!0,z.backEdges??(z.backEdges=new Set),z.backEdges.add(k.value);return h}Qe=w;let Z=et.length,P=p(h,y);Qe=void 0;let O=et.length>Z?et.pop():void 0;if(P instanceof Promise)return P.then((I)=>{if(O)O.issues=I.issues.length?Mt(I.issues):Li;return I});if(O)O.issues=P.issues.length?Mt(P.issues):Li;return P};if(t._zod.parse=f,t._zod.run===p)t._zod.run=f})}};function Bt(){return cu}function uu(t,o){let n=t[Jt]?.backEdges;return n!==void 0&&o!==null&&typeof o==="object"&&n.has(o)}var au=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function o(p){return t[p]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},c={nan:"NaN"};function u(p,f){if(p==="number"&&typeof f==="number"&&!Number.isFinite(f))return String(f);return c[p]??p}return(p)=>{switch(p.code){case"invalid_type":{let f=u(p.expected),h=fo(p.input),y=u(h,p.input);return`Invalid input: expected ${f}, received ${y}`}case"invalid_value":if(p.values.length===1)return`Invalid input: expected ${ht(p.values[0])}`;return`Invalid option: expected one of ${ft(p.values,"|")}`;case"too_big":{let f=p.exact?"exactly ":p.inclusive?"<=":"<",h=o(p.origin);if(h)return`Too big: expected ${p.origin??"value"} to have ${f}${p.maximum.toString()} ${h.unit??"elements"}`;return`Too big: expected ${p.origin??"value"} to be ${f}${p.maximum.toString()}`}case"too_small":{let f=p.exact?"exactly ":p.inclusive?">=":">",h=o(p.origin);if(h)return`Too small: expected ${p.origin} to have ${f}${p.minimum.toString()} ${h.unit}`;return`Too small: expected ${p.origin} to be ${f}${p.minimum.toString()}`}case"invalid_format":{let f=p;if(f.format==="starts_with")return`Invalid string: must start with "${f.prefix}"`;if(f.format==="ends_with")return`Invalid string: must end with "${f.suffix}"`;if(f.format==="includes")return`Invalid string: must include "${f.includes}"`;if(f.format==="regex")return`Invalid string: must match pattern ${f.pattern}`;return`Invalid ${n[f.format]??p.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${p.divisor}`;case"unrecognized_keys":return`Unrecognized key${p.keys.length>1?"s":""}: ${ft(p.keys,", ")}`;case"invalid_key":return`Invalid key in ${p.origin}`;case"invalid_union":if(p.options&&Array.isArray(p.options)&&p.options.length>0)return`Invalid discriminator value. Expected ${p.options.map((h)=>`'${h}'`).join(" | ")}`;if(p.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${p.origin}`;default:return"Invalid input"}}};function Vt(){return{localeError:au()}}var Ji;class Bi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){let n=o[0];if(this._map.set(t,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,t);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let o=this._map.get(t);if(o&&typeof o==="object"&&"id"in o)this._idmap.delete(o.id);return this._map.delete(t),this}get(t){let o=t._zod.parent;if(o){let n={...this.get(o)??{}};delete n.id;let c={...n,...this._map.get(t)};return Object.keys(c).length?c:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Vi(){return new Bi}(Ji=globalThis).__zod_globalRegistry??(Ji.__zod_globalRegistry=Vi());var pe=globalThis.__zod_globalRegistry;function Ki(t,o){return new t({type:"string",...S(o)})}function Wi(t,o){return new t({type:"string",coerce:!0,...S(o)})}function Kt(t,o){return new t({type:"string",format:"email",check:"string_format",abort:!1,...S(o)})}function Gi(t,o){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...S(o)})}function qi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...S(o)})}function Yi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(o)})}function Xi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(o)})}function Hi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(o)})}function Wt(t,o){return new t({type:"string",format:"url",check:"string_format",abort:!1,...S(o)})}function Qi(t,o){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...S(o)})}function es(t,o){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(o)})}function ts(t,o){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...S(o)})}function rs(t,o){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(o)})}function os(t,o){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...S(o)})}function ns(t,o){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...S(o)})}function is(t,o){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(o)})}function Gt(t,o){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(o)})}function qt(t,o){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(o)})}function ss(t,o){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(o)})}function cs(t,o){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(o)})}function us(t,o){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...S(o)})}function as(t,o){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...S(o)})}function ls(t,o){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...S(o)})}function ps(t,o){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...S(o)})}function tt(t,o){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(o)})}function rt(t,o){return new t({type:"string",format:"date",check:"string_format",...S(o)})}function Yt(t,o){return new t({type:"string",format:"time",check:"string_format",precision:null,...S(o)})}function Xt(t,o){return new t({type:"string",format:"duration",check:"string_format",...S(o)})}function fs(t,o){return new t({type:"number",checks:[],...S(o)})}function ds(t,o){return new t({type:"number",coerce:!0,checks:[],...S(o)})}function ms(t,o){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...S(o)})}function hs(t,o){return new t({type:"boolean",...S(o)})}function _s(t,o){return new t({type:"boolean",coerce:!0,...S(o)})}function gs(t,o){return new t({type:"bigint",coerce:!0,...S(o)})}function xs(t,o){return new t({type:"null",...S(o)})}function ys(t){return new t({type:"any"})}function bs(t){return new t({type:"unknown"})}function zs(t,o){return new t({type:"never",...S(o)})}function vs(t,o){return new t({type:"void",...S(o)})}function $s(t,o){return new t({type:"date",...S(o)})}function ws(t,o){return new t({type:"date",coerce:!0,...S(o)})}function ye(t,o){return new It({check:"less_than",...S(o),value:t,inclusive:!1})}function se(t,o){return new It({check:"less_than",...S(o),value:t,inclusive:!0})}function be(t,o){return new Et({check:"greater_than",...S(o),value:t,inclusive:!1})}function ce(t,o){return new Et({check:"greater_than",...S(o),value:t,inclusive:!0})}function Ae(t,o){return new sn({check:"multiple_of",...S(o),value:t})}function ot(t,o){return new un({check:"max_length",...S(o),maximum:t})}function ze(t,o){return new an({check:"min_length",...S(o),minimum:t})}function nt(t,o){return new ln({check:"length_equals",...S(o),length:t})}function Ht(t,o){return new pn({check:"string_format",format:"regex",...S(o),pattern:t})}function Qt(t){return new fn({check:"string_format",format:"lowercase",...S(t)})}function er(t){return new dn({check:"string_format",format:"uppercase",...S(t)})}function tr(t,o){return new mn({check:"string_format",format:"includes",...S(o),includes:t})}function rr(t,o){return new hn({check:"string_format",format:"starts_with",...S(o),prefix:t})}function or(t,o){return new _n({check:"string_format",format:"ends_with",...S(o),suffix:t})}function fe(t){return new gn({check:"overwrite",tx:t})}function ir(t){return fe((o)=>o.normalize(t))}function sr(){return fe((t)=>t.trim())}function cr(){return fe((t)=>t.toLowerCase())}function ur(){return fe((t)=>t.toUpperCase())}function ar(){return fe((t)=>no(t))}function ks(t,o,n){return new t({type:"array",element:o,...S(n)})}function Zs(t,o,n){let c=S(n);return c.abort??(c.abort=!0),new t({type:"custom",check:"custom",fn:o,...c})}function Ps(t,o,n){return new t({type:"custom",check:"custom",fn:o,...S(n)})}function Os(t,o){let n=lu((c)=>(c.addIssue=(u)=>{if(typeof u==="string")c.issues.push(_e(u,c.value,n._zod.def));else{let p=u;if(p.fatal)p.continue=!1;if(p.code??(p.code="custom"),!("input"in p))p.input=c.value;p.inst??(p.inst=n),p.continue??(p.continue=!n._zod.def.abort),c.issues.push(_e(p))}},t(c.value,c)),o);return n}function lu(t,o){let n=new M({check:"custom",...S(o)});return n._zod.check=t,n}function Ne(t,...o){for(let n of o)for(let c of Reflect.ownKeys(n))if(Object.prototype.propertyIsEnumerable.call(n,c))L(t,c,n[c]);return t}function je(t){let o=t?.target??"draft-2020-12";if(o==="draft-4")o="draft-04";if(o==="draft-7")o="draft-07";return{processors:t.processors??{},metadataRegistry:t?.metadata??pe,target:o,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function F(t,o,n,c,u){let p=typeof o.unrepresentable==="function"?o.unrepresentable({zodSchema:t,path:c.path,message:u}):o.unrepresentable;if(p==="any")return!1;if(p===void 0||p==="throw")throw Error(u);return Object.assign(n,p),!0}function C(t,o,n={path:[],schemaPath:[]}){var c;let u=t._zod.def,p=o.seen.get(t);if(p){if(p.count++,n.schemaPath.includes(t))p.cycle=n.path;return p.schema}let f={schema:{},count:1,cycle:void 0,path:n.path};o.seen.set(t,f),o.sharedDefsExtractedFor=void 0,o.sharedEmitDoneFor=void 0;let h=t._zod.toJSONSchema?.();if(h)f.schema=h;else{let z={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(o,f.schema,z);else{let k=f.schema,Z=o.processors[u.type];if(!Z)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);Z(t,o,k,z)}let w=t._zod.parent;if(w){if(!f.ref)f.ref=w;C(w,o,z),o.seen.get(w).isParent=!0}}let y=o.metadataRegistry.get(t);if(y)Ne(f.schema,y);if(o.io==="input"&&V(t))delete f.schema.examples,delete f.schema.default;if(o.io==="input"&&"_prefault"in f.schema)(c=f.schema).default??(c.default=f.schema._prefault);return delete f.schema._prefault,o.seen.get(t).schema}function Is(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Re(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;let c=new Map;for(let f of t.seen.entries()){let h=t.metadataRegistry.get(f[0])?.id;if(h){let y=c.get(h);if(y&&y!==f[0])throw Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);c.set(h,f[0])}}let u=(f)=>{let h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let w=t.external.registry.get(f[0])?.id,k=t.external.uri??((P)=>P);if(w)return{ref:k(w)};let Z=f[1].defId??f[1].schema.id??`schema${t.counter++}`;return f[1].defId=Z,{defId:Z,ref:`${k("__shared")}#/${h}/${Is(Z)}`}}let y="#",b=`${y}/${h}/`;if(f[1]===n&&!f[1].schema.id)return{ref:y};let z=f[1].schema.id??`__schema${t.counter++}`;return{defId:z,ref:b+Is(z)}},p=(f)=>{if(f[1].schema.$ref)return;let h=f[1],{ref:y,defId:b}=u(f);if(h.def={...h.schema},b)h.defId=b;let z=h.schema;for(let w in z)delete z[w];z.$ref=y};if(t.cycles==="throw")for(let f of t.seen.entries()){let h=f[1];if(h.cycle)throw Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
52
+ `)}return I.write("payload.value = newResult;"),I.write("return payload;"),I.compile()},f,h=ge,y=!B.jitless,z=y&&io.value,w=o.catchall,k;t._zod.parse=(Z,P)=>{k??(k=c.value);let O=Z.value;if(!h(O))return Z.issues.push({expected:"object",code:"invalid_type",input:O,inst:t}),Z;if(y&&z&&P?.async===!1&&P.jitless!==!0){if(!f)f=p(o.shape);if(Z=f(Z,P),!w)return Z;return xi([],O,Z,P,k,t)}return n(Z,P)}});function vn(t,o,n,c){for(let p of t)if(p.issues.length===0)return o.value=p.value,o;let u=t.filter((p)=>!he(p));if(u.length===1)return o.value=u[0].value,u[0];return o.issues.push({code:"invalid_union",input:o.value,inst:n,errors:t.map((p)=>p.issues.map((f)=>ne(f,c,W())))}),o}var Lt=v("$ZodUnion",(t,o)=>{A.init(t,o),E(t,"optin",(c)=>c.def.options.some((u)=>u._zod.optin==="defaulted")?"defaulted":c.def.options.some((u)=>u._zod.optin!==void 0)?"optional":void 0),E(t,"optout",(c)=>c.def.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),E(t,"values",(c)=>{if(c.def.options.every((u)=>u._zod.values))return new Set(c.def.options.flatMap((u)=>Array.from(u._zod.values)));return}),E(t,"pattern",(c)=>{if(c.def.options.every((u)=>u._zod.pattern)){let u=c.def.options.map((p)=>p._zod.pattern);return new RegExp(`^(${u.map((p)=>Me(p.source)).join("|")})$`)}return});let n=o.options.length===1?o.options[0]._zod.run:null;t._zod.parse=(c,u)=>{if(n)return n(c,u);let p=!1,f=[];for(let h of o.options){let y=h._zod.run({value:c.value,issues:[]},u);if(y instanceof Promise)f.push(y),p=!0;else{if(y.issues.length===0)return y;f.push(y)}}if(!p)return vn(f,c,t,u);return Promise.all(f).then((h)=>vn(h,c,t,u))}});var zi=v("$ZodDiscriminatedUnion",(t,o)=>{o.inclusive=!1,Lt.init(t,o);let n=t._zod.parse;E(t,"propValues",(u)=>{let p={};for(let f of u.def.options){let h=f._zod.propValues;if(!h||Object.keys(h).length===0)throw Error(`Invalid discriminated union option at index "${u.def.options.indexOf(f)}"`);for(let[y,b]of Object.entries(h)){if(!Object.prototype.hasOwnProperty.call(p,y))L(p,y,new Set);for(let z of b)p[y].add(z)}}return p}),o.options.forEach((u,p)=>{let f=Nt.get(u._zod.def);if(f&&!Object.prototype.hasOwnProperty.call(f,o.discriminator))throw Error(`Invalid discriminated union option at index "${p}"`)});let c=ke(()=>{let u=o.options,p=new Map;for(let f of u){let h=f._zod.propValues?.[o.discriminator];if(!h||h.size===0)throw Error(`Invalid discriminated union option at index "${o.options.indexOf(f)}"`);for(let y of h){if(p.has(y))throw Error(`Duplicate discriminator value "${String(y)}"`);p.set(y,f)}}return p});t._zod.parse=(u,p)=>{let f=u.value;if(!ge(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:t}),u;let h=c.value.get(f?.[o.discriminator]);if(h)return h._zod.run(u,p);if(o.unionFallback||p.direction==="backward")return n(u,p);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:o.discriminator,options:Array.from(c.value.keys()),input:f,path:[o.discriminator],inst:t}),u}}),vi=v("$ZodIntersection",(t,o)=>{A.init(t,o),t._zod.parse=(n,c)=>{let u=n.value,p=o.left._zod.run({value:u,issues:[]},c),f=o.right._zod.run({value:u,issues:[]},c);if(p instanceof Promise||f instanceof Promise)return Promise.all([p,f]).then(([y,b])=>$n(n,y,b));return $n(n,p,f)}});function jt(t,o){if(t===o)return{valid:!0,data:t};if(t instanceof Date&&o instanceof Date&&+t===+o)return{valid:!0,data:t};if(me(t)&&me(o)){let n=Object.keys(o),c=Object.keys(t).filter((p)=>n.indexOf(p)!==-1),u={...t,...o};if(Object.prototype.hasOwnProperty.call(u,"__proto__"))delete u.__proto__;for(let p of c){if(p==="__proto__")continue;let f=jt(t[p],o[p]);if(!f.valid)return{valid:!1,mergeErrorPath:[p,...f.mergeErrorPath]};u[p]=f.data}return{valid:!0,data:u}}if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let c=0;c<t.length;c++){let u=t[c],p=o[c],f=jt(u,p);if(!f.valid)return{valid:!1,mergeErrorPath:[c,...f.mergeErrorPath]};n.push(f.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $n(t,o,n){let c=new Map,u,p=new Map,f=(b,z)=>{let w;if(b.code==="unrecognized_keys"&&!b.path?.length)u??(u=b),w=b.keys;else if(b.code==="invalid_key"&&b.origin==="record"&&b.path?.length===1){let k=String(b.path[0]);if(!p.has(k))p.set(k,b);w=[k]}else return!1;for(let k of w){if(!c.has(k))c.set(k,{});c.get(k)[z]=!0}return!0};for(let b of o.issues)if(!f(b,"l"))t.issues.push(b);for(let b of n.issues)if(!f(b,"r"))t.issues.push(b);let h=[...c].filter(([,b])=>b.l&&b.r).map(([b])=>b);if(h.length){let b=u?h.filter((z)=>u.keys.includes(z)):[];if(b.length)t.issues.push({...u,keys:b});for(let z of h)if(!b.includes(z)&&p.has(z))t.issues.push(p.get(z))}let y=jt(o.value,n.value);if(!y.valid){if(he(t))return t;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(y.mergeErrorPath)}`)}return t.value=y.data,t}var $i=v("$ZodTuple",(t,o)=>{A.init(t,o);let n=o.items,c=B.memoizer;c?.attach(t),t._zod.parse=(u,p)=>{let f=u.value;if(!Array.isArray(f))return u.issues.push({input:f,inst:t,expected:"tuple",code:"invalid_type"}),u;u.value=c?c.alloc(t,u,[],p):[];let h=[],y=wn(n,"optin"),b=wn(n,"optout");if(!o.rest){if(f.length<y)return u.issues.push({code:"too_small",minimum:y,inclusive:!0,input:f,inst:t,origin:"array"}),u;if(f.length>n.length)u.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:f,inst:t,origin:"array"})}let z=Array(n.length);for(let w=0;w<n.length;w++){let k=n[w]._zod.run({value:f[w],issues:[]},p);if(k instanceof Promise)h.push(k.then((Z)=>{z[w]=Z}));else z[w]=k}if(o.rest){let w=n.length-1,k=f.slice(n.length);for(let Z of k){w++;let P=o.rest._zod.run({value:Z,issues:[]},p);if(P instanceof Promise)h.push(P.then((O)=>kn(O,u,w)));else kn(P,u,w)}}if(h.length)return Promise.all(h).then(()=>Zn(z,u,n,f,b));return Zn(z,u,n,f,b)}});function wn(t,o){for(let n=t.length-1;n>=0;n--)if(!(o==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function kn(t,o,n){if(t.issues.length)o.issues.push(...te(n,t.issues));o.value[n]=t.value}function Zn(t,o,n,c,u){for(let p=0;p<n.length;p++){let f=t[p],h=p<c.length;if(!h&&p>=u&&n[p]._zod.optin==="optional"){o.value.length=p;break}if(f.issues.length){if(!h&&p>=u){o.value.length=p;break}o.issues.push(...te(p,f.issues))}o.value[p]=f.value}for(let p=o.value.length-1;p>=c.length;p--)if(n[p]._zod.optout==="optional"&&o.value[p]===void 0)o.value.length=p;else break;return o}var wi=v("$ZodRecord",(t,o)=>{A.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!me(p))return c.issues.push({expected:"record",code:"invalid_type",input:p,inst:t}),c;let f=[],h=o.keyType._zod.values;if(h&&!o.partial){c.value=n?n.alloc(t,c,{},u):{};let y=new Set;for(let z of h)if(typeof z==="string"||typeof z==="number"||typeof z==="symbol"){if(y.add(typeof z==="number"?z.toString():z),z==="__proto__")continue;let w=o.keyType._zod.run({value:z,issues:[]},u);if(w instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(w.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:w.issues.map((P)=>ne(P,u,W())),input:z,path:[z],inst:t});continue}let k=w.value;if(k==="__proto__")continue;let Z=o.valueType._zod.run({value:p[z],issues:[]},u);if(Z instanceof Promise)f.push(Z.then((P)=>{if(P.issues.length)c.issues.push(...te(z,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...te(z,Z.issues));c.value[k]=Z.value}}let b;for(let z in p)if(!y.has(z))if(o.mode==="loose"){if(z==="__proto__")continue;c.value[z]=p[z]}else b=b??[],b.push(z);if(b&&b.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:b,continue:!0})}else{c.value=n?n.alloc(t,c,{},u):{};let y;for(let b of Reflect.ownKeys(p)){if(b==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(p,b))continue;let z=o.keyType._zod.run({value:b,issues:[]},u);if(z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof b==="string"&&Ee.test(b)&&z.issues.length){let P=o.keyType._zod.run({value:Number(b),issues:[]},u);if(P instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(P.issues.length===0)z=P}if(z.issues.length){if(o.mode==="loose")c.value[b]=p[b];else if(h)y=y??[],y.push(b);else c.issues.push({code:"invalid_key",origin:"record",issues:z.issues.map((P)=>ne(P,u,W())),input:b,path:[b],inst:t});continue}let k=z.value;if(k==="__proto__")continue;let Z=o.valueType._zod.run({value:p[b],issues:[]},u);if(Z instanceof Promise)f.push(Z.then((P)=>{if(P.issues.length)c.issues.push(...te(b,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...te(b,Z.issues));c.value[k]=Z.value}}if(y&&y.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:y,continue:!0})}if(f.length)return Promise.all(f).then(()=>c);return c}});var ki=v("$ZodEnum",(t,o)=>{A.init(t,o);let n=Ue(o.entries),c=new Set(n);t._zod.values=c;let u=n.filter((p)=>so.has(typeof p));t._zod.pattern=new RegExp(u.length?`^(${u.map((p)=>le(p.toString())).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(p,f)=>{let h=p.value;if(c.has(h))return p;return p.issues.push({code:"invalid_value",values:n,input:h,inst:t}),p}}),Zi=v("$ZodLiteral",(t,o)=>{A.init(t,o);let n=new Set(o.values);t._zod.values=n,t._zod.pattern=new RegExp(o.values.length?`^(${o.values.map((c)=>typeof c==="string"?le(c):c?le(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(c,u)=>{let p=c.value;if(n.has(p))return c;return c.issues.push({code:"invalid_value",values:o.values,input:p,inst:t}),c}});var Pi=v("$ZodTransform",(t,o)=>{A.init(t,o),t._zod.optin="optional",B.memoizer?.guard(t),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);let u=o.transform(n.value,n);if(c.async)return(u instanceof Promise?u:Promise.resolve(u)).then((f)=>(n.value=f,n));if(u instanceof Promise)throw new ie;return n.value=u,n}});function Pn(t,o){return t.value=o.issues.length?void 0:o.value,t}var Ft=v("$ZodOptional",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",E(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c,void 0]):void 0}),E(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)})?$`):void 0}),t._zod.parse=(n,c)=>{if(n.value===void 0){if(o.innerType._zod.optin!=="defaulted")return n;let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>Pn(n,p));return Pn(n,u)}return o.innerType._zod.run(n,c)}}),Si=v("$ZodExactOptional",(t,o)=>{Ft.init(t,o),E(t,"values",(n)=>n.def.innerType._zod.values),E(t,"pattern",(n)=>n.def.innerType._zod.pattern),t._zod.parse=(n,c)=>o.innerType._zod.run(n,c)}),Oi=v("$ZodNullable",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin),E(t,"optout",(n)=>n.def.innerType._zod.optout),E(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)}|null)$`):void 0}),E(t,"values",(n)=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,c)=>{if(n.value===null)return n;return o.innerType._zod.run(n,c)}}),Ii=v("$ZodDefault",(t,o)=>{A.init(t,o),t._zod.optin="defaulted",E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)return n.value=o.defaultValue,n;let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Sn(p,o));return Sn(u,o)}});function Sn(t,o){if(t.value===void 0)t.value=o.defaultValue;return t}var Ei=v("$ZodPrefault",(t,o)=>{A.init(t,o),t._zod.optin="defaulted",E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)n.value=o.defaultValue;return o.innerType._zod.run(n,c)}}),Ti=v("$ZodNonOptional",(t,o)=>{A.init(t,o),E(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c].filter((u)=>u!==void 0)):void 0}),t._zod.parse=(n,c)=>{let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>On(p,t));return On(u,t)}});function On(t,o){if(!t.issues.length&&t.value===void 0)t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:o});return t}function In(t,o,n,c){if(!o.issues.length){if(t.value=o.value,o.memo)t.memo=!0;return t}return t.value=n.catchValue({...o,value:t.value,error:{issues:o.issues.map((u)=>ne(u,c,W()))},input:t.value}),t}var Ni=v("$ZodCatch",(t,o)=>{A.init(t,o),E(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),E(t,"optout",(n)=>n.def.innerType._zod.optout),E(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>In(n,p,o,c));return In(n,u,o,c)}});var Ut=v("$ZodPipe",(t,o)=>{A.init(t,o),E(t,"values",(n)=>n.def.in._zod.values),E(t,"optin",(n)=>n.def.in._zod.optin),E(t,"optout",(n)=>n.def.out._zod.optout),E(t,"propValues",(n)=>n.def.in._zod.propValues),t._zod.parse=(n,c)=>{if(c.direction==="backward"){let p=o.out._zod.run(n,c);if(p instanceof Promise)return p.then((f)=>Ye(f,o.in,c));return Ye(p,o.in,c)}let u=o.in._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Ye(p,o.out,c));return Ye(u,o.out,c)}});function Ye(t,o,n){if(t.issues.some((c)=>c.code!=="unrecognized_keys"))return t.aborted=!0,t;return o._zod.run({value:t.value,issues:t.issues},n)}var Ci=v("$ZodPreprocess",(t,o)=>{Ut.init(t,o)}),ji=v("$ZodReadonly",(t,o)=>{A.init(t,o),E(t,"propValues",(n)=>n.def.innerType._zod.propValues),E(t,"values",(n)=>n.def.innerType._zod.values),E(t,"optin",(n)=>n.def.innerType?._zod?.optin),E(t,"optout",(n)=>n.def.innerType?._zod?.optout),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then(En);return En(u)}});function En(t){if(!t.memo)t.value=Object.freeze(t.value);return t}var Ri=v("$ZodLazy",(t,o)=>{A.init(t,o),ro(t._zod,"innerType",()=>{let n=o;if(!n._cachedInner)n._cachedInner=o.getter();return n._cachedInner}),E(t,"pattern",(n)=>n.innerType?._zod?.pattern),E(t,"propValues",(n)=>n.innerType?._zod?.propValues),E(t,"optin",(n)=>n.innerType?._zod?.optin??void 0),E(t,"optout",(n)=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,c)=>t._zod.innerType._zod.run(n,c)}),Di=v("$ZodCustom",(t,o)=>{M.init(t,o),A.init(t,o),t._zod.parse=(n,c)=>n,t._zod.check=(n)=>{let c=n.value,u=o.fn(c);if(u instanceof Promise)return u.then((p)=>Tn(p,n,c,t));Tn(u,n,c,t);return}});function Tn(t,o,n,c){if(!t){let u={code:"custom",input:n,inst:c,path:[...c._zod.def.path??[]],continue:!c._zod.def.abort};if(c._zod.def.params)u.params=c._zod.def.params;o.issues.push(_e(u))}}class Ui extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}}var Jt="~memo",Li=[];function Mt(t){return t.map((o)=>o.path?{...o,path:o.path.slice()}:{...o})}var Fi=new WeakMap;function Mi(t,o){let n=Fi.get(t);if(n!==void 0)return n;if(o.has(t))return!0;o.add(t);let c=!1,u=(h)=>{if(!c&&h?._zod&&Mi(h,o))c=!0},p=t._zod.def,f=p.type;switch(f){case"object":{for(let h of Reflect.ownKeys(p.shape))u(p.shape[h]);u(p.catchall);break}case"array":u(p.element);break;case"tuple":for(let h of p.items)u(h);u(p.rest);break;case"record":case"map":u(p.keyType),u(p.valueType);break;case"set":u(p.valueType);break;case"union":for(let h of p.options)u(h);break;case"intersection":u(p.left),u(p.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":u(p.innerType);break;case"pipe":u(p.in),u(p.out);break;case"function":u(p.input),u(p.output);break;case"lazy":u(t._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let h in p){let y=Object.getOwnPropertyDescriptor(p,h);if(!y||y.get)continue;let b=y.value;if(!b||typeof b!=="object")continue;if(b._zod)u(b);else if(Array.isArray(b))for(let z of b)u(z)}}return o.delete(t),Fi.set(t,c),c}function iu(t,o){let n=t.buckets.get(o);if(!n)n=new Map,t.buckets.set(o,n);return n}var Qe,et=[],su={alloc(t,o,n){let c=Qe;if(!c)return n;Qe=void 0;let u={value:n,issues:null};return c.set(o.value,u),et.push(u),n},guard(t){var o;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let n=t._zod.parse,c=(u,p)=>{if(p.direction!=="backward"&&cu(p,u.value))throw new Ui;return n(u,p)};if(t._zod.parse=c,t._zod.run===n)t._zod.run=c})},attach(t){var o;let n,c,u;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let p=t._zod.parse,f=(h,y)=>{if(n===void 0){if(n=Mi(t,new Set),!n){if(t._zod.parse=p,t._zod.run===f)t._zod.run=p;return p(h,y)}}let b=h.value;if(b===null||typeof b!=="object")return p(h,y);let z=y[Jt];if(!z)z={buckets:new Map,backEdges:void 0},y[Jt]=z;let w;if(c===y)w=u;else w=iu(z,t),c=y,u=w;let k=w.get(b);if(k){if(h.value=k.value,k.issues){if(k.issues.length)h.issues.push(...Mt(k.issues))}else h.memo=!0,z.backEdges??(z.backEdges=new Set),z.backEdges.add(k.value);return h}Qe=w;let Z=et.length,P=p(h,y);Qe=void 0;let O=et.length>Z?et.pop():void 0;if(P instanceof Promise)return P.then((I)=>{if(O)O.issues=I.issues.length?Mt(I.issues):Li;return I});if(O)O.issues=P.issues.length?Mt(P.issues):Li;return P};if(t._zod.parse=f,t._zod.run===p)t._zod.run=f})}};function Bt(){return su}function cu(t,o){let n=t[Jt]?.backEdges;return n!==void 0&&o!==null&&typeof o==="object"&&n.has(o)}var uu=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function o(p){return t[p]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},c={nan:"NaN"};function u(p,f){if(p==="number"&&typeof f==="number"&&!Number.isFinite(f))return String(f);return c[p]??p}return(p)=>{switch(p.code){case"invalid_type":{let f=u(p.expected),h=fo(p.input),y=u(h,p.input);return`Invalid input: expected ${f}, received ${y}`}case"invalid_value":if(p.values.length===1)return`Invalid input: expected ${ht(p.values[0])}`;return`Invalid option: expected one of ${ft(p.values,"|")}`;case"too_big":{let f=p.exact?"exactly ":p.inclusive?"<=":"<",h=o(p.origin);if(h)return`Too big: expected ${p.origin??"value"} to have ${f}${p.maximum.toString()} ${h.unit??"elements"}`;return`Too big: expected ${p.origin??"value"} to be ${f}${p.maximum.toString()}`}case"too_small":{let f=p.exact?"exactly ":p.inclusive?">=":">",h=o(p.origin);if(h)return`Too small: expected ${p.origin} to have ${f}${p.minimum.toString()} ${h.unit}`;return`Too small: expected ${p.origin} to be ${f}${p.minimum.toString()}`}case"invalid_format":{let f=p;if(f.format==="starts_with")return`Invalid string: must start with "${f.prefix}"`;if(f.format==="ends_with")return`Invalid string: must end with "${f.suffix}"`;if(f.format==="includes")return`Invalid string: must include "${f.includes}"`;if(f.format==="regex")return`Invalid string: must match pattern ${f.pattern}`;return`Invalid ${n[f.format]??p.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${p.divisor}`;case"unrecognized_keys":return`Unrecognized key${p.keys.length>1?"s":""}: ${ft(p.keys,", ")}`;case"invalid_key":return`Invalid key in ${p.origin}`;case"invalid_union":if(p.options&&Array.isArray(p.options)&&p.options.length>0)return`Invalid discriminator value. Expected ${p.options.map((h)=>`'${h}'`).join(" | ")}`;if(p.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${p.origin}`;default:return"Invalid input"}}};function Vt(){return{localeError:uu()}}var Ji;class Bi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){let n=o[0];if(this._map.set(t,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,t);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let o=this._map.get(t);if(o&&typeof o==="object"&&"id"in o)this._idmap.delete(o.id);return this._map.delete(t),this}get(t){let o=t._zod.parent;if(o){let n={...this.get(o)??{}};delete n.id;let c={...n,...this._map.get(t)};return Object.keys(c).length?c:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Vi(){return new Bi}(Ji=globalThis).__zod_globalRegistry??(Ji.__zod_globalRegistry=Vi());var pe=globalThis.__zod_globalRegistry;function Ki(t,o){return new t({type:"string",...S(o)})}function Wi(t,o){return new t({type:"string",coerce:!0,...S(o)})}function Kt(t,o){return new t({type:"string",format:"email",check:"string_format",abort:!1,...S(o)})}function Gi(t,o){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...S(o)})}function qi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...S(o)})}function Yi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(o)})}function Xi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(o)})}function Hi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(o)})}function Wt(t,o){return new t({type:"string",format:"url",check:"string_format",abort:!1,...S(o)})}function Qi(t,o){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...S(o)})}function es(t,o){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(o)})}function ts(t,o){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...S(o)})}function rs(t,o){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(o)})}function os(t,o){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...S(o)})}function ns(t,o){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...S(o)})}function is(t,o){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(o)})}function Gt(t,o){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(o)})}function qt(t,o){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(o)})}function ss(t,o){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(o)})}function cs(t,o){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(o)})}function us(t,o){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...S(o)})}function as(t,o){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...S(o)})}function ls(t,o){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...S(o)})}function ps(t,o){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...S(o)})}function tt(t,o){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(o)})}function rt(t,o){return new t({type:"string",format:"date",check:"string_format",...S(o)})}function Yt(t,o){return new t({type:"string",format:"time",check:"string_format",precision:null,...S(o)})}function Xt(t,o){return new t({type:"string",format:"duration",check:"string_format",...S(o)})}function fs(t,o){return new t({type:"number",checks:[],...S(o)})}function ds(t,o){return new t({type:"number",coerce:!0,checks:[],...S(o)})}function ms(t,o){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...S(o)})}function hs(t,o){return new t({type:"boolean",...S(o)})}function _s(t,o){return new t({type:"boolean",coerce:!0,...S(o)})}function gs(t,o){return new t({type:"bigint",coerce:!0,...S(o)})}function xs(t,o){return new t({type:"null",...S(o)})}function ys(t){return new t({type:"any"})}function bs(t){return new t({type:"unknown"})}function zs(t,o){return new t({type:"never",...S(o)})}function vs(t,o){return new t({type:"void",...S(o)})}function $s(t,o){return new t({type:"date",...S(o)})}function ws(t,o){return new t({type:"date",coerce:!0,...S(o)})}function ye(t,o){return new It({check:"less_than",...S(o),value:t,inclusive:!1})}function se(t,o){return new It({check:"less_than",...S(o),value:t,inclusive:!0})}function be(t,o){return new Et({check:"greater_than",...S(o),value:t,inclusive:!1})}function ce(t,o){return new Et({check:"greater_than",...S(o),value:t,inclusive:!0})}function Ae(t,o){return new sn({check:"multiple_of",...S(o),value:t})}function ot(t,o){return new un({check:"max_length",...S(o),maximum:t})}function ze(t,o){return new an({check:"min_length",...S(o),minimum:t})}function nt(t,o){return new ln({check:"length_equals",...S(o),length:t})}function Ht(t,o){return new pn({check:"string_format",format:"regex",...S(o),pattern:t})}function Qt(t){return new fn({check:"string_format",format:"lowercase",...S(t)})}function er(t){return new dn({check:"string_format",format:"uppercase",...S(t)})}function tr(t,o){return new mn({check:"string_format",format:"includes",...S(o),includes:t})}function rr(t,o){return new hn({check:"string_format",format:"starts_with",...S(o),prefix:t})}function nr(t,o){return new _n({check:"string_format",format:"ends_with",...S(o),suffix:t})}function fe(t){return new gn({check:"overwrite",tx:t})}function ir(t){return fe((o)=>o.normalize(t))}function sr(){return fe((t)=>t.trim())}function cr(){return fe((t)=>t.toLowerCase())}function ur(){return fe((t)=>t.toUpperCase())}function ar(){return fe((t)=>no(t))}function ks(t,o,n){return new t({type:"array",element:o,...S(n)})}function Zs(t,o,n){let c=S(n);return c.abort??(c.abort=!0),new t({type:"custom",check:"custom",fn:o,...c})}function Ps(t,o,n){return new t({type:"custom",check:"custom",fn:o,...S(n)})}function Ss(t,o){let n=au((c)=>(c.addIssue=(u)=>{if(typeof u==="string")c.issues.push(_e(u,c.value,n._zod.def));else{let p=u;if(p.fatal)p.continue=!1;if(p.code??(p.code="custom"),!("input"in p))p.input=c.value;p.inst??(p.inst=n),p.continue??(p.continue=!n._zod.def.abort),c.issues.push(_e(p))}},t(c.value,c)),o);return n}function au(t,o){let n=new M({check:"custom",...S(o)});return n._zod.check=t,n}function Ne(t,...o){for(let n of o)for(let c of Reflect.ownKeys(n))if(Object.prototype.propertyIsEnumerable.call(n,c))L(t,c,n[c]);return t}function je(t){let o=t?.target??"draft-2020-12";if(o==="draft-4")o="draft-04";if(o==="draft-7")o="draft-07";return{processors:t.processors??{},metadataRegistry:t?.metadata??pe,target:o,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function F(t,o,n,c,u){let p=typeof o.unrepresentable==="function"?o.unrepresentable({zodSchema:t,path:c.path,message:u}):o.unrepresentable;if(p==="any")return!1;if(p===void 0||p==="throw")throw Error(u);return Object.assign(n,p),!0}function C(t,o,n={path:[],schemaPath:[]}){var c;let u=t._zod.def,p=o.seen.get(t);if(p){if(p.count++,n.schemaPath.includes(t))p.cycle=n.path;return p.schema}let f={schema:{},count:1,cycle:void 0,path:n.path};o.seen.set(t,f),o.sharedDefsExtractedFor=void 0,o.sharedEmitDoneFor=void 0;let h=t._zod.toJSONSchema?.();if(h)f.schema=h;else{let z={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(o,f.schema,z);else{let k=f.schema,Z=o.processors[u.type];if(!Z)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);Z(t,o,k,z)}let w=t._zod.parent;if(w){if(!f.ref)f.ref=w;C(w,o,z),o.seen.get(w).isParent=!0}}let y=o.metadataRegistry.get(t);if(y)Ne(f.schema,y);if(o.io==="input"&&V(t))delete f.schema.examples,delete f.schema.default;if(o.io==="input"&&"_prefault"in f.schema)(c=f.schema).default??(c.default=f.schema._prefault);return delete f.schema._prefault,o.seen.get(t).schema}function Os(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Re(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;let c=new Map;for(let f of t.seen.entries()){let h=t.metadataRegistry.get(f[0])?.id;if(h){let y=c.get(h);if(y&&y!==f[0])throw Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);c.set(h,f[0])}}let u=(f)=>{let h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let w=t.external.registry.get(f[0])?.id,k=t.external.uri??((P)=>P);if(w)return{ref:k(w)};let Z=f[1].defId??f[1].schema.id??`schema${t.counter++}`;return f[1].defId=Z,{defId:Z,ref:`${k("__shared")}#/${h}/${Os(Z)}`}}let y="#",b=`${y}/${h}/`;if(f[1]===n&&!f[1].schema.id)return{ref:y};let z=f[1].schema.id??`__schema${t.counter++}`;return{defId:z,ref:b+Os(z)}},p=(f)=>{if(f[1].schema.$ref)return;let h=f[1],{ref:y,defId:b}=u(f);if(h.def={...h.schema},b)h.defId=b;let z=h.schema;for(let w in z)delete z[w];z.$ref=y};if(t.cycles==="throw")for(let f of t.seen.entries()){let h=f[1];if(h.cycle)throw Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
53
53
 
54
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of t.seen.entries()){let h=f[1];if(o===f[0]){p(f);continue}if(t.external){let b=t.external.registry.get(f[0])?.id;if(o!==f[0]&&b){p(f);continue}}if(t.metadataRegistry.get(f[0])?.id){p(f);continue}if(h.cycle){p(f);continue}if(h.count>1){if(t.reused==="ref"){p(f);continue}}}if(t.external)t.sharedDefsExtractedFor=t.external}function Ns(t){let o=t.anyOf;if(!Array.isArray(o)||o.length===0||t.type!==void 0)return;let n=[];for(let c of o){if(!c||typeof c!=="object")return;Ns(c);let u=Object.keys(c);if(u.length!==1||u[0]!=="type")return;let p=c.type;for(let f of Array.isArray(p)?p:[p]){if(typeof f!=="string")return;if(!n.includes(f))n.push(f)}}delete t.anyOf,t.type=n.length===1?n[0]:n}var Cs=new Set(["type","properties","required","additionalProperties"]),Ts=["oneOf","anyOf"];function As(t){let o=t.additionalProperties;if(o===void 0||o===!1||typeof o!=="object"||o===null)return null;return Object.keys(o).length?o:null}function lr(t){let o=[];for(let p of t){if(typeof p!=="object"||p.type!=="object")return null;for(let f in p)if(!Cs.has(f))return null;o.push(p)}let n={},c=new Set;for(let p of o){for(let f in p.properties){if(Object.prototype.hasOwnProperty.call(n,f))continue;let h=[];for(let b of o){let z=b.properties?.[f]??As(b);if(z===null||z===void 0)continue;if(!h.some((w)=>JSON.stringify(w)===JSON.stringify(z)))h.push(z)}let y=h.length===1?h[0]:lr(h)??{allOf:h};L(n,f,y)}for(let f of p.required??[])c.add(f)}let u={type:"object",properties:n};if(c.size)u.required=[...c];if(o.every((p)=>p.additionalProperties===!1))u.additionalProperties=!1;else{let p=[];for(let f of o){let h=As(f);if(h&&!p.some((y)=>JSON.stringify(y)===JSON.stringify(h)))p.push(h)}if(p.length===1)u.additionalProperties=p[0];else if(p.length>1)u.additionalProperties={allOf:p}}return u}function pu(t){let o=t.allOf;if(!Array.isArray(o)||o.length<2)return;for(let u of Cs)if(u in t)return;let n=o.filter((u)=>Ts.some((p)=>Array.isArray(u[p]))),c=null;if(!n.length)c=lr(o);else{let u=n[0],p=Ts.find((y)=>Array.isArray(u[y]));if(Object.keys(u).length!==1)return;let f=o.filter((y)=>y!==u),h=u[p].map((y)=>lr([...f,y]));if(h.some((y)=>!y))return;c={[p]:h}}if(!c)return;delete t.allOf,Ne(t,c)}function De(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let c=(h)=>{let y=t.seen.get(h);if(y.ref===null)return;let b=y.def??y.schema,z={...b},w=y.ref;if(y.ref=null,w){c(w);let Z=t.seen.get(w),P=Z.schema;if(P.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"))b.allOf=b.allOf??[],b.allOf.push(P);else Ne(b,P);if(Ne(b,z),h._zod.parent===w)for(let I in b){if(I==="$ref"||I==="allOf")continue;if(!(I in z))delete b[I]}if(P.$ref&&Z.def)for(let I in b){if(I==="$ref"||I==="allOf")continue;if(I in Z.def&&JSON.stringify(b[I])===JSON.stringify(Z.def[I]))delete b[I]}}let k=h._zod.parent;if(k&&k!==w){c(k);let Z=t.seen.get(k);if(Z?.schema.$ref){if(b.$ref=Z.schema.$ref,Z.def)for(let P in b){if(P==="$ref"||P==="allOf")continue;if(P in Z.def&&JSON.stringify(b[P])===JSON.stringify(Z.def[P]))delete b[P]}}}t.override({zodSchema:h,jsonSchema:b,path:y.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let h of[...t.seen.entries()].reverse())c(h[0]);if(t.target!=="openapi-3.0")for(let h of t.seen.entries())Ns(h[1].def??h[1].schema);for(let h of t.deferred)h();if(t.intersections.length){let h=new Map;for(let y of t.seen.values())for(let b of[y.schema,y.def]){let z=b?.allOf;if(!Array.isArray(z))continue;let w=h.get(z);if(w)w.push(b);else h.set(z,[b])}for(let y of t.intersections)for(let b of h.get(y)??[])pu(b)}}let u={};if(t.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if(t.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if(t.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if(t.target==="openapi-3.0");if(t.external?.uri){let h=t.external.registry.get(o)?.id;if(!h)throw Error("Schema is missing an `id` property");u.$id=t.external.uri(h)}Ne(u,n.defId?n.schema:n.def??n.schema);let p=t.metadataRegistry.get(o)?.id;if(p!==void 0&&u.id===p)delete u.id;let f=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let h of t.seen.entries()){let y=h[1];if(y.def&&y.defId){if(y.def.id===y.defId)delete y.def.id;L(f,y.defId,y.def)}}if(t.external)t.sharedEmitDoneFor=t.external;if(t.external);else if(Object.keys(f).length>0)if(t.target==="draft-2020-12")u.$defs=f;else u.definitions=f;try{let h=JSON.parse(JSON.stringify(u));return Object.defineProperty(h,"~standard",{value:{...o["~standard"],jsonSchema:{input:Ce(o,"input",t.processors),output:Ce(o,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch(h){throw Error("Error converting schema to JSON.")}}function V(t,o){let n=o??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let c=t._zod.def;if(c.type==="transform")return!0;if(c.type==="array")return V(c.element,n);if(c.type==="set")return V(c.valueType,n);if(c.type==="lazy")return V(c.getter(),n);if(c.type==="promise"||c.type==="optional"||c.type==="nonoptional"||c.type==="nullable"||c.type==="readonly"||c.type==="default"||c.type==="prefault"||c.type==="catch")return V(c.innerType,n);if(c.type==="intersection")return V(c.left,n)||V(c.right,n);if(c.type==="record"||c.type==="map")return V(c.keyType,n)||V(c.valueType,n);if(c.type==="pipe"){if(t._zod.traits.has("$ZodCodec"))return!0;return V(c.in,n)||V(c.out,n)}if(c.type==="object"){for(let u in c.shape)if(V(c.shape[u],n))return!0;return!1}if(c.type==="union"){for(let u of c.options)if(V(u,n))return!0;return!1}if(c.type==="tuple"){for(let u of c.items)if(V(u,n))return!0;if(c.rest&&V(c.rest,n))return!0;return!1}return!1}var js=(t,o={})=>(n)=>{let c=je({...n,processors:o});return C(t,c),Re(c,t),De(c,t)},Ce=(t,o,n={})=>(c)=>{let{libraryOptions:u,target:p}=c??{},f=je({...u??{},target:p,io:o,processors:n});return C(t,f),Re(f,t),De(f,t)};var fu={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dr=(t,o,n,c)=>{let u=n;u.type="string";let{minimum:p,maximum:f,format:h,patterns:y,contentEncoding:b,laxFormat:z}=t._zod.bag;if(typeof p==="number")u.minLength=p;if(typeof f==="number")u.maxLength=f;if(h){if(u.format=fu[h]??h,u.format==="")delete u.format;if(h==="time"||z)delete u.format}if(b)u.contentEncoding=b;if(y&&y.size>0){let w=[...y];if(w.length===1)u.pattern=w[0].source;else if(w.length>1)u.allOf=[...w.map((k)=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:k.source}))]}},mr=(t,o,n,c)=>{let u=n,{minimum:p,maximum:f,format:h,multipleOf:y,exclusiveMaximum:b,exclusiveMinimum:z}=t._zod.bag;if(typeof h==="string"&&h.includes("int"))u.type="integer";else u.type="number";let w=typeof z==="number"&&z>=(p??Number.NEGATIVE_INFINITY),k=typeof b==="number"&&b<=(f??Number.POSITIVE_INFINITY),Z=o.target==="draft-04"||o.target==="openapi-3.0";if(w)if(Z)u.minimum=z,u.exclusiveMinimum=!0;else u.exclusiveMinimum=z;else if(typeof p==="number")u.minimum=p;if(k)if(Z)u.maximum=b,u.exclusiveMaximum=!0;else u.exclusiveMaximum=b;else if(typeof f==="number")u.maximum=f;if(typeof y==="number")if(Number.isFinite(y)&&y!==0)u.multipleOf=Math.abs(y);else F(t,o,u,c,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`)},hr=(t,o,n,c)=>{n.type="boolean"},_r=(t,o,n,c)=>{F(t,o,n,c,"BigInt cannot be represented in JSON Schema")},Ds=(t,o,n,c)=>{F(t,o,n,c,"Symbols cannot be represented in JSON Schema")},gr=(t,o,n,c)=>{if(o.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},Ls=(t,o,n,c)=>{F(t,o,n,c,"Undefined cannot be represented in JSON Schema")},xr=(t,o,n,c)=>{F(t,o,n,c,"Void cannot be represented in JSON Schema")},yr=(t,o,n,c)=>{n.not={}},br=(t,o,n,c)=>{},zr=(t,o,n,c)=>{},vr=(t,o,n,c)=>{F(t,o,n,c,"Date cannot be represented in JSON Schema")},$r=(t,o,n,c)=>{let u=t._zod.def,p=Ue(u.entries);if(p.length===0){n.not={};return}if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";n.enum=p},wr=(t,o,n,c)=>{let u=t._zod.def;if(u.values.length===0){n.not={};return}let p=[];for(let f of u.values)if(f===void 0){if(F(t,o,n,c,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof f==="bigint"){if(F(t,o,n,c,"BigInt literals cannot be represented in JSON Schema"))return;p.push(Number(f))}else p.push(f);if(p.length===0);else if(p.length===1){let f=p[0];if(n.type=f===null?"null":typeof f,o.target==="draft-04"||o.target==="openapi-3.0")n.enum=[f];else n.const=f}else{if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";if(p.every((f)=>typeof f==="boolean"))n.type="boolean";if(p.every((f)=>f===null))n.type="null";n.enum=p}},Fs=(t,o,n,c)=>{F(t,o,n,c,"NaN cannot be represented in JSON Schema")},Us=(t,o,n,c)=>{let u=n,p=t._zod.pattern;if(!p)throw Error("Pattern not found in template literal");u.type="string",u.pattern=p.source},Ms=(t,o,n,c)=>{let u=n,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:h,mime:y}=t._zod.bag;if(f!==void 0)p.minLength=f;if(h!==void 0)p.maxLength=h;if(y)if(y.length===1)p.contentMediaType=y[0],Object.assign(u,p);else Object.assign(u,p),u.anyOf=y.map((b)=>({contentMediaType:b}));else Object.assign(u,p)},Bs=(t,o,n,c)=>{n.type="boolean"},kr=(t,o,n,c)=>{F(t,o,n,c,"Custom types cannot be represented in JSON Schema")},Vs=(t,o,n,c)=>{F(t,o,n,c,"Function types cannot be represented in JSON Schema")},Zr=(t,o,n,c)=>{F(t,o,n,c,"Transforms cannot be represented in JSON Schema")},Ks=(t,o,n,c)=>{F(t,o,n,c,"Map cannot be represented in JSON Schema")},Ws=(t,o,n,c)=>{F(t,o,n,c,"Set cannot be represented in JSON Schema")},Pr=(t,o,n,c)=>{let u=n,p=t._zod.def,{minimum:f,maximum:h}=t._zod.bag;if(typeof f==="number")u.minItems=f;if(typeof h==="number")u.maxItems=h;u.type="array",u.items=C(p.element,o,{...c,path:[...c.path,"items"]})};function Le(t){let o=t._zod.def;if(o.type==="pipe"&&o.in._zod.traits.has("$ZodTransform"))return Le(o.out);if(o.type==="catch")return Le(o.innerType);return t._zod.optin}var Sr=(t,o,n,c)=>{let u=n,p=t._zod.def,f=p.shape;if(Object.getOwnPropertySymbols(f).length&&F(t,o,u,c,"Symbol keys cannot be represented in JSON Schema"))return;u.type="object",u.properties={};for(let z in f)L(u.properties,z,C(f[z],o,{...c,path:[...c.path,"properties",z]}));let y=new Set(Object.keys(f)),b=new Set([...y].filter((z)=>{let w=p.shape[z];if(o.io==="input")return Le(w)===void 0;else return w._zod.optout===void 0}));if(b.size>0)u.required=Array.from(b);if(p.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!p.catchall){if(o.io==="output")u.additionalProperties=!1}else if(p.catchall)u.additionalProperties=C(p.catchall,o,{...c,path:[...c.path,"additionalProperties"]})},Or=(t,o,n,c)=>{let u=t._zod.def,p=u.inclusive===!1,f=u.options.map((h,y)=>C(h,o,{...c,path:[...c.path,p?"oneOf":"anyOf",y]}));if(p)n.oneOf=f;else n.anyOf=f},Ir=(t,o,n,c)=>{let u=t._zod.def,p=C(u.left,o,{...c,path:[...c.path,"allOf",0]}),f=C(u.right,o,{...c,path:[...c.path,"allOf",1]}),h=(b)=>("allOf"in b)&&Object.keys(b).length===1,y=[...h(p)?p.allOf:[p],...h(f)?f.allOf:[f]];n.allOf=y,o.intersections.push(y)},Er=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="array";let f=o.target==="draft-2020-12"?"prefixItems":"items",h=o.target==="draft-2020-12"?"items":o.target==="openapi-3.0"?"items":"additionalItems",y=p.items.map((O,I)=>C(O,o,{...c,path:[...c.path,f,I]})),b=p.rest?C(p.rest,o,{...c,path:[...c.path,h,...o.target==="openapi-3.0"?[p.items.length]:[]]}):null,z=p.items.length;while(z>0){let O=p.items[z-1];if(!(o.io==="input"?Le(O)!==void 0:O._zod.optout==="optional"))break;z--}let w=p.items.length,k=!p.rest;if(o.target==="draft-2020-12"){if(u.prefixItems=y,k)u.items=!1;else if(b)u.items=b;if(z>0)u.minItems=z;if(k)u.maxItems=w}else if(o.target==="openapi-3.0"){if(u.items={anyOf:y},b)u.items.anyOf.push(b);if(z>0)u.minItems=z;if(k)u.maxItems=w}else{if(u.items=y,k)u.additionalItems=!1;else if(b)u.additionalItems=b;if(z>0)u.minItems=z;if(k)u.maxItems=w}let{minimum:Z,maximum:P}=t._zod.bag;if(typeof Z==="number")u.minItems=Z;if(typeof P==="number")u.maxItems=P};function pr(t,o,n){if(o.$ref){if(n.has(o))return o;n.add(o);let P=t.get(o)?.def;if(!P)return o;let O=pr(t,P,n);return O===P?o:O}for(let P of["anyOf","oneOf"]){let O=o[P];if(!Array.isArray(O))continue;let I=O.map((J)=>pr(t,J,n));if(I.some((J,q)=>J!==O[q]))o={...o,[P]:I}}let c=Array.isArray(o.type)?o.type:[o.type],u=!c.includes("string")&&c.some((P)=>P==="number"||P==="integer"),p=o.enum??(o.const!==void 0?[o.const]:void 0);if(!u&&!p?.some((P)=>typeof P==="number"))return o;let{minimum:f,maximum:h,exclusiveMinimum:y,exclusiveMaximum:b,multipleOf:z,format:w,id:k,...Z}=o;if(Z.enum)Z.enum=Z.enum.map((P)=>typeof P==="number"?String(P):P);else if(typeof Z.const==="number")Z.const=String(Z.const);if(!u)return Z;if(Z.type="string",!p)Z.pattern=(c.includes("number")?Ee:Ge).source;return Z}var fr=new WeakMap;function du(t){let o=new Map;for(let c of t.seen.values())if(c.def&&!o.has(c.schema))o.set(c.schema,c);let n=new Map;for(let c of fr.get(t)??[]){let u=t.seen.get(c),p=(u?.def??u?.schema)?.propertyNames;if(!p||p===!0||n.has(p))continue;let f=pr(o,p,new Set);if(f!==p)n.set(p,f)}if(!n.size)return;for(let c of t.seen.values())for(let u of[c.schema,c.def]){let p=u&&n.get(u.propertyNames);if(p)u.propertyNames=p}}var Tr=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="object";let f=p.keyType,y=f._zod.bag?.patterns;if(p.mode==="loose"&&y&&y.size>0){let w=C(p.valueType,o,{...c,path:[...c.path,"patternProperties","*"]});u.patternProperties={};for(let k of y)L(u.patternProperties,k.source,w)}else{if(o.target==="draft-07"||o.target==="draft-2020-12"){u.propertyNames=C(p.keyType,o,{...c,path:[...c.path,"propertyNames"]});let w=fr.get(o);if(!w)w=[],fr.set(o,w),o.deferred.push(()=>du(o));w.push(t)}u.additionalProperties=C(p.valueType,o,{...c,path:[...c.path,"additionalProperties"]})}let b=f._zod.values,z=o.io==="input"&&Le(p.valueType)!==void 0;if(b&&!p.partial&&!z){let w=[...b].filter((k)=>typeof k==="string"||typeof k==="number");if(w.length>0)u.required=w.map(String)}},Ar=(t,o,n,c)=>{let u=t._zod.def,p=C(u.innerType,o,c),f=o.seen.get(t);if(o.target==="openapi-3.0")f.ref=u.innerType,n.nullable=!0;else n.anyOf=[p,{type:"null"}]},Nr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Cr=Symbol();function Gs(t,o,n,c,u){let p=!1,f=JSON.stringify(t,(h,y)=>{if(typeof y!=="bigint")return y;return p=!0,null});if(!p)return JSON.parse(f);return F(o,n,c,u,"BigInt defaults cannot be represented in JSON Schema"),Cr}var jr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f=Gs(u.defaultValue,t,o,n,c);if(f!==Cr)n.default=f},Rr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);if(p.ref=u.innerType,o.io!=="input")return;let f=Gs(u.defaultValue,t,o,n,c);if(f!==Cr)n._prefault=f},Dr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{F(t,o,n,c,"Dynamic catch values are not supported in JSON Schema");return}n.default=f},Lr=(t,o,n,c)=>{let u=t._zod.def,p=u.in._zod.traits.has("$ZodTransform"),f=o.io==="input"?p?u.out:u.in:u.out;C(f,o,c);let h=o.seen.get(t);h.ref=f},Ur=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType,n.readOnly=!0},qs=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},it=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Mr=(t,o,n,c)=>{let u=t._zod.innerType;C(u,o,c);let p=o.seen.get(t);p.ref=u},Rs={string:dr,number:mr,boolean:hr,bigint:_r,symbol:Ds,null:gr,undefined:Ls,void:xr,never:yr,any:br,unknown:zr,date:vr,enum:$r,literal:wr,nan:Fs,template_literal:Us,file:Ms,success:Bs,custom:kr,function:Vs,transform:Zr,map:Ks,set:Ws,array:Pr,object:Sr,union:Or,intersection:Ir,tuple:Er,record:Tr,nullable:Ar,nonoptional:Nr,default:jr,prefault:Rr,catch:Dr,pipe:Lr,readonly:Ur,promise:qs,optional:it,lazy:Mr};function Xs(t,o){if("_idmap"in t){let c=t,u=je({...o,processors:Rs}),p={};for(let y of c._idmap.entries()){let[b,z]=y;C(z,u)}let f={},h={registry:c,uri:o?.uri,defs:p};u.external=h;for(let y of c._idmap.entries()){let[b,z]=y;Re(u,z),L(f,b,De(u,z))}if(Object.keys(p).length>0){let y=u.target==="draft-2020-12"?"$defs":"definitions";f.__shared={[y]:p}}return{schemas:f}}let n=je({...o,processors:Rs});return C(t,n),Re(n,t),De(n,t)}var Ys=new WeakSet([Object.prototype,Error.prototype]);function st(t,o,n){Object.defineProperty(t,o,{configurable:!0,enumerable:!1,get(){let c=n(this);return Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0})}})}var $u=(t,o)=>{Js.init(t,o),t.name="ZodError";let n=Object.getPrototypeOf(t);if(Ys.has(n))return;Ys.add(n),st(n,"format",(c)=>(u)=>kt(c,u)),st(n,"flatten",(c)=>(u)=>wt(c,u)),st(n,"addIssue",(c)=>(u)=>{c.issues.push(u),c.message=JSON.stringify(c.issues,we,2)}),st(n,"addIssues",(c)=>(u)=>{c.issues.push(...u),c.message=JSON.stringify(c.issues,we,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var G=v("ZodError",$u,void 0,{Parent:Error});var Hs=Ke(G),Qs=We(G),bu=Pe(G),vu=Ie(G),ec=$o(G),tc=wo(G),rc=ko(G),oc=Zo(G),nc=Po(G),ic=So(G),sc=Oo(G),cc=Io(G);function Zu(){if(!B.localeError)W(Vt())}function Fe(){if(!B.memoizer)W({memoizer:Bt()})}var N=v("ZodType",(t,o)=>(Zu(),A.init(t,o),t.def=o,t.type=o.type,t),{check(...t){let o=this.def;return this.clone(ae(o,{checks:[...o.checks??[],...t.map((n)=>typeof n==="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,o){return Y(this,t,o)},brand(){return this},register(t,o){return t.add(this,o),this},refine(t,o){return this.check(ma(t,o))},superRefine(t,o){return this.check(ha(t,o))},overwrite(t){return this.check(fe(t))},optional(){return Se(this)},exactOptional(){return Qu(this)},nullable(){return s(this)},nullish(){return Se(s(this))},nonoptional(t){return ca(this,t)},array(){return a(this)},or(t){return T([this,t])},and(t){return Ss(this,t)},transform(t){return ac(this,zc(t))},default(t){return na(this,t)},prefault(t){return sa(this,t)},catch(t){return aa(this,t)},pipe(t){return ac(this,t)},readonly(){return fa(this)},describe(t){let o=this.clone();return pe.add(o,{description:t}),o},meta(...t){if(t.length===0)return pe.get(this);let o=this.clone();return pe.add(o,t[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...o){return o.length===0?t(this):t(this,...o)},get "~standard"(){return gt(this,"~standard",{...Rt(this),jsonSchema:{input:Ce(this,"input"),output:Ce(this,"output")}})},set "~standard"(t){de(this,"~standard",t)},parse:function t(o,n){return Hs(this,o,n,{callee:t})},parseAsync:async function t(o,n){return await Qs(this,o,n,{callee:t})},safeParse(t,o){return bu(this,t,o)},async safeParseAsync(t,o){return vu(this,t,o)},get spa(){return this?.safeParseAsync},set spa(t){de(this,"spa",t)},encode:function t(o,n){return ec(this,o,n,{callee:t})},decode:function t(o,n){return tc(this,o,n,{callee:t})},encodeAsync:async function t(o,n){return await rc(this,o,n,{callee:t})},decodeAsync:async function t(o,n){return await oc(this,o,n,{callee:t})},safeEncode(t,o){return nc(this,t,o)},safeDecode(t,o){return ic(this,t,o)},async safeEncodeAsync(t,o){return sc(this,t,o)},async safeDecodeAsync(t,o){return cc(this,t,o)},toJSONSchema(t){return js(this,{})(t)},get description(){return pe.get(this)?.description},get _def(){return this._zod.def}}),lc=v("_ZodString",(t,o)=>{He.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>dr(t,c,u,p);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null},{regex(...t){return this.check(Ht(...t))},includes(...t){return this.check(tr(...t))},startsWith(...t){return this.check(rr(...t))},endsWith(...t){return this.check(or(...t))},min(...t){return this.check(ze(...t))},max(...t){return this.check(ot(...t))},length(...t){return this.check(nt(...t))},nonempty(...t){return this.check(ze(1,...t))},lowercase(t){return this.check(Qt(t))},uppercase(t){return this.check(er(t))},trim(){return this.check(sr())},normalize(...t){return this.check(ir(...t))},toLowerCase(){return this.check(cr())},toUpperCase(){return this.check(ur())},slugify(){return this.check(ar())}}),Jr=v("ZodString",(t,o)=>{He.init(t,o),lc.init(t,o)},{email(t){return this.check(Kt(hc,t))},url(t){return this.check(Wt(_c,t))},jwt(t){return this.check(ps(Fu,t))},emoji(t){return this.check(Qi(Su,t))},guid(t){return this.check(Gi(Pu,t))},uuid(t){return this.check(qi(ct,t))},uuidv4(t){return this.check(Yi(ct,t))},uuidv6(t){return this.check(Xi(ct,t))},uuidv7(t){return this.check(Hi(ct,t))},nanoid(t){return this.check(es(Ou,t))},cuid(t){return this.check(ts(Iu,t))},cuid2(t){return this.check(rs(Eu,t))},ulid(t){return this.check(os(Tu,t))},base64(t){return this.check(us(Ru,t))},base64url(t){return this.check(as(Du,t))},xid(t){return this.check(ns(Au,t))},ksuid(t){return this.check(is(Nu,t))},ipv4(t){return this.check(Gt(gc,t))},ipv6(t){return this.check(qt(xc,t))},cidrv4(t){return this.check(ss(Cu,t))},cidrv6(t){return this.check(cs(ju,t))},e164(t){return this.check(ls(Lu,t))},datetime(t){return this.check(tt(Br,t))},date(t){return this.check(rt(Vr,t))},time(t){return this.check(Yt(dc,t))},duration(t){return this.check(Xt(mc,t))}});function e(t){return Ki(Jr,t)}var D=v("ZodStringFormat",(t,o)=>{j.init(t,o),lc.init(t,o)}),Br=v("ZodISODateTime",(t,o)=>{Kn.init(t,o),D.init(t,o)}),Vr=v("ZodISODate",(t,o)=>{Wn.init(t,o),D.init(t,o)}),dc=v("ZodISOTime",(t,o)=>{Gn.init(t,o),D.init(t,o)}),mc=v("ZodISODuration",(t,o)=>{qn.init(t,o),D.init(t,o)}),hc=v("ZodEmail",(t,o)=>{Cn.init(t,o),D.init(t,o)});function po(t){return Kt(hc,t)}var Pu=v("ZodGUID",(t,o)=>{An.init(t,o),D.init(t,o)});var ct=v("ZodUUID",(t,o)=>{Nn.init(t,o),D.init(t,o)});var _c=v("ZodURL",(t,o)=>{Dn.init(t,o),D.init(t,o)});function ea(t){return Wt(_c,t)}var Su=v("ZodEmoji",(t,o)=>{Ln.init(t,o),D.init(t,o)});var Ou=v("ZodNanoID",(t,o)=>{Fn.init(t,o),D.init(t,o)});var Iu=v("ZodCUID",(t,o)=>{Un.init(t,o),D.init(t,o)});var Eu=v("ZodCUID2",(t,o)=>{Mn.init(t,o),D.init(t,o)});var Tu=v("ZodULID",(t,o)=>{Jn.init(t,o),D.init(t,o)});var Au=v("ZodXID",(t,o)=>{Bn.init(t,o),D.init(t,o)});var Nu=v("ZodKSUID",(t,o)=>{Vn.init(t,o),D.init(t,o)});var gc=v("ZodIPv4",(t,o)=>{Yn.init(t,o),D.init(t,o)});function fc(t){return Gt(gc,t)}var xc=v("ZodIPv6",(t,o)=>{Hn.init(t,o),D.init(t,o)});function of(t){return qt(xc,t)}var Cu=v("ZodCIDRv4",(t,o)=>{Qn.init(t,o),D.init(t,o)});var ju=v("ZodCIDRv6",(t,o)=>{ei.init(t,o),D.init(t,o)});var Ru=v("ZodBase64",(t,o)=>{ri.init(t,o),D.init(t,o)});var Du=v("ZodBase64URL",(t,o)=>{oi.init(t,o),D.init(t,o)});var Lu=v("ZodE164",(t,o)=>{ni.init(t,o),D.init(t,o)});var Fu=v("ZodJWT",(t,o)=>{ii.init(t,o),D.init(t,o)});var at=v("ZodNumber",(t,o)=>{Dt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>mr(t,c,u,p);let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),t.isFinite=!0,t.format=n.format??null},{gt(t,o){return this.check(be(t,o))},gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(se(t,o))},max(t,o){return this.check(se(t,o))},int(t){return this.check(m(t))},safe(t){return this.check(m(t))},positive(t){return this.check(be(0,t))},nonnegative(t){return this.check(ce(0,t))},negative(t){return this.check(ye(0,t))},nonpositive(t){return this.check(se(0,t))},multipleOf(t,o){return this.check(Ae(t,o))},step(t,o){return this.check(Ae(t,o))},finite(){return this}});function i(t){return fs(at,t)}var Uu=v("ZodNumberFormat",(t,o)=>{si.init(t,o),at.init(t,o)});function m(t){return ms(Uu,t)}var Kr=v("ZodBoolean",(t,o)=>{ci.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>hr(t,n,c,u)});function d(t){return hs(Kr,t)}var yc=v("ZodBigInt",(t,o)=>{ui.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>_r(t,c,u,p);let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null},{gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},gt(t,o){return this.check(be(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(se(t,o))},max(t,o){return this.check(se(t,o))},positive(t){return this.check(be(BigInt(0),t))},negative(t){return this.check(ye(BigInt(0),t))},nonpositive(t){return this.check(se(BigInt(0),t))},nonnegative(t){return this.check(ce(BigInt(0),t))},multipleOf(t,o){return this.check(Ae(t,o))}});var Mu=v("ZodNull",(t,o)=>{ai.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>gr(t,n,c,u)});function mo(t){return xs(Mu,t)}var Ju=v("ZodAny",(t,o)=>{li.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>br(t,n,c,u)});function x(){return ys(Ju)}var Bu=v("ZodUnknown",(t,o)=>{pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>zr(t,n,c,u)});function U(){return bs(Bu)}var Vu=v("ZodNever",(t,o)=>{fi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>yr(t,n,c,u)});function sf(t){return zs(Vu,t)}var Ku=v("ZodVoid",(t,o)=>{di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>xr(t,n,c,u)});function Ct(t){return vs(Ku,t)}var Wr=v("ZodDate",(t,o)=>{mi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>vr(t,c,u,p),t.min=(c,u)=>t.check(ce(c,u)),t.max=(c,u)=>t.check(se(c,u));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function ee(t){return $s(Wr,t)}var Wu=v("ZodArray",(t,o)=>{Fe(),hi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Pr(t,n,c,u),t.element=o.element},{min(t,o){return this.check(ze(t,o))},nonempty(t){return this.check(ze(1,t))},max(t,o){return this.check(ot(t,o))},length(t,o){return this.check(nt(t,o))},unwrap(){return this.element}});function a(t,o){return ks(Wu,t,o)}var Ai=v("ZodObject",(t,o)=>{Fe(),bi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Sr(t,n,c,u),Dc(t,"shape",(n)=>n._zod.def.shape,!1)},{keyof(){return g(Object.keys(this._zod.def.shape))},catchall(t){return this.clone({...this._zod.def,catchall:t})},passthrough(){return this.clone({...this._zod.def,catchall:U()})},loose(){return this.clone({...this._zod.def,catchall:U()})},strict(){return this.clone({...this._zod.def,catchall:sf()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(t){return Ic(this,t)},safeExtend(t){return Ec(this,t)},merge(t){return Tc(this,t)},pick(t){return Sc(this,t)},omit(t){return Oc(this,t)},partial(...t){return ao(_i,this,t[0])},exactPartial(...t){return ao(vc,this,t[0],"exactPartial")},required(...t){return Ac($c,this,t[0])}});function r(t,o){let n={type:"object",shape:t??{},...S(o)};return new Ai(n)}function oe(t,o){return new Ai({type:"object",shape:t,catchall:U(),...S(o)})}var bc=v("ZodUnion",(t,o)=>{Lt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Or(t,n,c,u),t.options=o.options});function T(t,o){return new bc({type:"union",options:t,...S(o)})}var Gu=v("ZodDiscriminatedUnion",(t,o)=>{bc.init(t,o),zi.init(t,o)});function re(t,o,n){return new Gu({type:"union",options:o,discriminator:t,...S(n)})}var qu=v("ZodIntersection",(t,o)=>{vi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ir(t,n,c,u)});function Ss(t,o){return new qu({type:"intersection",left:t,right:o})}var Yu=v("ZodTuple",(t,o)=>{Fe(),$i.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Er(t,n,c,u)},{rest(t){return this.clone({...this._zod.def,rest:t})},partial(){let t=this._zod.def;if(t.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...t,items:t.items.map((o)=>new _i({type:"optional",innerType:o}))})}});function Ua(t,o,n){let c=o instanceof A,u=c?n:o;return new Yu({type:"tuple",items:t,rest:c?o:null,...S(u)})}var uc=v("ZodRecord",(t,o)=>{Fe(),wi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Tr(t,n,c,u),t.keyType=o.keyType,t.valueType=o.valueType});function _(t,o,n){if(!o||!o._zod)return new uc({type:"record",keyType:e(),valueType:t,...S(o)});return new uc({type:"record",keyType:t,valueType:o,...S(n)})}var ut=v("ZodEnum",(t,o)=>{ki.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>$r(t,c,u,p),t.enum=o.entries,t.options=Object.values(o.entries);let n=new Set(Object.keys(o.entries));t.extract=(c,u)=>{let p={};for(let f of c)if(n.has(f))p[f]=o.entries[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...S(u),entries:p})},t.exclude=(c,u)=>{let p={...o.entries};for(let f of c)if(n.has(f))delete p[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...S(u),entries:p})}});function g(t,o){let n=Array.isArray(t)?Object.fromEntries(t.map((c)=>[c,c])):t;return new ut({type:"enum",entries:n,...S(o)})}function nr(t,o){return new ut({type:"enum",entries:t,...S(o)})}var Xu=v("ZodLiteral",(t,o)=>{Zi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>wr(t,n,c,u),t.values=new Set(o.values),Object.defineProperty(t,"value",{get(){if(o.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return o.values[0]}})});function l(t,o){return new Xu({type:"literal",values:Array.isArray(t)?t:[t],...S(o)})}var Hu=v("ZodTransform",(t,o)=>{Fe(),Pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Zr(t,n,c,u),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);n.addIssue=(p)=>{if(typeof p==="string")n.issues.push(_e(p,n.value,o));else{let f=p;if(f.fatal)f.continue=!1;if(f.code??(f.code="custom"),!("input"in f))f.input=n.value;f.inst??(f.inst=t),n.issues.push(_e(f))}};let u=o.transform(n.value,n);if(u instanceof Promise)return u.then((p)=>(n.value=p,n));return n.value=u,n}});function zc(t){return new Hu({type:"transform",transform:t})}var _i=v("ZodOptional",(t,o)=>{Ft.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Se(t){return new _i({type:"optional",innerType:t})}var vc=v("ZodExactOptional",(t,o)=>{Si.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Qu(t){return new vc({type:"optional",innerType:t})}var ra=v("ZodNullable",(t,o)=>{Oi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ar(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function s(t){return new ra({type:"nullable",innerType:t})}var oa=v("ZodDefault",(t,o)=>{Ii.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>jr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function na(t,o){return new oa({type:"default",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var ia=v("ZodPrefault",(t,o)=>{Ei.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Rr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function sa(t,o){return new ia({type:"prefault",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var $c=v("ZodNonOptional",(t,o)=>{Ti.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Nr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function ca(t,o){return new $c({type:"nonoptional",innerType:t,...S(o)})}var ua=v("ZodCatch",(t,o)=>{Ni.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Dr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function aa(t,o){return new ua({type:"catch",innerType:t,catchValue:typeof o==="function"?o:_o(o)})}var wc=v("ZodPipe",(t,o)=>{Ut.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Lr(t,n,c,u),t.in=o.in,t.out=o.out});function ac(t,o){return new wc({type:"pipe",in:t,out:o})}var la=v("ZodPreprocess",(t,o)=>{wc.init(t,o),Ci.init(t,o)}),pa=v("ZodReadonly",(t,o)=>{ji.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ur(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function fa(t){return new pa({type:"readonly",innerType:t})}var da=v("ZodLazy",(t,o)=>{Ri.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Mr(t,n,c,u),t.unwrap=()=>t._zod.def.getter()});function yt(t){return new da({type:"lazy",getter:t})}var Gr=v("ZodCustom",(t,o)=>{Di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>kr(t,n,c,u)});function At(t,o){return Zs(Gr,t??(()=>!0),o)}function ma(t,o={}){return Ps(Gr,t,o)}function ha(t,o){return Os(t,o)}function wu(t,o={}){let n=new Gr({type:"custom",check:"custom",fn:(c)=>c instanceof t,abort:!0,...S(o)});return n._zod.bag.Class=t,n._zod.check=(c)=>{if(!(c.value instanceof t))c.issues.push({code:"invalid_type",expected:t.name,input:c.value,inst:n,path:[...n._zod.def.path??[]]})},n}function ta(t){let o=yt(()=>T([e(t),i(),d(),mo(),a(o),_(e(),o)]));return o}function yi(t,o){return new la({type:"pipe",in:zc(t),out:o})}var Es={};Oe(Es,{bigint:()=>ga,boolean:()=>pc,date:()=>xa,number:()=>lm,string:()=>im});function im(t){return Wi(Jr,t)}function lm(t){return ds(at,t)}function pc(t){return _s(Kr,t)}function ga(t){return gs(yc,t)}function xa(t){return ws(Wr,t)}function X(t){return tt(Br,t)}function hA(t){return rt(Vr,t)}export{Fr,Js,nf,Xs,bu,vu,e,po,ea,fc,of,i,m,d,mo,x,U,sf,Ct,ee,a,Ai,r,oe,T,re,Ss,Ua,_,g,nr,l,_i,Se,s,yt,At,wu,ta,yi,X,hA,im,lm,pc,Es};
54
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of t.seen.entries()){let h=f[1];if(o===f[0]){p(f);continue}if(t.external){let b=t.external.registry.get(f[0])?.id;if(o!==f[0]&&b){p(f);continue}}if(t.metadataRegistry.get(f[0])?.id){p(f);continue}if(h.cycle){p(f);continue}if(h.count>1){if(t.reused==="ref"){p(f);continue}}}if(t.external)t.sharedDefsExtractedFor=t.external}function As(t){let o=t.anyOf;if(!Array.isArray(o)||o.length===0||t.type!==void 0)return;let n=[];for(let c of o){if(!c||typeof c!=="object")return;As(c);let u=Object.keys(c);if(u.length!==1||u[0]!=="type")return;let p=c.type;for(let f of Array.isArray(p)?p:[p]){if(typeof f!=="string")return;if(!n.includes(f))n.push(f)}}delete t.anyOf,t.type=n.length===1?n[0]:n}var Ns=new Set(["type","properties","required","additionalProperties"]),Is=["oneOf","anyOf"];function Ts(t){let o=t.additionalProperties;if(o===void 0||o===!1||typeof o!=="object"||o===null)return null;return Object.keys(o).length?o:null}function lr(t){let o=[];for(let p of t){if(typeof p!=="object"||p.type!=="object")return null;for(let f in p)if(!Ns.has(f))return null;o.push(p)}let n={},c=new Set;for(let p of o){for(let f in p.properties){if(Object.prototype.hasOwnProperty.call(n,f))continue;let h=[];for(let b of o){let z=b.properties?.[f]??Ts(b);if(z===null||z===void 0)continue;if(!h.some((w)=>JSON.stringify(w)===JSON.stringify(z)))h.push(z)}let y=h.length===1?h[0]:lr(h)??{allOf:h};L(n,f,y)}for(let f of p.required??[])c.add(f)}let u={type:"object",properties:n};if(c.size)u.required=[...c];if(o.every((p)=>p.additionalProperties===!1))u.additionalProperties=!1;else{let p=[];for(let f of o){let h=Ts(f);if(h&&!p.some((y)=>JSON.stringify(y)===JSON.stringify(h)))p.push(h)}if(p.length===1)u.additionalProperties=p[0];else if(p.length>1)u.additionalProperties={allOf:p}}return u}function lu(t){let o=t.allOf;if(!Array.isArray(o)||o.length<2)return;for(let u of Ns)if(u in t)return;let n=o.filter((u)=>Is.some((p)=>Array.isArray(u[p]))),c=null;if(!n.length)c=lr(o);else{let u=n[0],p=Is.find((y)=>Array.isArray(u[y]));if(Object.keys(u).length!==1)return;let f=o.filter((y)=>y!==u),h=u[p].map((y)=>lr([...f,y]));if(h.some((y)=>!y))return;c={[p]:h}}if(!c)return;delete t.allOf,Ne(t,c)}function De(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let c=(h)=>{let y=t.seen.get(h);if(y.ref===null)return;let b=y.def??y.schema,z={...b},w=y.ref;if(y.ref=null,w){c(w);let Z=t.seen.get(w),P=Z.schema;if(P.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"))b.allOf=b.allOf??[],b.allOf.push(P);else Ne(b,P);if(Ne(b,z),h._zod.parent===w)for(let I in b){if(I==="$ref"||I==="allOf")continue;if(!(I in z))delete b[I]}if(P.$ref&&Z.def)for(let I in b){if(I==="$ref"||I==="allOf")continue;if(I in Z.def&&JSON.stringify(b[I])===JSON.stringify(Z.def[I]))delete b[I]}}let k=h._zod.parent;if(k&&k!==w){c(k);let Z=t.seen.get(k);if(Z?.schema.$ref){if(b.$ref=Z.schema.$ref,Z.def)for(let P in b){if(P==="$ref"||P==="allOf")continue;if(P in Z.def&&JSON.stringify(b[P])===JSON.stringify(Z.def[P]))delete b[P]}}}t.override({zodSchema:h,jsonSchema:b,path:y.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let h of[...t.seen.entries()].reverse())c(h[0]);if(t.target!=="openapi-3.0")for(let h of t.seen.entries())As(h[1].def??h[1].schema);for(let h of t.deferred)h();if(t.intersections.length){let h=new Map;for(let y of t.seen.values())for(let b of[y.schema,y.def]){let z=b?.allOf;if(!Array.isArray(z))continue;let w=h.get(z);if(w)w.push(b);else h.set(z,[b])}for(let y of t.intersections)for(let b of h.get(y)??[])lu(b)}}let u={};if(t.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if(t.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if(t.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if(t.target==="openapi-3.0");if(t.external?.uri){let h=t.external.registry.get(o)?.id;if(!h)throw Error("Schema is missing an `id` property");u.$id=t.external.uri(h)}Ne(u,n.defId?n.schema:n.def??n.schema);let p=t.metadataRegistry.get(o)?.id;if(p!==void 0&&u.id===p)delete u.id;let f=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let h of t.seen.entries()){let y=h[1];if(y.def&&y.defId){if(y.def.id===y.defId)delete y.def.id;L(f,y.defId,y.def)}}if(t.external)t.sharedEmitDoneFor=t.external;if(t.external);else if(Object.keys(f).length>0)if(t.target==="draft-2020-12")u.$defs=f;else u.definitions=f;try{let h=JSON.parse(JSON.stringify(u));return Object.defineProperty(h,"~standard",{value:{...o["~standard"],jsonSchema:{input:Ce(o,"input",t.processors),output:Ce(o,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch(h){throw Error("Error converting schema to JSON.")}}function V(t,o){let n=o??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let c=t._zod.def;if(c.type==="transform")return!0;if(c.type==="array")return V(c.element,n);if(c.type==="set")return V(c.valueType,n);if(c.type==="lazy")return V(c.getter(),n);if(c.type==="promise"||c.type==="optional"||c.type==="nonoptional"||c.type==="nullable"||c.type==="readonly"||c.type==="default"||c.type==="prefault"||c.type==="catch")return V(c.innerType,n);if(c.type==="intersection")return V(c.left,n)||V(c.right,n);if(c.type==="record"||c.type==="map")return V(c.keyType,n)||V(c.valueType,n);if(c.type==="pipe"){if(t._zod.traits.has("$ZodCodec"))return!0;return V(c.in,n)||V(c.out,n)}if(c.type==="object"){for(let u in c.shape)if(V(c.shape[u],n))return!0;return!1}if(c.type==="union"){for(let u of c.options)if(V(u,n))return!0;return!1}if(c.type==="tuple"){for(let u of c.items)if(V(u,n))return!0;if(c.rest&&V(c.rest,n))return!0;return!1}return!1}var js=(t,o={})=>(n)=>{let c=je({...n,processors:o});return C(t,c),Re(c,t),De(c,t)},Ce=(t,o,n={})=>(c)=>{let{libraryOptions:u,target:p}=c??{},f=je({...u??{},target:p,io:o,processors:n});return C(t,f),Re(f,t),De(f,t)};var pu={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dr=(t,o,n,c)=>{let u=n;u.type="string";let{minimum:p,maximum:f,format:h,patterns:y,contentEncoding:b,laxFormat:z}=t._zod.bag;if(typeof p==="number")u.minLength=p;if(typeof f==="number")u.maxLength=f;if(h){if(u.format=pu[h]??h,u.format==="")delete u.format;if(h==="time"||z)delete u.format}if(b)u.contentEncoding=b;if(y&&y.size>0){let w=[...y];if(w.length===1)u.pattern=w[0].source;else if(w.length>1)u.allOf=[...w.map((k)=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:k.source}))]}},mr=(t,o,n,c)=>{let u=n,{minimum:p,maximum:f,format:h,multipleOf:y,exclusiveMaximum:b,exclusiveMinimum:z}=t._zod.bag;if(typeof h==="string"&&h.includes("int"))u.type="integer";else u.type="number";let w=typeof z==="number"&&z>=(p??Number.NEGATIVE_INFINITY),k=typeof b==="number"&&b<=(f??Number.POSITIVE_INFINITY),Z=o.target==="draft-04"||o.target==="openapi-3.0";if(w)if(Z)u.minimum=z,u.exclusiveMinimum=!0;else u.exclusiveMinimum=z;else if(typeof p==="number")u.minimum=p;if(k)if(Z)u.maximum=b,u.exclusiveMaximum=!0;else u.exclusiveMaximum=b;else if(typeof f==="number")u.maximum=f;if(typeof y==="number")if(Number.isFinite(y)&&y!==0)u.multipleOf=Math.abs(y);else F(t,o,u,c,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`)},hr=(t,o,n,c)=>{n.type="boolean"},_r=(t,o,n,c)=>{F(t,o,n,c,"BigInt cannot be represented in JSON Schema")},Ds=(t,o,n,c)=>{F(t,o,n,c,"Symbols cannot be represented in JSON Schema")},gr=(t,o,n,c)=>{if(o.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},Ls=(t,o,n,c)=>{F(t,o,n,c,"Undefined cannot be represented in JSON Schema")},xr=(t,o,n,c)=>{F(t,o,n,c,"Void cannot be represented in JSON Schema")},yr=(t,o,n,c)=>{n.not={}},br=(t,o,n,c)=>{},zr=(t,o,n,c)=>{},vr=(t,o,n,c)=>{F(t,o,n,c,"Date cannot be represented in JSON Schema")},$r=(t,o,n,c)=>{let u=t._zod.def,p=Ue(u.entries);if(p.length===0){n.not={};return}if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";n.enum=p},wr=(t,o,n,c)=>{let u=t._zod.def;if(u.values.length===0){n.not={};return}let p=[];for(let f of u.values)if(f===void 0){if(F(t,o,n,c,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof f==="bigint"){if(F(t,o,n,c,"BigInt literals cannot be represented in JSON Schema"))return;p.push(Number(f))}else p.push(f);if(p.length===0);else if(p.length===1){let f=p[0];if(n.type=f===null?"null":typeof f,o.target==="draft-04"||o.target==="openapi-3.0")n.enum=[f];else n.const=f}else{if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";if(p.every((f)=>typeof f==="boolean"))n.type="boolean";if(p.every((f)=>f===null))n.type="null";n.enum=p}},Fs=(t,o,n,c)=>{F(t,o,n,c,"NaN cannot be represented in JSON Schema")},Us=(t,o,n,c)=>{let u=n,p=t._zod.pattern;if(!p)throw Error("Pattern not found in template literal");u.type="string",u.pattern=p.source},Ms=(t,o,n,c)=>{let u=n,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:h,mime:y}=t._zod.bag;if(f!==void 0)p.minLength=f;if(h!==void 0)p.maxLength=h;if(y)if(y.length===1)p.contentMediaType=y[0],Object.assign(u,p);else Object.assign(u,p),u.anyOf=y.map((b)=>({contentMediaType:b}));else Object.assign(u,p)},Js=(t,o,n,c)=>{n.type="boolean"},kr=(t,o,n,c)=>{F(t,o,n,c,"Custom types cannot be represented in JSON Schema")},Bs=(t,o,n,c)=>{F(t,o,n,c,"Function types cannot be represented in JSON Schema")},Zr=(t,o,n,c)=>{F(t,o,n,c,"Transforms cannot be represented in JSON Schema")},Vs=(t,o,n,c)=>{F(t,o,n,c,"Map cannot be represented in JSON Schema")},Ks=(t,o,n,c)=>{F(t,o,n,c,"Set cannot be represented in JSON Schema")},Pr=(t,o,n,c)=>{let u=n,p=t._zod.def,{minimum:f,maximum:h}=t._zod.bag;if(typeof f==="number")u.minItems=f;if(typeof h==="number")u.maxItems=h;u.type="array",u.items=C(p.element,o,{...c,path:[...c.path,"items"]})};function Le(t){let o=t._zod.def;if(o.type==="pipe"&&o.in._zod.traits.has("$ZodTransform"))return Le(o.out);if(o.type==="catch")return Le(o.innerType);return t._zod.optin}var Sr=(t,o,n,c)=>{let u=n,p=t._zod.def,f=p.shape;if(Object.getOwnPropertySymbols(f).length&&F(t,o,u,c,"Symbol keys cannot be represented in JSON Schema"))return;u.type="object",u.properties={};for(let z in f)L(u.properties,z,C(f[z],o,{...c,path:[...c.path,"properties",z]}));let y=new Set(Object.keys(f)),b=new Set([...y].filter((z)=>{let w=p.shape[z];if(o.io==="input")return Le(w)===void 0;else return w._zod.optout===void 0}));if(b.size>0)u.required=Array.from(b);if(p.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!p.catchall){if(o.io==="output")u.additionalProperties=!1}else if(p.catchall)u.additionalProperties=C(p.catchall,o,{...c,path:[...c.path,"additionalProperties"]})},Or=(t,o,n,c)=>{let u=t._zod.def,p=u.inclusive===!1,f=u.options.map((h,y)=>C(h,o,{...c,path:[...c.path,p?"oneOf":"anyOf",y]}));if(p)n.oneOf=f;else n.anyOf=f},Ir=(t,o,n,c)=>{let u=t._zod.def,p=C(u.left,o,{...c,path:[...c.path,"allOf",0]}),f=C(u.right,o,{...c,path:[...c.path,"allOf",1]}),h=(b)=>("allOf"in b)&&Object.keys(b).length===1,y=[...h(p)?p.allOf:[p],...h(f)?f.allOf:[f]];n.allOf=y,o.intersections.push(y)},Er=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="array";let f=o.target==="draft-2020-12"?"prefixItems":"items",h=o.target==="draft-2020-12"?"items":o.target==="openapi-3.0"?"items":"additionalItems",y=p.items.map((O,I)=>C(O,o,{...c,path:[...c.path,f,I]})),b=p.rest?C(p.rest,o,{...c,path:[...c.path,h,...o.target==="openapi-3.0"?[p.items.length]:[]]}):null,z=p.items.length;while(z>0){let O=p.items[z-1];if(!(o.io==="input"?Le(O)!==void 0:O._zod.optout==="optional"))break;z--}let w=p.items.length,k=!p.rest;if(o.target==="draft-2020-12"){if(u.prefixItems=y,k)u.items=!1;else if(b)u.items=b;if(z>0)u.minItems=z;if(k)u.maxItems=w}else if(o.target==="openapi-3.0"){if(u.items={anyOf:y},b)u.items.anyOf.push(b);if(z>0)u.minItems=z;if(k)u.maxItems=w}else{if(u.items=y,k)u.additionalItems=!1;else if(b)u.additionalItems=b;if(z>0)u.minItems=z;if(k)u.maxItems=w}let{minimum:Z,maximum:P}=t._zod.bag;if(typeof Z==="number")u.minItems=Z;if(typeof P==="number")u.maxItems=P};function pr(t,o,n){if(o.$ref){if(n.has(o))return o;n.add(o);let P=t.get(o)?.def;if(!P)return o;let O=pr(t,P,n);return O===P?o:O}for(let P of["anyOf","oneOf"]){let O=o[P];if(!Array.isArray(O))continue;let I=O.map((J)=>pr(t,J,n));if(I.some((J,q)=>J!==O[q]))o={...o,[P]:I}}let c=Array.isArray(o.type)?o.type:[o.type],u=!c.includes("string")&&c.some((P)=>P==="number"||P==="integer"),p=o.enum??(o.const!==void 0?[o.const]:void 0);if(!u&&!p?.some((P)=>typeof P==="number"))return o;let{minimum:f,maximum:h,exclusiveMinimum:y,exclusiveMaximum:b,multipleOf:z,format:w,id:k,...Z}=o;if(Z.enum)Z.enum=Z.enum.map((P)=>typeof P==="number"?String(P):P);else if(typeof Z.const==="number")Z.const=String(Z.const);if(!u)return Z;if(Z.type="string",!p)Z.pattern=(c.includes("number")?Ee:Ge).source;return Z}var fr=new WeakMap;function fu(t){let o=new Map;for(let c of t.seen.values())if(c.def&&!o.has(c.schema))o.set(c.schema,c);let n=new Map;for(let c of fr.get(t)??[]){let u=t.seen.get(c),p=(u?.def??u?.schema)?.propertyNames;if(!p||p===!0||n.has(p))continue;let f=pr(o,p,new Set);if(f!==p)n.set(p,f)}if(!n.size)return;for(let c of t.seen.values())for(let u of[c.schema,c.def]){let p=u&&n.get(u.propertyNames);if(p)u.propertyNames=p}}var Tr=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="object";let f=p.keyType,y=f._zod.bag?.patterns;if(p.mode==="loose"&&y&&y.size>0){let w=C(p.valueType,o,{...c,path:[...c.path,"patternProperties","*"]});u.patternProperties={};for(let k of y)L(u.patternProperties,k.source,w)}else{if(o.target==="draft-07"||o.target==="draft-2020-12"){u.propertyNames=C(p.keyType,o,{...c,path:[...c.path,"propertyNames"]});let w=fr.get(o);if(!w)w=[],fr.set(o,w),o.deferred.push(()=>fu(o));w.push(t)}u.additionalProperties=C(p.valueType,o,{...c,path:[...c.path,"additionalProperties"]})}let b=f._zod.values,z=o.io==="input"&&Le(p.valueType)!==void 0;if(b&&!p.partial&&!z){let w=[...b].filter((k)=>typeof k==="string"||typeof k==="number");if(w.length>0)u.required=w.map(String)}},Ar=(t,o,n,c)=>{let u=t._zod.def,p=C(u.innerType,o,c),f=o.seen.get(t);if(o.target==="openapi-3.0")f.ref=u.innerType,n.nullable=!0;else n.anyOf=[p,{type:"null"}]},Nr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Cr=Symbol();function Ws(t,o,n,c,u){let p=!1,f=JSON.stringify(t,(h,y)=>{if(typeof y!=="bigint")return y;return p=!0,null});if(!p)return JSON.parse(f);return F(o,n,c,u,"BigInt defaults cannot be represented in JSON Schema"),Cr}var jr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f=Ws(u.defaultValue,t,o,n,c);if(f!==Cr)n.default=f},Rr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);if(p.ref=u.innerType,o.io!=="input")return;let f=Ws(u.defaultValue,t,o,n,c);if(f!==Cr)n._prefault=f},Dr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{F(t,o,n,c,"Dynamic catch values are not supported in JSON Schema");return}n.default=f},Lr=(t,o,n,c)=>{let u=t._zod.def,p=u.in._zod.traits.has("$ZodTransform"),f=o.io==="input"?p?u.out:u.in:u.out;C(f,o,c);let h=o.seen.get(t);h.ref=f},Ur=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType,n.readOnly=!0},Gs=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},it=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Mr=(t,o,n,c)=>{let u=t._zod.innerType;C(u,o,c);let p=o.seen.get(t);p.ref=u},Rs={string:dr,number:mr,boolean:hr,bigint:_r,symbol:Ds,null:gr,undefined:Ls,void:xr,never:yr,any:br,unknown:zr,date:vr,enum:$r,literal:wr,nan:Fs,template_literal:Us,file:Ms,success:Js,custom:kr,function:Bs,transform:Zr,map:Vs,set:Ks,array:Pr,object:Sr,union:Or,intersection:Ir,tuple:Er,record:Tr,nullable:Ar,nonoptional:Nr,default:jr,prefault:Rr,catch:Dr,pipe:Lr,readonly:Ur,promise:Gs,optional:it,lazy:Mr};function ea(t,o){if("_idmap"in t){let c=t,u=je({...o,processors:Rs}),p={};for(let y of c._idmap.entries()){let[b,z]=y;C(z,u)}let f={},h={registry:c,uri:o?.uri,defs:p};u.external=h;for(let y of c._idmap.entries()){let[b,z]=y;Re(u,z),L(f,b,De(u,z))}if(Object.keys(p).length>0){let y=u.target==="draft-2020-12"?"$defs":"definitions";f.__shared={[y]:p}}return{schemas:f}}let n=je({...o,processors:Rs});return C(t,n),Re(n,t),De(n,t)}var qs=new WeakSet([Object.prototype,Error.prototype]);function st(t,o,n){Object.defineProperty(t,o,{configurable:!0,enumerable:!1,get(){let c=n(this);return Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0})}})}var zu=(t,o)=>{Xs.init(t,o),t.name="ZodError";let n=Object.getPrototypeOf(t);if(qs.has(n))return;qs.add(n),st(n,"format",(c)=>(u)=>kt(c,u)),st(n,"flatten",(c)=>(u)=>wt(c,u)),st(n,"addIssue",(c)=>(u)=>{c.issues.push(u),c.message=JSON.stringify(c.issues,we,2)}),st(n,"addIssues",(c)=>(u)=>{c.issues.push(...u),c.message=JSON.stringify(c.issues,we,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var G=v("ZodError",zu,void 0,{Parent:Error});var Ys=Ke(G),Hs=We(G),vu=Pe(G),wu=Ie(G),Qs=$o(G),ec=wo(G),tc=ko(G),rc=Zo(G),oc=Po(G),nc=So(G),ic=Oo(G),sc=Io(G);function ku(){if(!B.localeError)W(Vt())}function Fe(){if(!B.memoizer)W({memoizer:Bt()})}var N=v("ZodType",(t,o)=>(ku(),A.init(t,o),t.def=o,t.type=o.type,t),{check(...t){let o=this.def;return this.clone(ae(o,{checks:[...o.checks??[],...t.map((n)=>typeof n==="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,o){return Y(this,t,o)},brand(){return this},register(t,o){return t.add(this,o),this},refine(t,o){return this.check(ma(t,o))},superRefine(t,o){return this.check(ha(t,o))},overwrite(t){return this.check(fe(t))},optional(){return Se(this)},exactOptional(){return Hu(this)},nullable(){return s(this)},nullish(){return Se(s(this))},nonoptional(t){return ca(this,t)},array(){return a(this)},or(t){return T([this,t])},and(t){return Es(this,t)},transform(t){return uc(this,bc(t))},default(t){return na(this,t)},prefault(t){return sa(this,t)},catch(t){return aa(this,t)},pipe(t){return uc(this,t)},readonly(){return fa(this)},describe(t){let o=this.clone();return pe.add(o,{description:t}),o},meta(...t){if(t.length===0)return pe.get(this);let o=this.clone();return pe.add(o,t[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...o){return o.length===0?t(this):t(this,...o)},get "~standard"(){return gt(this,"~standard",{...Rt(this),jsonSchema:{input:Ce(this,"input"),output:Ce(this,"output")}})},set "~standard"(t){de(this,"~standard",t)},parse:function t(o,n){return Ys(this,o,n,{callee:t})},parseAsync:async function t(o,n){return await Hs(this,o,n,{callee:t})},safeParse(t,o){return vu(this,t,o)},async safeParseAsync(t,o){return wu(this,t,o)},get spa(){return this?.safeParseAsync},set spa(t){de(this,"spa",t)},encode:function t(o,n){return Qs(this,o,n,{callee:t})},decode:function t(o,n){return ec(this,o,n,{callee:t})},encodeAsync:async function t(o,n){return await tc(this,o,n,{callee:t})},decodeAsync:async function t(o,n){return await rc(this,o,n,{callee:t})},safeEncode(t,o){return oc(this,t,o)},safeDecode(t,o){return nc(this,t,o)},async safeEncodeAsync(t,o){return ic(this,t,o)},async safeDecodeAsync(t,o){return sc(this,t,o)},toJSONSchema(t){return js(this,{})(t)},get description(){return pe.get(this)?.description},get _def(){return this._zod.def}}),ac=v("_ZodString",(t,o)=>{He.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>dr(t,c,u,p);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null},{regex(...t){return this.check(Ht(...t))},includes(...t){return this.check(tr(...t))},startsWith(...t){return this.check(rr(...t))},endsWith(...t){return this.check(nr(...t))},min(...t){return this.check(ze(...t))},max(...t){return this.check(ot(...t))},length(...t){return this.check(nt(...t))},nonempty(...t){return this.check(ze(1,...t))},lowercase(t){return this.check(Qt(t))},uppercase(t){return this.check(er(t))},trim(){return this.check(sr())},normalize(...t){return this.check(ir(...t))},toLowerCase(){return this.check(cr())},toUpperCase(){return this.check(ur())},slugify(){return this.check(ar())}}),Jr=v("ZodString",(t,o)=>{He.init(t,o),ac.init(t,o)},{email(t){return this.check(Kt(mc,t))},url(t){return this.check(Wt(hc,t))},jwt(t){return this.check(ps(Lu,t))},emoji(t){return this.check(Qi(Pu,t))},guid(t){return this.check(Gi(Zu,t))},uuid(t){return this.check(qi(ct,t))},uuidv4(t){return this.check(Yi(ct,t))},uuidv6(t){return this.check(Xi(ct,t))},uuidv7(t){return this.check(Hi(ct,t))},nanoid(t){return this.check(es(Su,t))},cuid(t){return this.check(ts(Ou,t))},cuid2(t){return this.check(rs(Iu,t))},ulid(t){return this.check(os(Eu,t))},base64(t){return this.check(us(ju,t))},base64url(t){return this.check(as(Ru,t))},xid(t){return this.check(ns(Tu,t))},ksuid(t){return this.check(is(Au,t))},ipv4(t){return this.check(Gt(_c,t))},ipv6(t){return this.check(qt(gc,t))},cidrv4(t){return this.check(ss(Nu,t))},cidrv6(t){return this.check(cs(Cu,t))},e164(t){return this.check(ls(Du,t))},datetime(t){return this.check(tt(Br,t))},date(t){return this.check(rt(Vr,t))},time(t){return this.check(Yt(lc,t))},duration(t){return this.check(Xt(dc,t))}});function e(t){return Ki(Jr,t)}var D=v("ZodStringFormat",(t,o)=>{j.init(t,o),ac.init(t,o)}),Br=v("ZodISODateTime",(t,o)=>{Kn.init(t,o),D.init(t,o)}),Vr=v("ZodISODate",(t,o)=>{Wn.init(t,o),D.init(t,o)}),lc=v("ZodISOTime",(t,o)=>{Gn.init(t,o),D.init(t,o)}),dc=v("ZodISODuration",(t,o)=>{qn.init(t,o),D.init(t,o)}),mc=v("ZodEmail",(t,o)=>{Cn.init(t,o),D.init(t,o)});function po(t){return Kt(mc,t)}var Zu=v("ZodGUID",(t,o)=>{An.init(t,o),D.init(t,o)});var ct=v("ZodUUID",(t,o)=>{Nn.init(t,o),D.init(t,o)});var hc=v("ZodURL",(t,o)=>{Dn.init(t,o),D.init(t,o)});function ta(t){return Wt(hc,t)}var Pu=v("ZodEmoji",(t,o)=>{Ln.init(t,o),D.init(t,o)});var Su=v("ZodNanoID",(t,o)=>{Fn.init(t,o),D.init(t,o)});var Ou=v("ZodCUID",(t,o)=>{Un.init(t,o),D.init(t,o)});var Iu=v("ZodCUID2",(t,o)=>{Mn.init(t,o),D.init(t,o)});var Eu=v("ZodULID",(t,o)=>{Jn.init(t,o),D.init(t,o)});var Tu=v("ZodXID",(t,o)=>{Bn.init(t,o),D.init(t,o)});var Au=v("ZodKSUID",(t,o)=>{Vn.init(t,o),D.init(t,o)});var _c=v("ZodIPv4",(t,o)=>{Yn.init(t,o),D.init(t,o)});function fc(t){return Gt(_c,t)}var gc=v("ZodIPv6",(t,o)=>{Hn.init(t,o),D.init(t,o)});function af(t){return qt(gc,t)}var Nu=v("ZodCIDRv4",(t,o)=>{Qn.init(t,o),D.init(t,o)});var Cu=v("ZodCIDRv6",(t,o)=>{ei.init(t,o),D.init(t,o)});var ju=v("ZodBase64",(t,o)=>{ri.init(t,o),D.init(t,o)});var Ru=v("ZodBase64URL",(t,o)=>{oi.init(t,o),D.init(t,o)});var Du=v("ZodE164",(t,o)=>{ni.init(t,o),D.init(t,o)});var Lu=v("ZodJWT",(t,o)=>{ii.init(t,o),D.init(t,o)});var at=v("ZodNumber",(t,o)=>{Dt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>mr(t,c,u,p);let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),t.isFinite=!0,t.format=n.format??null},{gt(t,o){return this.check(be(t,o))},gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(se(t,o))},max(t,o){return this.check(se(t,o))},int(t){return this.check(m(t))},safe(t){return this.check(m(t))},positive(t){return this.check(be(0,t))},nonnegative(t){return this.check(ce(0,t))},negative(t){return this.check(ye(0,t))},nonpositive(t){return this.check(se(0,t))},multipleOf(t,o){return this.check(Ae(t,o))},step(t,o){return this.check(Ae(t,o))},finite(){return this}});function i(t){return fs(at,t)}var Fu=v("ZodNumberFormat",(t,o)=>{si.init(t,o),at.init(t,o)});function m(t){return ms(Fu,t)}var Kr=v("ZodBoolean",(t,o)=>{ci.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>hr(t,n,c,u)});function d(t){return hs(Kr,t)}var xc=v("ZodBigInt",(t,o)=>{ui.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>_r(t,c,u,p);let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null},{gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},gt(t,o){return this.check(be(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(se(t,o))},max(t,o){return this.check(se(t,o))},positive(t){return this.check(be(BigInt(0),t))},negative(t){return this.check(ye(BigInt(0),t))},nonpositive(t){return this.check(se(BigInt(0),t))},nonnegative(t){return this.check(ce(BigInt(0),t))},multipleOf(t,o){return this.check(Ae(t,o))}});var Uu=v("ZodNull",(t,o)=>{ai.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>gr(t,n,c,u)});function mo(t){return xs(Uu,t)}var Mu=v("ZodAny",(t,o)=>{li.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>br(t,n,c,u)});function x(){return ys(Mu)}var Ju=v("ZodUnknown",(t,o)=>{pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>zr(t,n,c,u)});function U(){return bs(Ju)}var Bu=v("ZodNever",(t,o)=>{fi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>yr(t,n,c,u)});function lf(t){return zs(Bu,t)}var Vu=v("ZodVoid",(t,o)=>{di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>xr(t,n,c,u)});function Ct(t){return vs(Vu,t)}var Wr=v("ZodDate",(t,o)=>{mi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>vr(t,c,u,p),t.min=(c,u)=>t.check(ce(c,u)),t.max=(c,u)=>t.check(se(c,u));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function ee(t){return $s(Wr,t)}var Ku=v("ZodArray",(t,o)=>{Fe(),hi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Pr(t,n,c,u),t.element=o.element},{min(t,o){return this.check(ze(t,o))},nonempty(t){return this.check(ze(1,t))},max(t,o){return this.check(ot(t,o))},length(t,o){return this.check(nt(t,o))},unwrap(){return this.element}});function a(t,o){return ks(Ku,t,o)}var Ai=v("ZodObject",(t,o)=>{Fe(),bi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Sr(t,n,c,u),Rc(t,"shape",(n)=>n._zod.def.shape,!1)},{keyof(){return g(Object.keys(this._zod.def.shape))},catchall(t){return this.clone({...this._zod.def,catchall:t})},passthrough(){return this.clone({...this._zod.def,catchall:U()})},loose(){return this.clone({...this._zod.def,catchall:U()})},strict(){return this.clone({...this._zod.def,catchall:lf()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(t){return Oc(this,t)},safeExtend(t){return Ic(this,t)},merge(t){return Ec(this,t)},pick(t){return Pc(this,t)},omit(t){return Sc(this,t)},partial(...t){return ao(_i,this,t[0])},exactPartial(...t){return ao(zc,this,t[0],"exactPartial")},required(...t){return Tc(vc,this,t[0])}});function r(t,o){let n={type:"object",shape:t??{},...S(o)};return new Ai(n)}function oe(t,o){return new Ai({type:"object",shape:t,catchall:U(),...S(o)})}var yc=v("ZodUnion",(t,o)=>{Lt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Or(t,n,c,u),t.options=o.options});function T(t,o){return new yc({type:"union",options:t,...S(o)})}var Wu=v("ZodDiscriminatedUnion",(t,o)=>{yc.init(t,o),zi.init(t,o)});function re(t,o,n){return new Wu({type:"union",options:o,discriminator:t,...S(n)})}var Gu=v("ZodIntersection",(t,o)=>{vi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ir(t,n,c,u)});function Es(t,o){return new Gu({type:"intersection",left:t,right:o})}var qu=v("ZodTuple",(t,o)=>{Fe(),$i.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Er(t,n,c,u)},{rest(t){return this.clone({...this._zod.def,rest:t})},partial(){let t=this._zod.def;if(t.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...t,items:t.items.map((o)=>new _i({type:"optional",innerType:o}))})}});function Ua(t,o,n){let c=o instanceof A,u=c?n:o;return new qu({type:"tuple",items:t,rest:c?o:null,...S(u)})}var cc=v("ZodRecord",(t,o)=>{Fe(),wi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Tr(t,n,c,u),t.keyType=o.keyType,t.valueType=o.valueType});function _(t,o,n){if(!o||!o._zod)return new cc({type:"record",keyType:e(),valueType:t,...S(o)});return new cc({type:"record",keyType:t,valueType:o,...S(n)})}var ut=v("ZodEnum",(t,o)=>{ki.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>$r(t,c,u,p),t.enum=o.entries,t.options=Object.values(o.entries);let n=new Set(Object.keys(o.entries));t.extract=(c,u)=>{let p={};for(let f of c)if(n.has(f))p[f]=o.entries[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...S(u),entries:p})},t.exclude=(c,u)=>{let p={...o.entries};for(let f of c)if(n.has(f))delete p[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...S(u),entries:p})}});function g(t,o){let n=Array.isArray(t)?Object.fromEntries(t.map((c)=>[c,c])):t;return new ut({type:"enum",entries:n,...S(o)})}function or(t,o){return new ut({type:"enum",entries:t,...S(o)})}var Yu=v("ZodLiteral",(t,o)=>{Zi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>wr(t,n,c,u),t.values=new Set(o.values),Object.defineProperty(t,"value",{get(){if(o.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return o.values[0]}})});function l(t,o){return new Yu({type:"literal",values:Array.isArray(t)?t:[t],...S(o)})}var Xu=v("ZodTransform",(t,o)=>{Fe(),Pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Zr(t,n,c,u),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);n.addIssue=(p)=>{if(typeof p==="string")n.issues.push(_e(p,n.value,o));else{let f=p;if(f.fatal)f.continue=!1;if(f.code??(f.code="custom"),!("input"in f))f.input=n.value;f.inst??(f.inst=t),n.issues.push(_e(f))}};let u=o.transform(n.value,n);if(u instanceof Promise)return u.then((p)=>(n.value=p,n));return n.value=u,n}});function bc(t){return new Xu({type:"transform",transform:t})}var _i=v("ZodOptional",(t,o)=>{Ft.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Se(t){return new _i({type:"optional",innerType:t})}var zc=v("ZodExactOptional",(t,o)=>{Si.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Hu(t){return new zc({type:"optional",innerType:t})}var Qu=v("ZodNullable",(t,o)=>{Oi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ar(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function s(t){return new Qu({type:"nullable",innerType:t})}var oa=v("ZodDefault",(t,o)=>{Ii.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>jr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function na(t,o){return new oa({type:"default",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var ia=v("ZodPrefault",(t,o)=>{Ei.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Rr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function sa(t,o){return new ia({type:"prefault",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var vc=v("ZodNonOptional",(t,o)=>{Ti.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Nr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function ca(t,o){return new vc({type:"nonoptional",innerType:t,...S(o)})}var ua=v("ZodCatch",(t,o)=>{Ni.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Dr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function aa(t,o){return new ua({type:"catch",innerType:t,catchValue:typeof o==="function"?o:_o(o)})}var $c=v("ZodPipe",(t,o)=>{Ut.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Lr(t,n,c,u),t.in=o.in,t.out=o.out});function uc(t,o){return new $c({type:"pipe",in:t,out:o})}var la=v("ZodPreprocess",(t,o)=>{$c.init(t,o),Ci.init(t,o)}),pa=v("ZodReadonly",(t,o)=>{ji.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ur(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function fa(t){return new pa({type:"readonly",innerType:t})}var da=v("ZodLazy",(t,o)=>{Ri.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Mr(t,n,c,u),t.unwrap=()=>t._zod.def.getter()});function yt(t){return new da({type:"lazy",getter:t})}var Gr=v("ZodCustom",(t,o)=>{Di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>kr(t,n,c,u)});function At(t,o){return Zs(Gr,t??(()=>!0),o)}function ma(t,o={}){return Ps(Gr,t,o)}function ha(t,o){return Ss(t,o)}function xu(t,o={}){let n=new Gr({type:"custom",check:"custom",fn:(c)=>c instanceof t,abort:!0,...S(o)});return n._zod.bag.Class=t,n._zod.check=(c)=>{if(!(c.value instanceof t))c.issues.push({code:"invalid_type",expected:t.name,input:c.value,inst:n,path:[...n._zod.def.path??[]]})},n}function ra(t){let o=yt(()=>T([e(t),i(),d(),mo(),a(o),_(e(),o)]));return o}function yi(t,o){return new la({type:"pipe",in:bc(t),out:o})}var Cs={};Oe(Cs,{bigint:()=>ga,boolean:()=>pc,date:()=>xa,number:()=>cm,string:()=>lm});function lm(t){return Wi(Jr,t)}function cm(t){return ds(at,t)}function pc(t){return _s(Kr,t)}function ga(t){return gs(xc,t)}function xa(t){return ws(Wr,t)}function X(t){return tt(Br,t)}function bA(t){return rt(Vr,t)}export{Fr,Xs,sf,ea,vu,wu,e,po,ta,fc,af,i,m,d,mo,x,U,lf,Ct,ee,a,Ai,r,oe,T,re,Es,Ua,_,g,or,l,_i,Se,s,yt,At,xu,ra,yi,X,bA,lm,cm,pc,Cs};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-jh8q3885.js";var a=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],qi=I("link",a);
1
+ import{I}from"./chunk-q6jsw0rr.js";var a=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],qi=I("link",a);
2
2
  export{qi};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Zn}from"./chunk-hxyg5q2a.js";var r=/"/g,n=/[\\'"]/g;class el extends Zn{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}sanitizeJSONPathMemberValue(e){return e.replace(n,(t)=>t==="\\"?"\\\\":t==="'"?"''":"\\\"")}visitDefaultInsertValue(e){this.append("null")}}class ra{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}class tl extends ra{get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}
3
- export{ra,el,tl};
2
+ import{Zn}from"./chunk-njabdtvb.js";var r=/"/g,n=/[\\'"]/g;class el extends Zn{visitOrAction(e){this.append("or "),this.append(e.action)}getCurrentParameterPlaceholder(){return"?"}getLeftExplainOptionsWrapper(){return""}getRightExplainOptionsWrapper(){return""}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}sanitizeIdentifier(e){return e.replace(r,'""')}sanitizeJSONPathMemberValue(e){return e.replace(n,(t)=>t==="\\"?"\\\\":t==="'"?"''":"\\\"")}visitDefaultInsertValue(e){this.append("null")}}class na{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!1}get supportsOutput(){return!1}}class tl extends na{get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(e,t){}async releaseMigrationLock(e,t){}}
3
+ export{na,el,tl};