@shumai-one/shumai 0.4.3 → 0.4.4

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 (168) hide show
  1. package/bin/chunk-071x515q.js +4 -0
  2. package/bin/chunk-0cmx7k4c.js +1 -0
  3. package/bin/{chunk-cqb415s6.js → chunk-0qaq0sp8.js} +2 -2
  4. package/bin/chunk-0qjfahk9.js +2 -0
  5. package/bin/{chunk-9t1ne8xr.js → chunk-0zv3bks2.js} +2 -2
  6. package/bin/chunk-16xax8kk.js +1 -0
  7. package/bin/chunk-1gvscz88.js +5 -0
  8. package/bin/{chunk-6gg1ymer.js → chunk-1j27fzy1.js} +2 -2
  9. package/bin/chunk-1t167cvj.js +11 -0
  10. package/bin/{chunk-pb1zf0vb.js → chunk-1xh34aew.js} +2 -2
  11. package/bin/{chunk-zmv8cg4s.js → chunk-1zwajpwf.js} +3 -3
  12. package/bin/chunk-2w5xqhjm.js +1 -0
  13. package/bin/{chunk-f3ehv01n.js → chunk-3tedzb2j.js} +26 -26
  14. package/bin/{chunk-zehyn6vd.js → chunk-3ttrhqy3.js} +2 -2
  15. package/bin/chunk-3zkasqb8.js +1 -0
  16. package/bin/chunk-453ykvaw.js +2 -0
  17. package/bin/{chunk-3cyrcgm5.js → chunk-4991gz3y.js} +9 -9
  18. package/bin/chunk-4hkkdm2q.js +2 -0
  19. package/bin/chunk-4mjywsj8.js +3 -0
  20. package/bin/{chunk-cnxwmycy.js → chunk-4v41a1r9.js} +3 -3
  21. package/bin/{chunk-87zxtf66.js → chunk-4wy87hwd.js} +2 -2
  22. package/bin/{chunk-sfx2588q.js → chunk-579e4wv4.js} +2 -2
  23. package/bin/{chunk-1yacmegc.js → chunk-5adsx8x4.js} +2 -2
  24. package/bin/{chunk-b235azv4.js → chunk-5hg6kcfz.js} +13 -13
  25. package/bin/{chunk-rbj4fad9.js → chunk-5nm2jvg5.js} +13 -13
  26. package/bin/chunk-5tcdwep5.js +11 -0
  27. package/bin/chunk-5vzrpz50.js +2 -0
  28. package/bin/chunk-6ghcj4a9.js +3 -0
  29. package/bin/{chunk-b9yrw9et.js → chunk-77fmkpdz.js} +4 -4
  30. package/bin/chunk-7bcxj1jd.js +2 -0
  31. package/bin/{chunk-qf24e71w.js → chunk-7gmdnsdg.js} +1 -1
  32. package/bin/{chunk-fxswt9hc.js → chunk-7jtmwt5a.js} +2 -2
  33. package/bin/chunk-7kjgvxqa.js +2 -0
  34. package/bin/{chunk-bay038pj.js → chunk-7pw1550a.js} +2 -2
  35. package/bin/chunk-7rhz2gze.js +211 -0
  36. package/bin/chunk-837fky18.js +3 -0
  37. package/bin/chunk-84as6x83.js +1 -0
  38. package/bin/chunk-8e28hcny.js +2 -0
  39. package/bin/{chunk-k7hss0bd.js → chunk-914bp49r.js} +3 -3
  40. package/bin/chunk-97f2af6d.js +12 -0
  41. package/bin/{chunk-4r81ghg8.js → chunk-98715kc3.js} +2 -2
  42. package/bin/chunk-9ccw540k.js +2 -0
  43. package/bin/{chunk-ag6p3mbf.js → chunk-9t8n2des.js} +2 -2
  44. package/bin/chunk-9ybt6vbm.js +1 -0
  45. package/bin/{chunk-f15qyp41.js → chunk-a6gx7f5q.js} +1 -1
  46. package/bin/chunk-avwgktxb.js +2 -0
  47. package/bin/chunk-bkr5zm4h.js +2 -0
  48. package/bin/{chunk-2yxj593j.js → chunk-cbgq517y.js} +2 -2
  49. package/bin/chunk-d27mm390.js +1 -0
  50. package/bin/{chunk-185qefn1.js → chunk-dj92fss9.js} +2 -2
  51. package/bin/{chunk-v9w25rp2.js → chunk-dqxeztfa.js} +2 -2
  52. package/bin/chunk-drepsbb4.js +2 -0
  53. package/bin/chunk-f6svp4dp.js +2 -0
  54. package/bin/{chunk-q2bvyv39.js → chunk-fahk9h62.js} +2 -2
  55. package/bin/{chunk-v9b3w8q5.js → chunk-fb40xxz3.js} +2 -2
  56. package/bin/chunk-fnmwksnb.js +3 -0
  57. package/bin/chunk-fpc4p0j8.js +3 -0
  58. package/bin/{chunk-aqbrzx9z.js → chunk-fsyzs0tf.js} +1 -1
  59. package/bin/{chunk-e2mvmq2m.js → chunk-fxecgp5k.js} +1 -1
  60. package/bin/{chunk-wfzqnpc1.js → chunk-g3fpmyyn.js} +2 -2
  61. package/bin/{chunk-ehc9adfz.js → chunk-gc5sbfa5.js} +2 -2
  62. package/bin/chunk-gdm6yfqq.js +2 -0
  63. package/bin/{chunk-ea79xnn3.js → chunk-gk2q9a3f.js} +2 -2
  64. package/bin/{chunk-jje8nj8h.js → chunk-gt4csat6.js} +2 -2
  65. package/bin/chunk-gye8gabk.js +2 -0
  66. package/bin/{chunk-wry2hvrq.js → chunk-hk5rc6cd.js} +2 -2
  67. package/bin/{chunk-zqv0zhfb.js → chunk-hm0dkzed.js} +2 -2
  68. package/bin/chunk-hmpwg5za.js +16 -0
  69. package/bin/{chunk-rpywcvg1.js → chunk-j1tkmcae.js} +2 -2
  70. package/bin/chunk-j2bvj2yn.js +2 -0
  71. package/bin/chunk-jffktpqg.js +1 -0
  72. package/bin/chunk-jgs8an3h.js +18 -0
  73. package/bin/{chunk-8fmy5jtp.js → chunk-jmpb5633.js} +1 -1
  74. package/bin/{chunk-xp59apdb.js → chunk-jrjnqx78.js} +1 -1
  75. package/bin/chunk-k2k9vjq6.js +1 -0
  76. package/bin/{chunk-32pcmaqm.js → chunk-kpgfqkp0.js} +2 -2
  77. package/bin/{chunk-twdxayky.js → chunk-ks8xzc95.js} +2 -2
  78. package/bin/{chunk-qwqvt9v6.js → chunk-kswvyqq1.js} +2 -2
  79. package/bin/{chunk-gk3eqd50.js → chunk-m9pr03kn.js} +2 -2
  80. package/bin/chunk-mfn9qjm4.js +2 -0
  81. package/bin/{chunk-e99dv20z.js → chunk-msfw3jmc.js} +2 -2
  82. package/bin/chunk-mz0yjra0.js +5 -0
  83. package/bin/chunk-nbdw8fen.js +1 -0
  84. package/bin/{chunk-cak32x57.js → chunk-nkdk229f.js} +1 -1
  85. package/bin/chunk-nr20tvnw.js +3 -0
  86. package/bin/{chunk-ck8azecb.js → chunk-pazjhrnf.js} +5 -5
  87. package/bin/chunk-q806pqeh.js +1 -0
  88. package/bin/{chunk-abt0azmv.js → chunk-qka4mkmj.js} +2 -2
  89. package/bin/{chunk-0e4wawpq.js → chunk-qsr1a0rp.js} +1 -1
  90. package/bin/chunk-rchsme43.js +3 -0
  91. package/bin/{chunk-tf28796q.js → chunk-reyxk4bw.js} +1 -1
  92. package/bin/{chunk-av1a8fqp.js → chunk-rhvv1vvk.js} +2 -2
  93. package/bin/{chunk-a32vreya.js → chunk-rq0n0vcc.js} +2 -2
  94. package/bin/chunk-rqf7999q.js +42 -0
  95. package/bin/chunk-rssgmj7x.js +2 -0
  96. package/bin/chunk-ryzz5fht.js +2 -0
  97. package/bin/chunk-s2fnfyn9.js +2 -0
  98. package/bin/{chunk-83e12sjg.js → chunk-s2k4qntr.js} +2 -2
  99. package/bin/{chunk-c007p0t8.js → chunk-snhsjs4x.js} +56 -56
  100. package/bin/{chunk-j8fxp8ej.js → chunk-t2hy6tj9.js} +1 -1
  101. package/bin/chunk-t7nsgg5k.js +4 -0
  102. package/bin/chunk-tm7f32c7.js +14 -0
  103. package/bin/{chunk-2291ehh5.js → chunk-trveq4wg.js} +2 -2
  104. package/bin/chunk-vap4k11j.js +20 -0
  105. package/bin/chunk-vm5fx7td.js +3 -0
  106. package/bin/chunk-vy8gntez.js +1 -0
  107. package/bin/{chunk-awfwk64v.js → chunk-vyzptrea.js} +2 -2
  108. package/bin/{chunk-hfh0c082.js → chunk-w4ghe71n.js} +1 -1
  109. package/bin/chunk-wdsf44hs.js +2 -0
  110. package/bin/chunk-wjyaezs7.js +2 -0
  111. package/bin/{chunk-3a13dcs1.js → chunk-wndm3px3.js} +1 -1
  112. package/bin/chunk-x5jwwvs0.js +1 -0
  113. package/bin/chunk-x92cq59c.js +1 -0
  114. package/bin/{chunk-vgn5zcpv.js → chunk-xa18z1py.js} +2 -2
  115. package/bin/{chunk-4v5n0ayb.js → chunk-xarsrs08.js} +1 -1
  116. package/bin/{chunk-66hsjnw6.js → chunk-xx337zcw.js} +2 -2
  117. package/bin/chunk-xz6713tj.js +2 -0
  118. package/bin/chunk-yfnem6se.js +2 -0
  119. package/bin/{chunk-m7m9d4fb.js → chunk-ytdwk2fq.js} +2 -2
  120. package/bin/{chunk-jy006gcv.js → chunk-ze20rm02.js} +4 -4
  121. package/bin/chunk-zw86wnwe.js +7 -0
  122. package/bin/{chunk-h3tbf521.js → chunk-zxk7q0zk.js} +1 -1
  123. package/bin/shumai-app.html +1 -1
  124. package/bin/shumai-app.js +773 -776
  125. package/package.json +7 -7
  126. package/prisma/migrations/20260907021754_add_asset_upload_id/migration.sql +2 -0
  127. package/prisma/schema.prisma +1 -0
  128. package/bin/chunk-1kw2mbqb.js +0 -1
  129. package/bin/chunk-1wm6ptdx.js +0 -1
  130. package/bin/chunk-2520aq8j.js +0 -2
  131. package/bin/chunk-29zdp63z.js +0 -3
  132. package/bin/chunk-3swpwb9v.js +0 -1
  133. package/bin/chunk-3wmcx2bv.js +0 -2
  134. package/bin/chunk-5a8nt4me.js +0 -1
  135. package/bin/chunk-6bhn1p8v.js +0 -211
  136. package/bin/chunk-70c3xrgd.js +0 -2
  137. package/bin/chunk-7esm0hqb.js +0 -2
  138. package/bin/chunk-7fst8kdw.js +0 -12
  139. package/bin/chunk-8zqgaxvv.js +0 -1
  140. package/bin/chunk-a3dmtt2j.js +0 -1
  141. package/bin/chunk-ce8m4zeg.js +0 -3
  142. package/bin/chunk-e7mqtkzn.js +0 -2
  143. package/bin/chunk-ejbvfj4r.js +0 -1
  144. package/bin/chunk-ekfem7kf.js +0 -1
  145. package/bin/chunk-etwkk0xh.js +0 -1
  146. package/bin/chunk-evrdd32b.js +0 -2
  147. package/bin/chunk-fm6p03ad.js +0 -2
  148. package/bin/chunk-fyha3r13.js +0 -2
  149. package/bin/chunk-g0vs7k2x.js +0 -1
  150. package/bin/chunk-g84z2w7v.js +0 -16
  151. package/bin/chunk-h837fyed.js +0 -2
  152. package/bin/chunk-j20e0qsw.js +0 -7
  153. package/bin/chunk-n1jwdb0a.js +0 -1
  154. package/bin/chunk-p5gf1zdm.js +0 -4
  155. package/bin/chunk-pfgxggaj.js +0 -11
  156. package/bin/chunk-q16490pv.js +0 -2
  157. package/bin/chunk-qh81zhg1.js +0 -1
  158. package/bin/chunk-qwp3kwbz.js +0 -2
  159. package/bin/chunk-qydeqgyj.js +0 -5
  160. package/bin/chunk-r7dty1tg.js +0 -2
  161. package/bin/chunk-rhdxwebf.js +0 -2
  162. package/bin/chunk-rhh716z0.js +0 -42
  163. package/bin/chunk-rza4ae5z.js +0 -3
  164. package/bin/chunk-sk4e6rb1.js +0 -1
  165. package/bin/chunk-t2n1dbgx.js +0 -4
  166. package/bin/chunk-x8f4defx.js +0 -3
  167. package/bin/chunk-z3gkt8w1.js +0 -3
  168. package/bin/chunk-zh6fqq44.js +0 -1
@@ -1,54 +1,54 @@
1
1
  // @bun
2
- import{Ne}from"./chunk-rza4ae5z.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)=>gt(n)).join(o)}function ke(t,o){if(typeof o==="bigint")return o.toString();return o}function Ze(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 oo(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 F(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 io(t){return JSON.stringify(t)}function so(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ht="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ge(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var co=Ze(()=>{if(V.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 _t(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 uo=new Set(["string","number","symbol"]);function le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function H(t,o,n){let c=new t._zod.constr(o??t._zod.def);if(!o||n?.parent)c._zod.parent=t;return c}function O(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 gt(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function ao(t){return Object.keys(t).filter((o)=>t[o]._zod.optin!==void 0&&t[o]._zod.optout==="optional")}var lo=(()=>({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 $c(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;F(f,h,n.shape[h])}return F(this,"shape",f),f},checks:[]});return H(t,p)}function wc(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 F(this,"shape",f),f},checks:[]});return H(t,p)}function kc(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 F(this,"shape",p),p}});return H(t,u)}function Zc(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 F(this,"shape",c),c}});return H(t,n)}function Pc(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 F(this,"shape",c),c},get catchall(){return o._zod.def.catchall},checks:o._zod.def.checks??[]});return H(t,n)}function po(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 _=o._zod.def.shape,b={..._};if(n)for(let v of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(_,v))throw Error(`Unrecognized key: "${String(v)}"`);if(!n[v])continue;b[v]=t?new t({type:"optional",innerType:_[v]}):_[v]}else for(let v of Reflect.ownKeys(_))b[v]=t?new t({type:"optional",innerType:_[v]}):_[v];return F(this,"shape",b),b},checks:[]});return H(o,h)}function Sc(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 F(this,"shape",p),p}});return H(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 fo(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 re(t,o){return o.map((n)=>{var c;return(c=n).path??(c.path=[]),n.path.unshift(t),n})}function we(t){return typeof t==="string"?t:t?.message}function xt(t,o,n){var c;for(let u=o;u<t.length;u++)(c=t[u]).schema??(c.schema=n)}function oe(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:we(t.inst?._zod.def?.error?.(t))??we(p?.(t))??we(o?.error?.(t))??we(n.customError?.(t))??we(n.localeError?.(t))??"Invalid input",{inst:h,schema:_,continue:b,input:v,...k}=t;if(k.path??(k.path=[]),k.message=f,o?.reportInput)k.input=v;return k}var Oc=/[\uD800-\uDBFF]/;function Je(t){let o=t.length;if(!Oc.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 mo(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 Ic(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 yt(t,o,n){return de(t,o,n,!1)}function Ic(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 Ec(t,o){let n=Object.getPrototypeOf(t);return o in n?void 0:n}var pt,ue=!1,Tc={configurable:!0,get(){ue=!0;return}};function A(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,Tc);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 Ac(t,o,n,c){let u=Ec(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 Nc="~constantCatch";function _o(t){let o=()=>t;return o[Nc]=!0,o}var go,Nr=Object.freeze({status:"aborted"}),bt={value:void 0,enumerable:!1},xo="captureStackTrace"in Error?Error:null;function Cc(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 w(t,o,n,c){let u={};function p(Z){this.def=Z,this.constr=k,this.traits=new Set}p.prototype=u;let f=n,h=f&&new WeakSet;function _(Z,P){if(!Z._zod){bt.value=new p(P);try{Object.defineProperty(Z,"_zod",bt)}finally{bt.value=void 0}}if(Z._zod.traits.has(t))return;if(Z._zod.traits.add(t),o(Z,P),h){let E=Object.getPrototypeOf(Z),T=Z._zod.constr.prototype,B=E;while(B&&B!==T)B=Object.getPrototypeOf(B);let Y=B??E;if(!h.has(Y))h.add(Y),ho(Y,f)}let S=k.prototype;for(let E in S){if(!Object.prototype.hasOwnProperty.call(S,E))continue;if(!(E in Z))Z[E]=S[E].bind(Z)}}let b=c?.Parent??Object;class v extends b{}Object.defineProperty(v,"name",{value:t});function k(Z){let P=c?.Parent?Cc(v):this;_(P,Z);let S=P._zod.deferred;if(S){for(let T of S)T();P._zod.deferred=void 0}let E=globalThis.__zod_globalConfig?.postProcessor;if(E)E(P);return P}return Object.defineProperty(k,"init",{value:_}),Object.defineProperty(k,Symbol.hasInstance,{value:(Z)=>{if(c?.Parent&&Z instanceof c.Parent)return!0;return Z?._zod?.traits?.has(t)}}),Object.defineProperty(k,"name",{value:t}),k}class ie extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pe extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`);this.name="ZodEncodeError"}}(go=globalThis).__zod_globalConfig??(go.__zod_globalConfig={});var V=globalThis.__zod_globalConfig;function G(t){if(t)Object.assign(V,t);return V}function jc(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,ke,2)),t.message}function Rc(t){this._zod.message=t}var Dc={get:jc,set:Rc,enumerable:!0,configurable:!0},vt={value:void 0,enumerable:!1},$t={value:void 0,enumerable:!1},yo=new WeakSet([Object.prototype,Error.prototype]),bo=(t,o)=>{t.name="$ZodError",vt.value=t._zod,Object.defineProperty(t,"_zod",vt),$t.value=o,Object.defineProperty(t,"issues",$t),vt.value=void 0,$t.value=void 0,Object.defineProperty(t,"message",Dc);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})}})},Da=w("$ZodError",bo),wt=w("$ZodError",bo,void 0,{Parent:Error});function Lc(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 kt(t,o=(n)=>n.message){let n={},c=[];for(let u of t.issues)if(u.path.length>0)Lc(n,u.path[0],()=>[]).push(o(u));else c.push(o(u));return{formErrors:c,fieldErrors:n}}function Zt(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 _=n,b=0;while(b<h.length){let v=h[b],k=b===h.length-1;if(v==="_errors"){if(k)_._errors.push(o(f));b++;continue}if(!Object.prototype.hasOwnProperty.call(_,v))Object.defineProperty(_,v,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let Z=_[v];if(k)Z._errors.push(o(f));_=Z,b++}}}};return c(t),n}function Fc(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 Zd(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 ${Fc(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 _=new(p?.Err??t)(h.issues.map((b)=>oe(b,f,G())));throw ht(_,p?.callee??o),_}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 _=new(p?.Err??t)(h.issues.map((b)=>oe(b,f,G())));throw ht(_,p?.callee??o),_}return h.value};return o};var Se=(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??Da)(p.issues.map((f)=>oe(f,u,G())))}:{success:!0,data:p.value}},zo=Se(wt),Oe=(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)=>oe(f,u,G())))}:{success:!0,data:p.value}},vo=Oe(wt);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 Se(t)(o,n,u)};var So=(t)=>(o,n,c)=>Se(t)(o,n,c);var Oo=(t)=>async(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Oe(t)(o,n,u)};var Io=(t)=>async(o,n,c)=>Oe(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})$/,St=(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 Mc="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Uo(){return new RegExp(Mc,"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}=))?$/,Ot=/^[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 Jc(t){return new RegExp(`^${t}$`)}var Yo=Jc(qo);function Pt(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(`^${Pt(t)}$`)}function Ho(t){let o=["Z"];if(t.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Pt({precision:t.precision,seconds:!0})}(?:${o.join("|")})`,c=t.local?`${n}|${Pt({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+$/,Ie=/^-?\d+(?:\.\d+)?$/,tn=/^(?:true|false)$/i,rn=/^null$/i;var on=/^[^A-Z]*$/,nn=/^[^a-z]*$/;var M=w("$ZodCheck",(t,o)=>{var n;t._zod??(t._zod={}),t._zod.def=o,(n=t._zod).onattach??(n.onattach=[])});var It=(t)=>{let o=t.value;return!eo(o)&&o.length!==void 0},qe={number:"number",bigint:"bigint",object:"date"},Et=w("$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})}}),Tt=w("$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=w("$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=w("$ZodCheckNumberFormat",(t,o)=>{M.init(t,o),o.format=o.format||"float64";let n=o.format?.includes("int"),c=n?"int":"number",[u,p]=lo[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=w("$ZodCheckMaxLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=It),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=w("$ZodCheckMinLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=It),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=w("$ZodCheckLengthEquals",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=It),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),_=f>o.length;c.issues.push({origin:h,..._?{code:"too_big",maximum:o.length}:{code:"too_small",minimum:o.length},inclusive:!0,exact:!0,input:c.value,inst:t,continue:!o.abort})}}),Ee=w("$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=w("$ZodCheckRegex",(t,o)=>{Ee.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=w("$ZodCheckLowerCase",(t,o)=>{o.pattern??(o.pattern=on),Ee.init(t,o)}),dn=w("$ZodCheckUpperCase",(t,o)=>{o.pattern??(o.pattern=nn),Ee.init(t,o)}),mn=w("$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=w("$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=w("$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=w("$ZodCheckOverwrite",(t,o)=>{M.init(t,o),t._zod.check=(n)=>{n.value=o.tx(n.value)}});class At{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-fnmwksnb.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 dt(t,o="|"){return t.map((n)=>gt(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 mt="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 _t(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 gt(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function ao(t){return Object.keys(t).filter((o)=>t[o]._zod.optin!==void 0&&t[o]._zod.optout==="optional")}var lo=(()=>({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 Ic(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 Ec(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 Tc(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 Ac(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 Nc(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 po(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 _=o._zod.def.shape,b={..._};if(n)for(let z of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(_,z))throw Error(`Unrecognized key: "${String(z)}"`);if(!n[z])continue;b[z]=t?new t({type:"optional",innerType:_[z]}):_[z]}else for(let z of Reflect.ownKeys(_))b[z]=t?new t({type:"optional",innerType:_[z]}):_[z];return L(this,"shape",b),b},checks:[]});return Y(o,h)}function Cc(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 fo(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 re(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 xt(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:_,continue:b,input:z,...w}=t;if(w.path??(w.path=[]),w.message=f,o?.reportInput)w.input=z;return w}var jc=/[\uD800-\uDBFF]/;function Je(t){let o=t.length;if(!jc.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 mo(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 Rc(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 yt(t,o,n){return de(t,o,n,!1)}function Rc(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 Dc(t,o){let n=Object.getPrototypeOf(t);return o in n?void 0:n}var pt,ue=!1,Lc={configurable:!0,get(){ue=!0;return}};function T(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,Lc);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 Fc(t,o,n,c){let u=Dc(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 Uc="~constantCatch";function _o(t){let o=()=>t;return o[Uc]=!0,o}var go,Dr=Object.freeze({status:"aborted"}),bt={value:void 0,enumerable:!1},xo="captureStackTrace"in Error?Error:null;function Mc(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 _(k,Z){if(!k._zod){bt.value=new p(Z);try{Object.defineProperty(k,"_zod",bt)}finally{bt.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),E=k._zod.constr.prototype,J=O;while(J&&J!==E)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?Mc(z):this;_(Z,k);let P=Z._zod.deferred;if(P){for(let E of P)E();Z._zod.deferred=void 0}let O=globalThis.__zod_globalConfig?.postProcessor;if(O)O(Z);return Z}return Object.defineProperty(w,"init",{value:_}),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 Jc(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,we,2)),t.message}function Bc(t){this._zod.message=t}var Vc={get:Jc,set:Bc,enumerable:!0,configurable:!0},vt={value:void 0,enumerable:!1},$t={value:void 0,enumerable:!1},yo=new WeakSet([Object.prototype,Error.prototype]),bo=(t,o)=>{t.name="$ZodError",vt.value=t._zod,Object.defineProperty(t,"_zod",vt),$t.value=o,Object.defineProperty(t,"issues",$t),vt.value=void 0,$t.value=void 0,Object.defineProperty(t,"message",Vc);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})}})},Vs=v("$ZodError",bo),wt=v("$ZodError",bo,void 0,{Parent:Error});function Kc(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 kt(t,o=(n)=>n.message){let n={},c=[];for(let u of t.issues)if(u.path.length>0)Kc(n,u.path[0],()=>[]).push(o(u));else c.push(o(u));return{formErrors:c,fieldErrors:n}}function Zt(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 _=n,b=0;while(b<h.length){let z=h[b],w=b===h.length-1;if(z==="_errors"){if(w)_._errors.push(o(f));b++;continue}if(!Object.prototype.hasOwnProperty.call(_,z))Object.defineProperty(_,z,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let k=_[z];if(w)k._errors.push(o(f));_=k,b++}}}};return c(t),n}function Wc(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 ef(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 ${Wc(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 _=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw mt(_,p?.callee??o),_}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 _=new(p?.Err??t)(h.issues.map((b)=>ne(b,f,W())));throw mt(_,p?.callee??o),_}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??Vs)(p.issues.map((f)=>ne(f,u,W())))}:{success:!0,data:p.value}},zo=Pe(wt),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(wt);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})$/,St=(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 qc="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Uo(){return new RegExp(qc,"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}=))?$/,Ot=/^[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 Yc(t){return new RegExp(`^${t}$`)}var Yo=Yc(qo);function Pt(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(`^${Pt(t)}$`)}function Ho(t){let o=["Z"];if(t.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Pt({precision:t.precision,seconds:!0})}(?:${o.join("|")})`,c=t.local?`${n}|${Pt({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 It=(t)=>{let o=t.value;return!eo(o)&&o.length!==void 0},qe={number:"number",bigint:"bigint",object:"date"},Tt=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})}}),At=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]=lo[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=It),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=It),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=It),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),_=f>o.length;c.issues.push({origin:h,..._?{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 Nt{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 N=w("$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,_,b)=>{if(h.memo)return h;let v=he(h),k;for(let Z of _){if(Z._zod.def.when){if(fo(h))continue;if(!Z._zod.def.when(h))continue}else if(v)continue;let P=h.issues.length,S=Z._zod.check(h);if(S instanceof Promise&&b?.async===!1)throw new ie;if(k||S instanceof Promise)k=(k??Promise.resolve()).then(async()=>{if(await S,h.issues.length===P)return;if(xt(h.issues,P,t),!v)v=he(h,P)});else{if(h.issues.length===P)continue;if(xt(h.issues,P,t),!v)v=he(h,P)}}if(k)return k.then(()=>h);return h},f=(h,_,b)=>{if(he(h))return h.aborted=!0,h;let v=p(_,u,b);if(v instanceof Promise){if(b.async===!1)throw new ie;return v.then((k)=>t._zod.parse(k,b))}return t._zod.parse(v,b)};t._zod.run=(h,_)=>{if(_.skipChecks)return t._zod.parse(h,_);if(_.direction==="backward"){let v=t._zod.parse({value:h.value,issues:[]},{..._,skipChecks:!0});if(v instanceof Promise)return v.then((k)=>f(k,h,_));return f(v,h,_)}let b=t._zod.parse(h,_);if(b instanceof Promise){if(_.async===!1)throw new ie;return b.then((v)=>p(v,u,_))}return p(b,u,_)}}},{get "~standard"(){return yt(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=w("$ZodString",(t,o)=>{N.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}}),R=w("$ZodStringFormat",(t,o)=>{Ee.init(t,o),He.init(t,o)}),An=w("$ZodGUID",(t,o)=>{o.pattern??(o.pattern=Lo),R.init(t,o)}),Nn=w("$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=St(c))}else o.pattern??(o.pattern=St());R.init(t,o)}),Cn=w("$ZodEmail",(t,o)=>{o.pattern??(o.pattern=Fo),R.init(t,o)}),jn=1,Rn=2;function Bc(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 Vc=/[\t\n\r]/g;function Kc(t){return t.replace(Vc,"")}function Wc(t,o){return o.lastIndex=0,o.test(t.hostname)}function Gc(t,o){return o.lastIndex=0,o.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Dn=w("$ZodURL",(t,o)=>{R.init(t,o),t._zod.check=(n)=>{try{let c=n.value.trim(),u=Bc(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&&!Wc(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&&!Gc(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:Kc(c);return}catch(c){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort})}}}),Ln=w("$ZodEmoji",(t,o)=>{o.pattern??(o.pattern=Uo()),R.init(t,o)}),Fn=w("$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)),R.init(t,o)}),Un=w("$ZodCUID",(t,o)=>{o.pattern??(o.pattern=Eo),R.init(t,o)}),Mn=w("$ZodCUID2",(t,o)=>{o.pattern??(o.pattern=To),R.init(t,o)}),Jn=w("$ZodULID",(t,o)=>{o.pattern??(o.pattern=Ao),R.init(t,o)}),Bn=w("$ZodXID",(t,o)=>{o.pattern??(o.pattern=No),R.init(t,o)}),Vn=w("$ZodKSUID",(t,o)=>{o.pattern??(o.pattern=Co),R.init(t,o)}),Kn=w("$ZodISODateTime",(t,o)=>{if(o.pattern??(o.pattern=Ho(o)),R.init(t,o),o.local||o.precision===-1)t._zod.bag.laxFormat=!0,t._zod.onattach.push((n)=>{n._zod.bag.laxFormat=!0})}),Wn=w("$ZodISODate",(t,o)=>{o.pattern??(o.pattern=Yo),R.init(t,o)}),Gn=w("$ZodISOTime",(t,o)=>{o.pattern??(o.pattern=Xo(o)),R.init(t,o)}),qn=w("$ZodISODuration",(t,o)=>{o.pattern??(o.pattern=Do),R.init(t,o)}),Yn=w("$ZodIPv4",(t,o)=>{o.pattern??(o.pattern=Mo),R.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=w("$ZodIPv6",(t,o)=>{o.pattern??(o.pattern=Jo),R.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=w("$ZodCIDRv4",(t,o)=>{o.pattern??(o.pattern=Bo),R.init(t,o)});function Yc(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 oi=w("$ZodCIDRv6",(t,o)=>{o.pattern??(o.pattern=Vo),R.init(t,o),t._zod.check=(n)=>{if(!Yc(n.value))n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!o.abort})}});function ni(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 ii=w("$ZodBase64",(t,o)=>{o.pattern??(o.pattern=Ko),R.init(t,o),t._zod.bag.contentEncoding="base64",t._zod.check=(n)=>{if(ni(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!o.abort})}});function Xc(t){if(!Ot.test(t))return!1;let o=t.replace(/[-_]/g,(c)=>c==="-"?"+":"/"),n=o.padEnd(Math.ceil(o.length/4)*4,"=");return ni(n)}var si=w("$ZodBase64URL",(t,o)=>{o.pattern??(o.pattern=Ot),R.init(t,o),t._zod.bag.contentEncoding="base64url",t._zod.check=(n)=>{if(Xc(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!o.abort})}}),ci=w("$ZodE164",(t,o)=>{o.pattern??(o.pattern=Go),R.init(t,o)});function Hc(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 ui=w("$ZodJWT",(t,o)=>{R.init(t,o),t._zod.check=(n)=>{if(Hc(n.value,o.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!o.abort})}});var Dt=w("$ZodNumber",(t,o)=>{N.init(t,o),t._zod.pattern=t._zod.bag.pattern??Ie,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}}),ai=w("$ZodNumberFormat",(t,o)=>{cn.init(t,o),Dt.init(t,o)}),li=w("$ZodBoolean",(t,o)=>{N.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}}),pi=w("$ZodBigInt",(t,o)=>{N.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 fi=w("$ZodNull",(t,o)=>{N.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}}),di=w("$ZodAny",(t,o)=>{N.init(t,o),t._zod.parse=(n)=>n}),mi=w("$ZodUnknown",(t,o)=>{N.init(t,o),t._zod.parse=(n)=>n}),hi=w("$ZodNever",(t,o)=>{N.init(t,o),t._zod.parse=(n,c)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),_i=w("$ZodVoid",(t,o)=>{N.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}}),gi=w("$ZodDate",(t,o)=>{N.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(...re(n,t.issues));o.value[n]=t.value}var xi=w("$ZodArray",(t,o)=>{N.init(t,o);let n=V.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 _=p[h],b=o.element._zod.run({value:_,issues:[]},u);if(b instanceof Promise)f.push(b.then((v)=>zn(v,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(...re(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 Qc=[];function yi(t){let o=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),c=n.length?n:Qc,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=ao(t.shape);return{...t,allKeys:u,symbolKeys:c,keySet:new Set(o),numKeys:o.length,optionalKeys:new Set(p)}}function bi(t,o,n,c,u,p){let f=[],h=u.keySet,_=u.catchall._zod,b=_.def.type,{optin:v,optout:k}=_;for(let Z in o){if(h.has(Z))continue;if(Z==="__proto__"){if(b==="never")f.push(Z);continue}if(b==="never"){f.push(Z);continue}let P=_.run({value:o[Z],issues:[]},c);if(P instanceof Promise)t.push(P.then((S)=>Xe(S,n,Z,o,v,k)));else Xe(P,n,Z,o,v,k)}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,eu=w("$ZodObject",(t,o)=>{if(N.init(t,o),!Object.getOwnPropertyDescriptor(o,"shape")?.get){let _=o.shape;Nt.set(o,_),Object.defineProperty(o,"shape",{get:()=>{let b={..._};return Object.defineProperty(o,"shape",{value:b}),Nt.set(o,b),b}})}let c=Ze(()=>yi(o));A(t,"propValues",(_)=>{let b=_.def.shape,v={};for(let k in b){let Z=b[k]._zod;if(Z.values){if(!Object.prototype.hasOwnProperty.call(v,k))F(v,k,new Set);for(let P of Z.values)v[k].add(P);if(Z.optin!==void 0)v[k].add(void 0)}}return v});let u=ge,p=o.catchall,f,h=V.memoizer;h?.attach(t),t._zod.parse=(_,b)=>{f??(f=c.value);let v=_.value;if(!u(v))return _.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),_;_.value=h?h.alloc(t,_,{},b):{};let k=[],Z=f.shape;for(let P of f.allKeys){if(P==="__proto__")continue;let S=Z[P],E=S._zod.optin,T=S._zod.optout,B=S._zod.run({value:v[P],issues:[]},b);if(B instanceof Promise)k.push(B.then((Y)=>Xe(Y,_,P,v,E,T)));else Xe(B,_,P,v,E,T)}if(!p)return k.length?Promise.all(k).then(()=>_):_;return bi(k,v,_,b,c.value,t)}}),zi=w("$ZodObjectJIT",(t,o)=>{eu.init(t,o);let n=t._zod.parse,c=Ze(()=>yi(o)),u=V.memoizer,p=(P)=>{let S=c.value,E=S.symbolKeys,T=new At(["payload","ctx"],{shape:P,inst:t,memo:u,syms:E}),B=(W)=>`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`,Y=(W,D)=>`
8
- for (let i = 0; i < ${W}.issues.length; i++) {
9
- const iss = ${W}.issues[i];
10
- iss.path = iss.path ? [${D}, ...iss.path] : [${D}];
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,_,b)=>{if(h.memo)return h;let z=he(h),w;for(let k of _){if(k._zod.def.when){if(fo(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(xt(h.issues,Z,t),!z)z=he(h,Z)});else{if(h.issues.length===Z)continue;if(xt(h.issues,Z,t),!z)z=he(h,Z)}}if(w)return w.then(()=>h);return h},f=(h,_,b)=>{if(he(h))return h.aborted=!0,h;let z=p(_,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,_)=>{if(_.skipChecks)return t._zod.parse(h,_);if(_.direction==="backward"){let z=t._zod.parse({value:h.value,issues:[]},{..._,skipChecks:!0});if(z instanceof Promise)return z.then((w)=>f(w,h,_));return f(z,h,_)}let b=t._zod.parse(h,_);if(b instanceof Promise){if(_.async===!1)throw new ie;return b.then((z)=>p(z,u,_))}return p(b,u,_)}}},{get "~standard"(){return yt(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=St(c))}else o.pattern??(o.pattern=St());j.init(t,o)}),Cn=v("$ZodEmail",(t,o)=>{o.pattern??(o.pattern=Fo),j.init(t,o)}),jn=1,Rn=2;function Xc(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 Hc=/[\t\n\r]/g;function Qc(t){return t.replace(Hc,"")}function eu(t,o){return o.lastIndex=0,o.test(t.hostname)}function tu(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=Xc(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&&!eu(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&&!tu(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:Qc(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"}),ru=/^[0-9a-fA-F:.]+$/;function Xn(t){if(!ru.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 ou(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(!ou(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 nu(t){if(!Ot.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=Ot),j.init(t,o),t._zod.bag.contentEncoding="base64url",t._zod.check=(n)=>{if(nu(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 iu(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(iu(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(...re(n,t.issues));o.value[n]=t.value}var _i=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 _=p[h],b=o.element._zod.run({value:_,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(...re(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 su=[];function xi(t){let o=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),c=n.length?n:su,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=ao(t.shape);return{...t,allKeys:u,symbolKeys:c,keySet:new Set(o),numKeys:o.length,optionalKeys:new Set(p)}}function yi(t,o,n,c,u,p){let f=[],h=u.keySet,_=u.catchall._zod,b=_.def.type,{optin:z,optout:w}=_;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=_.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 Ct=new WeakMap,cu=v("$ZodObject",(t,o)=>{if(A.init(t,o),!Object.getOwnPropertyDescriptor(o,"shape")?.get){let _=o.shape;Ct.set(o,_),Object.defineProperty(o,"shape",{get:()=>{let b={..._};return Object.defineProperty(o,"shape",{value:b}),Ct.set(o,b),b}})}let c=ke(()=>xi(o));T(t,"propValues",(_)=>{let b=_.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=(_,b)=>{f??(f=c.value);let z=_.value;if(!u(z))return _.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),_;_.value=h?h.alloc(t,_,{},b):{};let w=[],k=f.shape;for(let Z of f.allKeys){if(Z==="__proto__")continue;let P=k[Z],O=P._zod.optin,E=P._zod.optout,J=P._zod.run({value:z[Z],issues:[]},b);if(J instanceof Promise)w.push(J.then((q)=>Xe(q,_,Z,z,O,E)));else Xe(J,_,Z,z,O,E)}if(!p)return w.length?Promise.all(w).then(()=>_):_;return yi(w,z,_,b,c.value,t)}}),bi=v("$ZodObjectJIT",(t,o)=>{cu.init(t,o);let n=t._zod.parse,c=ke(()=>xi(o)),u=B.memoizer,p=(Z)=>{let P=c.value,O=P.symbolKeys,E=new Nt(["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
+ for (let i = 0; i < ${K}.issues.length; i++) {
9
+ const iss = ${K}.issues[i];
10
+ iss.path = iss.path ? [${R}, ...iss.path] : [${R}];
11
11
  payload.issues.push(iss);
12
- }`;T.write("const input = payload.value;");let qr=Object.create(null),bc=0;for(let W of S.allKeys)qr[W]=`key_${bc++}`;T.write(u?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let W of S.allKeys){if(W==="__proto__")continue;let D=qr[W],te=typeof W==="symbol"?`syms[${E.indexOf(W)}]`:io(W),lt=`${te} in input`,Yr=P[W],Xr=Yr?._zod?.optin,Hr=Xr!==void 0,zc=Yr?._zod?.optout==="optional";if(T.write(`const ${D} = ${B(te)};`),Hr&&zc){let vc=Xr==="optional"?`${D}_present`:`${D}.value !== undefined || ${D}_present`;T.write(`
13
- const ${D}_present = ${lt};
14
- if (!${D}.issues.length || ${D}_present) {
15
- if (${D}.issues.length) {${Y(D,te)}
12
+ }`;E.write("const input = payload.value;");let qr=Object.create(null),Pc=0;for(let K of P.allKeys)qr[K]=`key_${Pc++}`;E.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,Sc=Yr?._zod?.optout==="optional";if(E.write(`const ${R} = ${J(Q)};`),Hr&&Sc){let Oc=Xr==="optional"?`${R}_present`:`${R}.value !== undefined || ${R}_present`;E.write(`
13
+ const ${R}_present = ${lt};
14
+ if (!${R}.issues.length || ${R}_present) {
15
+ if (${R}.issues.length) {${q(R,Q)}
16
16
  }
17
17
 
18
- if (${vc}) {
19
- newResult[${te}] = ${D}.value;
18
+ if (${Oc}) {
19
+ newResult[${Q}] = ${R}.value;
20
20
  }
21
21
  }
22
22
 
23
- `)}else if(!Hr)T.write(`
24
- const ${D}_present = ${lt};
25
- if (${D}.issues.length) {${Y(D,te)}
23
+ `)}else if(!Hr)E.write(`
24
+ const ${R}_present = ${lt};
25
+ if (${R}.issues.length) {${q(R,Q)}
26
26
  }
27
- if (!${D}_present && !${D}.issues.length) {
27
+ if (!${R}_present && !${R}.issues.length) {
28
28
  payload.issues.push({
29
29
  code: "invalid_type",
30
30
  expected: "nonoptional",
31
31
  input: undefined,
32
- path: [${te}]
32
+ path: [${Q}]
33
33
  });
34
34
  }
35
35
 
36
- if (${D}_present) {
37
- newResult[${te}] = ${D}.value;
36
+ if (${R}_present) {
37
+ newResult[${Q}] = ${R}.value;
38
38
  }
39
39
 
40
- `);else T.write(`
41
- if (${D}.issues.length) {${Y(D,te)}
40
+ `);else E.write(`
41
+ if (${R}.issues.length) {${q(R,Q)}
42
42
  }
43
43
 
44
- if (${D}.value === undefined) {
44
+ if (${R}.value === undefined) {
45
45
  if (${lt}) {
46
- newResult[${te}] = undefined;
46
+ newResult[${Q}] = undefined;
47
47
  }
48
48
  } else {
49
- newResult[${te}] = ${D}.value;
49
+ newResult[${Q}] = ${R}.value;
50
50
  }
51
51
 
52
- `)}return T.write("payload.value = newResult;"),T.write("return payload;"),T.compile()},f,h=ge,_=!V.jitless,v=_&&co.value,k=o.catchall,Z;t._zod.parse=(P,S)=>{Z??(Z=c.value);let E=P.value;if(!h(E))return P.issues.push({expected:"object",code:"invalid_type",input:E,inst:t}),P;if(_&&v&&S?.async===!1&&S.jitless!==!0){if(!f)f=p(o.shape);if(P=f(P,S),!k)return P;return bi([],E,P,S,Z,t)}return n(P,S)}});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)=>oe(f,c,G())))}),o}var Lt=w("$ZodUnion",(t,o)=>{N.init(t,o),A(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),A(t,"optout",(c)=>c.def.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),A(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}),A(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 _=h._zod.run({value:c.value,issues:[]},u);if(_ instanceof Promise)f.push(_),p=!0;else{if(_.issues.length===0)return _;f.push(_)}}if(!p)return vn(f,c,t,u);return Promise.all(f).then((h)=>vn(h,c,t,u))}});var vi=w("$ZodDiscriminatedUnion",(t,o)=>{o.inclusive=!1,Lt.init(t,o);let n=t._zod.parse;A(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[_,b]of Object.entries(h)){if(!Object.prototype.hasOwnProperty.call(p,_))F(p,_,new Set);for(let v of b)p[_].add(v)}}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=Ze(()=>{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 _ of h){if(p.has(_))throw Error(`Duplicate discriminator value "${String(_)}"`);p.set(_,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}}),$i=w("$ZodIntersection",(t,o)=>{N.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(([_,b])=>$n(n,_,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,v)=>{let k;if(b.code==="unrecognized_keys"&&!b.path?.length)u??(u=b),k=b.keys;else if(b.code==="invalid_key"&&b.origin==="record"&&b.path?.length===1){let Z=String(b.path[0]);if(!p.has(Z))p.set(Z,b);k=[Z]}else return!1;for(let Z of k){if(!c.has(Z))c.set(Z,{});c.get(Z)[v]=!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((v)=>u.keys.includes(v)):[];if(b.length)t.issues.push({...u,keys:b});for(let v of h)if(!b.includes(v)&&p.has(v))t.issues.push(p.get(v))}let _=jt(o.value,n.value);if(!_.valid){if(he(t))return t;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(_.mergeErrorPath)}`)}return t.value=_.data,t}var wi=w("$ZodTuple",(t,o)=>{N.init(t,o);let n=o.items,c=V.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=[],_=wn(n,"optin"),b=wn(n,"optout");if(!o.rest){if(f.length<_)return u.issues.push({code:"too_small",minimum:_,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 v=Array(n.length);for(let k=0;k<n.length;k++){let Z=n[k]._zod.run({value:f[k],issues:[]},p);if(Z instanceof Promise)h.push(Z.then((P)=>{v[k]=P}));else v[k]=Z}if(o.rest){let k=n.length-1,Z=f.slice(n.length);for(let P of Z){k++;let S=o.rest._zod.run({value:P,issues:[]},p);if(S instanceof Promise)h.push(S.then((E)=>kn(E,u,k)));else kn(S,u,k)}}if(h.length)return Promise.all(h).then(()=>Zn(v,u,n,f,b));return Zn(v,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(...re(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(...re(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 ki=w("$ZodRecord",(t,o)=>{N.init(t,o);let n=V.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 _=new Set;for(let v of h)if(typeof v==="string"||typeof v==="number"||typeof v==="symbol"){if(_.add(typeof v==="number"?v.toString():v),v==="__proto__")continue;let k=o.keyType._zod.run({value:v,issues:[]},u);if(k instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(k.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:k.issues.map((S)=>oe(S,u,G())),input:v,path:[v],inst:t});continue}let Z=k.value;if(Z==="__proto__")continue;let P=o.valueType._zod.run({value:p[v],issues:[]},u);if(P instanceof Promise)f.push(P.then((S)=>{if(S.issues.length)c.issues.push(...re(v,S.issues));c.value[Z]=S.value}));else{if(P.issues.length)c.issues.push(...re(v,P.issues));c.value[Z]=P.value}}let b;for(let v in p)if(!_.has(v))if(o.mode==="loose"){if(v==="__proto__")continue;c.value[v]=p[v]}else b=b??[],b.push(v);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 _;for(let b of Reflect.ownKeys(p)){if(b==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(p,b))continue;let v=o.keyType._zod.run({value:b,issues:[]},u);if(v instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof b==="string"&&Ie.test(b)&&v.issues.length){let S=o.keyType._zod.run({value:Number(b),issues:[]},u);if(S instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(S.issues.length===0)v=S}if(v.issues.length){if(o.mode==="loose")c.value[b]=p[b];else if(h)_=_??[],_.push(b);else c.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map((S)=>oe(S,u,G())),input:b,path:[b],inst:t});continue}let Z=v.value;if(Z==="__proto__")continue;let P=o.valueType._zod.run({value:p[b],issues:[]},u);if(P instanceof Promise)f.push(P.then((S)=>{if(S.issues.length)c.issues.push(...re(b,S.issues));c.value[Z]=S.value}));else{if(P.issues.length)c.issues.push(...re(b,P.issues));c.value[Z]=P.value}}if(_&&_.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:_,continue:!0})}if(f.length)return Promise.all(f).then(()=>c);return c}});var Zi=w("$ZodEnum",(t,o)=>{N.init(t,o);let n=Ue(o.entries),c=new Set(n);t._zod.values=c;let u=n.filter((p)=>uo.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}}),Pi=w("$ZodLiteral",(t,o)=>{N.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 Si=w("$ZodTransform",(t,o)=>{N.init(t,o),t._zod.optin="optional",V.memoizer?.guard(t),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Pe(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=w("$ZodOptional",(t,o)=>{N.init(t,o),A(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",A(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c,void 0]):void 0}),A(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)}}),Oi=w("$ZodExactOptional",(t,o)=>{Ft.init(t,o),A(t,"values",(n)=>n.def.innerType._zod.values),A(t,"pattern",(n)=>n.def.innerType._zod.pattern),t._zod.parse=(n,c)=>o.innerType._zod.run(n,c)}),Ii=w("$ZodNullable",(t,o)=>{N.init(t,o),A(t,"optin",(n)=>n.def.innerType._zod.optin),A(t,"optout",(n)=>n.def.innerType._zod.optout),A(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)}|null)$`):void 0}),A(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)}}),Ei=w("$ZodDefault",(t,o)=>{N.init(t,o),t._zod.optin="defaulted",A(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 Ti=w("$ZodPrefault",(t,o)=>{N.init(t,o),t._zod.optin="defaulted",A(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)}}),Ai=w("$ZodNonOptional",(t,o)=>{N.init(t,o),A(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)=>oe(u,c,G()))},input:t.value}),t}var Ni=w("$ZodCatch",(t,o)=>{N.init(t,o),A(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),A(t,"optout",(n)=>n.def.innerType._zod.optout),A(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=w("$ZodPipe",(t,o)=>{N.init(t,o),A(t,"values",(n)=>n.def.in._zod.values),A(t,"optin",(n)=>n.def.in._zod.optin),A(t,"optout",(n)=>n.def.out._zod.optout),A(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=w("$ZodPreprocess",(t,o)=>{Ut.init(t,o)}),ji=w("$ZodReadonly",(t,o)=>{N.init(t,o),A(t,"propValues",(n)=>n.def.innerType._zod.propValues),A(t,"values",(n)=>n.def.innerType._zod.values),A(t,"optin",(n)=>n.def.innerType?._zod?.optin),A(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=w("$ZodLazy",(t,o)=>{N.init(t,o),oo(t._zod,"innerType",()=>{let n=o;if(!n._cachedInner)n._cachedInner=o.getter();return n._cachedInner}),A(t,"pattern",(n)=>n.innerType?._zod?.pattern),A(t,"propValues",(n)=>n.innerType?._zod?.propValues),A(t,"optin",(n)=>n.innerType?._zod?.optin??void 0),A(t,"optout",(n)=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,c)=>t._zod.innerType._zod.run(n,c)}),Di=w("$ZodCustom",(t,o)=>{M.init(t,o),N.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 Bt="~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 _=Object.getOwnPropertyDescriptor(p,h);if(!_||_.get)continue;let b=_.value;if(!b||typeof b!=="object")continue;if(b._zod)u(b);else if(Array.isArray(b))for(let v of b)u(v)}}return o.delete(t),Fi.set(t,c),c}function tu(t,o){let n=t.buckets.get(o);if(!n)n=new Map,t.buckets.set(o,n);return n}var Qe,et=[],ru={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"&&ou(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,_)=>{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,_)}}let b=h.value;if(b===null||typeof b!=="object")return p(h,_);let v=_[Bt];if(!v)v={buckets:new Map,backEdges:void 0},_[Bt]=v;let k;if(c===_)k=u;else k=tu(v,t),c=_,u=k;let Z=k.get(b);if(Z){if(h.value=Z.value,Z.issues){if(Z.issues.length)h.issues.push(...Mt(Z.issues))}else h.memo=!0,v.backEdges??(v.backEdges=new Set),v.backEdges.add(Z.value);return h}Qe=k;let P=et.length,S=p(h,_);Qe=void 0;let E=et.length>P?et.pop():void 0;if(S instanceof Promise)return S.then((T)=>{if(E)E.issues=T.issues.length?Mt(T.issues):Li;return T});if(E)E.issues=S.issues.length?Mt(S.issues):Li;return S};if(t._zod.parse=f,t._zod.run===p)t._zod.run=f})}};function Vt(){return ru}function ou(t,o){let n=t[Bt]?.backEdges;return n!==void 0&&o!==null&&typeof o==="object"&&n.has(o)}var nu=()=>{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=mo(p.input),_=u(h,p.input);return`Invalid input: expected ${f}, received ${_}`}case"invalid_value":if(p.values.length===1)return`Invalid input: expected ${gt(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 Kt(){return{localeError:nu()}}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",...O(o)})}function Wi(t,o){return new t({type:"string",coerce:!0,...O(o)})}function Wt(t,o){return new t({type:"string",format:"email",check:"string_format",abort:!1,...O(o)})}function Gi(t,o){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...O(o)})}function qi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...O(o)})}function Yi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(o)})}function Xi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(o)})}function Hi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(o)})}function Gt(t,o){return new t({type:"string",format:"url",check:"string_format",abort:!1,...O(o)})}function Qi(t,o){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...O(o)})}function es(t,o){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(o)})}function ts(t,o){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...O(o)})}function rs(t,o){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(o)})}function os(t,o){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...O(o)})}function ns(t,o){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...O(o)})}function is(t,o){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(o)})}function qt(t,o){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(o)})}function Yt(t,o){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(o)})}function ss(t,o){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(o)})}function cs(t,o){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(o)})}function us(t,o){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...O(o)})}function as(t,o){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...O(o)})}function ls(t,o){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...O(o)})}function ps(t,o){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...O(o)})}function tt(t,o){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(o)})}function rt(t,o){return new t({type:"string",format:"date",check:"string_format",...O(o)})}function Xt(t,o){return new t({type:"string",format:"time",check:"string_format",precision:null,...O(o)})}function Ht(t,o){return new t({type:"string",format:"duration",check:"string_format",...O(o)})}function fs(t,o){return new t({type:"number",checks:[],...O(o)})}function ds(t,o){return new t({type:"number",coerce:!0,checks:[],...O(o)})}function ms(t,o){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...O(o)})}function hs(t,o){return new t({type:"boolean",...O(o)})}function _s(t,o){return new t({type:"boolean",coerce:!0,...O(o)})}function gs(t,o){return new t({type:"bigint",coerce:!0,...O(o)})}function xs(t,o){return new t({type:"null",...O(o)})}function ys(t){return new t({type:"any"})}function zs(t){return new t({type:"unknown"})}function vs(t,o){return new t({type:"never",...O(o)})}function $s(t,o){return new t({type:"void",...O(o)})}function ws(t,o){return new t({type:"date",...O(o)})}function ks(t,o){return new t({type:"date",coerce:!0,...O(o)})}function be(t,o){return new Et({check:"less_than",...O(o),value:t,inclusive:!1})}function se(t,o){return new Et({check:"less_than",...O(o),value:t,inclusive:!0})}function ze(t,o){return new Tt({check:"greater_than",...O(o),value:t,inclusive:!1})}function ce(t,o){return new Tt({check:"greater_than",...O(o),value:t,inclusive:!0})}function Te(t,o){return new sn({check:"multiple_of",...O(o),value:t})}function ot(t,o){return new un({check:"max_length",...O(o),maximum:t})}function ve(t,o){return new an({check:"min_length",...O(o),minimum:t})}function nt(t,o){return new ln({check:"length_equals",...O(o),length:t})}function Qt(t,o){return new pn({check:"string_format",format:"regex",...O(o),pattern:t})}function er(t){return new fn({check:"string_format",format:"lowercase",...O(t)})}function tr(t){return new dn({check:"string_format",format:"uppercase",...O(t)})}function rr(t,o){return new mn({check:"string_format",format:"includes",...O(o),includes:t})}function or(t,o){return new hn({check:"string_format",format:"starts_with",...O(o),prefix:t})}function nr(t,o){return new _n({check:"string_format",format:"ends_with",...O(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)=>so(t))}function Zs(t,o,n){return new t({type:"array",element:o,...O(n)})}function Ps(t,o,n){let c=O(n);return c.abort??(c.abort=!0),new t({type:"custom",check:"custom",fn:o,...c})}function Ss(t,o,n){return new t({type:"custom",check:"custom",fn:o,...O(n)})}function Os(t,o){let n=su((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 su(t,o){let n=new M({check:"custom",...O(o)});return n._zod.check=t,n}function Ae(t,...o){for(let n of o)for(let c of Reflect.ownKeys(n))if(Object.prototype.propertyIsEnumerable.call(n,c))F(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 U(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 j(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 v={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(o,f.schema,v);else{let Z=f.schema,P=o.processors[u.type];if(!P)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);P(t,o,Z,v)}let k=t._zod.parent;if(k){if(!f.ref)f.ref=k;j(k,o,v),o.seen.get(k).isParent=!0}}let _=o.metadataRegistry.get(t);if(_)Ae(f.schema,_);if(o.io==="input"&&K(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 _=c.get(h);if(_&&_!==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 k=t.external.registry.get(f[0])?.id,Z=t.external.uri??((S)=>S);if(k)return{ref:Z(k)};let P=f[1].defId??f[1].schema.id??`schema${t.counter++}`;return f[1].defId=P,{defId:P,ref:`${Z("__shared")}#/${h}/${Is(P)}`}}let _="#",b=`${_}/${h}/`;if(f[1]===n&&!f[1].schema.id)return{ref:_};let v=f[1].schema.id??`__schema${t.counter++}`;return{defId:v,ref:b+Is(v)}},p=(f)=>{if(f[1].schema.$ref)return;let h=f[1],{ref:_,defId:b}=u(f);if(h.def={...h.schema},b)h.defId=b;let v=h.schema;for(let k in v)delete v[k];v.$ref=_};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 E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()},f,h=ge,_=!B.jitless,z=_&&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(_&&z&&P?.async===!1&&P.jitless!==!0){if(!f)f=p(o.shape);if(Z=f(Z,P),!w)return Z;return yi([],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),T(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),T(t,"optout",(c)=>c.def.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),T(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}),T(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 _=h._zod.run({value:c.value,issues:[]},u);if(_ instanceof Promise)f.push(_),p=!0;else{if(_.issues.length===0)return _;f.push(_)}}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;T(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[_,b]of Object.entries(h)){if(!Object.prototype.hasOwnProperty.call(p,_))L(p,_,new Set);for(let z of b)p[_].add(z)}}return p}),o.options.forEach((u,p)=>{let f=Ct.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 _ of h){if(p.has(_))throw Error(`Duplicate discriminator value "${String(_)}"`);p.set(_,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(([_,b])=>$n(n,_,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 _=jt(o.value,n.value);if(!_.valid){if(he(t))return t;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(_.mergeErrorPath)}`)}return t.value=_.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=[],_=wn(n,"optin"),b=wn(n,"optout");if(!o.rest){if(f.length<_)return u.issues.push({code:"too_small",minimum:_,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(...re(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(...re(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 _=new Set;for(let z of h)if(typeof z==="string"||typeof z==="number"||typeof z==="symbol"){if(_.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(...re(z,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...re(z,Z.issues));c.value[k]=Z.value}}let b;for(let z in p)if(!_.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 _;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)_=_??[],_.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(...re(b,P.issues));c.value[k]=P.value}));else{if(Z.issues.length)c.issues.push(...re(b,Z.issues));c.value[k]=Z.value}}if(_&&_.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:_,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),T(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",T(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c,void 0]):void 0}),T(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),T(t,"values",(n)=>n.def.innerType._zod.values),T(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),T(t,"optin",(n)=>n.def.innerType._zod.optin),T(t,"optout",(n)=>n.def.innerType._zod.optout),T(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Me(c.source)}|null)$`):void 0}),T(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",T(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",T(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),T(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),T(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),T(t,"optout",(n)=>n.def.innerType._zod.optout),T(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),T(t,"values",(n)=>n.def.in._zod.values),T(t,"optin",(n)=>n.def.in._zod.optin),T(t,"optout",(n)=>n.def.out._zod.optout),T(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),T(t,"propValues",(n)=>n.def.innerType._zod.propValues),T(t,"values",(n)=>n.def.innerType._zod.values),T(t,"optin",(n)=>n.def.innerType?._zod?.optin),T(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}),T(t,"pattern",(n)=>n.innerType?._zod?.pattern),T(t,"propValues",(n)=>n.innerType?._zod?.propValues),T(t,"optin",(n)=>n.innerType?._zod?.optin??void 0),T(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 _=Object.getOwnPropertyDescriptor(p,h);if(!_||_.get)continue;let b=_.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 uu(t,o){let n=t.buckets.get(o);if(!n)n=new Map,t.buckets.set(o,n);return n}var Qe,et=[],au={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"&&lu(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,_)=>{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,_)}}let b=h.value;if(b===null||typeof b!=="object")return p(h,_);let z=_[Jt];if(!z)z={buckets:new Map,backEdges:void 0},_[Jt]=z;let w;if(c===_)w=u;else w=uu(z,t),c=_,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,_);Qe=void 0;let O=et.length>Z?et.pop():void 0;if(P instanceof Promise)return P.then((E)=>{if(O)O.issues=E.issues.length?Mt(E.issues):Li;return E});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 au}function lu(t,o){let n=t[Jt]?.backEdges;return n!==void 0&&o!==null&&typeof o==="object"&&n.has(o)}var pu=()=>{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=mo(p.input),_=u(h,p.input);return`Invalid input: expected ${f}, received ${_}`}case"invalid_value":if(p.values.length===1)return`Invalid input: expected ${gt(p.values[0])}`;return`Invalid option: expected one of ${dt(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":""}: ${dt(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:pu()}}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 gs(t,o){return new t({type:"boolean",coerce:!0,...S(o)})}function xs(t,o){return new t({type:"bigint",coerce:!0,...S(o)})}function ys(t,o){return new t({type:"null",...S(o)})}function zs(t){return new t({type:"any"})}function vs(t){return new t({type:"unknown"})}function $s(t,o){return new t({type:"never",...S(o)})}function ws(t,o){return new t({type:"void",...S(o)})}function ks(t,o){return new t({type:"date",...S(o)})}function Zs(t,o){return new t({type:"date",coerce:!0,...S(o)})}function ye(t,o){return new Tt({check:"less_than",...S(o),value:t,inclusive:!1})}function se(t,o){return new Tt({check:"less_than",...S(o),value:t,inclusive:!0})}function be(t,o){return new At({check:"greater_than",...S(o),value:t,inclusive:!1})}function ce(t,o){return new At({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 rr(t,o){return new mn({check:"string_format",format:"includes",...S(o),includes:t})}function or(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 Ps(t,o,n){return new t({type:"array",element:o,...S(n)})}function Ss(t,o,n){let c=S(n);return c.abort??(c.abort=!0),new t({type:"custom",check:"custom",fn:o,...c})}function Os(t,o,n){return new t({type:"custom",check:"custom",fn:o,...S(n)})}function Is(t,o){let n=fu((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 fu(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 U(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 _=o.metadataRegistry.get(t);if(_)Ne(f.schema,_);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 Es(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 _=c.get(h);if(_&&_!==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}/${Es(Z)}`}}let _="#",b=`${_}/${h}/`;if(f[1]===n&&!f[1].schema.id)return{ref:_};let z=f[1].schema.id??`__schema${t.counter++}`;return{defId:z,ref:b+Es(z)}},p=(f)=>{if(f[1].schema.$ref)return;let h=f[1],{ref:_,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=_};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 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"]),Es=["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 v=b.properties?.[f]??Ts(b);if(v===null||v===void 0)continue;if(!h.some((k)=>JSON.stringify(k)===JSON.stringify(v)))h.push(v)}let _=h.length===1?h[0]:lr(h)??{allOf:h};F(n,f,_)}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((_)=>JSON.stringify(_)===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 uu(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)=>Es.some((p)=>Array.isArray(u[p]))),c=null;if(!n.length)c=lr(o);else{let u=n[0],p=Es.find((_)=>Array.isArray(u[_]));if(Object.keys(u).length!==1)return;let f=o.filter((_)=>_!==u),h=u[p].map((_)=>lr([...f,_]));if(h.some((_)=>!_))return;c={[p]:h}}if(!c)return;delete t.allOf,Ae(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 _=t.seen.get(h);if(_.ref===null)return;let b=_.def??_.schema,v={...b},k=_.ref;if(_.ref=null,k){c(k);let P=t.seen.get(k),S=P.schema;if(S.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"))b.allOf=b.allOf??[],b.allOf.push(S);else Ae(b,S);if(Ae(b,v),h._zod.parent===k)for(let T in b){if(T==="$ref"||T==="allOf")continue;if(!(T in v))delete b[T]}if(S.$ref&&P.def)for(let T in b){if(T==="$ref"||T==="allOf")continue;if(T in P.def&&JSON.stringify(b[T])===JSON.stringify(P.def[T]))delete b[T]}}let Z=h._zod.parent;if(Z&&Z!==k){c(Z);let P=t.seen.get(Z);if(P?.schema.$ref){if(b.$ref=P.schema.$ref,P.def)for(let S in b){if(S==="$ref"||S==="allOf")continue;if(S in P.def&&JSON.stringify(b[S])===JSON.stringify(P.def[S]))delete b[S]}}}t.override({zodSchema:h,jsonSchema:b,path:_.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 _ of t.seen.values())for(let b of[_.schema,_.def]){let v=b?.allOf;if(!Array.isArray(v))continue;let k=h.get(v);if(k)k.push(b);else h.set(v,[b])}for(let _ of t.intersections)for(let b of h.get(_)??[])uu(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)}Ae(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 _=h[1];if(_.def&&_.defId){if(_.def.id===_.defId)delete _.def.id;F(f,_.defId,_.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 K(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 K(c.element,n);if(c.type==="set")return K(c.valueType,n);if(c.type==="lazy")return K(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 K(c.innerType,n);if(c.type==="intersection")return K(c.left,n)||K(c.right,n);if(c.type==="record"||c.type==="map")return K(c.keyType,n)||K(c.valueType,n);if(c.type==="pipe"){if(t._zod.traits.has("$ZodCodec"))return!0;return K(c.in,n)||K(c.out,n)}if(c.type==="object"){for(let u in c.shape)if(K(c.shape[u],n))return!0;return!1}if(c.type==="union"){for(let u of c.options)if(K(u,n))return!0;return!1}if(c.type==="tuple"){for(let u of c.items)if(K(u,n))return!0;if(c.rest&&K(c.rest,n))return!0;return!1}return!1}var Cs=(t,o={})=>(n)=>{let c=je({...n,processors:o});return j(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 j(t,f),Re(f,t),De(f,t)};var au={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:_,contentEncoding:b,laxFormat:v}=t._zod.bag;if(typeof p==="number")u.minLength=p;if(typeof f==="number")u.maxLength=f;if(h){if(u.format=au[h]??h,u.format==="")delete u.format;if(h==="time"||v)delete u.format}if(b)u.contentEncoding=b;if(_&&_.size>0){let k=[..._];if(k.length===1)u.pattern=k[0].source;else if(k.length>1)u.allOf=[...k.map((Z)=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:Z.source}))]}},mr=(t,o,n,c)=>{let u=n,{minimum:p,maximum:f,format:h,multipleOf:_,exclusiveMaximum:b,exclusiveMinimum:v}=t._zod.bag;if(typeof h==="string"&&h.includes("int"))u.type="integer";else u.type="number";let k=typeof v==="number"&&v>=(p??Number.NEGATIVE_INFINITY),Z=typeof b==="number"&&b<=(f??Number.POSITIVE_INFINITY),P=o.target==="draft-04"||o.target==="openapi-3.0";if(k)if(P)u.minimum=v,u.exclusiveMinimum=!0;else u.exclusiveMinimum=v;else if(typeof p==="number")u.minimum=p;if(Z)if(P)u.maximum=b,u.exclusiveMaximum=!0;else u.exclusiveMaximum=b;else if(typeof f==="number")u.maximum=f;if(typeof _==="number")if(Number.isFinite(_)&&_!==0)u.multipleOf=Math.abs(_);else U(t,o,u,c,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`)},hr=(t,o,n,c)=>{n.type="boolean"},_r=(t,o,n,c)=>{U(t,o,n,c,"BigInt cannot be represented in JSON Schema")},Rs=(t,o,n,c)=>{U(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"},Ds=(t,o,n,c)=>{U(t,o,n,c,"Undefined cannot be represented in JSON Schema")},xr=(t,o,n,c)=>{U(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)=>{U(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(U(t,o,n,c,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof f==="bigint"){if(U(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}},Ls=(t,o,n,c)=>{U(t,o,n,c,"NaN cannot be represented in JSON Schema")},Fs=(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},Us=(t,o,n,c)=>{let u=n,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:h,mime:_}=t._zod.bag;if(f!==void 0)p.minLength=f;if(h!==void 0)p.maxLength=h;if(_)if(_.length===1)p.contentMediaType=_[0],Object.assign(u,p);else Object.assign(u,p),u.anyOf=_.map((b)=>({contentMediaType:b}));else Object.assign(u,p)},Ms=(t,o,n,c)=>{n.type="boolean"},kr=(t,o,n,c)=>{U(t,o,n,c,"Custom types cannot be represented in JSON Schema")},Js=(t,o,n,c)=>{U(t,o,n,c,"Function types cannot be represented in JSON Schema")},Zr=(t,o,n,c)=>{U(t,o,n,c,"Transforms cannot be represented in JSON Schema")},Bs=(t,o,n,c)=>{U(t,o,n,c,"Map cannot be represented in JSON Schema")},Vs=(t,o,n,c)=>{U(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=j(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&&U(t,o,u,c,"Symbol keys cannot be represented in JSON Schema"))return;u.type="object",u.properties={};for(let v in f)F(u.properties,v,j(f[v],o,{...c,path:[...c.path,"properties",v]}));let _=new Set(Object.keys(f)),b=new Set([..._].filter((v)=>{let k=p.shape[v];if(o.io==="input")return Le(k)===void 0;else return k._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=j(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,_)=>j(h,o,{...c,path:[...c.path,p?"oneOf":"anyOf",_]}));if(p)n.oneOf=f;else n.anyOf=f},Ir=(t,o,n,c)=>{let u=t._zod.def,p=j(u.left,o,{...c,path:[...c.path,"allOf",0]}),f=j(u.right,o,{...c,path:[...c.path,"allOf",1]}),h=(b)=>("allOf"in b)&&Object.keys(b).length===1,_=[...h(p)?p.allOf:[p],...h(f)?f.allOf:[f]];n.allOf=_,o.intersections.push(_)},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",_=p.items.map((E,T)=>j(E,o,{...c,path:[...c.path,f,T]})),b=p.rest?j(p.rest,o,{...c,path:[...c.path,h,...o.target==="openapi-3.0"?[p.items.length]:[]]}):null,v=p.items.length;while(v>0){let E=p.items[v-1];if(!(o.io==="input"?Le(E)!==void 0:E._zod.optout==="optional"))break;v--}let k=p.items.length,Z=!p.rest;if(o.target==="draft-2020-12"){if(u.prefixItems=_,Z)u.items=!1;else if(b)u.items=b;if(v>0)u.minItems=v;if(Z)u.maxItems=k}else if(o.target==="openapi-3.0"){if(u.items={anyOf:_},b)u.items.anyOf.push(b);if(v>0)u.minItems=v;if(Z)u.maxItems=k}else{if(u.items=_,Z)u.additionalItems=!1;else if(b)u.additionalItems=b;if(v>0)u.minItems=v;if(Z)u.maxItems=k}let{minimum:P,maximum:S}=t._zod.bag;if(typeof P==="number")u.minItems=P;if(typeof S==="number")u.maxItems=S};function pr(t,o,n){if(o.$ref){if(n.has(o))return o;n.add(o);let S=t.get(o)?.def;if(!S)return o;let E=pr(t,S,n);return E===S?o:E}for(let S of["anyOf","oneOf"]){let E=o[S];if(!Array.isArray(E))continue;let T=E.map((B)=>pr(t,B,n));if(T.some((B,Y)=>B!==E[Y]))o={...o,[S]:T}}let c=Array.isArray(o.type)?o.type:[o.type],u=!c.includes("string")&&c.some((S)=>S==="number"||S==="integer"),p=o.enum??(o.const!==void 0?[o.const]:void 0);if(!u&&!p?.some((S)=>typeof S==="number"))return o;let{minimum:f,maximum:h,exclusiveMinimum:_,exclusiveMaximum:b,multipleOf:v,format:k,id:Z,...P}=o;if(P.enum)P.enum=P.enum.map((S)=>typeof S==="number"?String(S):S);else if(typeof P.const==="number")P.const=String(P.const);if(!u)return P;if(P.type="string",!p)P.pattern=(c.includes("number")?Ie:Ge).source;return P}var fr=new WeakMap;function pu(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,_=f._zod.bag?.patterns;if(p.mode==="loose"&&_&&_.size>0){let k=j(p.valueType,o,{...c,path:[...c.path,"patternProperties","*"]});u.patternProperties={};for(let Z of _)F(u.patternProperties,Z.source,k)}else{if(o.target==="draft-07"||o.target==="draft-2020-12"){u.propertyNames=j(p.keyType,o,{...c,path:[...c.path,"propertyNames"]});let k=fr.get(o);if(!k)k=[],fr.set(o,k),o.deferred.push(()=>pu(o));k.push(t)}u.additionalProperties=j(p.valueType,o,{...c,path:[...c.path,"additionalProperties"]})}let b=f._zod.values,v=o.io==="input"&&Le(p.valueType)!==void 0;if(b&&!p.partial&&!v){let k=[...b].filter((Z)=>typeof Z==="string"||typeof Z==="number");if(k.length>0)u.required=k.map(String)}},Ar=(t,o,n,c)=>{let u=t._zod.def,p=j(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"}]},Cr=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},jr=Symbol();function Ks(t,o,n,c,u){let p=!1,f=JSON.stringify(t,(h,_)=>{if(typeof _!=="bigint")return _;return p=!0,null});if(!p)return JSON.parse(f);return U(o,n,c,u,"BigInt defaults cannot be represented in JSON Schema"),jr}var Rr=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f=Ks(u.defaultValue,t,o,n,c);if(f!==jr)n.default=f},Dr=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);if(p.ref=u.innerType,o.io!=="input")return;let f=Ks(u.defaultValue,t,o,n,c);if(f!==jr)n._prefault=f},Lr=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{U(t,o,n,c,"Dynamic catch values are not supported in JSON Schema");return}n.default=f},Fr=(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;j(f,o,c);let h=o.seen.get(t);h.ref=f},Ur=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType,n.readOnly=!0},Ws=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},it=(t,o,n,c)=>{let u=t._zod.def;j(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Mr=(t,o,n,c)=>{let u=t._zod.innerType;j(u,o,c);let p=o.seen.get(t);p.ref=u},js={string:dr,number:mr,boolean:hr,bigint:_r,symbol:Rs,null:gr,undefined:Ds,void:xr,never:yr,any:br,unknown:zr,date:vr,enum:$r,literal:wr,nan:Ls,template_literal:Fs,file:Us,success:Ms,custom:kr,function:Js,transform:Zr,map:Bs,set:Vs,array:Pr,object:Sr,union:Or,intersection:Ir,tuple:Er,record:Tr,nullable:Ar,nonoptional:Cr,default:Rr,prefault:Dr,catch:Lr,pipe:Fr,readonly:Ur,promise:Ws,optional:it,lazy:Mr};function Za(t,o){if("_idmap"in t){let c=t,u=je({...o,processors:js}),p={};for(let _ of c._idmap.entries()){let[b,v]=_;j(v,u)}let f={},h={registry:c,uri:o?.uri,defs:p};u.external=h;for(let _ of c._idmap.entries()){let[b,v]=_;Re(u,v),F(f,b,De(u,v))}if(Object.keys(p).length>0){let _=u.target==="draft-2020-12"?"$defs":"definitions";f.__shared={[_]:p}}return{schemas:f}}let n=je({...o,processors:js});return j(t,n),Re(n,t),De(n,t)}var Gs=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 yu=(t,o)=>{Da.init(t,o),t.name="ZodError";let n=Object.getPrototypeOf(t);if(Gs.has(n))return;Gs.add(n),st(n,"format",(c)=>(u)=>Zt(c,u)),st(n,"flatten",(c)=>(u)=>kt(c,u)),st(n,"addIssue",(c)=>(u)=>{c.issues.push(u),c.message=JSON.stringify(c.issues,ke,2)}),st(n,"addIssues",(c)=>(u)=>{c.issues.push(...u),c.message=JSON.stringify(c.issues,ke,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var q=w("ZodError",yu,void 0,{Parent:Error});var qs=Ke(q),Ys=We(q),iu=Se(q),lu=Oe(q),Xs=$o(q),Hs=wo(q),Qs=ko(q),ec=Zo(q),tc=Po(q),rc=So(q),oc=Oo(q),nc=Io(q);function zu(){if(!V.localeError)G(Kt())}function Fe(){if(!V.memoizer)G({memoizer:Vt()})}var C=w("ZodType",(t,o)=>(zu(),N.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 H(this,t,o)},brand(){return this},register(t,o){return t.add(this,o),this},refine(t,o){return this.check(ua(t,o))},superRefine(t,o){return this.check(aa(t,o))},overwrite(t){return this.check(fe(t))},optional(){return xe(this)},exactOptional(){return Gu(this)},nullable(){return a(this)},nullish(){return xe(a(this))},nonoptional(t){return ea(this,t)},array(){return s(this)},or(t){return I([this,t])},and(t){return ia(this,t)},transform(t){return sc(this,_c(t))},default(t){return Xu(this,t)},prefault(t){return Qu(this,t)},catch(t){return ra(this,t)},pipe(t){return sc(this,t)},readonly(){return sa(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 yt(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 qs(this,o,n,{callee:t})},parseAsync:async function t(o,n){return await Ys(this,o,n,{callee:t})},safeParse(t,o){return iu(this,t,o)},async safeParseAsync(t,o){return lu(this,t,o)},get spa(){return this?.safeParseAsync},set spa(t){de(this,"spa",t)},encode:function t(o,n){return Xs(this,o,n,{callee:t})},decode:function t(o,n){return Hs(this,o,n,{callee:t})},encodeAsync:async function t(o,n){return await Qs(this,o,n,{callee:t})},decodeAsync:async function t(o,n){return await ec(this,o,n,{callee:t})},safeEncode(t,o){return tc(this,t,o)},safeDecode(t,o){return rc(this,t,o)},async safeEncodeAsync(t,o){return oc(this,t,o)},async safeDecodeAsync(t,o){return nc(this,t,o)},toJSONSchema(t){return Cs(this,{})(t)},get description(){return pe.get(this)?.description},get _def(){return this._zod.def}}),cc=w("_ZodString",(t,o)=>{He.init(t,o),C.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(Qt(...t))},includes(...t){return this.check(rr(...t))},startsWith(...t){return this.check(or(...t))},endsWith(...t){return this.check(nr(...t))},min(...t){return this.check(ve(...t))},max(...t){return this.check(ot(...t))},length(...t){return this.check(nt(...t))},nonempty(...t){return this.check(ve(1,...t))},lowercase(t){return this.check(er(t))},uppercase(t){return this.check(tr(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=w("ZodString",(t,o)=>{He.init(t,o),cc.init(t,o)},{email(t){return this.check(Wt(lc,t))},url(t){return this.check(Gt(pc,t))},jwt(t){return this.check(ps(Cu,t))},emoji(t){return this.check(Qi($u,t))},guid(t){return this.check(Gi(vu,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(wu,t))},cuid(t){return this.check(ts(ku,t))},cuid2(t){return this.check(rs(Zu,t))},ulid(t){return this.check(os(Pu,t))},base64(t){return this.check(us(Tu,t))},base64url(t){return this.check(as(Au,t))},xid(t){return this.check(ns(Su,t))},ksuid(t){return this.check(is(Ou,t))},ipv4(t){return this.check(qt(fc,t))},ipv6(t){return this.check(Yt(dc,t))},cidrv4(t){return this.check(ss(Iu,t))},cidrv6(t){return this.check(cs(Eu,t))},e164(t){return this.check(ls(Nu,t))},datetime(t){return this.check(tt(Br,t))},date(t){return this.check(rt(Vr,t))},time(t){return this.check(Xt(uc,t))},duration(t){return this.check(Ht(ac,t))}});function e(t){return Ki(Jr,t)}var L=w("ZodStringFormat",(t,o)=>{R.init(t,o),cc.init(t,o)}),Br=w("ZodISODateTime",(t,o)=>{Kn.init(t,o),L.init(t,o)}),Vr=w("ZodISODate",(t,o)=>{Wn.init(t,o),L.init(t,o)}),uc=w("ZodISOTime",(t,o)=>{Gn.init(t,o),L.init(t,o)}),ac=w("ZodISODuration",(t,o)=>{qn.init(t,o),L.init(t,o)}),lc=w("ZodEmail",(t,o)=>{Cn.init(t,o),L.init(t,o)});function ro(t){return Wt(lc,t)}var vu=w("ZodGUID",(t,o)=>{An.init(t,o),L.init(t,o)});var ct=w("ZodUUID",(t,o)=>{Nn.init(t,o),L.init(t,o)});var pc=w("ZodURL",(t,o)=>{Dn.init(t,o),L.init(t,o)});function La(t){return Gt(pc,t)}var $u=w("ZodEmoji",(t,o)=>{Ln.init(t,o),L.init(t,o)});var wu=w("ZodNanoID",(t,o)=>{Fn.init(t,o),L.init(t,o)});var ku=w("ZodCUID",(t,o)=>{Un.init(t,o),L.init(t,o)});var Zu=w("ZodCUID2",(t,o)=>{Mn.init(t,o),L.init(t,o)});var Pu=w("ZodULID",(t,o)=>{Jn.init(t,o),L.init(t,o)});var Su=w("ZodXID",(t,o)=>{Bn.init(t,o),L.init(t,o)});var Ou=w("ZodKSUID",(t,o)=>{Vn.init(t,o),L.init(t,o)});var fc=w("ZodIPv4",(t,o)=>{Yn.init(t,o),L.init(t,o)});function jl(t){return qt(fc,t)}var dc=w("ZodIPv6",(t,o)=>{Hn.init(t,o),L.init(t,o)});function Ld(t){return Yt(dc,t)}var Iu=w("ZodCIDRv4",(t,o)=>{Qn.init(t,o),L.init(t,o)});var Eu=w("ZodCIDRv6",(t,o)=>{oi.init(t,o),L.init(t,o)});var Tu=w("ZodBase64",(t,o)=>{ii.init(t,o),L.init(t,o)});var Au=w("ZodBase64URL",(t,o)=>{si.init(t,o),L.init(t,o)});var Nu=w("ZodE164",(t,o)=>{ci.init(t,o),L.init(t,o)});var Cu=w("ZodJWT",(t,o)=>{ui.init(t,o),L.init(t,o)});var at=w("ZodNumber",(t,o)=>{Dt.init(t,o),C.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(ze(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(be(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(ze(0,t))},nonnegative(t){return this.check(ce(0,t))},negative(t){return this.check(be(0,t))},nonpositive(t){return this.check(se(0,t))},multipleOf(t,o){return this.check(Te(t,o))},step(t,o){return this.check(Te(t,o))},finite(){return this}});function i(t){return fs(at,t)}var ju=w("ZodNumberFormat",(t,o)=>{ai.init(t,o),at.init(t,o)});function m(t){return ms(ju,t)}var Kr=w("ZodBoolean",(t,o)=>{li.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>hr(t,n,c,u)});function d(t){return hs(Kr,t)}var mc=w("ZodBigInt",(t,o)=>{pi.init(t,o),C.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(ze(t,o))},lt(t,o){return this.check(be(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(ze(BigInt(0),t))},negative(t){return this.check(be(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(Te(t,o))}});var Ru=w("ZodNull",(t,o)=>{fi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>gr(t,n,c,u)});function no(t){return xs(Ru,t)}var Du=w("ZodAny",(t,o)=>{di.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>br(t,n,c,u)});function x(){return ys(Du)}var Lu=w("ZodUnknown",(t,o)=>{mi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>zr(t,n,c,u)});function z(){return zs(Lu)}var Fu=w("ZodNever",(t,o)=>{hi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>yr(t,n,c,u)});function Bd(t){return vs(Fu,t)}var Uu=w("ZodVoid",(t,o)=>{_i.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>xr(t,n,c,u)});function Ct(t){return $s(Uu,t)}var Wr=w("ZodDate",(t,o)=>{gi.init(t,o),C.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 X(t){return ws(Wr,t)}var Mu=w("ZodArray",(t,o)=>{Fe(),xi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Pr(t,n,c,u),t.element=o.element},{min(t,o){return this.check(ve(t,o))},nonempty(t){return this.check(ve(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 s(t,o){return Zs(Mu,t,o)}var ei=w("ZodObject",(t,o)=>{Fe(),zi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Sr(t,n,c,u),Ac(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:z()})},loose(){return this.clone({...this._zod.def,catchall:z()})},strict(){return this.clone({...this._zod.def,catchall:Bd()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(t){return kc(this,t)},safeExtend(t){return Zc(this,t)},merge(t){return Pc(this,t)},pick(t){return $c(this,t)},omit(t){return wc(this,t)},partial(...t){return po(ti,this,t[0])},exactPartial(...t){return po(gc,this,t[0],"exactPartial")},required(...t){return Sc(xc,this,t[0])}});function r(t,o){let n={type:"object",shape:t??{},...O(o)};return new ei(n)}function ne(t,o){return new ei({type:"object",shape:t,catchall:z(),...O(o)})}var hc=w("ZodUnion",(t,o)=>{Lt.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Or(t,n,c,u),t.options=o.options});function I(t,o){return new hc({type:"union",options:t,...O(o)})}var Ju=w("ZodDiscriminatedUnion",(t,o)=>{hc.init(t,o),vi.init(t,o)});function ee(t,o,n){return new Ju({type:"union",options:o,discriminator:t,...O(n)})}var Bu=w("ZodIntersection",(t,o)=>{$i.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ir(t,n,c,u)});function ia(t,o){return new Bu({type:"intersection",left:t,right:o})}var Vu=w("ZodTuple",(t,o)=>{Fe(),wi.init(t,o),C.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 ti({type:"optional",innerType:o}))})}});function bs(t,o,n){let c=o instanceof N,u=c?n:o;return new Vu({type:"tuple",items:t,rest:c?o:null,...O(u)})}var ic=w("ZodRecord",(t,o)=>{Fe(),ki.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Tr(t,n,c,u),t.keyType=o.keyType,t.valueType=o.valueType});function y(t,o,n){if(!o||!o._zod)return new ic({type:"record",keyType:e(),valueType:t,...O(o)});return new ic({type:"record",keyType:t,valueType:o,...O(n)})}var ut=w("ZodEnum",(t,o)=>{Zi.init(t,o),C.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:[],...O(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:[],...O(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,...O(o)})}function Jt(t,o){return new ut({type:"enum",entries:t,...O(o)})}var Ku=w("ZodLiteral",(t,o)=>{Pi.init(t,o),C.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 Ku({type:"literal",values:Array.isArray(t)?t:[t],...O(o)})}var Wu=w("ZodTransform",(t,o)=>{Fe(),Si.init(t,o),C.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 Pe(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 _c(t){return new Wu({type:"transform",transform:t})}var ti=w("ZodOptional",(t,o)=>{Ft.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function xe(t){return new ti({type:"optional",innerType:t})}var gc=w("ZodExactOptional",(t,o)=>{Oi.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Gu(t){return new gc({type:"optional",innerType:t})}var qu=w("ZodNullable",(t,o)=>{Ii.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ar(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function a(t){return new qu({type:"nullable",innerType:t})}var Yu=w("ZodDefault",(t,o)=>{Ei.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Rr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Xu(t,o){return new Yu({type:"default",innerType:t,get defaultValue(){return typeof o==="function"?o():_t(o)}})}var Hu=w("ZodPrefault",(t,o)=>{Ti.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Dr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Qu(t,o){return new Hu({type:"prefault",innerType:t,get defaultValue(){return typeof o==="function"?o():_t(o)}})}var xc=w("ZodNonOptional",(t,o)=>{Ai.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Cr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function ea(t,o){return new xc({type:"nonoptional",innerType:t,...O(o)})}var ta=w("ZodCatch",(t,o)=>{Ni.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Lr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ra(t,o){return new ta({type:"catch",innerType:t,catchValue:typeof o==="function"?o:_o(o)})}var yc=w("ZodPipe",(t,o)=>{Ut.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Fr(t,n,c,u),t.in=o.in,t.out=o.out});function sc(t,o){return new yc({type:"pipe",in:t,out:o})}var oa=w("ZodPreprocess",(t,o)=>{yc.init(t,o),Ci.init(t,o)}),na=w("ZodReadonly",(t,o)=>{ji.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ur(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function sa(t){return new na({type:"readonly",innerType:t})}var ca=w("ZodLazy",(t,o)=>{Ri.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Mr(t,n,c,u),t.unwrap=()=>t._zod.def.getter()});function mt(t){return new ca({type:"lazy",getter:t})}var Gr=w("ZodCustom",(t,o)=>{Di.init(t,o),C.init(t,o),t._zod.processJSONSchema=(n,c,u)=>kr(t,n,c,u)});function dt(t,o){return Ps(Gr,t??(()=>!0),o)}function ua(t,o={}){return Ss(Gr,t,o)}function aa(t,o){return Os(t,o)}function cu(t,o={}){let n=new Gr({type:"custom",check:"custom",fn:(c)=>c instanceof t,abort:!0,...O(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 Ba(t){let o=mt(()=>I([e(t),i(),d(),no(),s(o),y(e(),o)]));return o}function ri(t,o){return new oa({type:"pipe",in:_c(t),out:o})}var la={};Ne(la,{bigint:()=>fa,boolean:()=>ql,date:()=>da,number:()=>Lp,string:()=>Zp});function Zp(t){return Wi(Jr,t)}function Lp(t){return ds(at,t)}function ql(t){return _s(Kr,t)}function fa(t){return gs(mc,t)}function da(t){return ks(Wr,t)}function J(t){return tt(Br,t)}function Zg(t){return rt(Vr,t)}export{Nr,Da,Zd,Za,iu,lu,e,ro,La,jl,Ld,i,m,d,no,x,z,Bd,Ct,X,s,ei,r,ne,I,ee,ia,bs,y,g,Jt,l,ti,xe,a,mt,dt,cu,Ba,ri,J,Zg,Zp,Lp,ql,la};
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 _=h.length===1?h[0]:lr(h)??{allOf:h};L(n,f,_)}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((_)=>JSON.stringify(_)===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 du(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((_)=>Array.isArray(u[_]));if(Object.keys(u).length!==1)return;let f=o.filter((_)=>_!==u),h=u[p].map((_)=>lr([...f,_]));if(h.some((_)=>!_))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 _=t.seen.get(h);if(_.ref===null)return;let b=_.def??_.schema,z={...b},w=_.ref;if(_.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 E in b){if(E==="$ref"||E==="allOf")continue;if(!(E in z))delete b[E]}if(P.$ref&&Z.def)for(let E in b){if(E==="$ref"||E==="allOf")continue;if(E in Z.def&&JSON.stringify(b[E])===JSON.stringify(Z.def[E]))delete b[E]}}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:_.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 _ of t.seen.values())for(let b of[_.schema,_.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 _ of t.intersections)for(let b of h.get(_)??[])du(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 _=h[1];if(_.def&&_.defId){if(_.def.id===_.defId)delete _.def.id;L(f,_.defId,_.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 mu={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:_,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=mu[h]??h,u.format==="")delete u.format;if(h==="time"||z)delete u.format}if(b)u.contentEncoding=b;if(_&&_.size>0){let w=[..._];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:_,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 _==="number")if(Number.isFinite(_)&&_!==0)u.multipleOf=Math.abs(_);else U(t,o,u,c,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`)},hr=(t,o,n,c)=>{n.type="boolean"},_r=(t,o,n,c)=>{U(t,o,n,c,"BigInt cannot be represented in JSON Schema")},Ds=(t,o,n,c)=>{U(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)=>{U(t,o,n,c,"Undefined cannot be represented in JSON Schema")},xr=(t,o,n,c)=>{U(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)=>{U(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(U(t,o,n,c,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof f==="bigint"){if(U(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)=>{U(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:_}=t._zod.bag;if(f!==void 0)p.minLength=f;if(h!==void 0)p.maxLength=h;if(_)if(_.length===1)p.contentMediaType=_[0],Object.assign(u,p);else Object.assign(u,p),u.anyOf=_.map((b)=>({contentMediaType:b}));else Object.assign(u,p)},Js=(t,o,n,c)=>{n.type="boolean"},kr=(t,o,n,c)=>{U(t,o,n,c,"Custom types cannot be represented in JSON Schema")},Bs=(t,o,n,c)=>{U(t,o,n,c,"Function types cannot be represented in JSON Schema")},Zr=(t,o,n,c)=>{U(t,o,n,c,"Transforms cannot be represented in JSON Schema")},Gs=(t,o,n,c)=>{U(t,o,n,c,"Map cannot be represented in JSON Schema")},qs=(t,o,n,c)=>{U(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&&U(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 _=new Set(Object.keys(f)),b=new Set([..._].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,_)=>C(h,o,{...c,path:[...c.path,p?"oneOf":"anyOf",_]}));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,_=[...h(p)?p.allOf:[p],...h(f)?f.allOf:[f]];n.allOf=_,o.intersections.push(_)},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",_=p.items.map((O,E)=>C(O,o,{...c,path:[...c.path,f,E]})),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=_,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:_},b)u.items.anyOf.push(b);if(z>0)u.minItems=z;if(k)u.maxItems=w}else{if(u.items=_,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 E=O.map((J)=>pr(t,J,n));if(E.some((J,q)=>J!==O[q]))o={...o,[P]:E}}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:_,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 hu(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,_=f._zod.bag?.patterns;if(p.mode==="loose"&&_&&_.size>0){let w=C(p.valueType,o,{...c,path:[...c.path,"patternProperties","*"]});u.patternProperties={};for(let k of _)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(()=>hu(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 Xs(t,o,n,c,u){let p=!1,f=JSON.stringify(t,(h,_)=>{if(typeof _!=="bigint")return _;return p=!0,null});if(!p)return JSON.parse(f);return U(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=Xs(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=Xs(u.defaultValue,t,o,n,c);if(f!==Cr)n._prefault=f},Lr=(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{U(t,o,n,c,"Dynamic catch values are not supported in JSON Schema");return}n.default=f},Fr=(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},Hs=(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:Gs,set:qs,array:Pr,object:Sr,union:Or,intersection:Ir,tuple:Er,record:Tr,nullable:Ar,nonoptional:Nr,default:jr,prefault:Rr,catch:Lr,pipe:Fr,readonly:Ur,promise:Hs,optional:it,lazy:Mr};function Ks(t,o){if("_idmap"in t){let c=t,u=je({...o,processors:Rs}),p={};for(let _ of c._idmap.entries()){let[b,z]=_;C(z,u)}let f={},h={registry:c,uri:o?.uri,defs:p};u.external=h;for(let _ of c._idmap.entries()){let[b,z]=_;Re(u,z),L(f,b,De(u,z))}if(Object.keys(p).length>0){let _=u.target==="draft-2020-12"?"$defs":"definitions";f.__shared={[_]: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 ku=(t,o)=>{Vs.init(t,o),t.name="ZodError";let n=Object.getPrototypeOf(t);if(Qs.has(n))return;Qs.add(n),st(n,"format",(c)=>(u)=>Zt(c,u)),st(n,"flatten",(c)=>(u)=>kt(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",ku,void 0,{Parent:Error});var ec=Ke(G),tc=We(G),Au=Pe(G),yu=Ie(G),rc=$o(G),oc=wo(G),nc=ko(G),ic=Zo(G),sc=Po(G),uc=So(G),ac=Oo(G),pc=Io(G);function Pu(){if(!B.localeError)W(Vt())}function Fe(){if(!B.memoizer)W({memoizer:Bt()})}var N=v("ZodType",(t,o)=>(Pu(),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 ta(this)},nullable(){return s(this)},nullish(){return Se(s(this))},nonoptional(t){return ca(this,t)},array(){return a(this)},or(t){return I([this,t])},and(t){return _s(this,t)},transform(t){return dc(this,$c(t))},default(t){return na(this,t)},prefault(t){return sa(this,t)},catch(t){return aa(this,t)},pipe(t){return dc(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 yt(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 ec(this,o,n,{callee:t})},parseAsync:async function t(o,n){return await tc(this,o,n,{callee:t})},safeParse(t,o){return Au(this,t,o)},async safeParseAsync(t,o){return yu(this,t,o)},get spa(){return this?.safeParseAsync},set spa(t){de(this,"spa",t)},encode:function t(o,n){return rc(this,o,n,{callee:t})},decode:function t(o,n){return oc(this,o,n,{callee:t})},encodeAsync:async function t(o,n){return await nc(this,o,n,{callee:t})},decodeAsync:async function t(o,n){return await ic(this,o,n,{callee:t})},safeEncode(t,o){return sc(this,t,o)},safeDecode(t,o){return uc(this,t,o)},async safeEncodeAsync(t,o){return ac(this,t,o)},async safeDecodeAsync(t,o){return pc(this,t,o)},toJSONSchema(t){return js(this,{})(t)},get description(){return pe.get(this)?.description},get _def(){return this._zod.def}}),mc=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(rr(...t))},startsWith(...t){return this.check(or(...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),mc.init(t,o)},{email(t){return this.check(Kt(gc,t))},url(t){return this.check(Wt(xc,t))},jwt(t){return this.check(ps(Mu,t))},emoji(t){return this.check(Qi(Ou,t))},guid(t){return this.check(Gi(Su,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(Iu,t))},cuid(t){return this.check(ts(Eu,t))},cuid2(t){return this.check(rs(Tu,t))},ulid(t){return this.check(os(Nu,t))},base64(t){return this.check(us(Lu,t))},base64url(t){return this.check(as(Fu,t))},xid(t){return this.check(ns(Cu,t))},ksuid(t){return this.check(is(ju,t))},ipv4(t){return this.check(Gt(yc,t))},ipv6(t){return this.check(qt(bc,t))},cidrv4(t){return this.check(ss(Ru,t))},cidrv6(t){return this.check(cs(Du,t))},e164(t){return this.check(ls(Uu,t))},datetime(t){return this.check(tt(Br,t))},date(t){return this.check(rt(Vr,t))},time(t){return this.check(Yt(hc,t))},duration(t){return this.check(Xt(_c,t))}});function e(t){return Ki(Jr,t)}var D=v("ZodStringFormat",(t,o)=>{j.init(t,o),mc.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)}),hc=v("ZodISOTime",(t,o)=>{Gn.init(t,o),D.init(t,o)}),_c=v("ZodISODuration",(t,o)=>{qn.init(t,o),D.init(t,o)}),gc=v("ZodEmail",(t,o)=>{Cn.init(t,o),D.init(t,o)});function co(t){return Kt(gc,t)}var Su=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 xc=v("ZodURL",(t,o)=>{Dn.init(t,o),D.init(t,o)});function Ws(t){return Wt(xc,t)}var Ou=v("ZodEmoji",(t,o)=>{Ln.init(t,o),D.init(t,o)});var Iu=v("ZodNanoID",(t,o)=>{Fn.init(t,o),D.init(t,o)});var Eu=v("ZodCUID",(t,o)=>{Un.init(t,o),D.init(t,o)});var Tu=v("ZodCUID2",(t,o)=>{Mn.init(t,o),D.init(t,o)});var Nu=v("ZodULID",(t,o)=>{Jn.init(t,o),D.init(t,o)});var Cu=v("ZodXID",(t,o)=>{Bn.init(t,o),D.init(t,o)});var ju=v("ZodKSUID",(t,o)=>{Vn.init(t,o),D.init(t,o)});var yc=v("ZodIPv4",(t,o)=>{Yn.init(t,o),D.init(t,o)});function lc(t){return Gt(yc,t)}var bc=v("ZodIPv6",(t,o)=>{Hn.init(t,o),D.init(t,o)});function tf(t){return qt(bc,t)}var Ru=v("ZodCIDRv4",(t,o)=>{Qn.init(t,o),D.init(t,o)});var Du=v("ZodCIDRv6",(t,o)=>{ei.init(t,o),D.init(t,o)});var Lu=v("ZodBase64",(t,o)=>{ri.init(t,o),D.init(t,o)});var Fu=v("ZodBase64URL",(t,o)=>{oi.init(t,o),D.init(t,o)});var Uu=v("ZodE164",(t,o)=>{ni.init(t,o),D.init(t,o)});var Mu=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 Ju=v("ZodNumberFormat",(t,o)=>{si.init(t,o),at.init(t,o)});function m(t){return ms(Ju,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 zc=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 Bu=v("ZodNull",(t,o)=>{ai.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>gr(t,n,c,u)});function uo(t){return ys(Bu,t)}var Vu=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 zs(Vu)}var Ku=v("ZodUnknown",(t,o)=>{pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>zr(t,n,c,u)});function F(){return vs(Ku)}var Wu=v("ZodNever",(t,o)=>{fi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>yr(t,n,c,u)});function rf(t){return $s(Wu,t)}var Gu=v("ZodVoid",(t,o)=>{di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>xr(t,n,c,u)});function Et(t){return ws(Gu,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 ks(Wr,t)}var qu=v("ZodArray",(t,o)=>{Fe(),_i.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 Ps(qu,t,o)}var hi=v("ZodObject",(t,o)=>{Fe(),bi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Sr(t,n,c,u),Fc(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:F()})},loose(){return this.clone({...this._zod.def,catchall:F()})},strict(){return this.clone({...this._zod.def,catchall:rf()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(t){return Tc(this,t)},safeExtend(t){return Ac(this,t)},merge(t){return Nc(this,t)},pick(t){return Ic(this,t)},omit(t){return Ec(this,t)},partial(...t){return po(gi,this,t[0])},exactPartial(...t){return po(wc,this,t[0],"exactPartial")},required(...t){return Cc(kc,this,t[0])}});function r(t,o){let n={type:"object",shape:t??{},...S(o)};return new hi(n)}function oe(t,o){return new hi({type:"object",shape:t,catchall:F(),...S(o)})}var vc=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 I(t,o){return new vc({type:"union",options:t,...S(o)})}var Yu=v("ZodDiscriminatedUnion",(t,o)=>{vc.init(t,o),zi.init(t,o)});function te(t,o,n){return new Yu({type:"union",options:o,discriminator:t,...S(n)})}var Xu=v("ZodIntersection",(t,o)=>{vi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ir(t,n,c,u)});function _s(t,o){return new Xu({type:"intersection",left:t,right:o})}var Hu=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 gi({type:"optional",innerType:o}))})}});function Oa(t,o,n){let c=o instanceof A,u=c?n:o;return new Hu({type:"tuple",items:t,rest:c?o:null,...S(u)})}var fc=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 y(t,o,n){if(!o||!o._zod)return new fc({type:"record",keyType:e(),valueType:t,...S(o)});return new fc({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 tr(t,o){return new ut({type:"enum",entries:t,...S(o)})}var Qu=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 Qu({type:"literal",values:Array.isArray(t)?t:[t],...S(o)})}var ea=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 $c(t){return new ea({type:"transform",transform:t})}var gi=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 gi({type:"optional",innerType:t})}var wc=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 ta(t){return new wc({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():_t(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():_t(o)}})}var kc=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 kc({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)=>Lr(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 Zc=v("ZodPipe",(t,o)=>{Ut.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Fr(t,n,c,u),t.in=o.in,t.out=o.out});function dc(t,o){return new Zc({type:"pipe",in:t,out:o})}var la=v("ZodPreprocess",(t,o)=>{Zc.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 ht(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 ft(t,o){return Ss(Gr,t??(()=>!0),o)}function ma(t,o={}){return Os(Gr,t,o)}function ha(t,o){return Is(t,o)}function _u(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 Ys(t){let o=ht(()=>I([e(t),i(),d(),uo(),a(o),y(e(),o)]));return o}function Ai(t,o){return new la({type:"pipe",in:$c(t),out:o})}var bs={};Oe(bs,{bigint:()=>ga,boolean:()=>cc,date:()=>xa,number:()=>rm,string:()=>tm});function tm(t){return Wi(Jr,t)}function rm(t){return ds(at,t)}function cc(t){return gs(Kr,t)}function ga(t){return xs(zc,t)}function xa(t){return Zs(Wr,t)}function X(t){return tt(Br,t)}function oA(t){return rt(Vr,t)}export{Dr,Vs,ef,Ks,Au,yu,e,co,Ws,lc,tf,i,m,d,uo,x,F,rf,Et,ee,a,hi,r,oe,I,te,_s,Oa,y,g,tr,l,gi,Se,s,ht,ft,_u,Ys,Ai,X,oA,tm,rm,cc,bs};