@oomol-lab/open-flow 0.1.0-beta.27 → 0.1.0-beta.29

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 (56) hide show
  1. package/dist/browser/{createResourceDialog-BwI2JmPE.js → createResourceDialog-C_8I3Fua.js} +1 -1
  2. package/dist/browser/dist-CoszrK7m.js +4 -0
  3. package/dist/browser/{switch-CyZ96-UF.js → editorComponent-Dq4IKp5R.js} +5787 -651
  4. package/dist/browser/flow-authoring-node.d.ts +6 -2
  5. package/dist/browser/flow-authoring.js +1489 -1638
  6. package/dist/browser/flow-change-schema.d.ts +4 -0
  7. package/dist/browser/flow-change.d.ts +20 -14
  8. package/dist/browser/flow-change.js +1057 -1179
  9. package/dist/browser/flow-notifications.d.ts +6 -2
  10. package/dist/browser/{flowChanges-DhEjA0n5.js → flowChanges-BBtkyUGd.js} +2192 -1975
  11. package/dist/browser/{flowRunInputEditorStore-BBqQIOCR.js → flowRunInputEditorStore-CTORQcA2.js} +378 -429
  12. package/dist/browser/{flowWorkspace-zcweMsLS.js → flowWorkspace-DNmBb3ZW.js} +62886 -66618
  13. package/dist/browser/host-conformance.js +7 -1
  14. package/dist/browser/{inputValues-C5ExCCf0.js → inputValues-BbSVOWQP.js} +2 -2
  15. package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-D2oHGWc6.js} +24 -24
  16. package/dist/browser/ui.css +1 -1
  17. package/dist/browser/value-DPg_9yXB.js +93 -0
  18. package/dist/browser/workbench.css +1 -1
  19. package/dist/browser/workbench.js +769 -605
  20. package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-CQOvpteT.js} +1507 -1642
  21. package/dist/common/authoringExamples.d.ts +28 -0
  22. package/dist/common/control-api-conformance.js +1449 -1556
  23. package/dist/common/control-api-errors.d.ts +8 -0
  24. package/dist/common/control-api.d.ts +12 -4
  25. package/dist/common/control-api.js +1480 -1560
  26. package/dist/common/control-requests.d.ts +13 -6
  27. package/dist/common/control-requests.js +1886 -1445
  28. package/dist/common/cron-trigger.d.ts +2 -1
  29. package/dist/common/cron-trigger.js +27 -24
  30. package/dist/common/draftOperations.d.ts +14 -0
  31. package/dist/common/engine-contract.d.ts +2 -2
  32. package/dist/common/flow-encoding.d.ts +3 -0
  33. package/dist/common/flow-encoding.js +1488 -1524
  34. package/dist/common/flow-graph.d.ts +18 -2
  35. package/dist/common/flow-notifications.d.ts +6 -2
  36. package/dist/common/flow-schema.d.ts +1 -2
  37. package/dist/common/flow-semantics.d.ts +2 -1
  38. package/dist/common/flow-semantics.js +7809 -7820
  39. package/dist/common/flowInspection.d.ts +16 -0
  40. package/dist/common/integration-trigger.d.ts +2 -2
  41. package/dist/common/integration-trigger.js +8 -8
  42. package/dist/common/mcp.d.ts +2 -1
  43. package/dist/common/mcp.js +985 -1060
  44. package/dist/common/poll-trigger.d.ts +3 -0
  45. package/dist/common/poll-trigger.js +26 -22
  46. package/dist/common/provider-triggers.js +3096 -3126
  47. package/dist/common/run-events.js +1 -0
  48. package/dist/common/runtime-contract.js +3 -3
  49. package/dist/common/scheduler.d.ts +6 -5
  50. package/dist/common/scheduler.js +2318 -2383
  51. package/dist/common/trigger-contract.d.ts +5 -0
  52. package/dist/common/webhook-trigger.d.ts +3 -3
  53. package/dist/common/webhook-trigger.js +64 -18
  54. package/package.json +1 -1
  55. package/dist/browser/dist-B_T-OpQp.js +0 -4
  56. package/dist/browser/languages-C0zQ4GSo.js +0 -42
@@ -88,7 +88,7 @@ function te(e) {
88
88
  return typeof e == "object" && !!e && !Array.isArray(e);
89
89
  }
90
90
  var ne = /* @__PURE__*/ a(() => {
91
- if (E.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
91
+ if (T.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
92
92
  try {
93
93
  return Function(""), !0;
94
94
  } catch {
@@ -485,44 +485,44 @@ function w(e, t, n, r) {
485
485
  }
486
486
  return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
487
487
  }
488
- var T = class extends Error {
488
+ var Le = class extends Error {
489
489
  constructor() {
490
490
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
491
491
  }
492
- }, Le = class extends Error {
492
+ }, Re = class extends Error {
493
493
  constructor(e) {
494
494
  super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
495
495
  }
496
496
  };
497
497
  (Ne = globalThis).__zod_globalConfig ?? (Ne.__zod_globalConfig = {});
498
- var E = globalThis.__zod_globalConfig;
499
- function D(e) {
500
- return e && Object.assign(E, e), E;
498
+ var T = globalThis.__zod_globalConfig;
499
+ function E(e) {
500
+ return e && Object.assign(T, e), T;
501
501
  }
502
502
  //#endregion
503
503
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
504
- function Re() {
504
+ function ze() {
505
505
  let e = this._zod;
506
506
  return e.message ??= JSON.stringify(e.def, i, 2), e.message;
507
507
  }
508
- function ze(e) {
508
+ function Be(e) {
509
509
  this._zod.message = e;
510
510
  }
511
- var Be = {
512
- get: Re,
513
- set: ze,
511
+ var Ve = {
512
+ get: ze,
513
+ set: Be,
514
514
  enumerable: !0,
515
515
  configurable: !0
516
- }, Ve = {
516
+ }, He = {
517
517
  value: void 0,
518
518
  enumerable: !1
519
- }, He = {
519
+ }, Ue = {
520
520
  value: void 0,
521
521
  enumerable: !1
522
- }, Ue = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), We = (e, t) => {
523
- e.name = "$ZodError", Ve.value = e._zod, Object.defineProperty(e, "_zod", Ve), He.value = t, Object.defineProperty(e, "issues", He), Ve.value = void 0, He.value = void 0, Object.defineProperty(e, "message", Be);
522
+ }, We = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Ge = (e, t) => {
523
+ e.name = "$ZodError", He.value = e._zod, Object.defineProperty(e, "_zod", He), Ue.value = t, Object.defineProperty(e, "issues", Ue), He.value = void 0, Ue.value = void 0, Object.defineProperty(e, "message", Ve);
524
524
  let n = Object.getPrototypeOf(e);
525
- Ue.has(n) || (Ue.add(n), Object.defineProperty(n, "toString", {
525
+ We.has(n) || (We.add(n), Object.defineProperty(n, "toString", {
526
526
  configurable: !0,
527
527
  enumerable: !1,
528
528
  get() {
@@ -541,8 +541,8 @@ var Be = {
541
541
  });
542
542
  }
543
543
  }));
544
- }, Ge = w("$ZodError", We), Ke = w("$ZodError", We, void 0, { Parent: Error });
545
- function qe(e, t, n) {
544
+ }, Ke = w("$ZodError", Ge), qe = w("$ZodError", Ge, void 0, { Parent: Error });
545
+ function Je(e, t, n) {
546
546
  return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
547
547
  value: n(),
548
548
  writable: !0,
@@ -550,15 +550,15 @@ function qe(e, t, n) {
550
550
  configurable: !0
551
551
  }) : e[t] = n()), e[t];
552
552
  }
553
- function Je(e, t = (e) => e.message) {
553
+ function Ye(e, t = (e) => e.message) {
554
554
  let n = {}, r = [];
555
- for (let i of e.issues) i.path.length > 0 ? qe(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
555
+ for (let i of e.issues) i.path.length > 0 ? Je(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
556
556
  return {
557
557
  formErrors: r,
558
558
  fieldErrors: n
559
559
  };
560
560
  }
561
- function Ye(e, t = (e) => e.message) {
561
+ function Xe(e, t = (e) => e.message) {
562
562
  let n = { _errors: [] }, r = (e, i = []) => {
563
563
  for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
564
564
  else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
@@ -590,13 +590,13 @@ function Ye(e, t = (e) => e.message) {
590
590
  }
591
591
  //#endregion
592
592
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/parse.js
593
- function Xe(e, t) {
593
+ function Ze(e, t) {
594
594
  return {
595
595
  callee: t?.callee ?? e,
596
596
  Err: t?.Err
597
597
  };
598
598
  }
599
- var Ze = (e) => {
599
+ var Qe = (e) => {
600
600
  let t = (n, r, i, a) => {
601
601
  let o = i ? {
602
602
  ...i,
@@ -605,15 +605,15 @@ var Ze = (e) => {
605
605
  value: r,
606
606
  issues: []
607
607
  }, o);
608
- if (s instanceof Promise) throw new T();
608
+ if (s instanceof Promise) throw new Le();
609
609
  if (s.issues.length) {
610
- let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, D())));
610
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, E())));
611
611
  throw ee(n, a?.callee ?? t), n;
612
612
  }
613
613
  return s.value;
614
614
  };
615
615
  return t;
616
- }, Qe = (e) => {
616
+ }, $e = (e) => {
617
617
  let t = async (n, r, i, a) => {
618
618
  let o = i ? {
619
619
  ...i,
@@ -623,13 +623,13 @@ var Ze = (e) => {
623
623
  issues: []
624
624
  }, o);
625
625
  if (s instanceof Promise && (s = await s), s.issues.length) {
626
- let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, D())));
626
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, E())));
627
627
  throw ee(n, a?.callee ?? t), n;
628
628
  }
629
629
  return s.value;
630
630
  };
631
631
  return t;
632
- }, $e = (e) => (t, n, r) => {
632
+ }, et = (e) => (t, n, r) => {
633
633
  let i = r ? {
634
634
  ...r,
635
635
  async: !1
@@ -637,15 +637,15 @@ var Ze = (e) => {
637
637
  value: n,
638
638
  issues: []
639
639
  }, i);
640
- if (a instanceof Promise) throw new T();
640
+ if (a instanceof Promise) throw new Le();
641
641
  return a.issues.length ? {
642
642
  success: !1,
643
- error: new (e ?? Ge)(a.issues.map((e) => b(e, i, D())))
643
+ error: new (e ?? Ke)(a.issues.map((e) => b(e, i, E())))
644
644
  } : {
645
645
  success: !0,
646
646
  data: a.value
647
647
  };
648
- }, et = /* @__PURE__*/ $e(Ke), tt = (e) => async (t, n, r) => {
648
+ }, tt = /* @__PURE__*/ et(qe), nt = (e) => async (t, n, r) => {
649
649
  let i = r ? {
650
650
  ...r,
651
651
  async: !0
@@ -655,98 +655,98 @@ var Ze = (e) => {
655
655
  }, i);
656
656
  return a instanceof Promise && (a = await a), a.issues.length ? {
657
657
  success: !1,
658
- error: new e(a.issues.map((e) => b(e, i, D())))
658
+ error: new e(a.issues.map((e) => b(e, i, E())))
659
659
  } : {
660
660
  success: !0,
661
661
  data: a.value
662
662
  };
663
- }, nt = /* @__PURE__*/ tt(Ke), rt = (e) => {
664
- let t = Ze(e), n = (e, r, i, a) => {
663
+ }, rt = /* @__PURE__*/ nt(qe), it = (e) => {
664
+ let t = Qe(e), n = (e, r, i, a) => {
665
665
  let o = i ? {
666
666
  ...i,
667
667
  direction: "backward"
668
668
  } : { direction: "backward" };
669
- return t(e, r, o, Xe(n, a));
669
+ return t(e, r, o, Ze(n, a));
670
670
  };
671
671
  return n;
672
- }, it = (e) => {
673
- let t = Ze(e), n = (e, r, i, a) => t(e, r, i, Xe(n, a));
674
- return n;
675
672
  }, at = (e) => {
676
- let t = Qe(e), n = async (e, r, i, a) => {
673
+ let t = Qe(e), n = (e, r, i, a) => t(e, r, i, Ze(n, a));
674
+ return n;
675
+ }, ot = (e) => {
676
+ let t = $e(e), n = async (e, r, i, a) => {
677
677
  let o = i ? {
678
678
  ...i,
679
679
  direction: "backward"
680
680
  } : { direction: "backward" };
681
- return await t(e, r, o, Xe(n, a));
681
+ return await t(e, r, o, Ze(n, a));
682
682
  };
683
683
  return n;
684
- }, ot = (e) => {
685
- let t = Qe(e), n = async (e, r, i, a) => await t(e, r, i, Xe(n, a));
684
+ }, st = (e) => {
685
+ let t = $e(e), n = async (e, r, i, a) => await t(e, r, i, Ze(n, a));
686
686
  return n;
687
- }, st = (e) => (t, n, r) => {
687
+ }, ct = (e) => (t, n, r) => {
688
688
  let i = r ? {
689
689
  ...r,
690
690
  direction: "backward"
691
691
  } : { direction: "backward" };
692
- return $e(e)(t, n, i);
693
- }, ct = (e) => (t, n, r) => $e(e)(t, n, r), lt = (e) => async (t, n, r) => {
692
+ return et(e)(t, n, i);
693
+ }, lt = (e) => (t, n, r) => et(e)(t, n, r), ut = (e) => async (t, n, r) => {
694
694
  let i = r ? {
695
695
  ...r,
696
696
  direction: "backward"
697
697
  } : { direction: "backward" };
698
- return tt(e)(t, n, i);
699
- }, ut = (e) => async (t, n, r) => tt(e)(t, n, r), dt = /^[cC][0-9a-z]{6,}$/, ft = /^[0-9a-z]+$/, pt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, mt = /^[0-9a-vA-V]{20}$/, ht = /^[A-Za-z0-9]{27}$/, gt = /^[a-zA-Z0-9_-]{21}$/;
700
- function _t(e) {
698
+ return nt(e)(t, n, i);
699
+ }, dt = (e) => async (t, n, r) => nt(e)(t, n, r), ft = /^[cC][0-9a-z]{6,}$/, pt = /^[0-9a-z]+$/, mt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, ht = /^[0-9a-vA-V]{20}$/, gt = /^[A-Za-z0-9]{27}$/, _t = /^[a-zA-Z0-9_-]{21}$/;
700
+ function vt(e) {
701
701
  return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
702
702
  }
703
- var vt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, yt = /^([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})$/, bt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, xt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, St = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
704
- function Ct() {
705
- return new RegExp(St, "u");
703
+ var yt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, bt = /^([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})$/, xt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, St = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Ct = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
704
+ function wt() {
705
+ return new RegExp(Ct, "u");
706
706
  }
707
- var wt = /^(?:(?: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])$/, Tt = /^(([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}|:))$/, Et = /^((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])$/, Dt = /^(([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])$/, Ot = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, kt = /^[A-Za-z0-9_-]*$/, At = /^https?$/, jt = /^\+[1-9]\d{6,14}$/, Mt = "(?:(?:\\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])))";
708
- function Nt(e) {
707
+ var Tt = /^(?:(?: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])$/, Et = /^(([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}|:))$/, Dt = /^((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])$/, Ot = /^(([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])$/, kt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, At = /^[A-Za-z0-9_-]*$/, jt = /^https?$/, Mt = /^\+[1-9]\d{6,14}$/, Nt = "(?:(?:\\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])))";
708
+ function Pt(e) {
709
709
  return RegExp(`^${e}$`);
710
710
  }
711
- var Pt = /*@__PURE__*/ Nt(Mt);
712
- function Ft(e) {
711
+ var Ft = /*@__PURE__*/ Pt(Nt);
712
+ function It(e) {
713
713
  let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
714
714
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
715
715
  }
716
- function It(e) {
717
- return RegExp(`^${Ft(e)}$`);
718
- }
719
716
  function Lt(e) {
717
+ return RegExp(`^${It(e)}$`);
718
+ }
719
+ function Rt(e) {
720
720
  let t = ["Z"];
721
721
  e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
722
- let n = `${Ft({
722
+ let n = `${It({
723
723
  precision: e.precision,
724
724
  seconds: !0
725
- })}(?:${t.join("|")})`, r = e.local ? `${n}|${Ft({ precision: e.precision })}` : n;
726
- return RegExp(`^${Mt}T(?:${r})$`);
725
+ })}(?:${t.join("|")})`, r = e.local ? `${n}|${It({ precision: e.precision })}` : n;
726
+ return RegExp(`^${Nt}T(?:${r})$`);
727
727
  }
728
- var Rt = (e) => {
728
+ var zt = (e) => {
729
729
  let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
730
730
  return RegExp(`^${t}$`);
731
- }, zt = /^-?\d+$/, Bt = /^-?\d+(?:\.\d+)?$/, Vt = /^(?:true|false)$/i, Ht = /^null$/i, Ut = /^[^A-Z]*$/, Wt = /^[^a-z]*$/, O = /*@__PURE__*/ w("$ZodCheck", (e, t) => {
731
+ }, Bt = /^-?\d+$/, Vt = /^-?\d+(?:\.\d+)?$/, Ht = /^(?:true|false)$/i, Ut = /^null$/i, Wt = /^[^A-Z]*$/, Gt = /^[^a-z]*$/, D = /*@__PURE__*/ w("$ZodCheck", (e, t) => {
732
732
  var n;
733
733
  e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
734
- }), Gt = (e) => {
734
+ }), Kt = (e) => {
735
735
  let t = e.value;
736
736
  return !o(t) && t.length !== void 0;
737
- }, Kt = {
737
+ }, qt = {
738
738
  number: "number",
739
739
  bigint: "bigint",
740
740
  object: "date"
741
- }, qt = /*@__PURE__*/ w("$ZodCheckLessThan", (e, t) => {
742
- O.init(e, t);
743
- let n = Kt[typeof t.value];
741
+ }, Jt = /*@__PURE__*/ w("$ZodCheckLessThan", (e, t) => {
742
+ D.init(e, t);
743
+ let n = qt[typeof t.value];
744
744
  e._zod.onattach.push((e) => {
745
745
  let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
746
746
  t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
747
747
  }), e._zod.check = (r) => {
748
748
  (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
749
- origin: Kt[typeof r.value] ?? n,
749
+ origin: qt[typeof r.value] ?? n,
750
750
  code: "too_big",
751
751
  maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
752
752
  input: r.value,
@@ -755,15 +755,15 @@ var Rt = (e) => {
755
755
  continue: !t.abort
756
756
  });
757
757
  };
758
- }), Jt = /*@__PURE__*/ w("$ZodCheckGreaterThan", (e, t) => {
759
- O.init(e, t);
760
- let n = Kt[typeof t.value];
758
+ }), Yt = /*@__PURE__*/ w("$ZodCheckGreaterThan", (e, t) => {
759
+ D.init(e, t);
760
+ let n = qt[typeof t.value];
761
761
  e._zod.onattach.push((e) => {
762
762
  let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
763
763
  t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
764
764
  }), e._zod.check = (r) => {
765
765
  (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
766
- origin: Kt[typeof r.value] ?? n,
766
+ origin: qt[typeof r.value] ?? n,
767
767
  code: "too_small",
768
768
  minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
769
769
  input: r.value,
@@ -772,8 +772,8 @@ var Rt = (e) => {
772
772
  continue: !t.abort
773
773
  });
774
774
  };
775
- }), Yt = /*@__PURE__*/ w("$ZodCheckMultipleOf", (e, t) => {
776
- O.init(e, t), e._zod.onattach.push((e) => {
775
+ }), Xt = /*@__PURE__*/ w("$ZodCheckMultipleOf", (e, t) => {
776
+ D.init(e, t), e._zod.onattach.push((e) => {
777
777
  var n;
778
778
  (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
779
779
  }), e._zod.check = (n) => {
@@ -787,12 +787,12 @@ var Rt = (e) => {
787
787
  continue: !t.abort
788
788
  });
789
789
  };
790
- }), Xt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
791
- O.init(e, t), t.format = t.format || "float64";
790
+ }), Zt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
791
+ D.init(e, t), t.format = t.format || "float64";
792
792
  let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = se[t.format];
793
793
  e._zod.onattach.push((e) => {
794
794
  let r = e._zod.bag;
795
- r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = zt);
795
+ r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Bt);
796
796
  }), e._zod.check = (o) => {
797
797
  let s = o.value;
798
798
  if (n) {
@@ -848,9 +848,9 @@ var Rt = (e) => {
848
848
  continue: !t.abort
849
849
  });
850
850
  };
851
- }), Zt = /*@__PURE__*/ w("$ZodCheckMaxLength", (e, t) => {
851
+ }), Qt = /*@__PURE__*/ w("$ZodCheckMaxLength", (e, t) => {
852
852
  var n;
853
- O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
853
+ D.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), e._zod.onattach.push((e) => {
854
854
  let n = e._zod.bag.maximum ?? Infinity;
855
855
  t.maximum < n && (e._zod.bag.maximum = t.maximum);
856
856
  }), e._zod.check = (n) => {
@@ -867,9 +867,9 @@ var Rt = (e) => {
867
867
  continue: !t.abort
868
868
  });
869
869
  };
870
- }), Qt = /*@__PURE__*/ w("$ZodCheckMinLength", (e, t) => {
870
+ }), $t = /*@__PURE__*/ w("$ZodCheckMinLength", (e, t) => {
871
871
  var n;
872
- O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
872
+ D.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), e._zod.onattach.push((e) => {
873
873
  let n = e._zod.bag.minimum ?? -Infinity;
874
874
  t.minimum > n && (e._zod.bag.minimum = t.minimum);
875
875
  }), e._zod.check = (n) => {
@@ -886,9 +886,9 @@ var Rt = (e) => {
886
886
  continue: !t.abort
887
887
  });
888
888
  };
889
- }), $t = /*@__PURE__*/ w("$ZodCheckLengthEquals", (e, t) => {
889
+ }), en = /*@__PURE__*/ w("$ZodCheckLengthEquals", (e, t) => {
890
890
  var n;
891
- O.init(e, t), (n = e._zod.def).when ?? (n.when = Gt), e._zod.onattach.push((e) => {
891
+ D.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), e._zod.onattach.push((e) => {
892
892
  let n = e._zod.bag;
893
893
  n.minimum = t.length, n.maximum = t.length, n.length = t.length;
894
894
  }), e._zod.check = (n) => {
@@ -911,9 +911,9 @@ var Rt = (e) => {
911
911
  continue: !t.abort
912
912
  });
913
913
  };
914
- }), en = /*@__PURE__*/ w("$ZodCheckStringFormat", (e, t) => {
914
+ }), tn = /*@__PURE__*/ w("$ZodCheckStringFormat", (e, t) => {
915
915
  var n, r;
916
- O.init(e, t), e._zod.onattach.push((e) => {
916
+ D.init(e, t), e._zod.onattach.push((e) => {
917
917
  let n = e._zod.bag;
918
918
  n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
919
919
  }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
@@ -927,8 +927,8 @@ var Rt = (e) => {
927
927
  continue: !t.abort
928
928
  });
929
929
  }) : (r = e._zod).check ?? (r.check = () => {});
930
- }), tn = /*@__PURE__*/ w("$ZodCheckRegex", (e, t) => {
931
- en.init(e, t), e._zod.check = (n) => {
930
+ }), nn = /*@__PURE__*/ w("$ZodCheckRegex", (e, t) => {
931
+ tn.init(e, t), e._zod.check = (n) => {
932
932
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
933
933
  origin: "string",
934
934
  code: "invalid_format",
@@ -939,12 +939,12 @@ var Rt = (e) => {
939
939
  continue: !t.abort
940
940
  });
941
941
  };
942
- }), nn = /*@__PURE__*/ w("$ZodCheckLowerCase", (e, t) => {
943
- t.pattern ??= Ut, en.init(e, t);
944
- }), rn = /*@__PURE__*/ w("$ZodCheckUpperCase", (e, t) => {
945
- t.pattern ??= Wt, en.init(e, t);
946
- }), an = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
947
- O.init(e, t);
942
+ }), rn = /*@__PURE__*/ w("$ZodCheckLowerCase", (e, t) => {
943
+ t.pattern ??= Wt, tn.init(e, t);
944
+ }), an = /*@__PURE__*/ w("$ZodCheckUpperCase", (e, t) => {
945
+ t.pattern ??= Gt, tn.init(e, t);
946
+ }), on = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
947
+ D.init(e, t);
948
948
  let n = g(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
949
949
  t.pattern = r, e._zod.onattach.push((e) => {
950
950
  let t = e._zod.bag;
@@ -960,8 +960,8 @@ var Rt = (e) => {
960
960
  continue: !t.abort
961
961
  });
962
962
  };
963
- }), on = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
964
- O.init(e, t);
963
+ }), sn = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
964
+ D.init(e, t);
965
965
  let n = RegExp(`^${g(t.prefix)}.*`);
966
966
  t.pattern ??= n, e._zod.onattach.push((e) => {
967
967
  let t = e._zod.bag;
@@ -977,8 +977,8 @@ var Rt = (e) => {
977
977
  continue: !t.abort
978
978
  });
979
979
  };
980
- }), sn = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
981
- O.init(e, t);
980
+ }), cn = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
981
+ D.init(e, t);
982
982
  let n = RegExp(`.*${g(t.suffix)}$`);
983
983
  t.pattern ??= n, e._zod.onattach.push((e) => {
984
984
  let t = e._zod.bag;
@@ -994,11 +994,11 @@ var Rt = (e) => {
994
994
  continue: !t.abort
995
995
  });
996
996
  };
997
- }), cn = /*@__PURE__*/ w("$ZodCheckOverwrite", (e, t) => {
998
- O.init(e, t), e._zod.check = (e) => {
997
+ }), ln = /*@__PURE__*/ w("$ZodCheckOverwrite", (e, t) => {
998
+ D.init(e, t), e._zod.check = (e) => {
999
999
  e.value = t.tx(e.value);
1000
1000
  };
1001
- }), ln = class {
1001
+ }), un = class {
1002
1002
  constructor(e = [], t = {}) {
1003
1003
  this.content = [], this.indent = 0, this.args = e, this.closed = t;
1004
1004
  }
@@ -1017,13 +1017,13 @@ var Rt = (e) => {
1017
1017
  let e = Function, t = this?.content ?? [""];
1018
1018
  return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
1019
1019
  }
1020
- }, un = {
1020
+ }, dn = {
1021
1021
  major: 4,
1022
1022
  minor: 5,
1023
1023
  patch: 4
1024
- }, k = /*@__PURE__*/ w("$ZodType", (e, t) => {
1024
+ }, O = /*@__PURE__*/ w("$ZodType", (e, t) => {
1025
1025
  var n;
1026
- e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = un;
1026
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = dn;
1027
1027
  let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
1028
1028
  for (let t of i) for (let n of t._zod.onattach) n(e);
1029
1029
  if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
@@ -1038,7 +1038,7 @@ var Rt = (e) => {
1038
1038
  if (ge(t) || !o._zod.def.when(t)) continue;
1039
1039
  } else if (i) continue;
1040
1040
  let n = t.issues.length, s = o._zod.check(t);
1041
- if (s instanceof Promise && r?.async === !1) throw new T();
1041
+ if (s instanceof Promise && r?.async === !1) throw new Le();
1042
1042
  if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
1043
1043
  await s, t.issues.length !== n && (ve(t.issues, n, e), i ||= he(t, n));
1044
1044
  });
@@ -1052,7 +1052,7 @@ var Rt = (e) => {
1052
1052
  if (he(n)) return n.aborted = !0, n;
1053
1053
  let o = t(r, i, a);
1054
1054
  if (o instanceof Promise) {
1055
- if (a.async === !1) throw new T();
1055
+ if (a.async === !1) throw new Le();
1056
1056
  return o.then((t) => e._zod.parse(t, a));
1057
1057
  }
1058
1058
  return e._zod.parse(o, a);
@@ -1071,7 +1071,7 @@ var Rt = (e) => {
1071
1071
  }
1072
1072
  let o = e._zod.parse(r, a);
1073
1073
  if (o instanceof Promise) {
1074
- if (a.async === !1) throw new T();
1074
+ if (a.async === !1) throw new Le();
1075
1075
  return o.then((e) => t(e, i, a));
1076
1076
  }
1077
1077
  return t(o, i, a);
@@ -1079,27 +1079,27 @@ var Rt = (e) => {
1079
1079
  }
1080
1080
  }, {
1081
1081
  get "~standard"() {
1082
- return Te(this, "~standard", fn(this));
1082
+ return Te(this, "~standard", pn(this));
1083
1083
  },
1084
1084
  set "~standard"(e) {
1085
1085
  x(this, "~standard", e);
1086
1086
  }
1087
- }), dn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
1088
- function fn(e) {
1087
+ }), fn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
1088
+ function pn(e) {
1089
1089
  return {
1090
1090
  validate: (t) => {
1091
1091
  try {
1092
- return dn(et(e, t));
1092
+ return fn(tt(e, t));
1093
1093
  } catch {
1094
- return nt(e, t).then(dn);
1094
+ return rt(e, t).then(fn);
1095
1095
  }
1096
1096
  },
1097
1097
  vendor: "zod",
1098
1098
  version: 1
1099
1099
  };
1100
1100
  }
1101
- var pn = /*@__PURE__*/ w("$ZodString", (e, t) => {
1102
- k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Rt(e._zod.bag), e._zod.parse = (n, r) => {
1101
+ var mn = /*@__PURE__*/ w("$ZodString", (e, t) => {
1102
+ O.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? zt(e._zod.bag), e._zod.parse = (n, r) => {
1103
1103
  if (t.coerce) try {
1104
1104
  n.value = String(n.value);
1105
1105
  } catch {}
@@ -1110,11 +1110,11 @@ var pn = /*@__PURE__*/ w("$ZodString", (e, t) => {
1110
1110
  inst: e
1111
1111
  }), n;
1112
1112
  };
1113
- }), A = /*@__PURE__*/ w("$ZodStringFormat", (e, t) => {
1114
- en.init(e, t), pn.init(e, t);
1115
- }), mn = /*@__PURE__*/ w("$ZodGUID", (e, t) => {
1116
- t.pattern ??= yt, A.init(e, t);
1117
- }), hn = /*@__PURE__*/ w("$ZodUUID", (e, t) => {
1113
+ }), k = /*@__PURE__*/ w("$ZodStringFormat", (e, t) => {
1114
+ tn.init(e, t), mn.init(e, t);
1115
+ }), hn = /*@__PURE__*/ w("$ZodGUID", (e, t) => {
1116
+ t.pattern ??= bt, k.init(e, t);
1117
+ }), gn = /*@__PURE__*/ w("$ZodUUID", (e, t) => {
1118
1118
  if (t.version) {
1119
1119
  let e = {
1120
1120
  v1: 1,
@@ -1127,34 +1127,34 @@ var pn = /*@__PURE__*/ w("$ZodString", (e, t) => {
1127
1127
  v8: 8
1128
1128
  }[t.version];
1129
1129
  if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
1130
- t.pattern ??= bt(e);
1131
- } else t.pattern ??= bt();
1132
- A.init(e, t);
1133
- }), gn = /*@__PURE__*/ w("$ZodEmail", (e, t) => {
1134
- t.pattern ??= xt, A.init(e, t);
1130
+ t.pattern ??= xt(e);
1131
+ } else t.pattern ??= xt();
1132
+ k.init(e, t);
1133
+ }), _n = /*@__PURE__*/ w("$ZodEmail", (e, t) => {
1134
+ t.pattern ??= St, k.init(e, t);
1135
1135
  });
1136
- function _n(e, t) {
1137
- if (!t.normalize && t.protocol?.source === At.source && !/^https?:\/\//i.test(e)) return 1;
1136
+ function vn(e, t) {
1137
+ if (!t.normalize && t.protocol?.source === jt.source && !/^https?:\/\//i.test(e)) return 1;
1138
1138
  try {
1139
1139
  return new URL(e);
1140
1140
  } catch {
1141
1141
  return 2;
1142
1142
  }
1143
1143
  }
1144
- var vn = /[\t\n\r]/g;
1145
- function yn(e) {
1146
- return e.replace(vn, "");
1144
+ var yn = /[\t\n\r]/g;
1145
+ function bn(e) {
1146
+ return e.replace(yn, "");
1147
1147
  }
1148
- function bn(e, t) {
1148
+ function xn(e, t) {
1149
1149
  return t.lastIndex = 0, t.test(e.hostname);
1150
1150
  }
1151
- function xn(e, t) {
1151
+ function Sn(e, t) {
1152
1152
  return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
1153
1153
  }
1154
- var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1155
- A.init(e, t), e._zod.check = (n) => {
1154
+ var Cn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1155
+ k.init(e, t), e._zod.check = (n) => {
1156
1156
  try {
1157
- let r = n.value.trim(), i = _n(r, t);
1157
+ let r = n.value.trim(), i = vn(r, t);
1158
1158
  if (i === 1) {
1159
1159
  n.issues.push({
1160
1160
  code: "invalid_format",
@@ -1176,7 +1176,7 @@ var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1176
1176
  });
1177
1177
  return;
1178
1178
  }
1179
- t.hostname && !bn(i, t.hostname) && n.issues.push({
1179
+ t.hostname && !xn(i, t.hostname) && n.issues.push({
1180
1180
  code: "invalid_format",
1181
1181
  format: "url",
1182
1182
  note: "Invalid hostname",
@@ -1184,7 +1184,7 @@ var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1184
1184
  input: n.value,
1185
1185
  inst: e,
1186
1186
  continue: !t.abort
1187
- }), t.protocol && !xn(i, t.protocol) && n.issues.push({
1187
+ }), t.protocol && !Sn(i, t.protocol) && n.issues.push({
1188
1188
  code: "invalid_format",
1189
1189
  format: "url",
1190
1190
  note: "Invalid protocol",
@@ -1192,7 +1192,7 @@ var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1192
1192
  input: n.value,
1193
1193
  inst: e,
1194
1194
  continue: !t.abort
1195
- }), n.value = t.normalize ? i.href : yn(r);
1195
+ }), n.value = t.normalize ? i.href : bn(r);
1196
1196
  return;
1197
1197
  } catch {
1198
1198
  n.issues.push({
@@ -1204,45 +1204,45 @@ var Sn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
1204
1204
  });
1205
1205
  }
1206
1206
  };
1207
- }), Cn = /*@__PURE__*/ w("$ZodEmoji", (e, t) => {
1208
- t.pattern ??= Ct(), A.init(e, t);
1209
- }), wn = /*@__PURE__*/ w("$ZodNanoID", (e, t) => {
1207
+ }), wn = /*@__PURE__*/ w("$ZodEmoji", (e, t) => {
1208
+ t.pattern ??= wt(), k.init(e, t);
1209
+ }), Tn = /*@__PURE__*/ w("$ZodNanoID", (e, t) => {
1210
1210
  if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
1211
- t.pattern ??= t.length === void 0 ? gt : _t(t.length), A.init(e, t);
1212
- }), Tn = /*@__PURE__*/ w("$ZodCUID", (e, t) => {
1213
- t.pattern ??= dt, A.init(e, t);
1214
- }), En = /*@__PURE__*/ w("$ZodCUID2", (e, t) => {
1215
- t.pattern ??= ft, A.init(e, t);
1216
- }), Dn = /*@__PURE__*/ w("$ZodULID", (e, t) => {
1217
- t.pattern ??= pt, A.init(e, t);
1218
- }), On = /*@__PURE__*/ w("$ZodXID", (e, t) => {
1219
- t.pattern ??= mt, A.init(e, t);
1220
- }), kn = /*@__PURE__*/ w("$ZodKSUID", (e, t) => {
1221
- t.pattern ??= ht, A.init(e, t);
1222
- }), An = /*@__PURE__*/ w("$ZodISODateTime", (e, t) => {
1223
- t.pattern ??= Lt(t), A.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
1211
+ t.pattern ??= t.length === void 0 ? _t : vt(t.length), k.init(e, t);
1212
+ }), En = /*@__PURE__*/ w("$ZodCUID", (e, t) => {
1213
+ t.pattern ??= ft, k.init(e, t);
1214
+ }), Dn = /*@__PURE__*/ w("$ZodCUID2", (e, t) => {
1215
+ t.pattern ??= pt, k.init(e, t);
1216
+ }), On = /*@__PURE__*/ w("$ZodULID", (e, t) => {
1217
+ t.pattern ??= mt, k.init(e, t);
1218
+ }), kn = /*@__PURE__*/ w("$ZodXID", (e, t) => {
1219
+ t.pattern ??= ht, k.init(e, t);
1220
+ }), An = /*@__PURE__*/ w("$ZodKSUID", (e, t) => {
1221
+ t.pattern ??= gt, k.init(e, t);
1222
+ }), jn = /*@__PURE__*/ w("$ZodISODateTime", (e, t) => {
1223
+ t.pattern ??= Rt(t), k.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
1224
1224
  e._zod.bag.laxFormat = !0;
1225
1225
  }));
1226
- }), jn = /*@__PURE__*/ w("$ZodISODate", (e, t) => {
1227
- t.pattern ??= Pt, A.init(e, t);
1228
- }), Mn = /*@__PURE__*/ w("$ZodISOTime", (e, t) => {
1229
- t.pattern ??= It(t), A.init(e, t);
1230
- }), Nn = /*@__PURE__*/ w("$ZodISODuration", (e, t) => {
1231
- t.pattern ??= vt, A.init(e, t);
1232
- }), Pn = /*@__PURE__*/ w("$ZodIPv4", (e, t) => {
1233
- t.pattern ??= wt, A.init(e, t), e._zod.bag.format = "ipv4";
1234
- }), Fn = /^[0-9a-fA-F:.]+$/;
1235
- function In(e) {
1236
- if (!Fn.test(e)) return !1;
1226
+ }), Mn = /*@__PURE__*/ w("$ZodISODate", (e, t) => {
1227
+ t.pattern ??= Ft, k.init(e, t);
1228
+ }), Nn = /*@__PURE__*/ w("$ZodISOTime", (e, t) => {
1229
+ t.pattern ??= Lt(t), k.init(e, t);
1230
+ }), Pn = /*@__PURE__*/ w("$ZodISODuration", (e, t) => {
1231
+ t.pattern ??= yt, k.init(e, t);
1232
+ }), Fn = /*@__PURE__*/ w("$ZodIPv4", (e, t) => {
1233
+ t.pattern ??= Tt, k.init(e, t), e._zod.bag.format = "ipv4";
1234
+ }), In = /^[0-9a-fA-F:.]+$/;
1235
+ function Ln(e) {
1236
+ if (!In.test(e)) return !1;
1237
1237
  try {
1238
1238
  return new URL(`http://[${e}]`), !0;
1239
1239
  } catch {
1240
1240
  return !1;
1241
1241
  }
1242
1242
  }
1243
- var Ln = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
1244
- t.pattern ??= Tt, A.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1245
- In(n.value) || n.issues.push({
1243
+ var Rn = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
1244
+ t.pattern ??= Et, k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1245
+ Ln(n.value) || n.issues.push({
1246
1246
  code: "invalid_format",
1247
1247
  format: "ipv6",
1248
1248
  input: n.value,
@@ -1250,20 +1250,20 @@ var Ln = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
1250
1250
  continue: !t.abort
1251
1251
  });
1252
1252
  };
1253
- }), Rn = /*@__PURE__*/ w("$ZodCIDRv4", (e, t) => {
1254
- t.pattern ??= Et, A.init(e, t);
1253
+ }), zn = /*@__PURE__*/ w("$ZodCIDRv4", (e, t) => {
1254
+ t.pattern ??= Dt, k.init(e, t);
1255
1255
  });
1256
- function zn(e) {
1256
+ function Bn(e) {
1257
1257
  let t = e.split("/");
1258
1258
  if (t.length !== 2) return !1;
1259
1259
  let [n, r] = t;
1260
1260
  if (!r) return !1;
1261
1261
  let i = Number(r);
1262
- return `${i}` !== r || i < 0 || i > 128 ? !1 : In(n);
1262
+ return `${i}` !== r || i < 0 || i > 128 ? !1 : Ln(n);
1263
1263
  }
1264
- var Bn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
1265
- t.pattern ??= Dt, A.init(e, t), e._zod.check = (n) => {
1266
- zn(n.value) || n.issues.push({
1264
+ var Vn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
1265
+ t.pattern ??= Ot, k.init(e, t), e._zod.check = (n) => {
1266
+ Bn(n.value) || n.issues.push({
1267
1267
  code: "invalid_format",
1268
1268
  format: "cidrv6",
1269
1269
  input: n.value,
@@ -1272,7 +1272,7 @@ var Bn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
1272
1272
  });
1273
1273
  };
1274
1274
  });
1275
- function Vn(e) {
1275
+ function Hn(e) {
1276
1276
  if (e === "") return !0;
1277
1277
  if (/\s/.test(e) || e.length % 4 != 0) return !1;
1278
1278
  try {
@@ -1281,9 +1281,9 @@ function Vn(e) {
1281
1281
  return !1;
1282
1282
  }
1283
1283
  }
1284
- var Hn = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
1285
- t.pattern ??= Ot, A.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1286
- Vn(n.value) || n.issues.push({
1284
+ var Un = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
1285
+ t.pattern ??= kt, k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1286
+ Hn(n.value) || n.issues.push({
1287
1287
  code: "invalid_format",
1288
1288
  format: "base64",
1289
1289
  input: n.value,
@@ -1292,14 +1292,14 @@ var Hn = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
1292
1292
  });
1293
1293
  };
1294
1294
  });
1295
- function Un(e) {
1296
- if (!kt.test(e)) return !1;
1295
+ function Wn(e) {
1296
+ if (!At.test(e)) return !1;
1297
1297
  let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
1298
- return Vn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
1298
+ return Hn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
1299
1299
  }
1300
- var Wn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
1301
- t.pattern ??= kt, A.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1302
- Un(n.value) || n.issues.push({
1300
+ var Gn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
1301
+ t.pattern ??= At, k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1302
+ Wn(n.value) || n.issues.push({
1303
1303
  code: "invalid_format",
1304
1304
  format: "base64url",
1305
1305
  input: n.value,
@@ -1307,10 +1307,10 @@ var Wn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
1307
1307
  continue: !t.abort
1308
1308
  });
1309
1309
  };
1310
- }), Gn = /*@__PURE__*/ w("$ZodE164", (e, t) => {
1311
- t.pattern ??= jt, A.init(e, t);
1310
+ }), Kn = /*@__PURE__*/ w("$ZodE164", (e, t) => {
1311
+ t.pattern ??= Mt, k.init(e, t);
1312
1312
  });
1313
- function Kn(e, t = null) {
1313
+ function qn(e, t = null) {
1314
1314
  try {
1315
1315
  let n = e.split(".");
1316
1316
  if (n.length !== 3) return !1;
@@ -1322,9 +1322,9 @@ function Kn(e, t = null) {
1322
1322
  return !1;
1323
1323
  }
1324
1324
  }
1325
- var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1326
- A.init(e, t), e._zod.check = (n) => {
1327
- Kn(n.value, t.alg) || n.issues.push({
1325
+ var Jn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1326
+ k.init(e, t), e._zod.check = (n) => {
1327
+ qn(n.value, t.alg) || n.issues.push({
1328
1328
  code: "invalid_format",
1329
1329
  format: "jwt",
1330
1330
  input: n.value,
@@ -1332,8 +1332,8 @@ var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1332
1332
  continue: !t.abort
1333
1333
  });
1334
1334
  };
1335
- }), Jn = /*@__PURE__*/ w("$ZodNumber", (e, t) => {
1336
- k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Bt, e._zod.parse = (n, r) => {
1335
+ }), Yn = /*@__PURE__*/ w("$ZodNumber", (e, t) => {
1336
+ O.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Vt, e._zod.parse = (n, r) => {
1337
1337
  if (t.coerce) try {
1338
1338
  n.value = Number(n.value);
1339
1339
  } catch {}
@@ -1348,10 +1348,10 @@ var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1348
1348
  ...a ? { received: a } : {}
1349
1349
  }), n;
1350
1350
  };
1351
- }), Yn = /*@__PURE__*/ w("$ZodNumberFormat", (e, t) => {
1352
- Xt.init(e, t), Jn.init(e, t);
1353
- }), Xn = /*@__PURE__*/ w("$ZodBoolean", (e, t) => {
1354
- k.init(e, t), e._zod.pattern = Vt, e._zod.parse = (n, r) => {
1351
+ }), Xn = /*@__PURE__*/ w("$ZodNumberFormat", (e, t) => {
1352
+ Zt.init(e, t), Yn.init(e, t);
1353
+ }), Zn = /*@__PURE__*/ w("$ZodBoolean", (e, t) => {
1354
+ O.init(e, t), e._zod.pattern = Ht, e._zod.parse = (n, r) => {
1355
1355
  if (t.coerce) try {
1356
1356
  n.value = !!n.value;
1357
1357
  } catch {}
@@ -1363,8 +1363,8 @@ var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1363
1363
  inst: e
1364
1364
  }), n;
1365
1365
  };
1366
- }), Zn = /*@__PURE__*/ w("$ZodNull", (e, t) => {
1367
- k.init(e, t), e._zod.pattern = Ht, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
1366
+ }), Qn = /*@__PURE__*/ w("$ZodNull", (e, t) => {
1367
+ O.init(e, t), e._zod.pattern = Ut, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
1368
1368
  let r = t.value;
1369
1369
  return r === null || t.issues.push({
1370
1370
  expected: "null",
@@ -1373,22 +1373,22 @@ var qn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
1373
1373
  inst: e
1374
1374
  }), t;
1375
1375
  };
1376
- }), Qn = /*@__PURE__*/ w("$ZodUnknown", (e, t) => {
1377
- k.init(e, t), e._zod.parse = (e) => e;
1378
- }), $n = /*@__PURE__*/ w("$ZodNever", (e, t) => {
1379
- k.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1376
+ }), $n = /*@__PURE__*/ w("$ZodUnknown", (e, t) => {
1377
+ O.init(e, t), e._zod.parse = (e) => e;
1378
+ }), er = /*@__PURE__*/ w("$ZodNever", (e, t) => {
1379
+ O.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1380
1380
  expected: "never",
1381
1381
  code: "invalid_type",
1382
1382
  input: t.value,
1383
1383
  inst: e
1384
1384
  }), t);
1385
1385
  });
1386
- function er(e, t, n) {
1386
+ function tr(e, t, n) {
1387
1387
  e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
1388
1388
  }
1389
- var tr = /*@__PURE__*/ w("$ZodArray", (e, t) => {
1390
- k.init(e, t);
1391
- let n = E.memoizer;
1389
+ var nr = /*@__PURE__*/ w("$ZodArray", (e, t) => {
1390
+ O.init(e, t);
1391
+ let n = T.memoizer;
1392
1392
  n?.attach(e), e._zod.parse = (r, i) => {
1393
1393
  let a = r.value;
1394
1394
  if (!Array.isArray(a)) return r.issues.push({
@@ -1404,12 +1404,12 @@ var tr = /*@__PURE__*/ w("$ZodArray", (e, t) => {
1404
1404
  value: n,
1405
1405
  issues: []
1406
1406
  }, i);
1407
- s instanceof Promise ? o.push(s.then((t) => er(t, r, e))) : er(s, r, e);
1407
+ s instanceof Promise ? o.push(s.then((t) => tr(t, r, e))) : tr(s, r, e);
1408
1408
  }
1409
1409
  return o.length ? Promise.all(o).then(() => r) : r;
1410
1410
  };
1411
1411
  });
1412
- function nr(e, t, n, r, i, a) {
1412
+ function rr(e, t, n, r, i, a) {
1413
1413
  let o = n in r, s = a === "optional";
1414
1414
  if (!(!o && s && i === "optional")) {
1415
1415
  if (e.issues.length) {
@@ -1428,9 +1428,9 @@ function nr(e, t, n, r, i, a) {
1428
1428
  e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
1429
1429
  }
1430
1430
  }
1431
- var rr = [];
1432
- function ir(e) {
1433
- let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : rr, i = r.length ? [...t, ...r] : t;
1431
+ var ir = [];
1432
+ function ar(e) {
1433
+ let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : ir, i = r.length ? [...t, ...r] : t;
1434
1434
  for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
1435
1435
  let a = oe(e.shape);
1436
1436
  return {
@@ -1442,7 +1442,7 @@ function ir(e) {
1442
1442
  optionalKeys: new Set(a)
1443
1443
  };
1444
1444
  }
1445
- function ar(e, t, n, r, i, a) {
1445
+ function or(e, t, n, r, i, a) {
1446
1446
  let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin, d = c.optout;
1447
1447
  for (let i in t) {
1448
1448
  if (s.has(i)) continue;
@@ -1458,7 +1458,7 @@ function ar(e, t, n, r, i, a) {
1458
1458
  value: t[i],
1459
1459
  issues: []
1460
1460
  }, r);
1461
- a instanceof Promise ? e.push(a.then((e) => nr(e, n, i, t, u, d))) : nr(a, n, i, t, u, d);
1461
+ a instanceof Promise ? e.push(a.then((e) => rr(e, n, i, t, u, d))) : rr(a, n, i, t, u, d);
1462
1462
  }
1463
1463
  return o.length && n.issues.push({
1464
1464
  code: "unrecognized_keys",
@@ -1468,15 +1468,15 @@ function ar(e, t, n, r, i, a) {
1468
1468
  continue: !0
1469
1469
  }), e.length ? Promise.all(e).then(() => n) : n;
1470
1470
  }
1471
- var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t) => {
1472
- if (k.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1471
+ var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ w("$ZodObject", (e, t) => {
1472
+ if (O.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1473
1473
  let e = t.shape;
1474
- or.set(t, e), Object.defineProperty(t, "shape", { get: () => {
1474
+ sr.set(t, e), Object.defineProperty(t, "shape", { get: () => {
1475
1475
  let n = { ...e };
1476
- return Object.defineProperty(t, "shape", { value: n }), or.set(t, n), n;
1476
+ return Object.defineProperty(t, "shape", { value: n }), sr.set(t, n), n;
1477
1477
  } });
1478
1478
  }
1479
- let n = a(() => ir(t));
1479
+ let n = a(() => ar(t));
1480
1480
  C(e, "propValues", (e) => {
1481
1481
  let t = e.def.shape, n = {};
1482
1482
  for (let e in t) {
@@ -1489,7 +1489,7 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t
1489
1489
  }
1490
1490
  return n;
1491
1491
  });
1492
- let r = te, i = t.catchall, o, s = E.memoizer;
1492
+ let r = te, i = t.catchall, o, s = T.memoizer;
1493
1493
  s?.attach(e), e._zod.parse = (t, a) => {
1494
1494
  o ??= n.value;
1495
1495
  let c = t.value;
@@ -1507,14 +1507,14 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t
1507
1507
  value: c[e],
1508
1508
  issues: []
1509
1509
  }, a);
1510
- o instanceof Promise ? l.push(o.then((n) => nr(n, t, e, c, r, i))) : nr(o, t, e, c, r, i);
1510
+ o instanceof Promise ? l.push(o.then((n) => rr(n, t, e, c, r, i))) : rr(o, t, e, c, r, i);
1511
1511
  }
1512
- return i ? ar(l, c, t, a, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
1512
+ return i ? or(l, c, t, a, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
1513
1513
  };
1514
- }), cr = /*@__PURE__*/ w("$ZodObjectJIT", (e, t) => {
1515
- sr.init(e, t);
1516
- let n = e._zod.parse, r = a(() => ir(t)), i = E.memoizer, o = (t) => {
1517
- let n = r.value, a = n.symbolKeys, o = new ln(["payload", "ctx"], {
1514
+ }), lr = /*@__PURE__*/ w("$ZodObjectJIT", (e, t) => {
1515
+ cr.init(e, t);
1516
+ let n = e._zod.parse, r = a(() => ar(t)), i = T.memoizer, o = (t) => {
1517
+ let n = r.value, a = n.symbolKeys, o = new un(["payload", "ctx"], {
1518
1518
  shape: t,
1519
1519
  inst: e,
1520
1520
  memo: i,
@@ -1578,11 +1578,11 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t
1578
1578
  `);
1579
1579
  }
1580
1580
  return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
1581
- }, s, c = te, l = !E.jitless, u = l && ne.value, d = t.catchall, f;
1581
+ }, s, c = te, l = !T.jitless, u = l && ne.value, d = t.catchall, f;
1582
1582
  e._zod.parse = (i, a) => {
1583
1583
  f ??= r.value;
1584
1584
  let p = i.value;
1585
- return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ? ar([], p, i, a, f, e) : i) : n(i, a) : (i.issues.push({
1585
+ return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ? or([], p, i, a, f, e) : i) : n(i, a) : (i.issues.push({
1586
1586
  expected: "object",
1587
1587
  code: "invalid_type",
1588
1588
  input: p,
@@ -1590,18 +1590,18 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ w("$ZodObject", (e, t
1590
1590
  }), i);
1591
1591
  };
1592
1592
  });
1593
- function lr(e, t, n, r) {
1593
+ function ur(e, t, n, r) {
1594
1594
  for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1595
1595
  let i = e.filter((e) => !he(e));
1596
1596
  return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1597
1597
  code: "invalid_union",
1598
1598
  input: t.value,
1599
1599
  inst: n,
1600
- errors: e.map((e) => e.issues.map((e) => b(e, r, D())))
1600
+ errors: e.map((e) => e.issues.map((e) => b(e, r, E())))
1601
1601
  }), t);
1602
1602
  }
1603
- var ur = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
1604
- k.init(e, t), C(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), C(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), C(e, "values", (e) => {
1603
+ var dr = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
1604
+ O.init(e, t), C(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), C(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), C(e, "values", (e) => {
1605
1605
  if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
1606
1606
  }), C(e, "pattern", (e) => {
1607
1607
  if (e.def.options.every((e) => e._zod.pattern)) {
@@ -1624,10 +1624,10 @@ var ur = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
1624
1624
  o.push(t);
1625
1625
  }
1626
1626
  }
1627
- return a ? Promise.all(o).then((t) => lr(t, r, e, i)) : lr(o, r, e, i);
1627
+ return a ? Promise.all(o).then((t) => ur(t, r, e, i)) : ur(o, r, e, i);
1628
1628
  };
1629
- }), dr = /*@__PURE__*/ w("$ZodIntersection", (e, t) => {
1630
- k.init(e, t), e._zod.parse = (e, n) => {
1629
+ }), fr = /*@__PURE__*/ w("$ZodIntersection", (e, t) => {
1630
+ O.init(e, t), e._zod.parse = (e, n) => {
1631
1631
  let r = e.value, i = t.left._zod.run({
1632
1632
  value: r,
1633
1633
  issues: []
@@ -1635,10 +1635,10 @@ var ur = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
1635
1635
  value: r,
1636
1636
  issues: []
1637
1637
  }, n);
1638
- return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => pr(e, t, n)) : pr(e, i, a);
1638
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => mr(e, t, n)) : mr(e, i, a);
1639
1639
  };
1640
1640
  });
1641
- function fr(e, t) {
1641
+ function pr(e, t) {
1642
1642
  if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1643
1643
  valid: !0,
1644
1644
  data: e
@@ -1651,7 +1651,7 @@ function fr(e, t) {
1651
1651
  Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
1652
1652
  for (let n of r) {
1653
1653
  if (n === "__proto__") continue;
1654
- let r = fr(e[n], t[n]);
1654
+ let r = pr(e[n], t[n]);
1655
1655
  if (!r.valid) return {
1656
1656
  valid: !1,
1657
1657
  mergeErrorPath: [n, ...r.mergeErrorPath]
@@ -1670,7 +1670,7 @@ function fr(e, t) {
1670
1670
  };
1671
1671
  let n = [];
1672
1672
  for (let r = 0; r < e.length; r++) {
1673
- let i = e[r], a = t[r], o = fr(i, a);
1673
+ let i = e[r], a = t[r], o = pr(i, a);
1674
1674
  if (!o.valid) return {
1675
1675
  valid: !1,
1676
1676
  mergeErrorPath: [r, ...o.mergeErrorPath]
@@ -1687,7 +1687,7 @@ function fr(e, t) {
1687
1687
  mergeErrorPath: []
1688
1688
  };
1689
1689
  }
1690
- function pr(e, t, n) {
1690
+ function mr(e, t, n) {
1691
1691
  let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
1692
1692
  let n;
1693
1693
  if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
@@ -1709,97 +1709,16 @@ function pr(e, t, n) {
1709
1709
  });
1710
1710
  for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
1711
1711
  }
1712
- let c = fr(t.value, n.value);
1712
+ let c = pr(t.value, n.value);
1713
1713
  if (!c.valid) {
1714
1714
  if (he(e)) return e;
1715
1715
  throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
1716
1716
  }
1717
1717
  return e.value = c.data, e;
1718
1718
  }
1719
- var mr = /*@__PURE__*/ w("$ZodTuple", (e, t) => {
1720
- k.init(e, t);
1721
- let n = t.items, r = E.memoizer;
1722
- r?.attach(e), e._zod.parse = (i, a) => {
1723
- let o = i.value;
1724
- if (!Array.isArray(o)) return i.issues.push({
1725
- input: o,
1726
- inst: e,
1727
- expected: "tuple",
1728
- code: "invalid_type"
1729
- }), i;
1730
- i.value = r ? r.alloc(e, i, [], a) : [];
1731
- let s = [], c = hr(n, "optin"), l = hr(n, "optout");
1732
- if (!t.rest) {
1733
- if (o.length < c) return i.issues.push({
1734
- code: "too_small",
1735
- minimum: c,
1736
- inclusive: !0,
1737
- input: o,
1738
- inst: e,
1739
- origin: "array"
1740
- }), i;
1741
- o.length > n.length && i.issues.push({
1742
- code: "too_big",
1743
- maximum: n.length,
1744
- inclusive: !0,
1745
- input: o,
1746
- inst: e,
1747
- origin: "array"
1748
- });
1749
- }
1750
- let u = Array(n.length);
1751
- for (let e = 0; e < n.length; e++) {
1752
- let t = n[e]._zod.run({
1753
- value: o[e],
1754
- issues: []
1755
- }, a);
1756
- t instanceof Promise ? s.push(t.then((t) => {
1757
- u[e] = t;
1758
- })) : u[e] = t;
1759
- }
1760
- if (t.rest) {
1761
- let e = n.length - 1, r = o.slice(n.length);
1762
- for (let n of r) {
1763
- e++;
1764
- let r = t.rest._zod.run({
1765
- value: n,
1766
- issues: []
1767
- }, a);
1768
- r instanceof Promise ? s.push(r.then((t) => gr(t, i, e))) : gr(r, i, e);
1769
- }
1770
- }
1771
- return s.length ? Promise.all(s).then(() => _r(u, i, n, o, l)) : _r(u, i, n, o, l);
1772
- };
1773
- });
1774
- function hr(e, t) {
1775
- for (let n = e.length - 1; n >= 0; n--) if (!(t === "optin" ? e[n]._zod.optin !== void 0 : e[n]._zod.optout === "optional")) return n + 1;
1776
- return 0;
1777
- }
1778
- function gr(e, t, n) {
1779
- e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
1780
- }
1781
- function _r(e, t, n, r, i) {
1782
- for (let a = 0; a < n.length; a++) {
1783
- let o = e[a], s = a < r.length;
1784
- if (!s && a >= i && n[a]._zod.optin === "optional") {
1785
- t.value.length = a;
1786
- break;
1787
- }
1788
- if (o.issues.length) {
1789
- if (!s && a >= i) {
1790
- t.value.length = a;
1791
- break;
1792
- }
1793
- t.issues.push(...y(a, o.issues));
1794
- }
1795
- t.value[a] = o.value;
1796
- }
1797
- for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
1798
- return t;
1799
- }
1800
- var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1801
- k.init(e, t);
1802
- let n = E.memoizer;
1719
+ var hr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1720
+ O.init(e, t);
1721
+ let n = T.memoizer;
1803
1722
  n?.attach(e), e._zod.parse = (r, i) => {
1804
1723
  let a = r.value;
1805
1724
  if (!h(a)) return r.issues.push({
@@ -1823,7 +1742,7 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1823
1742
  r.issues.push({
1824
1743
  code: "invalid_key",
1825
1744
  origin: "record",
1826
- issues: s.issues.map((e) => b(e, i, D())),
1745
+ issues: s.issues.map((e) => b(e, i, E())),
1827
1746
  input: n,
1828
1747
  path: [n],
1829
1748
  inst: e
@@ -1864,7 +1783,7 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1864
1783
  issues: []
1865
1784
  }, i);
1866
1785
  if (l instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1867
- if (typeof n == "string" && Bt.test(n) && l.issues.length) {
1786
+ if (typeof n == "string" && Vt.test(n) && l.issues.length) {
1868
1787
  let e = t.keyType._zod.run({
1869
1788
  value: Number(n),
1870
1789
  issues: []
@@ -1876,7 +1795,7 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1876
1795
  t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
1877
1796
  code: "invalid_key",
1878
1797
  origin: "record",
1879
- issues: l.issues.map((e) => b(e, i, D())),
1798
+ issues: l.issues.map((e) => b(e, i, E())),
1880
1799
  input: n,
1881
1800
  path: [n],
1882
1801
  inst: e
@@ -1903,8 +1822,8 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1903
1822
  }
1904
1823
  return o.length ? Promise.all(o).then(() => r) : r;
1905
1824
  };
1906
- }), yr = /*@__PURE__*/ w("$ZodEnum", (e, t) => {
1907
- k.init(e, t);
1825
+ }), gr = /*@__PURE__*/ w("$ZodEnum", (e, t) => {
1826
+ O.init(e, t);
1908
1827
  let r = n(t.entries), i = new Set(r);
1909
1828
  e._zod.values = i;
1910
1829
  let a = r.filter((e) => ie.has(typeof e));
@@ -1917,8 +1836,8 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1917
1836
  inst: e
1918
1837
  }), t;
1919
1838
  };
1920
- }), br = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
1921
- k.init(e, t);
1839
+ }), _r = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
1840
+ O.init(e, t);
1922
1841
  let n = new Set(t.values);
1923
1842
  e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? g(e) : e ? g(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
1924
1843
  let a = r.value;
@@ -1929,20 +1848,20 @@ var vr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
1929
1848
  inst: e
1930
1849
  }), r;
1931
1850
  };
1932
- }), xr = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
1933
- k.init(e, t), e._zod.optin = "optional", E.memoizer?.guard(e), e._zod.parse = (n, r) => {
1934
- if (r.direction === "backward") throw new Le(e.constructor.name);
1851
+ }), vr = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
1852
+ O.init(e, t), e._zod.optin = "optional", T.memoizer?.guard(e), e._zod.parse = (n, r) => {
1853
+ if (r.direction === "backward") throw new Re(e.constructor.name);
1935
1854
  let i = t.transform(n.value, n);
1936
1855
  if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
1937
- if (i instanceof Promise) throw new T();
1856
+ if (i instanceof Promise) throw new Le();
1938
1857
  return n.value = i, n;
1939
1858
  };
1940
1859
  });
1941
- function Sr(e, t) {
1860
+ function yr(e, t) {
1942
1861
  return e.value = t.issues.length ? void 0 : t.value, e;
1943
1862
  }
1944
- var Cr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1945
- k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", C(e, "values", (e) => {
1863
+ var br = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1864
+ O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", C(e, "values", (e) => {
1946
1865
  let t = e.def.innerType._zod.values;
1947
1866
  return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
1948
1867
  }), C(e, "pattern", (e) => {
@@ -1955,40 +1874,40 @@ var Cr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
1955
1874
  value: e.value,
1956
1875
  issues: []
1957
1876
  }, n);
1958
- return r instanceof Promise ? r.then((t) => Sr(e, t)) : Sr(e, r);
1877
+ return r instanceof Promise ? r.then((t) => yr(e, t)) : yr(e, r);
1959
1878
  }
1960
1879
  return t.innerType._zod.run(e, n);
1961
1880
  };
1962
- }), wr = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
1963
- Cr.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1964
- }), Tr = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
1965
- k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "pattern", (e) => {
1881
+ }), xr = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
1882
+ br.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1883
+ }), Sr = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
1884
+ O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "pattern", (e) => {
1966
1885
  let t = e.def.innerType._zod.pattern;
1967
1886
  return t ? RegExp(`^(${s(t.source)}|null)$`) : void 0;
1968
1887
  }), C(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1969
- }), Er = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
1970
- k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1888
+ }), Cr = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
1889
+ O.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1971
1890
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
1972
1891
  if (e.value === void 0) return e.value = t.defaultValue, e;
1973
1892
  let r = t.innerType._zod.run(e, n);
1974
- return r instanceof Promise ? r.then((e) => Dr(e, t)) : Dr(r, t);
1893
+ return r instanceof Promise ? r.then((e) => wr(e, t)) : wr(r, t);
1975
1894
  };
1976
1895
  });
1977
- function Dr(e, t) {
1896
+ function wr(e, t) {
1978
1897
  return e.value === void 0 && (e.value = t.defaultValue), e;
1979
1898
  }
1980
- var Or = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
1981
- k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1982
- }), kr = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
1983
- k.init(e, t), C(e, "values", (e) => {
1899
+ var Tr = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
1900
+ O.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1901
+ }), Er = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
1902
+ O.init(e, t), C(e, "values", (e) => {
1984
1903
  let t = e.def.innerType._zod.values;
1985
1904
  return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
1986
1905
  }), e._zod.parse = (n, r) => {
1987
1906
  let i = t.innerType._zod.run(n, r);
1988
- return i instanceof Promise ? i.then((t) => Ar(t, e)) : Ar(i, e);
1907
+ return i instanceof Promise ? i.then((t) => Dr(t, e)) : Dr(i, e);
1989
1908
  };
1990
1909
  });
1991
- function Ar(e, t) {
1910
+ function Dr(e, t) {
1992
1911
  return !e.issues.length && e.value === void 0 && e.issues.push({
1993
1912
  code: "invalid_type",
1994
1913
  expected: "nonoptional",
@@ -1996,62 +1915,62 @@ function Ar(e, t) {
1996
1915
  inst: t
1997
1916
  }), e;
1998
1917
  }
1999
- function jr(e, t, n, r) {
1918
+ function Or(e, t, n, r) {
2000
1919
  return t.issues.length ? (e.value = n.catchValue({
2001
1920
  ...t,
2002
1921
  value: e.value,
2003
- error: { issues: t.issues.map((e) => b(e, r, D())) },
1922
+ error: { issues: t.issues.map((e) => b(e, r, E())) },
2004
1923
  input: e.value
2005
1924
  }), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
2006
1925
  }
2007
- var Mr = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
2008
- k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1926
+ var kr = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
1927
+ O.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2009
1928
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2010
1929
  let r = t.innerType._zod.run({
2011
1930
  value: e.value,
2012
1931
  issues: []
2013
1932
  }, n);
2014
- return r instanceof Promise ? r.then((r) => jr(e, r, t, n)) : jr(e, r, t, n);
1933
+ return r instanceof Promise ? r.then((r) => Or(e, r, t, n)) : Or(e, r, t, n);
2015
1934
  };
2016
- }), Nr = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
2017
- k.init(e, t), C(e, "values", (e) => e.def.in._zod.values), C(e, "optin", (e) => e.def.in._zod.optin), C(e, "optout", (e) => e.def.out._zod.optout), C(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
1935
+ }), Ar = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
1936
+ O.init(e, t), C(e, "values", (e) => e.def.in._zod.values), C(e, "optin", (e) => e.def.in._zod.optin), C(e, "optout", (e) => e.def.out._zod.optout), C(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
2018
1937
  if (n.direction === "backward") {
2019
1938
  let r = t.out._zod.run(e, n);
2020
- return r instanceof Promise ? r.then((e) => Pr(e, t.in, n)) : Pr(r, t.in, n);
1939
+ return r instanceof Promise ? r.then((e) => jr(e, t.in, n)) : jr(r, t.in, n);
2021
1940
  }
2022
1941
  let r = t.in._zod.run(e, n);
2023
- return r instanceof Promise ? r.then((e) => Pr(e, t.out, n)) : Pr(r, t.out, n);
1942
+ return r instanceof Promise ? r.then((e) => jr(e, t.out, n)) : jr(r, t.out, n);
2024
1943
  };
2025
1944
  });
2026
- function Pr(e, t, n) {
1945
+ function jr(e, t, n) {
2027
1946
  return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
2028
1947
  value: e.value,
2029
1948
  issues: e.issues
2030
1949
  }, n);
2031
1950
  }
2032
- var Fr = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
2033
- k.init(e, t), C(e, "propValues", (e) => e.def.innerType._zod.propValues), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "optin", (e) => e.def.innerType?._zod?.optin), C(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
1951
+ var Mr = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
1952
+ O.init(e, t), C(e, "propValues", (e) => e.def.innerType._zod.propValues), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "optin", (e) => e.def.innerType?._zod?.optin), C(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
2034
1953
  if (n.direction === "backward") return t.innerType._zod.run(e, n);
2035
1954
  let r = t.innerType._zod.run(e, n);
2036
- return r instanceof Promise ? r.then(Ir) : Ir(r);
1955
+ return r instanceof Promise ? r.then(Nr) : Nr(r);
2037
1956
  };
2038
1957
  });
2039
- function Ir(e) {
1958
+ function Nr(e) {
2040
1959
  return e.memo || (e.value = Object.freeze(e.value)), e;
2041
1960
  }
2042
- var Lr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
2043
- k.init(e, t), u(e._zod, "innerType", () => {
1961
+ var Pr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
1962
+ O.init(e, t), u(e._zod, "innerType", () => {
2044
1963
  let e = t;
2045
1964
  return e._cachedInner ||= t.getter(), e._cachedInner;
2046
1965
  }), C(e, "pattern", (e) => e.innerType?._zod?.pattern), C(e, "propValues", (e) => e.innerType?._zod?.propValues), C(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), C(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
2047
- }), Rr = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
2048
- O.init(e, t), k.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1966
+ }), Fr = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
1967
+ D.init(e, t), O.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
2049
1968
  let r = n.value, i = t.fn(r);
2050
- if (i instanceof Promise) return i.then((t) => zr(t, n, r, e));
2051
- zr(i, n, r, e);
1969
+ if (i instanceof Promise) return i.then((t) => Ir(t, n, r, e));
1970
+ Ir(i, n, r, e);
2052
1971
  };
2053
1972
  });
2054
- function zr(e, t, n, r) {
1973
+ function Ir(e, t, n, r) {
2055
1974
  if (!e) {
2056
1975
  let e = {
2057
1976
  code: "custom",
@@ -2065,25 +1984,25 @@ function zr(e, t, n, r) {
2065
1984
  }
2066
1985
  //#endregion
2067
1986
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
2068
- var Br = class extends Error {
1987
+ var Lr = class extends Error {
2069
1988
  constructor() {
2070
1989
  super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
2071
1990
  }
2072
- }, Vr = "~memo", Hr = [];
2073
- function Ur(e) {
1991
+ }, Rr = "~memo", zr = [];
1992
+ function Br(e) {
2074
1993
  return e.map((e) => e.path ? {
2075
1994
  ...e,
2076
1995
  path: e.path.slice()
2077
1996
  } : { ...e });
2078
1997
  }
2079
- var Wr = /*@__PURE__*/ new WeakMap();
2080
- function Gr(e, t) {
2081
- let n = Wr.get(e);
1998
+ var Vr = /*@__PURE__*/ new WeakMap();
1999
+ function Hr(e, t) {
2000
+ let n = Vr.get(e);
2082
2001
  if (n !== void 0) return n;
2083
2002
  if (t.has(e)) return !0;
2084
2003
  t.add(e);
2085
2004
  let r = !1, i = (e) => {
2086
- !r && e?._zod && Gr(e, t) && (r = !0);
2005
+ !r && e?._zod && Hr(e, t) && (r = !0);
2087
2006
  }, a = e._zod.def;
2088
2007
  switch (a.type) {
2089
2008
  case "object":
@@ -2160,28 +2079,28 @@ function Gr(e, t) {
2160
2079
  }
2161
2080
  }
2162
2081
  }
2163
- return t.delete(e), Wr.set(e, r), r;
2082
+ return t.delete(e), Vr.set(e, r), r;
2164
2083
  }
2165
- function Kr(e, t) {
2084
+ function Ur(e, t) {
2166
2085
  let n = e.buckets.get(t);
2167
2086
  return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
2168
2087
  }
2169
- var qr, Jr = [], Yr = {
2088
+ var Wr, Gr = [], Kr = {
2170
2089
  alloc(e, t, n) {
2171
- let r = qr;
2090
+ let r = Wr;
2172
2091
  if (!r) return n;
2173
- qr = void 0;
2092
+ Wr = void 0;
2174
2093
  let i = {
2175
2094
  value: n,
2176
2095
  issues: null
2177
2096
  };
2178
- return r.set(t.value, i), Jr.push(i), n;
2097
+ return r.set(t.value, i), Gr.push(i), n;
2179
2098
  },
2180
2099
  guard(e) {
2181
2100
  var t;
2182
2101
  (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2183
2102
  let t = e._zod.parse, n = (e, n) => {
2184
- if (n.direction !== "backward" && Zr(n, e.value)) throw new Br();
2103
+ if (n.direction !== "backward" && Jr(n, e.value)) throw new Lr();
2185
2104
  return t(e, n);
2186
2105
  };
2187
2106
  e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
@@ -2192,38 +2111,38 @@ var qr, Jr = [], Yr = {
2192
2111
  let n, r, i;
2193
2112
  (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2194
2113
  let t = e._zod.parse, a = (o, s) => {
2195
- if (n === void 0 && (n = Gr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
2114
+ if (n === void 0 && (n = Hr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
2196
2115
  let c = o.value;
2197
2116
  if (typeof c != "object" || !c) return t(o, s);
2198
- let l = s[Vr];
2117
+ let l = s[Rr];
2199
2118
  l || (l = {
2200
2119
  buckets: /* @__PURE__ */ new Map(),
2201
2120
  backEdges: void 0
2202
- }, s[Vr] = l);
2121
+ }, s[Rr] = l);
2203
2122
  let u;
2204
- r === s ? u = i : (u = Kr(l, e), r = s, i = u);
2123
+ r === s ? u = i : (u = Ur(l, e), r = s, i = u);
2205
2124
  let d = u.get(c);
2206
- if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Ur(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
2207
- qr = u;
2208
- let f = Jr.length, p = t(o, s);
2209
- qr = void 0;
2210
- let m = Jr.length > f ? Jr.pop() : void 0;
2211
- return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Ur(e.issues) : Hr), e)) : (m && (m.issues = p.issues.length ? Ur(p.issues) : Hr), p);
2125
+ if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Br(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
2126
+ Wr = u;
2127
+ let f = Gr.length, p = t(o, s);
2128
+ Wr = void 0;
2129
+ let m = Gr.length > f ? Gr.pop() : void 0;
2130
+ return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Br(e.issues) : zr), e)) : (m && (m.issues = p.issues.length ? Br(p.issues) : zr), p);
2212
2131
  };
2213
2132
  e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
2214
2133
  });
2215
2134
  }
2216
2135
  };
2217
- function Xr() {
2218
- return Yr;
2136
+ function qr() {
2137
+ return Kr;
2219
2138
  }
2220
- function Zr(e, t) {
2221
- let n = e[Vr]?.backEdges;
2139
+ function Jr(e, t) {
2140
+ let n = e[Rr]?.backEdges;
2222
2141
  return n !== void 0 && typeof t == "object" && !!t && n.has(t);
2223
2142
  }
2224
2143
  //#endregion
2225
2144
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
2226
- var Qr = () => {
2145
+ var Yr = () => {
2227
2146
  let e = {
2228
2147
  string: {
2229
2148
  unit: "characters",
@@ -2309,12 +2228,12 @@ var Qr = () => {
2309
2228
  }
2310
2229
  };
2311
2230
  };
2312
- function $r() {
2313
- return { localeError: Qr() };
2231
+ function Xr() {
2232
+ return { localeError: Yr() };
2314
2233
  }
2315
2234
  //#endregion
2316
2235
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
2317
- var ei, ti = class {
2236
+ var Zr, Qr = class {
2318
2237
  constructor() {
2319
2238
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2320
2239
  }
@@ -2346,22 +2265,22 @@ var ei, ti = class {
2346
2265
  return this._map.has(e);
2347
2266
  }
2348
2267
  };
2349
- function ni() {
2350
- return new ti();
2268
+ function $r() {
2269
+ return new Qr();
2351
2270
  }
2352
- (ei = globalThis).__zod_globalRegistry ?? (ei.__zod_globalRegistry = ni());
2353
- var ri = globalThis.__zod_globalRegistry;
2271
+ (Zr = globalThis).__zod_globalRegistry ?? (Zr.__zod_globalRegistry = $r());
2272
+ var ei = globalThis.__zod_globalRegistry;
2354
2273
  //#endregion
2355
2274
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
2356
2275
  // @__NO_SIDE_EFFECTS__
2357
- function ii(e, t) {
2276
+ function ti(e, t) {
2358
2277
  return new e({
2359
2278
  type: "string",
2360
2279
  ...v(t)
2361
2280
  });
2362
2281
  }
2363
2282
  // @__NO_SIDE_EFFECTS__
2364
- function ai(e, t) {
2283
+ function ni(e, t) {
2365
2284
  return new e({
2366
2285
  type: "string",
2367
2286
  format: "email",
@@ -2371,7 +2290,7 @@ function ai(e, t) {
2371
2290
  });
2372
2291
  }
2373
2292
  // @__NO_SIDE_EFFECTS__
2374
- function oi(e, t) {
2293
+ function ri(e, t) {
2375
2294
  return new e({
2376
2295
  type: "string",
2377
2296
  format: "guid",
@@ -2381,7 +2300,7 @@ function oi(e, t) {
2381
2300
  });
2382
2301
  }
2383
2302
  // @__NO_SIDE_EFFECTS__
2384
- function si(e, t) {
2303
+ function ii(e, t) {
2385
2304
  return new e({
2386
2305
  type: "string",
2387
2306
  format: "uuid",
@@ -2391,7 +2310,7 @@ function si(e, t) {
2391
2310
  });
2392
2311
  }
2393
2312
  // @__NO_SIDE_EFFECTS__
2394
- function ci(e, t) {
2313
+ function ai(e, t) {
2395
2314
  return new e({
2396
2315
  type: "string",
2397
2316
  format: "uuid",
@@ -2402,7 +2321,7 @@ function ci(e, t) {
2402
2321
  });
2403
2322
  }
2404
2323
  // @__NO_SIDE_EFFECTS__
2405
- function li(e, t) {
2324
+ function oi(e, t) {
2406
2325
  return new e({
2407
2326
  type: "string",
2408
2327
  format: "uuid",
@@ -2413,7 +2332,7 @@ function li(e, t) {
2413
2332
  });
2414
2333
  }
2415
2334
  // @__NO_SIDE_EFFECTS__
2416
- function ui(e, t) {
2335
+ function si(e, t) {
2417
2336
  return new e({
2418
2337
  type: "string",
2419
2338
  format: "uuid",
@@ -2424,7 +2343,7 @@ function ui(e, t) {
2424
2343
  });
2425
2344
  }
2426
2345
  // @__NO_SIDE_EFFECTS__
2427
- function di(e, t) {
2346
+ function ci(e, t) {
2428
2347
  return new e({
2429
2348
  type: "string",
2430
2349
  format: "url",
@@ -2434,7 +2353,7 @@ function di(e, t) {
2434
2353
  });
2435
2354
  }
2436
2355
  // @__NO_SIDE_EFFECTS__
2437
- function fi(e, t) {
2356
+ function li(e, t) {
2438
2357
  return new e({
2439
2358
  type: "string",
2440
2359
  format: "emoji",
@@ -2444,7 +2363,7 @@ function fi(e, t) {
2444
2363
  });
2445
2364
  }
2446
2365
  // @__NO_SIDE_EFFECTS__
2447
- function pi(e, t) {
2366
+ function ui(e, t) {
2448
2367
  return new e({
2449
2368
  type: "string",
2450
2369
  format: "nanoid",
@@ -2454,7 +2373,7 @@ function pi(e, t) {
2454
2373
  });
2455
2374
  }
2456
2375
  // @__NO_SIDE_EFFECTS__
2457
- function mi(e, t) {
2376
+ function di(e, t) {
2458
2377
  return new e({
2459
2378
  type: "string",
2460
2379
  format: "cuid",
@@ -2464,7 +2383,7 @@ function mi(e, t) {
2464
2383
  });
2465
2384
  }
2466
2385
  // @__NO_SIDE_EFFECTS__
2467
- function hi(e, t) {
2386
+ function fi(e, t) {
2468
2387
  return new e({
2469
2388
  type: "string",
2470
2389
  format: "cuid2",
@@ -2474,7 +2393,7 @@ function hi(e, t) {
2474
2393
  });
2475
2394
  }
2476
2395
  // @__NO_SIDE_EFFECTS__
2477
- function gi(e, t) {
2396
+ function pi(e, t) {
2478
2397
  return new e({
2479
2398
  type: "string",
2480
2399
  format: "ulid",
@@ -2484,7 +2403,7 @@ function gi(e, t) {
2484
2403
  });
2485
2404
  }
2486
2405
  // @__NO_SIDE_EFFECTS__
2487
- function _i(e, t) {
2406
+ function mi(e, t) {
2488
2407
  return new e({
2489
2408
  type: "string",
2490
2409
  format: "xid",
@@ -2494,7 +2413,7 @@ function _i(e, t) {
2494
2413
  });
2495
2414
  }
2496
2415
  // @__NO_SIDE_EFFECTS__
2497
- function vi(e, t) {
2416
+ function hi(e, t) {
2498
2417
  return new e({
2499
2418
  type: "string",
2500
2419
  format: "ksuid",
@@ -2504,7 +2423,7 @@ function vi(e, t) {
2504
2423
  });
2505
2424
  }
2506
2425
  // @__NO_SIDE_EFFECTS__
2507
- function yi(e, t) {
2426
+ function gi(e, t) {
2508
2427
  return new e({
2509
2428
  type: "string",
2510
2429
  format: "ipv4",
@@ -2514,7 +2433,7 @@ function yi(e, t) {
2514
2433
  });
2515
2434
  }
2516
2435
  // @__NO_SIDE_EFFECTS__
2517
- function bi(e, t) {
2436
+ function _i(e, t) {
2518
2437
  return new e({
2519
2438
  type: "string",
2520
2439
  format: "ipv6",
@@ -2524,7 +2443,7 @@ function bi(e, t) {
2524
2443
  });
2525
2444
  }
2526
2445
  // @__NO_SIDE_EFFECTS__
2527
- function xi(e, t) {
2446
+ function vi(e, t) {
2528
2447
  return new e({
2529
2448
  type: "string",
2530
2449
  format: "cidrv4",
@@ -2534,7 +2453,7 @@ function xi(e, t) {
2534
2453
  });
2535
2454
  }
2536
2455
  // @__NO_SIDE_EFFECTS__
2537
- function Si(e, t) {
2456
+ function yi(e, t) {
2538
2457
  return new e({
2539
2458
  type: "string",
2540
2459
  format: "cidrv6",
@@ -2544,7 +2463,7 @@ function Si(e, t) {
2544
2463
  });
2545
2464
  }
2546
2465
  // @__NO_SIDE_EFFECTS__
2547
- function Ci(e, t) {
2466
+ function bi(e, t) {
2548
2467
  return new e({
2549
2468
  type: "string",
2550
2469
  format: "base64",
@@ -2554,7 +2473,7 @@ function Ci(e, t) {
2554
2473
  });
2555
2474
  }
2556
2475
  // @__NO_SIDE_EFFECTS__
2557
- function wi(e, t) {
2476
+ function xi(e, t) {
2558
2477
  return new e({
2559
2478
  type: "string",
2560
2479
  format: "base64url",
@@ -2564,7 +2483,7 @@ function wi(e, t) {
2564
2483
  });
2565
2484
  }
2566
2485
  // @__NO_SIDE_EFFECTS__
2567
- function Ti(e, t) {
2486
+ function Si(e, t) {
2568
2487
  return new e({
2569
2488
  type: "string",
2570
2489
  format: "e164",
@@ -2574,7 +2493,7 @@ function Ti(e, t) {
2574
2493
  });
2575
2494
  }
2576
2495
  // @__NO_SIDE_EFFECTS__
2577
- function Ei(e, t) {
2496
+ function Ci(e, t) {
2578
2497
  return new e({
2579
2498
  type: "string",
2580
2499
  format: "jwt",
@@ -2584,7 +2503,7 @@ function Ei(e, t) {
2584
2503
  });
2585
2504
  }
2586
2505
  // @__NO_SIDE_EFFECTS__
2587
- function Di(e, t) {
2506
+ function wi(e, t) {
2588
2507
  return new e({
2589
2508
  type: "string",
2590
2509
  format: "datetime",
@@ -2596,7 +2515,7 @@ function Di(e, t) {
2596
2515
  });
2597
2516
  }
2598
2517
  // @__NO_SIDE_EFFECTS__
2599
- function Oi(e, t) {
2518
+ function Ti(e, t) {
2600
2519
  return new e({
2601
2520
  type: "string",
2602
2521
  format: "date",
@@ -2605,7 +2524,7 @@ function Oi(e, t) {
2605
2524
  });
2606
2525
  }
2607
2526
  // @__NO_SIDE_EFFECTS__
2608
- function ki(e, t) {
2527
+ function Ei(e, t) {
2609
2528
  return new e({
2610
2529
  type: "string",
2611
2530
  format: "time",
@@ -2615,7 +2534,7 @@ function ki(e, t) {
2615
2534
  });
2616
2535
  }
2617
2536
  // @__NO_SIDE_EFFECTS__
2618
- function Ai(e, t) {
2537
+ function Di(e, t) {
2619
2538
  return new e({
2620
2539
  type: "string",
2621
2540
  format: "duration",
@@ -2624,7 +2543,7 @@ function Ai(e, t) {
2624
2543
  });
2625
2544
  }
2626
2545
  // @__NO_SIDE_EFFECTS__
2627
- function ji(e, t) {
2546
+ function Oi(e, t) {
2628
2547
  return new e({
2629
2548
  type: "number",
2630
2549
  checks: [],
@@ -2632,7 +2551,7 @@ function ji(e, t) {
2632
2551
  });
2633
2552
  }
2634
2553
  // @__NO_SIDE_EFFECTS__
2635
- function Mi(e, t) {
2554
+ function ki(e, t) {
2636
2555
  return new e({
2637
2556
  type: "number",
2638
2557
  check: "number_format",
@@ -2642,33 +2561,33 @@ function Mi(e, t) {
2642
2561
  });
2643
2562
  }
2644
2563
  // @__NO_SIDE_EFFECTS__
2645
- function Ni(e, t) {
2564
+ function Ai(e, t) {
2646
2565
  return new e({
2647
2566
  type: "boolean",
2648
2567
  ...v(t)
2649
2568
  });
2650
2569
  }
2651
2570
  // @__NO_SIDE_EFFECTS__
2652
- function Pi(e, t) {
2571
+ function ji(e, t) {
2653
2572
  return new e({
2654
2573
  type: "null",
2655
2574
  ...v(t)
2656
2575
  });
2657
2576
  }
2658
2577
  // @__NO_SIDE_EFFECTS__
2659
- function Fi(e) {
2578
+ function Mi(e) {
2660
2579
  return new e({ type: "unknown" });
2661
2580
  }
2662
2581
  // @__NO_SIDE_EFFECTS__
2663
- function Ii(e, t) {
2582
+ function Ni(e, t) {
2664
2583
  return new e({
2665
2584
  type: "never",
2666
2585
  ...v(t)
2667
2586
  });
2668
2587
  }
2669
2588
  // @__NO_SIDE_EFFECTS__
2670
- function Li(e, t) {
2671
- return new qt({
2589
+ function Pi(e, t) {
2590
+ return new Jt({
2672
2591
  check: "less_than",
2673
2592
  ...v(t),
2674
2593
  value: e,
@@ -2676,8 +2595,8 @@ function Li(e, t) {
2676
2595
  });
2677
2596
  }
2678
2597
  // @__NO_SIDE_EFFECTS__
2679
- function Ri(e, t) {
2680
- return new qt({
2598
+ function Fi(e, t) {
2599
+ return new Jt({
2681
2600
  check: "less_than",
2682
2601
  ...v(t),
2683
2602
  value: e,
@@ -2685,8 +2604,8 @@ function Ri(e, t) {
2685
2604
  });
2686
2605
  }
2687
2606
  // @__NO_SIDE_EFFECTS__
2688
- function zi(e, t) {
2689
- return new Jt({
2607
+ function Ii(e, t) {
2608
+ return new Yt({
2690
2609
  check: "greater_than",
2691
2610
  ...v(t),
2692
2611
  value: e,
@@ -2694,8 +2613,8 @@ function zi(e, t) {
2694
2613
  });
2695
2614
  }
2696
2615
  // @__NO_SIDE_EFFECTS__
2697
- function Bi(e, t) {
2698
- return new Jt({
2616
+ function Li(e, t) {
2617
+ return new Yt({
2699
2618
  check: "greater_than",
2700
2619
  ...v(t),
2701
2620
  value: e,
@@ -2703,40 +2622,40 @@ function Bi(e, t) {
2703
2622
  });
2704
2623
  }
2705
2624
  // @__NO_SIDE_EFFECTS__
2706
- function Vi(e, t) {
2707
- return new Yt({
2625
+ function Ri(e, t) {
2626
+ return new Xt({
2708
2627
  check: "multiple_of",
2709
2628
  ...v(t),
2710
2629
  value: e
2711
2630
  });
2712
2631
  }
2713
2632
  // @__NO_SIDE_EFFECTS__
2714
- function Hi(e, t) {
2715
- return new Zt({
2633
+ function zi(e, t) {
2634
+ return new Qt({
2716
2635
  check: "max_length",
2717
2636
  ...v(t),
2718
2637
  maximum: e
2719
2638
  });
2720
2639
  }
2721
2640
  // @__NO_SIDE_EFFECTS__
2722
- function Ui(e, t) {
2723
- return new Qt({
2641
+ function Bi(e, t) {
2642
+ return new $t({
2724
2643
  check: "min_length",
2725
2644
  ...v(t),
2726
2645
  minimum: e
2727
2646
  });
2728
2647
  }
2729
2648
  // @__NO_SIDE_EFFECTS__
2730
- function Wi(e, t) {
2731
- return new $t({
2649
+ function Vi(e, t) {
2650
+ return new en({
2732
2651
  check: "length_equals",
2733
2652
  ...v(t),
2734
2653
  length: e
2735
2654
  });
2736
2655
  }
2737
2656
  // @__NO_SIDE_EFFECTS__
2738
- function Gi(e, t) {
2739
- return new tn({
2657
+ function Hi(e, t) {
2658
+ return new nn({
2740
2659
  check: "string_format",
2741
2660
  format: "regex",
2742
2661
  ...v(t),
@@ -2744,24 +2663,24 @@ function Gi(e, t) {
2744
2663
  });
2745
2664
  }
2746
2665
  // @__NO_SIDE_EFFECTS__
2747
- function Ki(e) {
2748
- return new nn({
2666
+ function Ui(e) {
2667
+ return new rn({
2749
2668
  check: "string_format",
2750
2669
  format: "lowercase",
2751
2670
  ...v(e)
2752
2671
  });
2753
2672
  }
2754
2673
  // @__NO_SIDE_EFFECTS__
2755
- function qi(e) {
2756
- return new rn({
2674
+ function Wi(e) {
2675
+ return new an({
2757
2676
  check: "string_format",
2758
2677
  format: "uppercase",
2759
2678
  ...v(e)
2760
2679
  });
2761
2680
  }
2762
2681
  // @__NO_SIDE_EFFECTS__
2763
- function Ji(e, t) {
2764
- return new an({
2682
+ function Gi(e, t) {
2683
+ return new on({
2765
2684
  check: "string_format",
2766
2685
  format: "includes",
2767
2686
  ...v(t),
@@ -2769,8 +2688,8 @@ function Ji(e, t) {
2769
2688
  });
2770
2689
  }
2771
2690
  // @__NO_SIDE_EFFECTS__
2772
- function Yi(e, t) {
2773
- return new on({
2691
+ function Ki(e, t) {
2692
+ return new sn({
2774
2693
  check: "string_format",
2775
2694
  format: "starts_with",
2776
2695
  ...v(t),
@@ -2778,8 +2697,8 @@ function Yi(e, t) {
2778
2697
  });
2779
2698
  }
2780
2699
  // @__NO_SIDE_EFFECTS__
2781
- function Xi(e, t) {
2782
- return new sn({
2700
+ function qi(e, t) {
2701
+ return new cn({
2783
2702
  check: "string_format",
2784
2703
  format: "ends_with",
2785
2704
  ...v(t),
@@ -2787,34 +2706,34 @@ function Xi(e, t) {
2787
2706
  });
2788
2707
  }
2789
2708
  // @__NO_SIDE_EFFECTS__
2790
- function Zi(e) {
2791
- return new cn({
2709
+ function Ji(e) {
2710
+ return new ln({
2792
2711
  check: "overwrite",
2793
2712
  tx: e
2794
2713
  });
2795
2714
  }
2796
2715
  // @__NO_SIDE_EFFECTS__
2797
- function Qi(e) {
2798
- return /* @__PURE__ */ Zi((t) => t.normalize(e));
2716
+ function Yi(e) {
2717
+ return /* @__PURE__ */ Ji((t) => t.normalize(e));
2799
2718
  }
2800
2719
  // @__NO_SIDE_EFFECTS__
2801
- function $i() {
2802
- return /* @__PURE__ */ Zi((e) => e.trim());
2720
+ function Xi() {
2721
+ return /* @__PURE__ */ Ji((e) => e.trim());
2803
2722
  }
2804
2723
  // @__NO_SIDE_EFFECTS__
2805
- function ea() {
2806
- return /* @__PURE__ */ Zi((e) => e.toLowerCase());
2724
+ function Zi() {
2725
+ return /* @__PURE__ */ Ji((e) => e.toLowerCase());
2807
2726
  }
2808
2727
  // @__NO_SIDE_EFFECTS__
2809
- function ta() {
2810
- return /* @__PURE__ */ Zi((e) => e.toUpperCase());
2728
+ function Qi() {
2729
+ return /* @__PURE__ */ Ji((e) => e.toUpperCase());
2811
2730
  }
2812
2731
  // @__NO_SIDE_EFFECTS__
2813
- function na() {
2814
- return /* @__PURE__ */ Zi((e) => m(e));
2732
+ function $i() {
2733
+ return /* @__PURE__ */ Ji((e) => m(e));
2815
2734
  }
2816
2735
  // @__NO_SIDE_EFFECTS__
2817
- function ra(e, t, n) {
2736
+ function ea(e, t, n) {
2818
2737
  return new e({
2819
2738
  type: "array",
2820
2739
  element: t,
@@ -2822,7 +2741,7 @@ function ra(e, t, n) {
2822
2741
  });
2823
2742
  }
2824
2743
  // @__NO_SIDE_EFFECTS__
2825
- function ia(e, t, n) {
2744
+ function ta(e, t, n) {
2826
2745
  return new e({
2827
2746
  type: "custom",
2828
2747
  check: "custom",
@@ -2831,8 +2750,8 @@ function ia(e, t, n) {
2831
2750
  });
2832
2751
  }
2833
2752
  // @__NO_SIDE_EFFECTS__
2834
- function aa(e, t) {
2835
- let n = /* @__PURE__ */ oa((t) => (t.addIssue = (e) => {
2753
+ function na(e, t) {
2754
+ let n = /* @__PURE__ */ ra((t) => (t.addIssue = (e) => {
2836
2755
  if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
2837
2756
  else {
2838
2757
  let r = e;
@@ -2842,8 +2761,8 @@ function aa(e, t) {
2842
2761
  return n;
2843
2762
  }
2844
2763
  // @__NO_SIDE_EFFECTS__
2845
- function oa(e, t) {
2846
- let n = new O({
2764
+ function ra(e, t) {
2765
+ let n = new D({
2847
2766
  check: "custom",
2848
2767
  ...v(t)
2849
2768
  });
@@ -2851,15 +2770,15 @@ function oa(e, t) {
2851
2770
  }
2852
2771
  //#endregion
2853
2772
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
2854
- function sa(e, ...t) {
2773
+ function ia(e, ...t) {
2855
2774
  for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && d(e, t, n[t]);
2856
2775
  return e;
2857
2776
  }
2858
- function ca(e) {
2777
+ function aa(e) {
2859
2778
  let t = e?.target ?? "draft-2020-12";
2860
2779
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2861
2780
  processors: e.processors ?? {},
2862
- metadataRegistry: e?.metadata ?? ri,
2781
+ metadataRegistry: e?.metadata ?? ei,
2863
2782
  target: t,
2864
2783
  unrepresentable: e?.unrepresentable ?? "throw",
2865
2784
  override: e?.override ?? (() => {}),
@@ -2875,7 +2794,7 @@ function ca(e) {
2875
2794
  external: e?.external ?? void 0
2876
2795
  };
2877
2796
  }
2878
- function j(e, t, n, r, i) {
2797
+ function A(e, t, n, r, i) {
2879
2798
  let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
2880
2799
  zodSchema: e,
2881
2800
  path: r.path,
@@ -2885,7 +2804,7 @@ function j(e, t, n, r, i) {
2885
2804
  if (a === void 0 || a === "throw") throw Error(i);
2886
2805
  return Object.assign(n, a), !0;
2887
2806
  }
2888
- function M(e, t, n = {
2807
+ function j(e, t, n = {
2889
2808
  path: [],
2890
2809
  schemaPath: []
2891
2810
  }) {
@@ -2914,15 +2833,15 @@ function M(e, t, n = {
2914
2833
  a(e, t, n, r);
2915
2834
  }
2916
2835
  let a = e._zod.parent;
2917
- a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
2836
+ a && (o.ref ||= a, j(a, t, r), t.seen.get(a).isParent = !0);
2918
2837
  }
2919
2838
  let c = t.metadataRegistry.get(e);
2920
- return c && sa(o.schema, c), t.io === "input" && N(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2839
+ return c && ia(o.schema, c), t.io === "input" && M(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2921
2840
  }
2922
- function la(e) {
2841
+ function oa(e) {
2923
2842
  return e.replace(/~/g, "~0").replace(/\//g, "~1");
2924
2843
  }
2925
- function ua(e, t) {
2844
+ function sa(e, t) {
2926
2845
  let n = e.seen.get(t);
2927
2846
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2928
2847
  if (e.external && e.sharedDefsExtractedFor === e.external) return;
@@ -2943,7 +2862,7 @@ function ua(e, t) {
2943
2862
  let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2944
2863
  return t[1].defId = a, {
2945
2864
  defId: a,
2946
- ref: `${i("__shared")}#/${r}/${la(a)}`
2865
+ ref: `${i("__shared")}#/${r}/${oa(a)}`
2947
2866
  };
2948
2867
  }
2949
2868
  let i = `#/${r}/`;
@@ -2951,7 +2870,7 @@ function ua(e, t) {
2951
2870
  let a = t[1].schema.id ?? `__schema${e.counter++}`;
2952
2871
  return {
2953
2872
  defId: a,
2954
- ref: i + la(a)
2873
+ ref: i + oa(a)
2955
2874
  };
2956
2875
  }, a = (e) => {
2957
2876
  if (e[1].schema.$ref) return;
@@ -2995,13 +2914,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2995
2914
  }
2996
2915
  e.external && (e.sharedDefsExtractedFor = e.external);
2997
2916
  }
2998
- function da(e) {
2917
+ function ca(e) {
2999
2918
  let t = e.anyOf;
3000
2919
  if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
3001
2920
  let n = [];
3002
2921
  for (let e of t) {
3003
2922
  if (!e || typeof e != "object") return;
3004
- da(e);
2923
+ ca(e);
3005
2924
  let t = Object.keys(e);
3006
2925
  if (t.length !== 1 || t[0] !== "type") return;
3007
2926
  let r = e.type;
@@ -3012,21 +2931,21 @@ function da(e) {
3012
2931
  }
3013
2932
  delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
3014
2933
  }
3015
- var fa = /* @__PURE__ */ new Set([
2934
+ var la = /* @__PURE__ */ new Set([
3016
2935
  "type",
3017
2936
  "properties",
3018
2937
  "required",
3019
2938
  "additionalProperties"
3020
- ]), pa = ["oneOf", "anyOf"];
3021
- function ma(e) {
2939
+ ]), ua = ["oneOf", "anyOf"];
2940
+ function da(e) {
3022
2941
  let t = e.additionalProperties;
3023
2942
  return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
3024
2943
  }
3025
- function ha(e) {
2944
+ function fa(e) {
3026
2945
  let t = [];
3027
2946
  for (let n of e) {
3028
2947
  if (typeof n != "object" || n.type !== "object") return null;
3029
- for (let e in n) if (!fa.has(e)) return null;
2948
+ for (let e in n) if (!la.has(e)) return null;
3030
2949
  t.push(n);
3031
2950
  }
3032
2951
  let n = {}, r = /* @__PURE__ */ new Set();
@@ -3035,10 +2954,10 @@ function ha(e) {
3035
2954
  if (Object.prototype.hasOwnProperty.call(n, r)) continue;
3036
2955
  let e = [];
3037
2956
  for (let n of t) {
3038
- let t = n.properties?.[r] ?? ma(n);
2957
+ let t = n.properties?.[r] ?? da(n);
3039
2958
  t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
3040
2959
  }
3041
- d(n, r, e.length === 1 ? e[0] : ha(e) ?? { allOf: e });
2960
+ d(n, r, e.length === 1 ? e[0] : fa(e) ?? { allOf: e });
3042
2961
  }
3043
2962
  for (let t of e.required ?? []) r.add(t);
3044
2963
  }
@@ -3050,29 +2969,29 @@ function ha(e) {
3050
2969
  else {
3051
2970
  let e = [];
3052
2971
  for (let n of t) {
3053
- let t = ma(n);
2972
+ let t = da(n);
3054
2973
  t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
3055
2974
  }
3056
2975
  e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
3057
2976
  }
3058
2977
  return i;
3059
2978
  }
3060
- function ga(e) {
2979
+ function pa(e) {
3061
2980
  let t = e.allOf;
3062
2981
  if (!Array.isArray(t) || t.length < 2) return;
3063
- for (let t of fa) if (t in e) return;
3064
- let n = t.filter((e) => pa.some((t) => Array.isArray(e[t]))), r = null;
3065
- if (!n.length) r = ha(t);
2982
+ for (let t of la) if (t in e) return;
2983
+ let n = t.filter((e) => ua.some((t) => Array.isArray(e[t]))), r = null;
2984
+ if (!n.length) r = fa(t);
3066
2985
  else {
3067
- let e = n[0], i = pa.find((t) => Array.isArray(e[t]));
2986
+ let e = n[0], i = ua.find((t) => Array.isArray(e[t]));
3068
2987
  if (Object.keys(e).length !== 1) return;
3069
- let a = t.filter((t) => t !== e), o = e[i].map((e) => ha([...a, e]));
2988
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => fa([...a, e]));
3070
2989
  if (o.some((e) => !e)) return;
3071
2990
  r = { [i]: o };
3072
2991
  }
3073
- r && (delete e.allOf, sa(e, r));
2992
+ r && (delete e.allOf, ia(e, r));
3074
2993
  }
3075
- function _a(e, t) {
2994
+ function ma(e, t) {
3076
2995
  let n = e.seen.get(t);
3077
2996
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3078
2997
  let r = (t) => {
@@ -3082,7 +3001,7 @@ function _a(e, t) {
3082
3001
  if (n.ref = null, o) {
3083
3002
  r(o);
3084
3003
  let n = e.seen.get(o), s = n.schema;
3085
- if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : sa(i, s), sa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3004
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : ia(i, s), ia(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3086
3005
  if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
3087
3006
  }
3088
3007
  let s = t._zod.parent;
@@ -3099,7 +3018,7 @@ function _a(e, t) {
3099
3018
  };
3100
3019
  if (!e.external || e.sharedEmitDoneFor !== e.external) {
3101
3020
  for (let t of [...e.seen.entries()].reverse()) r(t[0]);
3102
- if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) da(t[1].def ?? t[1].schema);
3021
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ca(t[1].def ?? t[1].schema);
3103
3022
  for (let t of e.deferred) t();
3104
3023
  if (e.intersections.length) {
3105
3024
  let t = /* @__PURE__ */ new Map();
@@ -3109,7 +3028,7 @@ function _a(e, t) {
3109
3028
  let r = t.get(n);
3110
3029
  r ? r.push(e) : t.set(n, [e]);
3111
3030
  }
3112
- for (let n of e.intersections) for (let e of t.get(n) ?? []) ga(e);
3031
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) pa(e);
3113
3032
  }
3114
3033
  }
3115
3034
  let i = {};
@@ -3118,7 +3037,7 @@ function _a(e, t) {
3118
3037
  if (!n) throw Error("Schema is missing an `id` property");
3119
3038
  i.$id = e.external.uri(n);
3120
3039
  }
3121
- sa(i, n.defId ? n.schema : n.def ?? n.schema);
3040
+ ia(i, n.defId ? n.schema : n.def ?? n.schema);
3122
3041
  let a = e.metadataRegistry.get(t)?.id;
3123
3042
  a !== void 0 && i.id === a && delete i.id;
3124
3043
  let o = e.external?.defs ?? {};
@@ -3133,8 +3052,8 @@ function _a(e, t) {
3133
3052
  value: {
3134
3053
  ...t["~standard"],
3135
3054
  jsonSchema: {
3136
- input: ya(t, "input", e.processors),
3137
- output: ya(t, "output", e.processors)
3055
+ input: ga(t, "input", e.processors),
3056
+ output: ga(t, "output", e.processors)
3138
3057
  }
3139
3058
  },
3140
3059
  enumerable: !1,
@@ -3144,93 +3063,93 @@ function _a(e, t) {
3144
3063
  throw Error("Error converting schema to JSON.");
3145
3064
  }
3146
3065
  }
3147
- function N(e, t) {
3066
+ function M(e, t) {
3148
3067
  let n = t ?? { seen: /* @__PURE__ */ new Set() };
3149
3068
  if (n.seen.has(e)) return !1;
3150
3069
  n.seen.add(e);
3151
3070
  let r = e._zod.def;
3152
3071
  if (r.type === "transform") return !0;
3153
- if (r.type === "array") return N(r.element, n);
3154
- if (r.type === "set") return N(r.valueType, n);
3155
- if (r.type === "lazy") return N(r.getter(), n);
3156
- if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return N(r.innerType, n);
3157
- if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
3158
- if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
3159
- if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(r.out, n);
3072
+ if (r.type === "array") return M(r.element, n);
3073
+ if (r.type === "set") return M(r.valueType, n);
3074
+ if (r.type === "lazy") return M(r.getter(), n);
3075
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return M(r.innerType, n);
3076
+ if (r.type === "intersection") return M(r.left, n) || M(r.right, n);
3077
+ if (r.type === "record" || r.type === "map") return M(r.keyType, n) || M(r.valueType, n);
3078
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : M(r.in, n) || M(r.out, n);
3160
3079
  if (r.type === "object") {
3161
- for (let e in r.shape) if (N(r.shape[e], n)) return !0;
3080
+ for (let e in r.shape) if (M(r.shape[e], n)) return !0;
3162
3081
  return !1;
3163
3082
  }
3164
3083
  if (r.type === "union") {
3165
- for (let e of r.options) if (N(e, n)) return !0;
3084
+ for (let e of r.options) if (M(e, n)) return !0;
3166
3085
  return !1;
3167
3086
  }
3168
3087
  if (r.type === "tuple") {
3169
- for (let e of r.items) if (N(e, n)) return !0;
3170
- return !!(r.rest && N(r.rest, n));
3088
+ for (let e of r.items) if (M(e, n)) return !0;
3089
+ return !!(r.rest && M(r.rest, n));
3171
3090
  }
3172
3091
  return !1;
3173
3092
  }
3174
- var va = (e, t = {}) => (n) => {
3175
- let r = ca({
3093
+ var ha = (e, t = {}) => (n) => {
3094
+ let r = aa({
3176
3095
  ...n,
3177
3096
  processors: t
3178
3097
  });
3179
- return M(e, r), ua(r, e), _a(r, e);
3180
- }, ya = (e, t, n = {}) => (r) => {
3181
- let { libraryOptions: i, target: a } = r ?? {}, o = ca({
3098
+ return j(e, r), sa(r, e), ma(r, e);
3099
+ }, ga = (e, t, n = {}) => (r) => {
3100
+ let { libraryOptions: i, target: a } = r ?? {}, o = aa({
3182
3101
  ...i ?? {},
3183
3102
  target: a,
3184
3103
  io: t,
3185
3104
  processors: n
3186
3105
  });
3187
- return M(e, o), ua(o, e), _a(o, e);
3188
- }, ba = {
3106
+ return j(e, o), sa(o, e), ma(o, e);
3107
+ }, _a = {
3189
3108
  guid: "uuid",
3190
3109
  url: "uri",
3191
3110
  datetime: "date-time",
3192
3111
  json_string: "json-string",
3193
3112
  regex: ""
3194
- }, xa = (e, t, n, r) => {
3113
+ }, va = (e, t, n, r) => {
3195
3114
  let i = n;
3196
3115
  i.type = "string";
3197
3116
  let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
3198
- if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ba[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3117
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = _a[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3199
3118
  let e = [...c];
3200
3119
  e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
3201
3120
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3202
3121
  pattern: e.source
3203
3122
  }))]);
3204
3123
  }
3205
- }, Sa = (e, t, n, r) => {
3124
+ }, ya = (e, t, n, r) => {
3206
3125
  let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
3207
3126
  i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
3208
3127
  let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
3209
- d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : j(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3210
- }, Ca = (e, t, n, r) => {
3128
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : A(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3129
+ }, ba = (e, t, n, r) => {
3211
3130
  n.type = "boolean";
3131
+ }, xa = (e, t, n, r) => {
3132
+ A(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3133
+ }, Sa = (e, t, n, r) => {
3134
+ A(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3135
+ }, Ca = (e, t, n, r) => {
3136
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3212
3137
  }, wa = (e, t, n, r) => {
3213
- j(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3138
+ A(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3214
3139
  }, Ta = (e, t, n, r) => {
3215
- j(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3140
+ A(e, t, n, r, "Void cannot be represented in JSON Schema");
3216
3141
  }, Ea = (e, t, n, r) => {
3217
- t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3218
- }, Da = (e, t, n, r) => {
3219
- j(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3220
- }, Oa = (e, t, n, r) => {
3221
- j(e, t, n, r, "Void cannot be represented in JSON Schema");
3222
- }, ka = (e, t, n, r) => {
3223
3142
  n.not = {};
3224
- }, Aa = (e, t, n, r) => {}, ja = (e, t, n, r) => {}, Ma = (e, t, n, r) => {
3225
- j(e, t, n, r, "Date cannot be represented in JSON Schema");
3226
- }, Na = (e, t, r, i) => {
3143
+ }, Da = (e, t, n, r) => {}, Oa = (e, t, n, r) => {}, ka = (e, t, n, r) => {
3144
+ A(e, t, n, r, "Date cannot be represented in JSON Schema");
3145
+ }, Aa = (e, t, r, i) => {
3227
3146
  let a = e._zod.def, o = n(a.entries);
3228
3147
  if (o.length === 0) {
3229
3148
  r.not = {};
3230
3149
  return;
3231
3150
  }
3232
3151
  o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
3233
- }, Pa = (e, t, n, r) => {
3152
+ }, ja = (e, t, n, r) => {
3234
3153
  let i = e._zod.def;
3235
3154
  if (i.values.length === 0) {
3236
3155
  n.not = {};
@@ -3238,9 +3157,9 @@ var va = (e, t = {}) => (n) => {
3238
3157
  }
3239
3158
  let a = [];
3240
3159
  for (let o of i.values) if (o === void 0) {
3241
- if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3160
+ if (A(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3242
3161
  } else if (typeof o == "bigint") {
3243
- if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3162
+ if (A(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3244
3163
  a.push(Number(o));
3245
3164
  } else a.push(o);
3246
3165
  if (a.length !== 0) {
@@ -3249,47 +3168,47 @@ var va = (e, t = {}) => (n) => {
3249
3168
  n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
3250
3169
  } else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
3251
3170
  }
3252
- }, Fa = (e, t, n, r) => {
3253
- j(e, t, n, r, "NaN cannot be represented in JSON Schema");
3254
- }, Ia = (e, t, n, r) => {
3171
+ }, Ma = (e, t, n, r) => {
3172
+ A(e, t, n, r, "NaN cannot be represented in JSON Schema");
3173
+ }, Na = (e, t, n, r) => {
3255
3174
  let i = n, a = e._zod.pattern;
3256
3175
  if (!a) throw Error("Pattern not found in template literal");
3257
3176
  i.type = "string", i.pattern = a.source;
3258
- }, La = (e, t, n, r) => {
3177
+ }, Pa = (e, t, n, r) => {
3259
3178
  let i = n, a = {
3260
3179
  type: "string",
3261
3180
  format: "binary",
3262
3181
  contentEncoding: "binary"
3263
3182
  }, { minimum: o, maximum: s, mime: c } = e._zod.bag;
3264
3183
  o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
3265
- }, Ra = (e, t, n, r) => {
3184
+ }, Fa = (e, t, n, r) => {
3266
3185
  n.type = "boolean";
3186
+ }, Ia = (e, t, n, r) => {
3187
+ A(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3188
+ }, La = (e, t, n, r) => {
3189
+ A(e, t, n, r, "Function types cannot be represented in JSON Schema");
3190
+ }, Ra = (e, t, n, r) => {
3191
+ A(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3267
3192
  }, za = (e, t, n, r) => {
3268
- j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3193
+ A(e, t, n, r, "Map cannot be represented in JSON Schema");
3269
3194
  }, Ba = (e, t, n, r) => {
3270
- j(e, t, n, r, "Function types cannot be represented in JSON Schema");
3195
+ A(e, t, n, r, "Set cannot be represented in JSON Schema");
3271
3196
  }, Va = (e, t, n, r) => {
3272
- j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3273
- }, Ha = (e, t, n, r) => {
3274
- j(e, t, n, r, "Map cannot be represented in JSON Schema");
3275
- }, Ua = (e, t, n, r) => {
3276
- j(e, t, n, r, "Set cannot be represented in JSON Schema");
3277
- }, Wa = (e, t, n, r) => {
3278
3197
  let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
3279
- typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
3198
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = j(a.element, t, {
3280
3199
  ...r,
3281
3200
  path: [...r.path, "items"]
3282
3201
  });
3283
3202
  };
3284
- function Ga(e) {
3203
+ function Ha(e) {
3285
3204
  let t = e._zod.def;
3286
- return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ga(t.out) : t.type === "catch" ? Ga(t.innerType) : e._zod.optin;
3205
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ha(t.out) : t.type === "catch" ? Ha(t.innerType) : e._zod.optin;
3287
3206
  }
3288
- var Ka = (e, t, n, r) => {
3207
+ var Ua = (e, t, n, r) => {
3289
3208
  let i = n, a = e._zod.def, o = a.shape;
3290
- if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3209
+ if (Object.getOwnPropertySymbols(o).length && A(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3291
3210
  i.type = "object", i.properties = {};
3292
- for (let e in o) d(i.properties, e, M(o[e], t, {
3211
+ for (let e in o) d(i.properties, e, j(o[e], t, {
3293
3212
  ...r,
3294
3213
  path: [
3295
3214
  ...r.path,
@@ -3299,14 +3218,14 @@ var Ka = (e, t, n, r) => {
3299
3218
  }));
3300
3219
  let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
3301
3220
  let n = a.shape[e];
3302
- return t.io === "input" ? Ga(n) === void 0 : n._zod.optout === void 0;
3221
+ return t.io === "input" ? Ha(n) === void 0 : n._zod.optout === void 0;
3303
3222
  }));
3304
- c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = M(a.catchall, t, {
3223
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = j(a.catchall, t, {
3305
3224
  ...r,
3306
3225
  path: [...r.path, "additionalProperties"]
3307
3226
  })) : t.io === "output" && (i.additionalProperties = !1);
3308
- }, qa = (e, t, n, r) => {
3309
- let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
3227
+ }, Wa = (e, t, n, r) => {
3228
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => j(e, t, {
3310
3229
  ...r,
3311
3230
  path: [
3312
3231
  ...r.path,
@@ -3315,15 +3234,15 @@ var Ka = (e, t, n, r) => {
3315
3234
  ]
3316
3235
  }));
3317
3236
  a ? n.oneOf = o : n.anyOf = o;
3318
- }, Ja = (e, t, n, r) => {
3319
- let i = e._zod.def, a = M(i.left, t, {
3237
+ }, Ga = (e, t, n, r) => {
3238
+ let i = e._zod.def, a = j(i.left, t, {
3320
3239
  ...r,
3321
3240
  path: [
3322
3241
  ...r.path,
3323
3242
  "allOf",
3324
3243
  0
3325
3244
  ]
3326
- }), o = M(i.right, t, {
3245
+ }), o = j(i.right, t, {
3327
3246
  ...r,
3328
3247
  path: [
3329
3248
  ...r.path,
@@ -3332,17 +3251,17 @@ var Ka = (e, t, n, r) => {
3332
3251
  ]
3333
3252
  }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3334
3253
  n.allOf = c, t.intersections.push(c);
3335
- }, Ya = (e, t, n, r) => {
3254
+ }, Ka = (e, t, n, r) => {
3336
3255
  let i = n, a = e._zod.def;
3337
3256
  i.type = "array";
3338
- let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => M(e, t, {
3257
+ let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => j(e, t, {
3339
3258
  ...r,
3340
3259
  path: [
3341
3260
  ...r.path,
3342
3261
  o,
3343
3262
  n
3344
3263
  ]
3345
- })), l = a.rest ? M(a.rest, t, {
3264
+ })), l = a.rest ? j(a.rest, t, {
3346
3265
  ...r,
3347
3266
  path: [
3348
3267
  ...r.path,
@@ -3352,7 +3271,7 @@ var Ka = (e, t, n, r) => {
3352
3271
  }) : null, u = a.items.length;
3353
3272
  for (; u > 0;) {
3354
3273
  let e = a.items[u - 1];
3355
- if (!(t.io === "input" ? Ga(e) !== void 0 : e._zod.optout === "optional")) break;
3274
+ if (!(t.io === "input" ? Ha(e) !== void 0 : e._zod.optout === "optional")) break;
3356
3275
  u--;
3357
3276
  }
3358
3277
  let d = a.items.length, f = !a.rest;
@@ -3360,19 +3279,19 @@ var Ka = (e, t, n, r) => {
3360
3279
  let { minimum: p, maximum: m } = e._zod.bag;
3361
3280
  typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3362
3281
  };
3363
- function Xa(e, t, n) {
3282
+ function qa(e, t, n) {
3364
3283
  if (t.$ref) {
3365
3284
  if (n.has(t)) return t;
3366
3285
  n.add(t);
3367
3286
  let r = e.get(t)?.def;
3368
3287
  if (!r) return t;
3369
- let i = Xa(e, r, n);
3288
+ let i = qa(e, r, n);
3370
3289
  return i === r ? t : i;
3371
3290
  }
3372
3291
  for (let r of ["anyOf", "oneOf"]) {
3373
3292
  let i = t[r];
3374
3293
  if (!Array.isArray(i)) continue;
3375
- let a = i.map((t) => Xa(e, t, n));
3294
+ let a = i.map((t) => qa(e, t, n));
3376
3295
  a.some((e, t) => e !== i[t]) && (t = {
3377
3296
  ...t,
3378
3297
  [r]: a
@@ -3381,17 +3300,17 @@ function Xa(e, t, n) {
3381
3300
  let r = Array.isArray(t.type) ? t.type : [t.type], i = !r.includes("string") && r.some((e) => e === "number" || e === "integer"), a = t.enum ?? (t.const === void 0 ? void 0 : [t.const]);
3382
3301
  if (!i && !a?.some((e) => typeof e == "number")) return t;
3383
3302
  let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
3384
- return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Bt : zt).source), p) : p;
3303
+ return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Vt : Bt).source), p) : p;
3385
3304
  }
3386
- var Za = /* @__PURE__ */ new WeakMap();
3387
- function Qa(e) {
3305
+ var Ja = /* @__PURE__ */ new WeakMap();
3306
+ function Ya(e) {
3388
3307
  let t = /* @__PURE__ */ new Map();
3389
3308
  for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
3390
3309
  let n = /* @__PURE__ */ new Map();
3391
- for (let r of Za.get(e) ?? []) {
3310
+ for (let r of Ja.get(e) ?? []) {
3392
3311
  let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
3393
3312
  if (!a || a === !0 || n.has(a)) continue;
3394
- let o = Xa(t, a, /* @__PURE__ */ new Set());
3313
+ let o = qa(t, a, /* @__PURE__ */ new Set());
3395
3314
  o !== a && n.set(a, o);
3396
3315
  }
3397
3316
  if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
@@ -3399,12 +3318,12 @@ function Qa(e) {
3399
3318
  t && (e.propertyNames = t);
3400
3319
  }
3401
3320
  }
3402
- var $a = (e, t, n, r) => {
3321
+ var Xa = (e, t, n, r) => {
3403
3322
  let i = n, a = e._zod.def;
3404
3323
  i.type = "object";
3405
3324
  let o = a.keyType, s = o._zod.bag?.patterns;
3406
3325
  if (a.mode === "loose" && s && s.size > 0) {
3407
- let e = M(a.valueType, t, {
3326
+ let e = j(a.valueType, t, {
3408
3327
  ...r,
3409
3328
  path: [
3410
3329
  ...r.path,
@@ -3416,138 +3335,138 @@ var $a = (e, t, n, r) => {
3416
3335
  for (let t of s) d(i.patternProperties, t.source, e);
3417
3336
  } else {
3418
3337
  if (t.target === "draft-07" || t.target === "draft-2020-12") {
3419
- i.propertyNames = M(a.keyType, t, {
3338
+ i.propertyNames = j(a.keyType, t, {
3420
3339
  ...r,
3421
3340
  path: [...r.path, "propertyNames"]
3422
3341
  });
3423
- let n = Za.get(t);
3424
- n || (n = [], Za.set(t, n), t.deferred.push(() => Qa(t))), n.push(e);
3342
+ let n = Ja.get(t);
3343
+ n || (n = [], Ja.set(t, n), t.deferred.push(() => Ya(t))), n.push(e);
3425
3344
  }
3426
- i.additionalProperties = M(a.valueType, t, {
3345
+ i.additionalProperties = j(a.valueType, t, {
3427
3346
  ...r,
3428
3347
  path: [...r.path, "additionalProperties"]
3429
3348
  });
3430
3349
  }
3431
- let c = o._zod.values, l = t.io === "input" && Ga(a.valueType) !== void 0;
3350
+ let c = o._zod.values, l = t.io === "input" && Ha(a.valueType) !== void 0;
3432
3351
  if (c && !a.partial && !l) {
3433
3352
  let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
3434
3353
  e.length > 0 && (i.required = e.map(String));
3435
3354
  }
3436
- }, eo = (e, t, n, r) => {
3437
- let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
3355
+ }, Za = (e, t, n, r) => {
3356
+ let i = e._zod.def, a = j(i.innerType, t, r), o = t.seen.get(e);
3438
3357
  t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3439
- }, to = (e, t, n, r) => {
3358
+ }, Qa = (e, t, n, r) => {
3440
3359
  let i = e._zod.def;
3441
- M(i.innerType, t, r);
3360
+ j(i.innerType, t, r);
3442
3361
  let a = t.seen.get(e);
3443
3362
  a.ref = i.innerType;
3444
- }, no = Symbol();
3445
- function ro(e, t, n, r, i) {
3363
+ }, $a = Symbol();
3364
+ function eo(e, t, n, r, i) {
3446
3365
  let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3447
- return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), no) : JSON.parse(o);
3366
+ return a ? (A(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), $a) : JSON.parse(o);
3448
3367
  }
3449
- var io = (e, t, n, r) => {
3368
+ var to = (e, t, n, r) => {
3450
3369
  let i = e._zod.def;
3451
- M(i.innerType, t, r);
3370
+ j(i.innerType, t, r);
3452
3371
  let a = t.seen.get(e);
3453
3372
  a.ref = i.innerType;
3454
- let o = ro(i.defaultValue, e, t, n, r);
3455
- o !== no && (n.default = o);
3456
- }, ao = (e, t, n, r) => {
3373
+ let o = eo(i.defaultValue, e, t, n, r);
3374
+ o !== $a && (n.default = o);
3375
+ }, no = (e, t, n, r) => {
3457
3376
  let i = e._zod.def;
3458
- M(i.innerType, t, r);
3377
+ j(i.innerType, t, r);
3459
3378
  let a = t.seen.get(e);
3460
3379
  if (a.ref = i.innerType, t.io !== "input") return;
3461
- let o = ro(i.defaultValue, e, t, n, r);
3462
- o !== no && (n._prefault = o);
3463
- }, oo = (e, t, n, r) => {
3380
+ let o = eo(i.defaultValue, e, t, n, r);
3381
+ o !== $a && (n._prefault = o);
3382
+ }, ro = (e, t, n, r) => {
3464
3383
  let i = e._zod.def;
3465
- M(i.innerType, t, r);
3384
+ j(i.innerType, t, r);
3466
3385
  let a = t.seen.get(e);
3467
3386
  a.ref = i.innerType;
3468
3387
  let o;
3469
3388
  try {
3470
3389
  o = i.catchValue(void 0);
3471
3390
  } catch {
3472
- j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3391
+ A(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3473
3392
  return;
3474
3393
  }
3475
3394
  n.default = o;
3476
- }, so = (e, t, n, r) => {
3395
+ }, io = (e, t, n, r) => {
3477
3396
  let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3478
- M(o, t, r);
3397
+ j(o, t, r);
3479
3398
  let s = t.seen.get(e);
3480
3399
  s.ref = o;
3481
- }, co = (e, t, n, r) => {
3400
+ }, ao = (e, t, n, r) => {
3482
3401
  let i = e._zod.def;
3483
- M(i.innerType, t, r);
3402
+ j(i.innerType, t, r);
3484
3403
  let a = t.seen.get(e);
3485
3404
  a.ref = i.innerType, n.readOnly = !0;
3486
- }, lo = (e, t, n, r) => {
3405
+ }, oo = (e, t, n, r) => {
3487
3406
  let i = e._zod.def;
3488
- M(i.innerType, t, r);
3407
+ j(i.innerType, t, r);
3489
3408
  let a = t.seen.get(e);
3490
3409
  a.ref = i.innerType;
3491
- }, uo = (e, t, n, r) => {
3410
+ }, so = (e, t, n, r) => {
3492
3411
  let i = e._zod.def;
3493
- M(i.innerType, t, r);
3412
+ j(i.innerType, t, r);
3494
3413
  let a = t.seen.get(e);
3495
3414
  a.ref = i.innerType;
3496
- }, fo = (e, t, n, r) => {
3415
+ }, co = (e, t, n, r) => {
3497
3416
  let i = e._zod.innerType;
3498
- M(i, t, r);
3417
+ j(i, t, r);
3499
3418
  let a = t.seen.get(e);
3500
3419
  a.ref = i;
3501
- }, po = {
3502
- string: xa,
3503
- number: Sa,
3504
- boolean: Ca,
3505
- bigint: wa,
3506
- symbol: Ta,
3507
- null: Ea,
3508
- undefined: Da,
3509
- void: Oa,
3510
- never: ka,
3511
- any: Aa,
3512
- unknown: ja,
3513
- date: Ma,
3514
- enum: Na,
3515
- literal: Pa,
3516
- nan: Fa,
3517
- template_literal: Ia,
3518
- file: La,
3519
- success: Ra,
3520
- custom: za,
3521
- function: Ba,
3522
- transform: Va,
3523
- map: Ha,
3524
- set: Ua,
3525
- array: Wa,
3526
- object: Ka,
3527
- union: qa,
3528
- intersection: Ja,
3529
- tuple: Ya,
3530
- record: $a,
3531
- nullable: eo,
3532
- nonoptional: to,
3533
- default: io,
3534
- prefault: ao,
3535
- catch: oo,
3536
- pipe: so,
3537
- readonly: co,
3538
- promise: lo,
3539
- optional: uo,
3540
- lazy: fo
3420
+ }, lo = {
3421
+ string: va,
3422
+ number: ya,
3423
+ boolean: ba,
3424
+ bigint: xa,
3425
+ symbol: Sa,
3426
+ null: Ca,
3427
+ undefined: wa,
3428
+ void: Ta,
3429
+ never: Ea,
3430
+ any: Da,
3431
+ unknown: Oa,
3432
+ date: ka,
3433
+ enum: Aa,
3434
+ literal: ja,
3435
+ nan: Ma,
3436
+ template_literal: Na,
3437
+ file: Pa,
3438
+ success: Fa,
3439
+ custom: Ia,
3440
+ function: La,
3441
+ transform: Ra,
3442
+ map: za,
3443
+ set: Ba,
3444
+ array: Va,
3445
+ object: Ua,
3446
+ union: Wa,
3447
+ intersection: Ga,
3448
+ tuple: Ka,
3449
+ record: Xa,
3450
+ nullable: Za,
3451
+ nonoptional: Qa,
3452
+ default: to,
3453
+ prefault: no,
3454
+ catch: ro,
3455
+ pipe: io,
3456
+ readonly: ao,
3457
+ promise: oo,
3458
+ optional: so,
3459
+ lazy: co
3541
3460
  };
3542
- function mo(e, t) {
3461
+ function uo(e, t) {
3543
3462
  if ("_idmap" in e) {
3544
- let n = e, r = ca({
3463
+ let n = e, r = aa({
3545
3464
  ...t,
3546
- processors: po
3465
+ processors: lo
3547
3466
  }), i = {};
3548
3467
  for (let e of n._idmap.entries()) {
3549
3468
  let [t, n] = e;
3550
- M(n, r);
3469
+ j(n, r);
3551
3470
  }
3552
3471
  let a = {};
3553
3472
  r.external = {
@@ -3557,20 +3476,20 @@ function mo(e, t) {
3557
3476
  };
3558
3477
  for (let e of n._idmap.entries()) {
3559
3478
  let [t, n] = e;
3560
- ua(r, n), d(a, t, _a(r, n));
3479
+ sa(r, n), d(a, t, ma(r, n));
3561
3480
  }
3562
3481
  return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
3563
3482
  }
3564
- let n = ca({
3483
+ let n = aa({
3565
3484
  ...t,
3566
- processors: po
3485
+ processors: lo
3567
3486
  });
3568
- return M(e, n), ua(n, e), _a(n, e);
3487
+ return j(e, n), sa(n, e), ma(n, e);
3569
3488
  }
3570
3489
  //#endregion
3571
3490
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
3572
- var ho = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3573
- function go(e, t, n) {
3491
+ var fo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3492
+ function po(e, t, n) {
3574
3493
  Object.defineProperty(e, t, {
3575
3494
  configurable: !0,
3576
3495
  enumerable: !1,
@@ -3591,12 +3510,12 @@ function go(e, t, n) {
3591
3510
  }
3592
3511
  });
3593
3512
  }
3594
- var P = /*@__PURE__*/ w("ZodError", (e, t) => {
3595
- Ge.init(e, t), e.name = "ZodError";
3513
+ var mo = (e, t) => {
3514
+ Ke.init(e, t), e.name = "ZodError";
3596
3515
  let n = Object.getPrototypeOf(e);
3597
- ho.has(n) || (ho.add(n), go(n, "format", (e) => (t) => Ye(e, t)), go(n, "flatten", (e) => (t) => Je(e, t)), go(n, "addIssue", (e) => (t) => {
3516
+ fo.has(n) || (fo.add(n), po(n, "format", (e) => (t) => Xe(e, t)), po(n, "flatten", (e) => (t) => Ye(e, t)), po(n, "addIssue", (e) => (t) => {
3598
3517
  e.issues.push(t), e.message = JSON.stringify(e.issues, i, 2);
3599
- }), go(n, "addIssues", (e) => (t) => {
3518
+ }), po(n, "addIssues", (e) => (t) => {
3600
3519
  e.issues.push(...t), e.message = JSON.stringify(e.issues, i, 2);
3601
3520
  }), Object.defineProperty(n, "isEmpty", {
3602
3521
  configurable: !0,
@@ -3605,16 +3524,16 @@ var P = /*@__PURE__*/ w("ZodError", (e, t) => {
3605
3524
  return this.issues.length === 0;
3606
3525
  }
3607
3526
  }));
3608
- }, void 0, { Parent: Error }), _o = /* @__PURE__ */ Ze(P), vo = /* @__PURE__ */ Qe(P), yo = /* @__PURE__ */ $e(P), bo = /* @__PURE__ */ tt(P), xo = /* @__PURE__ */ rt(P), So = /* @__PURE__ */ it(P), Co = /* @__PURE__ */ at(P), wo = /* @__PURE__ */ ot(P), To = /* @__PURE__ */ st(P), Eo = /* @__PURE__ */ ct(P), Do = /* @__PURE__ */ lt(P), Oo = /* @__PURE__ */ ut(P);
3527
+ }, ho = /*@__PURE__*/ w("ZodError", mo), N = /*@__PURE__*/ w("ZodError", mo, void 0, { Parent: Error }), go = /* @__PURE__ */ Qe(N), _o = /* @__PURE__ */ $e(N), vo = /* @__PURE__ */ et(N), yo = /* @__PURE__ */ nt(N), bo = /* @__PURE__ */ it(N), xo = /* @__PURE__ */ at(N), So = /* @__PURE__ */ ot(N), Co = /* @__PURE__ */ st(N), wo = /* @__PURE__ */ ct(N), To = /* @__PURE__ */ lt(N), Eo = /* @__PURE__ */ ut(N), Do = /* @__PURE__ */ dt(N);
3609
3528
  //#endregion
3610
3529
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3611
- function ko() {
3612
- E.localeError || D($r());
3530
+ function Oo() {
3531
+ T.localeError || E(Xr());
3613
3532
  }
3614
- function Ao() {
3615
- E.memoizer || D({ memoizer: Xr() });
3533
+ function ko() {
3534
+ T.memoizer || E({ memoizer: qr() });
3616
3535
  }
3617
- var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.type = t.type, e), {
3536
+ var P = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), O.init(e, t), e.def = t, e.type = t.type, e), {
3618
3537
  check(...e) {
3619
3538
  let t = this.def;
3620
3539
  return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
@@ -3636,28 +3555,28 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.t
3636
3555
  return e.add(this, t), this;
3637
3556
  },
3638
3557
  refine(e, t) {
3639
- return this.check(qs(e, t));
3558
+ return this.check(Us(e, t));
3640
3559
  },
3641
3560
  superRefine(e, t) {
3642
- return this.check(Js(e, t));
3561
+ return this.check(Ws(e, t));
3643
3562
  },
3644
3563
  overwrite(e) {
3645
- return this.check(/* @__PURE__ */ Zi(e));
3564
+ return this.check(/* @__PURE__ */ Ji(e));
3646
3565
  },
3647
3566
  optional() {
3648
- return Ds(this);
3567
+ return Cs(this);
3649
3568
  },
3650
3569
  exactOptional() {
3651
- return ks(this);
3570
+ return Ts(this);
3652
3571
  },
3653
3572
  nullable() {
3654
- return js(this);
3573
+ return Ds(this);
3655
3574
  },
3656
3575
  nullish() {
3657
- return Ds(js(this));
3576
+ return Cs(Ds(this));
3658
3577
  },
3659
3578
  nonoptional(e) {
3660
- return Ls(this, e);
3579
+ return Ns(this, e);
3661
3580
  },
3662
3581
  array() {
3663
3582
  return z(this);
@@ -3666,34 +3585,34 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.t
3666
3585
  return V([this, e]);
3667
3586
  },
3668
3587
  and(e) {
3669
- return vs(this, e);
3588
+ return gs(this, e);
3670
3589
  },
3671
3590
  transform(e) {
3672
- return Vs(this, Ts(e));
3591
+ return Ls(this, xs(e));
3673
3592
  },
3674
3593
  default(e) {
3675
- return Ns(this, e);
3594
+ return ks(this, e);
3676
3595
  },
3677
3596
  prefault(e) {
3678
- return Fs(this, e);
3597
+ return js(this, e);
3679
3598
  },
3680
3599
  catch(e) {
3681
- return zs(this, e);
3600
+ return Fs(this, e);
3682
3601
  },
3683
3602
  pipe(e) {
3684
- return Vs(this, e);
3603
+ return Ls(this, e);
3685
3604
  },
3686
3605
  readonly() {
3687
- return Us(this);
3606
+ return zs(this);
3688
3607
  },
3689
3608
  describe(e) {
3690
3609
  let t = this.clone();
3691
- return ri.add(t, { description: e }), t;
3610
+ return ei.add(t, { description: e }), t;
3692
3611
  },
3693
3612
  meta(...e) {
3694
- if (e.length === 0) return ri.get(this);
3613
+ if (e.length === 0) return ei.get(this);
3695
3614
  let t = this.clone();
3696
- return ri.add(t, e[0]), t;
3615
+ return ei.add(t, e[0]), t;
3697
3616
  },
3698
3617
  isOptional() {
3699
3618
  return this.safeParse(void 0).success;
@@ -3706,10 +3625,10 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.t
3706
3625
  },
3707
3626
  get "~standard"() {
3708
3627
  return Te(this, "~standard", {
3709
- ...fn(this),
3628
+ ...pn(this),
3710
3629
  jsonSchema: {
3711
- input: ya(this, "input"),
3712
- output: ya(this, "output")
3630
+ input: ga(this, "input"),
3631
+ output: ga(this, "output")
3713
3632
  }
3714
3633
  });
3715
3634
  },
@@ -3717,16 +3636,16 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.t
3717
3636
  x(this, "~standard", e);
3718
3637
  },
3719
3638
  parse: function e(t, n) {
3720
- return _o(this, t, n, { callee: e });
3639
+ return go(this, t, n, { callee: e });
3721
3640
  },
3722
3641
  parseAsync: async function e(t, n) {
3723
- return await vo(this, t, n, { callee: e });
3642
+ return await _o(this, t, n, { callee: e });
3724
3643
  },
3725
3644
  safeParse(e, t) {
3726
- return yo(this, e, t);
3645
+ return vo(this, e, t);
3727
3646
  },
3728
3647
  async safeParseAsync(e, t) {
3729
- return bo(this, e, t);
3648
+ return yo(this, e, t);
3730
3649
  },
3731
3650
  get spa() {
3732
3651
  return this?.safeParseAsync;
@@ -3735,329 +3654,329 @@ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.t
3735
3654
  x(this, "spa", e);
3736
3655
  },
3737
3656
  encode: function e(t, n) {
3738
- return xo(this, t, n, { callee: e });
3657
+ return bo(this, t, n, { callee: e });
3739
3658
  },
3740
3659
  decode: function e(t, n) {
3741
- return So(this, t, n, { callee: e });
3660
+ return xo(this, t, n, { callee: e });
3742
3661
  },
3743
3662
  encodeAsync: async function e(t, n) {
3744
- return await Co(this, t, n, { callee: e });
3663
+ return await So(this, t, n, { callee: e });
3745
3664
  },
3746
3665
  decodeAsync: async function e(t, n) {
3747
- return await wo(this, t, n, { callee: e });
3666
+ return await Co(this, t, n, { callee: e });
3748
3667
  },
3749
3668
  safeEncode(e, t) {
3750
- return To(this, e, t);
3669
+ return wo(this, e, t);
3751
3670
  },
3752
3671
  safeDecode(e, t) {
3753
- return Eo(this, e, t);
3672
+ return To(this, e, t);
3754
3673
  },
3755
3674
  async safeEncodeAsync(e, t) {
3756
- return Do(this, e, t);
3675
+ return Eo(this, e, t);
3757
3676
  },
3758
3677
  async safeDecodeAsync(e, t) {
3759
- return Oo(this, e, t);
3678
+ return Do(this, e, t);
3760
3679
  },
3761
3680
  toJSONSchema(e) {
3762
- return va(this, {})(e);
3681
+ return ha(this, {})(e);
3763
3682
  },
3764
3683
  get description() {
3765
- return ri.get(this)?.description;
3684
+ return ei.get(this)?.description;
3766
3685
  },
3767
3686
  get _def() {
3768
3687
  return this._zod.def;
3769
3688
  }
3770
- }), jo = /*@__PURE__*/ w("_ZodString", (e, t) => {
3771
- pn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3689
+ }), Ao = /*@__PURE__*/ w("_ZodString", (e, t) => {
3690
+ mn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
3772
3691
  let n = e._zod.bag;
3773
3692
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
3774
3693
  }, {
3775
3694
  regex(...e) {
3776
- return this.check(/* @__PURE__ */ Gi(...e));
3695
+ return this.check(/* @__PURE__ */ Hi(...e));
3777
3696
  },
3778
3697
  includes(...e) {
3779
- return this.check(/* @__PURE__ */ Ji(...e));
3698
+ return this.check(/* @__PURE__ */ Gi(...e));
3780
3699
  },
3781
3700
  startsWith(...e) {
3782
- return this.check(/* @__PURE__ */ Yi(...e));
3701
+ return this.check(/* @__PURE__ */ Ki(...e));
3783
3702
  },
3784
3703
  endsWith(...e) {
3785
- return this.check(/* @__PURE__ */ Xi(...e));
3704
+ return this.check(/* @__PURE__ */ qi(...e));
3786
3705
  },
3787
3706
  min(...e) {
3788
- return this.check(/* @__PURE__ */ Ui(...e));
3707
+ return this.check(/* @__PURE__ */ Bi(...e));
3789
3708
  },
3790
3709
  max(...e) {
3791
- return this.check(/* @__PURE__ */ Hi(...e));
3710
+ return this.check(/* @__PURE__ */ zi(...e));
3792
3711
  },
3793
3712
  length(...e) {
3794
- return this.check(/* @__PURE__ */ Wi(...e));
3713
+ return this.check(/* @__PURE__ */ Vi(...e));
3795
3714
  },
3796
3715
  nonempty(...e) {
3797
- return this.check(/* @__PURE__ */ Ui(1, ...e));
3716
+ return this.check(/* @__PURE__ */ Bi(1, ...e));
3798
3717
  },
3799
3718
  lowercase(e) {
3800
- return this.check(/* @__PURE__ */ Ki(e));
3719
+ return this.check(/* @__PURE__ */ Ui(e));
3801
3720
  },
3802
3721
  uppercase(e) {
3803
- return this.check(/* @__PURE__ */ qi(e));
3722
+ return this.check(/* @__PURE__ */ Wi(e));
3804
3723
  },
3805
3724
  trim() {
3806
- return this.check(/* @__PURE__ */ $i());
3725
+ return this.check(/* @__PURE__ */ Xi());
3807
3726
  },
3808
3727
  normalize(...e) {
3809
- return this.check(/* @__PURE__ */ Qi(...e));
3728
+ return this.check(/* @__PURE__ */ Yi(...e));
3810
3729
  },
3811
3730
  toLowerCase() {
3812
- return this.check(/* @__PURE__ */ ea());
3731
+ return this.check(/* @__PURE__ */ Zi());
3813
3732
  },
3814
3733
  toUpperCase() {
3815
- return this.check(/* @__PURE__ */ ta());
3734
+ return this.check(/* @__PURE__ */ Qi());
3816
3735
  },
3817
3736
  slugify() {
3818
- return this.check(/* @__PURE__ */ na());
3737
+ return this.check(/* @__PURE__ */ $i());
3819
3738
  }
3820
- }), Mo = /*@__PURE__*/ w("ZodString", (e, t) => {
3821
- pn.init(e, t), jo.init(e, t);
3739
+ }), jo = /*@__PURE__*/ w("ZodString", (e, t) => {
3740
+ mn.init(e, t), Ao.init(e, t);
3822
3741
  }, {
3823
3742
  email(e) {
3824
- return this.check(/* @__PURE__ */ ai(Ro, e));
3743
+ return this.check(/* @__PURE__ */ ni(Io, e));
3825
3744
  },
3826
3745
  url(e) {
3827
- return this.check(/* @__PURE__ */ di(Vo, e));
3746
+ return this.check(/* @__PURE__ */ ci(zo, e));
3828
3747
  },
3829
3748
  jwt(e) {
3830
- return this.check(/* @__PURE__ */ Ei(ns, e));
3749
+ return this.check(/* @__PURE__ */ Ci(es, e));
3831
3750
  },
3832
3751
  emoji(e) {
3833
- return this.check(/* @__PURE__ */ fi(Ho, e));
3752
+ return this.check(/* @__PURE__ */ li(Bo, e));
3834
3753
  },
3835
3754
  guid(e) {
3836
- return this.check(/* @__PURE__ */ oi(zo, e));
3755
+ return this.check(/* @__PURE__ */ ri(Lo, e));
3837
3756
  },
3838
3757
  uuid(e) {
3839
- return this.check(/* @__PURE__ */ si(Bo, e));
3758
+ return this.check(/* @__PURE__ */ ii(Ro, e));
3840
3759
  },
3841
3760
  uuidv4(e) {
3842
- return this.check(/* @__PURE__ */ ci(Bo, e));
3761
+ return this.check(/* @__PURE__ */ ai(Ro, e));
3843
3762
  },
3844
3763
  uuidv6(e) {
3845
- return this.check(/* @__PURE__ */ li(Bo, e));
3764
+ return this.check(/* @__PURE__ */ oi(Ro, e));
3846
3765
  },
3847
3766
  uuidv7(e) {
3848
- return this.check(/* @__PURE__ */ ui(Bo, e));
3767
+ return this.check(/* @__PURE__ */ si(Ro, e));
3849
3768
  },
3850
3769
  nanoid(e) {
3851
- return this.check(/* @__PURE__ */ pi(Uo, e));
3770
+ return this.check(/* @__PURE__ */ ui(Vo, e));
3852
3771
  },
3853
3772
  cuid(e) {
3854
- return this.check(/* @__PURE__ */ mi(Wo, e));
3773
+ return this.check(/* @__PURE__ */ di(Ho, e));
3855
3774
  },
3856
3775
  cuid2(e) {
3857
- return this.check(/* @__PURE__ */ hi(Go, e));
3776
+ return this.check(/* @__PURE__ */ fi(Uo, e));
3858
3777
  },
3859
3778
  ulid(e) {
3860
- return this.check(/* @__PURE__ */ gi(Ko, e));
3779
+ return this.check(/* @__PURE__ */ pi(Wo, e));
3861
3780
  },
3862
3781
  base64(e) {
3863
- return this.check(/* @__PURE__ */ Ci($o, e));
3782
+ return this.check(/* @__PURE__ */ bi(Zo, e));
3864
3783
  },
3865
3784
  base64url(e) {
3866
- return this.check(/* @__PURE__ */ wi(es, e));
3785
+ return this.check(/* @__PURE__ */ xi(Qo, e));
3867
3786
  },
3868
3787
  xid(e) {
3869
- return this.check(/* @__PURE__ */ _i(qo, e));
3788
+ return this.check(/* @__PURE__ */ mi(Go, e));
3870
3789
  },
3871
3790
  ksuid(e) {
3872
- return this.check(/* @__PURE__ */ vi(Jo, e));
3791
+ return this.check(/* @__PURE__ */ hi(Ko, e));
3873
3792
  },
3874
3793
  ipv4(e) {
3875
- return this.check(/* @__PURE__ */ yi(Yo, e));
3794
+ return this.check(/* @__PURE__ */ gi(qo, e));
3876
3795
  },
3877
3796
  ipv6(e) {
3878
- return this.check(/* @__PURE__ */ bi(Xo, e));
3797
+ return this.check(/* @__PURE__ */ _i(Jo, e));
3879
3798
  },
3880
3799
  cidrv4(e) {
3881
- return this.check(/* @__PURE__ */ xi(Zo, e));
3800
+ return this.check(/* @__PURE__ */ vi(Yo, e));
3882
3801
  },
3883
3802
  cidrv6(e) {
3884
- return this.check(/* @__PURE__ */ Si(Qo, e));
3803
+ return this.check(/* @__PURE__ */ yi(Xo, e));
3885
3804
  },
3886
3805
  e164(e) {
3887
- return this.check(/* @__PURE__ */ Ti(ts, e));
3806
+ return this.check(/* @__PURE__ */ Si($o, e));
3888
3807
  },
3889
3808
  datetime(e) {
3890
- return this.check(/* @__PURE__ */ Di(Po, e));
3809
+ return this.check(/* @__PURE__ */ wi(Mo, e));
3891
3810
  },
3892
3811
  date(e) {
3893
- return this.check(/* @__PURE__ */ Oi(Fo, e));
3812
+ return this.check(/* @__PURE__ */ Ti(No, e));
3894
3813
  },
3895
3814
  time(e) {
3896
- return this.check(/* @__PURE__ */ ki(Io, e));
3815
+ return this.check(/* @__PURE__ */ Ei(Po, e));
3897
3816
  },
3898
3817
  duration(e) {
3899
- return this.check(/* @__PURE__ */ Ai(Lo, e));
3818
+ return this.check(/* @__PURE__ */ Di(Fo, e));
3900
3819
  }
3901
3820
  });
3902
- function No(e) {
3903
- return /* @__PURE__ */ ii(Mo, e);
3821
+ function F(e) {
3822
+ return /* @__PURE__ */ ti(jo, e);
3904
3823
  }
3905
3824
  var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3906
- A.init(e, t), jo.init(e, t);
3907
- }), Po = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3908
- An.init(e, t), I.init(e, t);
3909
- }), Fo = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3825
+ k.init(e, t), Ao.init(e, t);
3826
+ }), Mo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3910
3827
  jn.init(e, t), I.init(e, t);
3911
- }), Io = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3828
+ }), No = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3912
3829
  Mn.init(e, t), I.init(e, t);
3913
- }), Lo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3830
+ }), Po = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3914
3831
  Nn.init(e, t), I.init(e, t);
3915
- }), Ro = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3916
- gn.init(e, t), I.init(e, t);
3917
- }), zo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3918
- mn.init(e, t), I.init(e, t);
3919
- }), Bo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3832
+ }), Fo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3833
+ Pn.init(e, t), I.init(e, t);
3834
+ }), Io = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3835
+ _n.init(e, t), I.init(e, t);
3836
+ }), Lo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3920
3837
  hn.init(e, t), I.init(e, t);
3921
- }), Vo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3922
- Sn.init(e, t), I.init(e, t);
3923
- }), Ho = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3838
+ }), Ro = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3839
+ gn.init(e, t), I.init(e, t);
3840
+ }), zo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3924
3841
  Cn.init(e, t), I.init(e, t);
3925
- }), Uo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3842
+ }), Bo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3926
3843
  wn.init(e, t), I.init(e, t);
3927
- }), Wo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3844
+ }), Vo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3928
3845
  Tn.init(e, t), I.init(e, t);
3929
- }), Go = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3846
+ }), Ho = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3930
3847
  En.init(e, t), I.init(e, t);
3931
- }), Ko = /*@__PURE__*/ w("ZodULID", (e, t) => {
3848
+ }), Uo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3932
3849
  Dn.init(e, t), I.init(e, t);
3933
- }), qo = /*@__PURE__*/ w("ZodXID", (e, t) => {
3850
+ }), Wo = /*@__PURE__*/ w("ZodULID", (e, t) => {
3934
3851
  On.init(e, t), I.init(e, t);
3935
- }), Jo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3852
+ }), Go = /*@__PURE__*/ w("ZodXID", (e, t) => {
3936
3853
  kn.init(e, t), I.init(e, t);
3937
- }), Yo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3938
- Pn.init(e, t), I.init(e, t);
3939
- }), Xo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3940
- Ln.init(e, t), I.init(e, t);
3941
- }), Zo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3854
+ }), Ko = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3855
+ An.init(e, t), I.init(e, t);
3856
+ }), qo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3857
+ Fn.init(e, t), I.init(e, t);
3858
+ }), Jo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3942
3859
  Rn.init(e, t), I.init(e, t);
3943
- }), Qo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3944
- Bn.init(e, t), I.init(e, t);
3945
- }), $o = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3946
- Hn.init(e, t), I.init(e, t);
3947
- }), es = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3948
- Wn.init(e, t), I.init(e, t);
3949
- }), ts = /*@__PURE__*/ w("ZodE164", (e, t) => {
3860
+ }), Yo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3861
+ zn.init(e, t), I.init(e, t);
3862
+ }), Xo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3863
+ Vn.init(e, t), I.init(e, t);
3864
+ }), Zo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3865
+ Un.init(e, t), I.init(e, t);
3866
+ }), Qo = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3950
3867
  Gn.init(e, t), I.init(e, t);
3951
- }), ns = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3952
- qn.init(e, t), I.init(e, t);
3953
- }), rs = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3954
- Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
3868
+ }), $o = /*@__PURE__*/ w("ZodE164", (e, t) => {
3869
+ Kn.init(e, t), I.init(e, t);
3870
+ }), es = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3871
+ Jn.init(e, t), I.init(e, t);
3872
+ }), ts = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3873
+ Yn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
3955
3874
  let n = e._zod.bag;
3956
3875
  e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
3957
3876
  }, {
3958
3877
  gt(e, t) {
3959
- return this.check(/* @__PURE__ */ zi(e, t));
3878
+ return this.check(/* @__PURE__ */ Ii(e, t));
3960
3879
  },
3961
3880
  gte(e, t) {
3962
- return this.check(/* @__PURE__ */ Bi(e, t));
3881
+ return this.check(/* @__PURE__ */ Li(e, t));
3963
3882
  },
3964
3883
  min(e, t) {
3965
- return this.check(/* @__PURE__ */ Bi(e, t));
3884
+ return this.check(/* @__PURE__ */ Li(e, t));
3966
3885
  },
3967
3886
  lt(e, t) {
3968
- return this.check(/* @__PURE__ */ Li(e, t));
3887
+ return this.check(/* @__PURE__ */ Pi(e, t));
3969
3888
  },
3970
3889
  lte(e, t) {
3971
- return this.check(/* @__PURE__ */ Ri(e, t));
3890
+ return this.check(/* @__PURE__ */ Fi(e, t));
3972
3891
  },
3973
3892
  max(e, t) {
3974
- return this.check(/* @__PURE__ */ Ri(e, t));
3893
+ return this.check(/* @__PURE__ */ Fi(e, t));
3975
3894
  },
3976
3895
  int(e) {
3977
- return this.check(as(e));
3896
+ return this.check(rs(e));
3978
3897
  },
3979
3898
  safe(e) {
3980
- return this.check(as(e));
3899
+ return this.check(rs(e));
3981
3900
  },
3982
3901
  positive(e) {
3983
- return this.check(/* @__PURE__ */ zi(0, e));
3902
+ return this.check(/* @__PURE__ */ Ii(0, e));
3984
3903
  },
3985
3904
  nonnegative(e) {
3986
- return this.check(/* @__PURE__ */ Bi(0, e));
3905
+ return this.check(/* @__PURE__ */ Li(0, e));
3987
3906
  },
3988
3907
  negative(e) {
3989
- return this.check(/* @__PURE__ */ Li(0, e));
3908
+ return this.check(/* @__PURE__ */ Pi(0, e));
3990
3909
  },
3991
3910
  nonpositive(e) {
3992
- return this.check(/* @__PURE__ */ Ri(0, e));
3911
+ return this.check(/* @__PURE__ */ Fi(0, e));
3993
3912
  },
3994
3913
  multipleOf(e, t) {
3995
- return this.check(/* @__PURE__ */ Vi(e, t));
3914
+ return this.check(/* @__PURE__ */ Ri(e, t));
3996
3915
  },
3997
3916
  step(e, t) {
3998
- return this.check(/* @__PURE__ */ Vi(e, t));
3917
+ return this.check(/* @__PURE__ */ Ri(e, t));
3999
3918
  },
4000
3919
  finite() {
4001
3920
  return this;
4002
3921
  }
4003
3922
  });
4004
3923
  function L(e) {
4005
- return /* @__PURE__ */ ji(rs, e);
3924
+ return /* @__PURE__ */ Oi(ts, e);
4006
3925
  }
4007
- var is = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
4008
- Yn.init(e, t), rs.init(e, t);
3926
+ var ns = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
3927
+ Xn.init(e, t), ts.init(e, t);
4009
3928
  });
4010
- function as(e) {
4011
- return /* @__PURE__ */ Mi(is, e);
3929
+ function rs(e) {
3930
+ return /* @__PURE__ */ ki(ns, e);
4012
3931
  }
4013
- var os = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
4014
- Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
3932
+ var is = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
3933
+ Zn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
4015
3934
  });
4016
3935
  function R(e) {
4017
- return /* @__PURE__ */ Ni(os, e);
3936
+ return /* @__PURE__ */ Ai(is, e);
4018
3937
  }
4019
- var ss = /*@__PURE__*/ w("ZodNull", (e, t) => {
4020
- Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
3938
+ var as = /*@__PURE__*/ w("ZodNull", (e, t) => {
3939
+ Qn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
4021
3940
  });
4022
- function cs(e) {
4023
- return /* @__PURE__ */ Pi(ss, e);
3941
+ function os(e) {
3942
+ return /* @__PURE__ */ ji(as, e);
4024
3943
  }
4025
- var ls = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
4026
- Qn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3944
+ var ss = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
3945
+ $n.init(e, t), P.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4027
3946
  });
4028
- function us() {
4029
- return /* @__PURE__ */ Fi(ls);
3947
+ function cs() {
3948
+ return /* @__PURE__ */ Mi(ss);
4030
3949
  }
4031
- var ds = /*@__PURE__*/ w("ZodNever", (e, t) => {
4032
- $n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
3950
+ var ls = /*@__PURE__*/ w("ZodNever", (e, t) => {
3951
+ er.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
4033
3952
  });
4034
- function fs(e) {
4035
- return /* @__PURE__ */ Ii(ds, e);
3953
+ function us(e) {
3954
+ return /* @__PURE__ */ Ni(ls, e);
4036
3955
  }
4037
- var ps = /*@__PURE__*/ w("ZodArray", (e, t) => {
4038
- Ao(), tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.element = t.element;
3956
+ var ds = /*@__PURE__*/ w("ZodArray", (e, t) => {
3957
+ ko(), nr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.element = t.element;
4039
3958
  }, {
4040
3959
  min(e, t) {
4041
- return this.check(/* @__PURE__ */ Ui(e, t));
3960
+ return this.check(/* @__PURE__ */ Bi(e, t));
4042
3961
  },
4043
3962
  nonempty(e) {
4044
- return this.check(/* @__PURE__ */ Ui(1, e));
3963
+ return this.check(/* @__PURE__ */ Bi(1, e));
4045
3964
  },
4046
3965
  max(e, t) {
4047
- return this.check(/* @__PURE__ */ Hi(e, t));
3966
+ return this.check(/* @__PURE__ */ zi(e, t));
4048
3967
  },
4049
3968
  length(e, t) {
4050
- return this.check(/* @__PURE__ */ Wi(e, t));
3969
+ return this.check(/* @__PURE__ */ Vi(e, t));
4051
3970
  },
4052
3971
  unwrap() {
4053
3972
  return this.element;
4054
3973
  }
4055
3974
  });
4056
3975
  function z(e, t) {
4057
- return /* @__PURE__ */ ra(ps, e, t);
3976
+ return /* @__PURE__ */ ea(ds, e, t);
4058
3977
  }
4059
- var ms = /*@__PURE__*/ w("ZodObject", (e, t) => {
4060
- Ao(), cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
3978
+ var fs = /*@__PURE__*/ w("ZodObject", (e, t) => {
3979
+ ko(), lr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
4061
3980
  }, {
4062
3981
  keyof() {
4063
3982
  return U(Object.keys(this._zod.def.shape));
@@ -4071,19 +3990,19 @@ var ms = /*@__PURE__*/ w("ZodObject", (e, t) => {
4071
3990
  passthrough() {
4072
3991
  return this.clone({
4073
3992
  ...this._zod.def,
4074
- catchall: us()
3993
+ catchall: cs()
4075
3994
  });
4076
3995
  },
4077
3996
  loose() {
4078
3997
  return this.clone({
4079
3998
  ...this._zod.def,
4080
- catchall: us()
3999
+ catchall: cs()
4081
4000
  });
4082
4001
  },
4083
4002
  strict() {
4084
4003
  return this.clone({
4085
4004
  ...this._zod.def,
4086
- catchall: fs()
4005
+ catchall: us()
4087
4006
  });
4088
4007
  },
4089
4008
  strip() {
@@ -4108,104 +4027,74 @@ var ms = /*@__PURE__*/ w("ZodObject", (e, t) => {
4108
4027
  return le(this, e);
4109
4028
  },
4110
4029
  partial(...e) {
4111
- return pe(Es, this, e[0]);
4030
+ return pe(Ss, this, e[0]);
4112
4031
  },
4113
4032
  exactPartial(...e) {
4114
- return pe(Os, this, e[0], "exactPartial");
4033
+ return pe(ws, this, e[0], "exactPartial");
4115
4034
  },
4116
4035
  required(...e) {
4117
- return me(Is, this, e[0]);
4036
+ return me(Ms, this, e[0]);
4118
4037
  }
4119
4038
  });
4120
4039
  function B(e, t) {
4121
- return new ms({
4040
+ return new fs({
4122
4041
  type: "object",
4123
4042
  shape: e ?? {},
4124
4043
  ...v(t)
4125
4044
  });
4126
4045
  }
4127
- function hs(e, t) {
4128
- return new ms({
4046
+ function ps(e, t) {
4047
+ return new fs({
4129
4048
  type: "object",
4130
4049
  shape: e,
4131
- catchall: fs(),
4050
+ catchall: us(),
4132
4051
  ...v(t)
4133
4052
  });
4134
4053
  }
4135
- var gs = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4136
- ur.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.options = t.options;
4054
+ var ms = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4055
+ dr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.options = t.options;
4137
4056
  });
4138
4057
  function V(e, t) {
4139
- return new gs({
4058
+ return new ms({
4140
4059
  type: "union",
4141
4060
  options: e,
4142
4061
  ...v(t)
4143
4062
  });
4144
4063
  }
4145
- var _s = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4146
- dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r);
4064
+ var hs = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4065
+ fr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r);
4147
4066
  });
4148
- function vs(e, t) {
4149
- return new _s({
4067
+ function gs(e, t) {
4068
+ return new hs({
4150
4069
  type: "intersection",
4151
4070
  left: e,
4152
4071
  right: t
4153
4072
  });
4154
4073
  }
4155
- var ys = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4156
- Ao(), mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r);
4157
- }, {
4158
- rest(e) {
4159
- return this.clone({
4160
- ...this._zod.def,
4161
- rest: e
4162
- });
4163
- },
4164
- partial() {
4165
- let e = this._zod.def;
4166
- if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4167
- return this.clone({
4168
- ...e,
4169
- items: e.items.map((e) => new Es({
4170
- type: "optional",
4171
- innerType: e
4172
- }))
4173
- });
4174
- }
4175
- });
4176
- function bs(e, t, n) {
4177
- let r = t instanceof k;
4178
- return new ys({
4179
- type: "tuple",
4180
- items: e,
4181
- rest: r ? t : null,
4182
- ...v(r ? n : t)
4183
- });
4184
- }
4185
- var xs = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4186
- Ao(), vr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4074
+ var _s = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4075
+ ko(), hr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4187
4076
  });
4188
4077
  function H(e, t, n) {
4189
- return !t || !t._zod ? new xs({
4078
+ return !t || !t._zod ? new _s({
4190
4079
  type: "record",
4191
- keyType: No(),
4080
+ keyType: F(),
4192
4081
  valueType: e,
4193
4082
  ...v(t)
4194
- }) : new xs({
4083
+ }) : new _s({
4195
4084
  type: "record",
4196
4085
  keyType: e,
4197
4086
  valueType: t,
4198
4087
  ...v(n)
4199
4088
  });
4200
4089
  }
4201
- var Ss = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4202
- yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4090
+ var vs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4091
+ gr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4203
4092
  let n = new Set(Object.keys(t.entries));
4204
4093
  e.extract = (e, r) => {
4205
4094
  let i = {};
4206
4095
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4207
4096
  else throw Error(`Key ${r} not found in enum`);
4208
- return new Ss({
4097
+ return new vs({
4209
4098
  ...t,
4210
4099
  checks: [],
4211
4100
  ...v(r),
@@ -4215,7 +4104,7 @@ var Ss = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4215
4104
  let i = { ...t.entries };
4216
4105
  for (let t of e) if (n.has(t)) delete i[t];
4217
4106
  else throw Error(`Key ${t} not found in enum`);
4218
- return new Ss({
4107
+ return new vs({
4219
4108
  ...t,
4220
4109
  checks: [],
4221
4110
  ...v(r),
@@ -4224,28 +4113,28 @@ var Ss = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4224
4113
  };
4225
4114
  });
4226
4115
  function U(e, t) {
4227
- return new Ss({
4116
+ return new vs({
4228
4117
  type: "enum",
4229
4118
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4230
4119
  ...v(t)
4231
4120
  });
4232
4121
  }
4233
- var Cs = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4234
- br.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4122
+ var ys = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4123
+ _r.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4235
4124
  if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4236
4125
  return t.values[0];
4237
4126
  } });
4238
4127
  });
4239
4128
  function W(e, t) {
4240
- return new Cs({
4129
+ return new ys({
4241
4130
  type: "literal",
4242
4131
  values: Array.isArray(e) ? e : [e],
4243
4132
  ...v(t)
4244
4133
  });
4245
4134
  }
4246
- var ws = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4247
- Ao(), xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e._zod.parse = (n, r) => {
4248
- if (r.direction === "backward") throw new Le(e.constructor.name);
4135
+ var bs = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4136
+ ko(), vr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e._zod.parse = (n, r) => {
4137
+ if (r.direction === "backward") throw new Re(e.constructor.name);
4249
4138
  n.addIssue = (r) => {
4250
4139
  if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
4251
4140
  else {
@@ -4257,44 +4146,44 @@ var ws = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4257
4146
  return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4258
4147
  };
4259
4148
  });
4260
- function Ts(e) {
4261
- return new ws({
4149
+ function xs(e) {
4150
+ return new bs({
4262
4151
  type: "transform",
4263
4152
  transform: e
4264
4153
  });
4265
4154
  }
4266
- var Es = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4267
- Cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4155
+ var Ss = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4156
+ br.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4268
4157
  });
4269
- function Ds(e) {
4270
- return new Es({
4158
+ function Cs(e) {
4159
+ return new Ss({
4271
4160
  type: "optional",
4272
4161
  innerType: e
4273
4162
  });
4274
4163
  }
4275
- var Os = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4276
- wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4164
+ var ws = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4165
+ xr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4277
4166
  });
4278
- function ks(e) {
4279
- return new Os({
4167
+ function Ts(e) {
4168
+ return new ws({
4280
4169
  type: "optional",
4281
4170
  innerType: e
4282
4171
  });
4283
4172
  }
4284
- var As = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4285
- Tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4173
+ var Es = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4174
+ Sr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4286
4175
  });
4287
- function js(e) {
4288
- return new As({
4176
+ function Ds(e) {
4177
+ return new Es({
4289
4178
  type: "nullable",
4290
4179
  innerType: e
4291
4180
  });
4292
4181
  }
4293
- var Ms = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4294
- Er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4182
+ var Os = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4183
+ Cr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4295
4184
  });
4296
- function Ns(e, t) {
4297
- return new Ms({
4185
+ function ks(e, t) {
4186
+ return new Os({
4298
4187
  type: "default",
4299
4188
  innerType: e,
4300
4189
  get defaultValue() {
@@ -4302,11 +4191,11 @@ function Ns(e, t) {
4302
4191
  }
4303
4192
  });
4304
4193
  }
4305
- var Ps = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4306
- Or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4194
+ var As = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4195
+ Tr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4307
4196
  });
4308
- function Fs(e, t) {
4309
- return new Ps({
4197
+ function js(e, t) {
4198
+ return new As({
4310
4199
  type: "prefault",
4311
4200
  innerType: e,
4312
4201
  get defaultValue() {
@@ -4314,112 +4203,126 @@ function Fs(e, t) {
4314
4203
  }
4315
4204
  });
4316
4205
  }
4317
- var Is = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4318
- kr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4206
+ var Ms = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4207
+ Er.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4319
4208
  });
4320
- function Ls(e, t) {
4321
- return new Is({
4209
+ function Ns(e, t) {
4210
+ return new Ms({
4322
4211
  type: "nonoptional",
4323
4212
  innerType: e,
4324
4213
  ...v(t)
4325
4214
  });
4326
4215
  }
4327
- var Rs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4328
- Mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4216
+ var Ps = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4217
+ kr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4329
4218
  });
4330
- function zs(e, t) {
4331
- return new Rs({
4219
+ function Fs(e, t) {
4220
+ return new Ps({
4332
4221
  type: "catch",
4333
4222
  innerType: e,
4334
4223
  catchValue: typeof t == "function" ? t : Me(t)
4335
4224
  });
4336
4225
  }
4337
- var Bs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4338
- Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.in = t.in, e.out = t.out;
4226
+ var Is = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4227
+ Ar.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.in = t.in, e.out = t.out;
4339
4228
  });
4340
- function Vs(e, t) {
4341
- return new Bs({
4229
+ function Ls(e, t) {
4230
+ return new Is({
4342
4231
  type: "pipe",
4343
4232
  in: e,
4344
4233
  out: t
4345
4234
  });
4346
4235
  }
4347
- var Hs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4348
- Fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4236
+ var Rs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4237
+ Mr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4349
4238
  });
4350
- function Us(e) {
4351
- return new Hs({
4239
+ function zs(e) {
4240
+ return new Rs({
4352
4241
  type: "readonly",
4353
4242
  innerType: e
4354
4243
  });
4355
4244
  }
4356
- var Ws = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4357
- Lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => fo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4245
+ var Bs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4246
+ Pr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4358
4247
  });
4359
- function Gs(e) {
4360
- return new Ws({
4248
+ function Vs(e) {
4249
+ return new Bs({
4361
4250
  type: "lazy",
4362
4251
  getter: e
4363
4252
  });
4364
4253
  }
4365
- var Ks = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4366
- Rr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r);
4254
+ var Hs = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4255
+ Fr.init(e, t), P.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r);
4367
4256
  });
4368
- function qs(e, t = {}) {
4369
- return /* @__PURE__ */ ia(Ks, e, t);
4257
+ function Us(e, t = {}) {
4258
+ return /* @__PURE__ */ ta(Hs, e, t);
4370
4259
  }
4371
- function Js(e, t) {
4372
- return /* @__PURE__ */ aa(e, t);
4260
+ function Ws(e, t) {
4261
+ return /* @__PURE__ */ na(e, t);
4373
4262
  }
4374
- function Ys(e) {
4375
- let t = Gs(() => V([
4376
- No(e),
4263
+ function Gs(e) {
4264
+ let t = Vs(() => V([
4265
+ F(e),
4377
4266
  L(),
4378
4267
  R(),
4379
- cs(),
4268
+ os(),
4380
4269
  z(t),
4381
- H(No(), t)
4270
+ H(F(), t)
4382
4271
  ]));
4383
4272
  return t;
4384
4273
  }
4385
- function Xs(e, t = 0) {
4274
+ function Ks(e, t = 0) {
4386
4275
  if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
4387
- if (typeof e == "object" && e) for (let n of Object.values(e)) Xs(n, t + 1);
4276
+ if (typeof e == "object" && e) for (let n of Object.values(e)) Ks(n, t + 1);
4388
4277
  }
4389
4278
  //#endregion
4390
- //#region src/flow/common/changeSchema.ts
4391
- var G = No(), K = Ys(), Zs = z(G), Qs = B({
4279
+ //#region src/flow/common/triggerScheduleSchema.ts
4280
+ var qs = z(V([B({
4281
+ type: W("cron"),
4282
+ expression: F(),
4283
+ timezone: F()
4284
+ }), B({
4285
+ type: W("every"),
4286
+ unit: U([
4287
+ "day",
4288
+ "hour",
4289
+ "minute",
4290
+ "month",
4291
+ "week"
4292
+ ]),
4293
+ value: L()
4294
+ })])), G = F(), K = Gs(), Js = z(G), Ys = B({
4392
4295
  description: G.optional(),
4393
4296
  jsonSchema: K,
4394
4297
  nullable: R(),
4395
4298
  handle: G
4396
- }), q = Qs.extend({ value: K.optional() }), $s = B({
4299
+ }), q = Ys.extend({ value: K.optional() }), Xs = B({
4397
4300
  collapsed: R().optional(),
4398
4301
  group: G
4399
- }), ec = B({
4302
+ }), Zs = B({
4400
4303
  kind: W("node"),
4401
4304
  nodeId: G,
4402
4305
  output: G
4403
- }), tc = B({
4306
+ }), Qs = B({
4404
4307
  kind: W("flow"),
4405
4308
  input: G
4406
- }), nc = V([
4407
- ec,
4408
- tc,
4309
+ }), $s = V([
4310
+ Zs,
4311
+ Qs,
4409
4312
  B({
4410
4313
  kind: W("binding"),
4411
4314
  bindingId: G
4412
4315
  })
4413
- ]), rc = V([B({
4316
+ ]), ec = V([B({
4414
4317
  kind: W("value"),
4415
4318
  value: K
4416
4319
  }), B({
4417
4320
  kind: W("sources"),
4418
- sources: z(nc)
4419
- })]), ic = H(G, rc), ac = {
4420
- inputs: z(V([q, $s])),
4421
- outputs: z(V([Qs, $s]))
4422
- }, oc = B({
4321
+ sources: z($s)
4322
+ })]), tc = H(G, ec), nc = {
4323
+ inputs: z(V([q, Xs])),
4324
+ outputs: z(V([Ys, Xs]))
4325
+ }, rc = B({
4423
4326
  kind: W("connector"),
4424
4327
  action: G,
4425
4328
  connectionId: G.optional(),
@@ -4427,19 +4330,19 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4427
4330
  connectionId: G,
4428
4331
  alias: G.optional()
4429
4332
  }))
4430
- }), sc = B({
4431
- ...ac,
4333
+ }), ic = B({
4334
+ ...nc,
4432
4335
  name: G,
4433
4336
  moduleId: G,
4434
- capabilities: z(oc).optional()
4435
- }), cc = V([B({
4337
+ capabilities: z(rc).optional()
4338
+ }), ac = V([B({
4436
4339
  kind: W("value"),
4437
4340
  value: K
4438
4341
  }), B({
4439
4342
  kind: W("input"),
4440
4343
  input: G
4441
- })]), lc = V([cc, B({ kind: W("model") })]), uc = B({
4442
- ...ac,
4344
+ })]), oc = V([ac, B({ kind: W("model") })]), sc = B({
4345
+ ...nc,
4443
4346
  name: G,
4444
4347
  executor: V([
4445
4348
  B({
@@ -4455,7 +4358,7 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4455
4358
  kind: W("agent"),
4456
4359
  code: R().optional(),
4457
4360
  model: G,
4458
- prompt: cc,
4361
+ prompt: ac,
4459
4362
  system: G,
4460
4363
  maxRounds: L(),
4461
4364
  tools: z(B({
@@ -4465,16 +4368,16 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4465
4368
  action: G,
4466
4369
  connectionId: G.optional(),
4467
4370
  approval: R(),
4468
- inputs: z(q.extend({ source: lc }))
4371
+ inputs: z(q.extend({ source: oc }))
4469
4372
  })),
4470
4373
  notification: B({
4471
4374
  taskId: G,
4472
4375
  messageHandle: G,
4473
- inputs: H(G, cc)
4376
+ inputs: H(G, ac)
4474
4377
  }).optional()
4475
4378
  })
4476
4379
  ])
4477
- }), dc = {
4380
+ }), cc = {
4478
4381
  input: q,
4479
4382
  cases: z(B({
4480
4383
  output: G,
@@ -4507,43 +4410,26 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4507
4410
  }))
4508
4411
  })),
4509
4412
  defaultOutput: G.optional()
4510
- }, fc = {
4511
- actions: V([bs([W("continue")]), bs([W("approve"), W("reject")])]),
4512
- prompt: G
4513
- }, pc = {
4514
- inputsDef: z(q),
4413
+ }, lc = { prompt: G }, uc = {
4414
+ bodyFields: z(q),
4515
4415
  options: B({
4516
- allowedMethods: Zs.optional(),
4517
- allowedOrigins: Zs.optional(),
4416
+ allowedMethods: Js.optional(),
4417
+ allowedOrigins: Js.optional(),
4518
4418
  noResponseBody: R().optional(),
4519
4419
  responseData: G.optional(),
4520
4420
  responseHeaders: H(G, G).optional(),
4521
4421
  responseStatusCode: L().optional()
4522
4422
  }).optional()
4523
- }, mc = z(V([B({
4524
- type: W("cron"),
4525
- expression: G,
4526
- timezone: G
4527
- }), B({
4528
- type: W("every"),
4529
- unit: U([
4530
- "day",
4531
- "hour",
4532
- "minute",
4533
- "month",
4534
- "week"
4535
- ]),
4536
- value: L()
4537
- })])), hc = {
4423
+ }, dc = {
4538
4424
  configSchema: K,
4539
- definitionVersion: L(),
4425
+ definitionVersion: W(2),
4540
4426
  description: G,
4541
4427
  displayName: G,
4542
4428
  key: G,
4543
4429
  name: G,
4544
- payloadSchema: K,
4430
+ outputs: z(Ys).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
4545
4431
  provider: G
4546
- }, gc = B({
4432
+ }, fc = B({
4547
4433
  body: B({
4548
4434
  allowArray: R(),
4549
4435
  allowEmpty: R(),
@@ -4563,25 +4449,26 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4563
4449
  "PUT"
4564
4450
  ])),
4565
4451
  successStatus: L()
4566
- }), _c = {
4452
+ }), pc = {
4567
4453
  name: G,
4568
4454
  description: G.optional(),
4569
4455
  icon: G.optional()
4570
4456
  }, J = {
4571
- inputs: ic,
4457
+ maxExecutions: L().int().positive().max(2 ** 53 - 1).optional(),
4458
+ inputs: tc,
4572
4459
  name: G.optional(),
4573
4460
  description: G.optional(),
4574
4461
  icon: G.optional(),
4575
4462
  timeoutMs: L().optional()
4576
- }, vc = V([
4463
+ }, mc = V([
4577
4464
  B({
4578
4465
  ...J,
4579
4466
  kind: W("condition"),
4580
- ...dc
4467
+ ...cc
4581
4468
  }),
4582
4469
  B({
4583
4470
  ...J,
4584
- inputs: us().transform(() => ({})).default({}),
4471
+ inputs: cs().transform(() => ({})).default({}),
4585
4472
  kind: W("value"),
4586
4473
  values: z(q)
4587
4474
  }),
@@ -4593,7 +4480,7 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4593
4480
  B({
4594
4481
  ...J,
4595
4482
  kind: W("task"),
4596
- task: sc,
4483
+ task: ic,
4597
4484
  additionalInputs: z(q).optional()
4598
4485
  }),
4599
4486
  B({
@@ -4602,90 +4489,96 @@ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4602
4489
  taskId: G,
4603
4490
  additionalInputs: z(q).optional()
4604
4491
  }),
4605
- hs({
4492
+ ps({
4493
+ ...J,
4494
+ kind: W("approval"),
4495
+ input: q,
4496
+ ...lc
4497
+ }).omit({ timeoutMs: !0 }),
4498
+ ps({
4606
4499
  ...J,
4607
4500
  kind: W("wait"),
4608
4501
  input: q,
4609
- ...fc
4502
+ ...lc
4610
4503
  }).omit({ timeoutMs: !0 }),
4611
4504
  B({
4612
- ..._c,
4505
+ ...pc,
4613
4506
  kind: W("manual")
4614
4507
  }),
4615
4508
  B({
4616
- ..._c,
4509
+ ...pc,
4617
4510
  kind: W("webhook"),
4618
- ...pc
4511
+ ...uc
4619
4512
  }),
4620
4513
  B({
4621
- ..._c,
4514
+ ...pc,
4622
4515
  kind: W("cron"),
4623
- cronTimes: mc
4516
+ cronTimes: qs
4624
4517
  }),
4625
4518
  B({
4626
- ..._c,
4519
+ ...pc,
4627
4520
  kind: W("poll"),
4628
4521
  bindingId: G,
4629
4522
  config: H(G, K),
4630
4523
  definition: B({
4631
- ...hc,
4524
+ ...dc,
4632
4525
  type: W("poll")
4633
4526
  }),
4634
- pollTimes: mc
4527
+ pollTimes: qs
4635
4528
  }),
4636
4529
  B({
4637
- ..._c,
4530
+ ...pc,
4638
4531
  kind: W("integration"),
4639
4532
  bindingId: G,
4640
4533
  config: H(G, K),
4641
4534
  definition: B({
4642
- ...hc,
4535
+ ...dc,
4643
4536
  type: W("integration"),
4644
- endpoint: gc
4537
+ endpoint: fc
4645
4538
  })
4646
4539
  })
4647
- ]), yc = V([B({ kind: W("flow") }), B({
4540
+ ]), hc = V([B({ kind: W("flow") }), B({
4648
4541
  kind: W("subflow"),
4649
4542
  id: G
4650
- })]), bc = B({
4543
+ })]), gc = B({
4651
4544
  source: G,
4652
4545
  target: G,
4653
4546
  sourceHandle: G.optional()
4654
4547
  }), Y = {
4655
4548
  nodeId: G,
4656
- target: yc
4657
- }, xc = B({
4549
+ target: hc
4550
+ }, _c = B({
4658
4551
  name: G,
4659
4552
  inputs: z(q),
4660
- outputs: z(Qs.extend({ sources: z(V([ec, tc])) }))
4661
- }), Sc = B({
4662
- nodes: H(G, vc),
4663
- edges: z(bc).default([])
4664
- }), Cc = B({
4553
+ outputs: z(Ys.extend({ sources: z(V([Zs, Qs])) }))
4554
+ }), vc = B({
4555
+ nodes: H(G, mc),
4556
+ edges: z(gc).default([])
4557
+ }), yc = B({
4665
4558
  kind: U(["connection", "variable"]),
4666
4559
  target: G
4667
- }), wc = B({
4560
+ }), bc = B({
4668
4561
  name: G,
4669
- imports: Zs,
4562
+ imports: Js,
4670
4563
  source: G
4671
- }), Tc = B({
4672
- bindings: H(G, Cc),
4673
- graph: Sc,
4674
- subflows: H(G, xc.extend({ graph: Sc })),
4675
- tasks: H(G, uc)
4564
+ }), xc = B({
4565
+ bindings: H(G, yc),
4566
+ graph: vc,
4567
+ subflows: H(G, _c.extend({ graph: vc })),
4568
+ tasks: H(G, sc)
4676
4569
  });
4677
4570
  B({
4678
- modelVersion: W(1),
4679
- document: Tc,
4680
- modules: H(G, wc)
4571
+ modelVersion: W(2),
4572
+ document: xc,
4573
+ modules: H(G, bc)
4681
4574
  }).extend({
4682
4575
  kind: W("open-flow-flow-revision"),
4683
4576
  version: W(1)
4684
4577
  });
4685
- var Ec = {
4578
+ var Sc = {
4686
4579
  "binding.create": {
4687
4580
  bindingId: G,
4688
- binding: Cc
4581
+ binding: yc
4689
4582
  },
4690
4583
  "binding.delete": { bindingId: G },
4691
4584
  "binding.target.set": {
@@ -4694,40 +4587,50 @@ var Ec = {
4694
4587
  value: G
4695
4588
  },
4696
4589
  "graph.edge.connect": {
4697
- target: yc,
4698
- edge: bc
4590
+ target: hc,
4591
+ edge: gc
4699
4592
  },
4700
4593
  "graph.edge.disconnect": {
4701
- target: yc,
4702
- edge: bc
4594
+ target: hc,
4595
+ edge: gc
4703
4596
  },
4704
4597
  "graph.node.create": {
4705
4598
  ...Y,
4706
- node: vc
4599
+ node: mc
4707
4600
  },
4708
4601
  "graph.node.delete": Y,
4709
- "graph.node.field.set": V([B({
4710
- ...Y,
4711
- kind: W("graph.node.field.set"),
4712
- field: U([
4713
- "description",
4714
- "icon",
4715
- "name"
4716
- ]),
4717
- before: G.optional(),
4718
- value: G.optional()
4719
- }), B({
4720
- ...Y,
4721
- kind: W("graph.node.field.set"),
4722
- field: W("timeoutMs"),
4723
- before: L().optional(),
4724
- value: L().optional()
4725
- })]),
4602
+ "graph.node.field.set": V([
4603
+ B({
4604
+ ...Y,
4605
+ kind: W("graph.node.field.set"),
4606
+ field: U([
4607
+ "description",
4608
+ "icon",
4609
+ "name"
4610
+ ]),
4611
+ before: G.optional(),
4612
+ value: G.optional()
4613
+ }),
4614
+ B({
4615
+ ...Y,
4616
+ kind: W("graph.node.field.set"),
4617
+ field: W("maxExecutions"),
4618
+ before: L().int().positive().max(2 ** 53 - 1).optional(),
4619
+ value: L().int().positive().max(2 ** 53 - 1).optional()
4620
+ }),
4621
+ B({
4622
+ ...Y,
4623
+ kind: W("graph.node.field.set"),
4624
+ field: W("timeoutMs"),
4625
+ before: L().optional(),
4626
+ value: L().optional()
4627
+ })
4628
+ ]),
4726
4629
  "graph.node.input.set": {
4727
4630
  ...Y,
4728
4631
  handle: G,
4729
- before: rc.optional(),
4730
- value: rc.optional()
4632
+ before: ec.optional(),
4633
+ value: ec.optional()
4731
4634
  },
4732
4635
  "graph.node.additional-inputs.set": {
4733
4636
  ...Y,
@@ -4736,30 +4639,30 @@ var Ec = {
4736
4639
  },
4737
4640
  "graph.node.condition.set": {
4738
4641
  ...Y,
4739
- before: B(dc),
4740
- value: B(dc)
4642
+ before: B(cc),
4643
+ value: B(cc)
4741
4644
  },
4742
4645
  "graph.node.values.set": {
4743
4646
  ...Y,
4744
4647
  before: z(q),
4745
4648
  value: z(q)
4746
4649
  },
4747
- "graph.node.wait.set": {
4650
+ "graph.node.resolution.set": {
4748
4651
  ...Y,
4749
4652
  target: B({ kind: W("flow") }),
4750
- before: B(fc),
4751
- value: B(fc)
4653
+ before: B(lc),
4654
+ value: B(lc)
4752
4655
  },
4753
4656
  "graph.node.webhook.set": {
4754
4657
  ...Y,
4755
4658
  target: B({ kind: W("flow") }),
4756
- before: B(pc),
4757
- value: B(pc)
4659
+ before: B(uc),
4660
+ value: B(uc)
4758
4661
  },
4759
4662
  "graph.node.task.ports.set": {
4760
4663
  ...Y,
4761
- before: B(ac),
4762
- value: B(ac)
4664
+ before: B(nc),
4665
+ value: B(nc)
4763
4666
  },
4764
4667
  "graph.node.task.name.set": {
4765
4668
  ...Y,
@@ -4768,8 +4671,8 @@ var Ec = {
4768
4671
  },
4769
4672
  "graph.node.task.capabilities.set": {
4770
4673
  ...Y,
4771
- before: z(oc).optional(),
4772
- value: z(oc).optional()
4674
+ before: z(rc).optional(),
4675
+ value: z(rc).optional()
4773
4676
  },
4774
4677
  "graph.trigger.config.set": {
4775
4678
  nodeId: G,
@@ -4779,12 +4682,12 @@ var Ec = {
4779
4682
  },
4780
4683
  "graph.trigger.schedule.set": {
4781
4684
  nodeId: G,
4782
- before: mc,
4783
- value: mc
4685
+ before: qs,
4686
+ value: qs
4784
4687
  },
4785
4688
  "module.create": {
4786
4689
  moduleId: G,
4787
- module: wc
4690
+ module: bc
4788
4691
  },
4789
4692
  "module.delete": { moduleId: G },
4790
4693
  "module.rename": {
@@ -4794,24 +4697,24 @@ var Ec = {
4794
4697
  },
4795
4698
  "module.source.replace": {
4796
4699
  moduleId: G,
4797
- beforeImports: Zs,
4700
+ beforeImports: Js,
4798
4701
  beforeSource: G,
4799
- imports: Zs,
4702
+ imports: Js,
4800
4703
  source: G
4801
4704
  },
4802
4705
  "subflow.create": {
4803
4706
  subflowId: G,
4804
- subflow: xc.extend({ graph: Sc })
4707
+ subflow: _c.extend({ graph: vc })
4805
4708
  },
4806
4709
  "subflow.definition.set": {
4807
4710
  subflowId: G,
4808
- before: xc,
4809
- definition: xc
4711
+ before: _c,
4712
+ definition: _c
4810
4713
  },
4811
4714
  "subflow.delete": { subflowId: G },
4812
4715
  "task.create": {
4813
4716
  taskId: G,
4814
- task: uc
4717
+ task: sc
4815
4718
  },
4816
4719
  "task.delete": { taskId: G },
4817
4720
  "task.connector.connection.set": {
@@ -4821,8 +4724,8 @@ var Ec = {
4821
4724
  },
4822
4725
  "task.agent.set": {
4823
4726
  taskId: G,
4824
- before: uc,
4825
- value: uc
4727
+ before: sc,
4728
+ value: sc
4826
4729
  },
4827
4730
  "task.llm.mode.set": {
4828
4731
  taskId: G,
@@ -4834,27 +4737,33 @@ var Ec = {
4834
4737
  before: G,
4835
4738
  value: G
4836
4739
  }
4837
- }, Dc = new Map(Object.entries(Ec).map(([e, t]) => [e, t instanceof F ? t : B({
4740
+ }, Cc = new Map(Object.entries(Sc).map(([e, t]) => [e, t instanceof P ? t : B({
4838
4741
  kind: W(e),
4839
4742
  ...t
4840
- })])), Oc = z(V([...Dc.values()])).min(1);
4841
- function kc(e) {
4842
- return Xs(e), z(us()).min(1).parse(e).map((e, t) => {
4843
- let { kind: n } = B({ kind: G }).parse(e), r = Dc.get(n);
4844
- if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
4845
- let i = r.safeParse(e);
4846
- if (!i.success) throw TypeError(`operations[${t}]: ${i.error.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`);
4847
- return i.data;
4848
- });
4743
+ })])), wc = z(V([...Cc.values()])).min(1);
4744
+ function Tc(e, t, n) {
4745
+ try {
4746
+ return n(e);
4747
+ } catch (e) {
4748
+ throw e instanceof ho ? TypeError(`operations[${t}]: ${e.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`, { cause: e }) : e;
4749
+ }
4849
4750
  }
4850
- function Ac(e) {
4851
- let t = e == null ? Oc : Dc.get(e);
4751
+ function Ec(e, t) {
4752
+ let { kind: n } = Tc(e, t, B({ kind: G }).parse), r = Cc.get(n);
4753
+ if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
4754
+ return Tc(e, t, r.parse);
4755
+ }
4756
+ function Dc(e) {
4757
+ return Ks(e), z(cs()).min(1).parse(e).map(Ec);
4758
+ }
4759
+ function Oc(e) {
4760
+ let t = e == null ? wc : Cc.get(e);
4852
4761
  if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
4853
- return mo(t, { io: "input" });
4762
+ return uo(t, { io: "input" });
4854
4763
  }
4855
4764
  //#endregion
4856
4765
  //#region src/flow/common/change.ts
4857
- var jc = /* @__PURE__ */ new Set([
4766
+ var kc = /* @__PURE__ */ new Set([
4858
4767
  "const",
4859
4768
  "enum",
4860
4769
  "exclusiveMaximum",
@@ -4872,11 +4781,11 @@ var jc = /* @__PURE__ */ new Set([
4872
4781
  "required",
4873
4782
  "type"
4874
4783
  ]);
4875
- function Mc(e) {
4876
- return jc.has(e);
4784
+ function Ac(e) {
4785
+ return kc.has(e);
4877
4786
  }
4878
- var Nc = 80;
4879
- function Pc(e) {
4787
+ var jc = 80;
4788
+ function Mc(e) {
4880
4789
  let t = e.trim();
4881
4790
  if (t.length == 0) return "empty";
4882
4791
  if (t.length > 80) return "tooLong";
@@ -4886,13 +4795,13 @@ function Pc(e) {
4886
4795
  }
4887
4796
  if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(t)) return "specialCharacter";
4888
4797
  }
4889
- function Fc(e) {
4798
+ function Nc(e) {
4890
4799
  return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
4891
4800
  }
4892
- function Ic(e) {
4801
+ function Pc(e) {
4893
4802
  return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
4894
4803
  }
4895
- function Lc(e) {
4804
+ function Fc(e) {
4896
4805
  if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
4897
4806
  let t = /* @__PURE__ */ new Set();
4898
4807
  return e.map((e) => {
@@ -4931,24 +4840,24 @@ function Lc(e) {
4931
4840
  function X(e) {
4932
4841
  return e.trim().normalize("NFC");
4933
4842
  }
4934
- function Rc(e, t) {
4843
+ function Ic(e, t) {
4935
4844
  let n = X(e), r = new Set([...t].map(X));
4936
4845
  if (!r.has(n)) return n;
4937
4846
  let i = /^(.*) \((\d+)\)$/.exec(n), a = i?.[2], o = a != null && Number(a) >= 2 ? Number(a) : void 0, s = o == null ? n : i?.[1] ?? n, c = o == null ? 2 : o + 1;
4938
4847
  for (; r.has(`${s} (${c})`);) c += 1;
4939
4848
  return `${s} (${c})`;
4940
4849
  }
4941
- function zc(e, t, n) {
4850
+ function Lc(e, t, n) {
4942
4851
  let r = X(n);
4943
4852
  return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && X(n.name) == r) ? "duplicate" : void 0;
4944
4853
  }
4945
- var Bc = class extends Error {
4854
+ var Rc = class extends Error {
4946
4855
  constructor(e) {
4947
4856
  super(e), this.name = "FlowChangeError";
4948
4857
  }
4949
4858
  };
4950
4859
  function Z(e) {
4951
- throw new Bc(e);
4860
+ throw new Rc(e);
4952
4861
  }
4953
4862
  function Q(e, t) {
4954
4863
  if (t.kind == "flow") return e.graph;
@@ -4972,23 +4881,7 @@ function $(e, t, n) {
4972
4881
  }
4973
4882
  };
4974
4883
  }
4975
- function Vc(e, t) {
4976
- if (!("inputs" in e)) return e;
4977
- let n = { ...e.inputs };
4978
- for (let [e, r] of Object.entries(n)) {
4979
- if (r.kind != "sources") continue;
4980
- let i = r.sources.filter((e) => e.kind != "node" || !t.has(e.nodeId));
4981
- i.length == 0 ? delete n[e] : n[e] = {
4982
- kind: "sources",
4983
- sources: i
4984
- };
4985
- }
4986
- return {
4987
- ...e,
4988
- inputs: n
4989
- };
4990
- }
4991
- function Hc(e, n) {
4884
+ function zc(e, n) {
4992
4885
  let r = { ...e.document }, i = { ...e.modules };
4993
4886
  for (let e of n) switch (e.kind) {
4994
4887
  case "binding.create":
@@ -5069,8 +4962,8 @@ function Hc(e, n) {
5069
4962
  }
5070
4963
  case "graph.node.create": {
5071
4964
  let t = Q(r, e.target);
5072
- t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Lc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
5073
- let n = X(e.node.name), i = zc(t, e.nodeId, n);
4965
+ t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Fc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
4966
+ let n = X(e.node.name), i = Lc(t, e.nodeId, n);
5074
4967
  i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
5075
4968
  let a = n == e.node.name ? e.node : {
5076
4969
  ...e.node,
@@ -5088,24 +4981,12 @@ function Hc(e, n) {
5088
4981
  case "graph.node.delete": {
5089
4982
  let t = Q(r, e.target);
5090
4983
  t.nodes[e.nodeId] ?? Z("The Node does not exist in the target graph.");
5091
- let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e, Vc(t, n)]]));
5092
- if (Object.assign(r, $(r, e.target, {
4984
+ let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).filter(([e]) => !n.has(e)));
4985
+ Object.assign(r, $(r, e.target, {
5093
4986
  ...t,
5094
4987
  edges: t.edges.filter((e) => !n.has(e.source) && !n.has(e.target)),
5095
4988
  nodes: i
5096
- })), e.target.kind == "subflow") {
5097
- let t = r.subflows[e.target.id], i = t.outputs.map((e) => ({
5098
- ...e,
5099
- sources: e.sources.filter((e) => e.kind != "node" || !n.has(e.nodeId))
5100
- }));
5101
- r.subflows = {
5102
- ...r.subflows,
5103
- [e.target.id]: {
5104
- ...t,
5105
- outputs: i
5106
- }
5107
- };
5108
- }
4989
+ }));
5109
4990
  break;
5110
4991
  }
5111
4992
  case "graph.node.field.set": {
@@ -5114,7 +4995,7 @@ function Hc(e, n) {
5114
4995
  let a = { ...i };
5115
4996
  if (e.field == "name") {
5116
4997
  typeof e.value != "string" && Z("A Node name cannot be empty.");
5117
- let t = X(e.value), r = zc(n, e.nodeId, t);
4998
+ let t = X(e.value), r = Lc(n, e.nodeId, t);
5118
4999
  r == "empty" && Z("A Node name cannot be empty."), r == "duplicate" && Z("A Node with this name already exists in the target graph."), Object.assign(a, { name: t });
5119
5000
  } else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
5120
5001
  Object.assign(r, $(r, e.target, {
@@ -5146,7 +5027,7 @@ function Hc(e, n) {
5146
5027
  let n = Q(r, e.target), i = n.nodes[e.nodeId];
5147
5028
  (i?.kind != "task" || i.task == null) && Z("The inline Task Node does not exist."), t(i.task.capabilities, e.before) || Z("The inline Task capabilities changed before this operation was applied.");
5148
5029
  let a = { ...i.task };
5149
- e.value === void 0 ? delete a.capabilities : a.capabilities = Lc(e.value), Object.assign(r, $(r, e.target, {
5030
+ e.value === void 0 ? delete a.capabilities : a.capabilities = Fc(e.value), Object.assign(r, $(r, e.target, {
5150
5031
  ...n,
5151
5032
  nodes: {
5152
5033
  ...n.nodes,
@@ -5214,12 +5095,9 @@ function Hc(e, n) {
5214
5095
  }));
5215
5096
  break;
5216
5097
  }
5217
- case "graph.node.wait.set": {
5098
+ case "graph.node.resolution.set": {
5218
5099
  let n = r.graph, i = n.nodes[e.nodeId];
5219
- (i?.kind != "wait" || !t({
5220
- actions: i.actions,
5221
- prompt: i.prompt
5222
- }, e.before)) && Z("The Wait Node changed before this operation was applied.");
5100
+ (i?.kind != "wait" && i?.kind != "approval" || !t({ prompt: i.prompt }, e.before)) && Z("The resolution node changed before this operation was applied.");
5223
5101
  let a = {
5224
5102
  ...i,
5225
5103
  ...e.value
@@ -5235,10 +5113,10 @@ function Hc(e, n) {
5235
5113
  }
5236
5114
  case "graph.node.webhook.set": {
5237
5115
  let n = Q(r, e.target), i = n.nodes[e.nodeId];
5238
- i?.kind != "webhook" && Z("The Webhook Node does not exist."), (!t(i.inputsDef, e.before.inputsDef) || !t(i.options, e.before.options)) && Z("The Webhook Node changed before this operation was applied.");
5116
+ i?.kind != "webhook" && Z("The Webhook Node does not exist."), (!t(i.bodyFields, e.before.bodyFields) || !t(i.options, e.before.options)) && Z("The Webhook Node changed before this operation was applied.");
5239
5117
  let { options: a, ...o } = i, s = e.value.options == null ? {
5240
5118
  ...o,
5241
- inputsDef: e.value.inputsDef
5119
+ bodyFields: e.value.bodyFields
5242
5120
  } : {
5243
5121
  ...i,
5244
5122
  ...e.value
@@ -5312,7 +5190,7 @@ function Hc(e, n) {
5312
5190
  }
5313
5191
  case "subflow.create":
5314
5192
  r.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
5315
- for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Lc(t.task.capabilities);
5193
+ for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Fc(t.task.capabilities);
5316
5194
  r.subflows = {
5317
5195
  ...r.subflows,
5318
5196
  [e.subflowId]: e.subflow
@@ -5408,4 +5286,4 @@ function Hc(e, n) {
5408
5286
  };
5409
5287
  }
5410
5288
  //#endregion
5411
- export { Bc as FlowChangeError, Hc as applyFlowChanges, Ac as changeOperationsSchema, kc as decodeChangeOperations, Lc as decodeConnectorCapabilities, Mc as isSchemaKeyword, Rc as nextNodeName, zc as nodeNameIssue, X as normalizeNodeName, Ic as portsByHandle, Pc as resourceNameIssue, Nc as resourceNameMaxLength, Fc as validVariableName };
5289
+ export { Rc as FlowChangeError, zc as applyFlowChanges, Oc as changeOperationsSchema, Dc as decodeChangeOperations, Fc as decodeConnectorCapabilities, Ac as isSchemaKeyword, Ic as nextNodeName, Lc as nodeNameIssue, X as normalizeNodeName, Pc as portsByHandle, Mc as resourceNameIssue, jc as resourceNameMaxLength, Nc as validVariableName };