@connectedxm/zpl-generator 0.0.4-beta.4 → 0.0.4-beta.5

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.
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
- function a(e, t, n) {
2
- function r(c, u) {
1
+ function u(e, t, n) {
2
+ function r(c, a) {
3
3
  if (c._zod || Object.defineProperty(c, "_zod", {
4
4
  value: {
5
- def: u,
5
+ def: a,
6
6
  constr: i,
7
7
  traits: /* @__PURE__ */ new Set()
8
8
  },
9
9
  enumerable: !1
10
10
  }), c._zod.traits.has(e))
11
11
  return;
12
- c._zod.traits.add(e), t(c, u);
12
+ c._zod.traits.add(e), t(c, a);
13
13
  const l = i.prototype, f = Object.keys(l);
14
14
  for (let m = 0; m < f.length; m++) {
15
15
  const d = f[m];
@@ -21,9 +21,9 @@ function a(e, t, n) {
21
21
  }
22
22
  Object.defineProperty(s, "name", { value: e });
23
23
  function i(c) {
24
- var u;
24
+ var a;
25
25
  const l = n?.Parent ? new s() : this;
26
- r(l, c), (u = l._zod).deferred ?? (u.deferred = []);
26
+ r(l, c), (a = l._zod).deferred ?? (a.deferred = []);
27
27
  for (const f of l._zod.deferred)
28
28
  f();
29
29
  return l;
@@ -43,7 +43,7 @@ class Le extends Error {
43
43
  }
44
44
  }
45
45
  const Je = {};
46
- function C(e) {
46
+ function x(e) {
47
47
  return Je;
48
48
  }
49
49
  function Ve(e) {
@@ -74,8 +74,8 @@ function St(e, t) {
74
74
  const n = (e.toString().split(".")[1] || "").length, r = t.toString();
75
75
  let o = (r.split(".")[1] || "").length;
76
76
  if (o === 0 && /\d?e-\d?/.test(r)) {
77
- const u = r.match(/\d?e-(\d?)/);
78
- u?.[1] && (o = Number.parseInt(u[1]));
77
+ const a = r.match(/\d?e-(\d?)/);
78
+ a?.[1] && (o = Number.parseInt(a[1]));
79
79
  }
80
80
  const s = n > o ? n : o, i = Number.parseInt(e.toFixed(s).replace(".", "")), c = Number.parseInt(t.toFixed(s).replace(".", ""));
81
81
  return i % c / 10 ** s;
@@ -231,7 +231,7 @@ function jt(e, t) {
231
231
  });
232
232
  return A(e, o);
233
233
  }
234
- function Ct(e, t) {
234
+ function xt(e, t) {
235
235
  if (!W(t))
236
236
  throw new Error("Invalid input to safeExtend: expected a plain object");
237
237
  const n = P(e._zod.def, {
@@ -242,7 +242,7 @@ function Ct(e, t) {
242
242
  });
243
243
  return A(e, n);
244
244
  }
245
- function xt(e, t) {
245
+ function Ct(e, t) {
246
246
  const n = P(e._zod.def, {
247
247
  get shape() {
248
248
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
@@ -262,23 +262,23 @@ function Rt(e, t, n) {
262
262
  throw new Error(".partial() cannot be used on object schemas containing refinements");
263
263
  const i = P(t._zod.def, {
264
264
  get shape() {
265
- const c = t._zod.def.shape, u = { ...c };
265
+ const c = t._zod.def.shape, a = { ...c };
266
266
  if (n)
267
267
  for (const l in n) {
268
268
  if (!(l in c))
269
269
  throw new Error(`Unrecognized key: "${l}"`);
270
- n[l] && (u[l] = e ? new e({
270
+ n[l] && (a[l] = e ? new e({
271
271
  type: "optional",
272
272
  innerType: c[l]
273
273
  }) : c[l]);
274
274
  }
275
275
  else
276
276
  for (const l in c)
277
- u[l] = e ? new e({
277
+ a[l] = e ? new e({
278
278
  type: "optional",
279
279
  innerType: c[l]
280
280
  }) : c[l];
281
- return R(this, "shape", u), u;
281
+ return R(this, "shape", a), a;
282
282
  },
283
283
  checks: []
284
284
  });
@@ -325,7 +325,7 @@ function Ye(e, t) {
325
325
  function G(e) {
326
326
  return typeof e == "string" ? e : e?.message;
327
327
  }
328
- function x(e, t, n) {
328
+ function C(e, t, n) {
329
329
  const r = { ...e, path: e.path ?? [] };
330
330
  if (!e.message) {
331
331
  const o = G(e.inst?._zod.def?.error?.(e)) ?? G(t?.error?.(e)) ?? G(n.customError?.(e)) ?? G(n.localeError?.(e)) ?? "Invalid input";
@@ -356,7 +356,7 @@ const Ke = (e, t) => {
356
356
  value: () => e.message,
357
357
  enumerable: !1
358
358
  });
359
- }, Ge = a("$ZodError", Ke), He = a("$ZodError", Ke, { Parent: Error });
359
+ }, Ge = u("$ZodError", Ke), He = u("$ZodError", Ke, { Parent: Error });
360
360
  function Ft(e, t = (n) => n.message) {
361
361
  const n = {}, r = [];
362
362
  for (const o of e.issues)
@@ -377,8 +377,8 @@ function Mt(e, t = (n) => n.message) {
377
377
  else {
378
378
  let i = n, c = 0;
379
379
  for (; c < s.path.length; ) {
380
- const u = s.path[c];
381
- c === s.path.length - 1 ? (i[u] = i[u] || { _errors: [] }, i[u]._errors.push(t(s))) : i[u] = i[u] || { _errors: [] }, i = i[u], c++;
380
+ const a = s.path[c];
381
+ c === s.path.length - 1 ? (i[a] = i[a] || { _errors: [] }, i[a]._errors.push(t(s))) : i[a] = i[a] || { _errors: [] }, i = i[a], c++;
382
382
  }
383
383
  }
384
384
  };
@@ -389,7 +389,7 @@ const _e = (e) => (t, n, r, o) => {
389
389
  if (i instanceof Promise)
390
390
  throw new F();
391
391
  if (i.issues.length) {
392
- const c = new (o?.Err ?? e)(i.issues.map((u) => x(u, s, C())));
392
+ const c = new (o?.Err ?? e)(i.issues.map((a) => C(a, s, x())));
393
393
  throw Be(c, o?.callee), c;
394
394
  }
395
395
  return i.value;
@@ -397,7 +397,7 @@ const _e = (e) => (t, n, r, o) => {
397
397
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
398
398
  let i = t._zod.run({ value: n, issues: [] }, s);
399
399
  if (i instanceof Promise && (i = await i), i.issues.length) {
400
- const c = new (o?.Err ?? e)(i.issues.map((u) => x(u, s, C())));
400
+ const c = new (o?.Err ?? e)(i.issues.map((a) => C(a, s, x())));
401
401
  throw Be(c, o?.callee), c;
402
402
  }
403
403
  return i.value;
@@ -407,14 +407,14 @@ const _e = (e) => (t, n, r, o) => {
407
407
  throw new F();
408
408
  return s.issues.length ? {
409
409
  success: !1,
410
- error: new (e ?? Ge)(s.issues.map((i) => x(i, o, C())))
410
+ error: new (e ?? Ge)(s.issues.map((i) => C(i, o, x())))
411
411
  } : { success: !0, data: s.value };
412
412
  }, Ut = /* @__PURE__ */ re(He), oe = (e) => async (t, n, r) => {
413
413
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
414
414
  let s = t._zod.run({ value: n, issues: [] }, o);
415
415
  return s instanceof Promise && (s = await s), s.issues.length ? {
416
416
  success: !1,
417
- error: new e(s.issues.map((i) => x(i, o, C())))
417
+ error: new e(s.issues.map((i) => C(i, o, x())))
418
418
  } : { success: !0, data: s.value };
419
419
  }, Lt = /* @__PURE__ */ oe(He), Jt = (e) => (t, n, r) => {
420
420
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
@@ -449,14 +449,14 @@ function gn(e) {
449
449
  const vn = (e) => {
450
450
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
451
451
  return new RegExp(`^${t}$`);
452
- }, bn = /^-?\d+$/, yn = /^-?\d+(?:\.\d+)?$/, zn = /^(?:true|false)$/i, wn = /^[^A-Z]*$/, $n = /^[^a-z]*$/, E = /* @__PURE__ */ a("$ZodCheck", (e, t) => {
452
+ }, bn = /^-?\d+$/, yn = /^-?\d+(?:\.\d+)?$/, zn = /^(?:true|false)$/i, wn = /^[^A-Z]*$/, $n = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
453
453
  var n;
454
454
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
455
455
  }), et = {
456
456
  number: "number",
457
457
  bigint: "bigint",
458
458
  object: "date"
459
- }, tt = /* @__PURE__ */ a("$ZodCheckLessThan", (e, t) => {
459
+ }, tt = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
460
460
  E.init(e, t);
461
461
  const n = et[typeof t.value];
462
462
  e._zod.onattach.push((r) => {
@@ -473,7 +473,7 @@ const vn = (e) => {
473
473
  continue: !t.abort
474
474
  });
475
475
  };
476
- }), nt = /* @__PURE__ */ a("$ZodCheckGreaterThan", (e, t) => {
476
+ }), nt = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
477
477
  E.init(e, t);
478
478
  const n = et[typeof t.value];
479
479
  e._zod.onattach.push((r) => {
@@ -490,7 +490,7 @@ const vn = (e) => {
490
490
  continue: !t.abort
491
491
  });
492
492
  };
493
- }), kn = /* @__PURE__ */ a("$ZodCheckMultipleOf", (e, t) => {
493
+ }), kn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
494
494
  E.init(e, t), e._zod.onattach.push((n) => {
495
495
  var r;
496
496
  (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
@@ -506,7 +506,7 @@ const vn = (e) => {
506
506
  continue: !t.abort
507
507
  });
508
508
  };
509
- }), Zn = /* @__PURE__ */ a("$ZodCheckNumberFormat", (e, t) => {
509
+ }), Zn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
510
510
  E.init(e, t), t.format = t.format || "float64";
511
511
  const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Nt[t.format];
512
512
  e._zod.onattach.push((i) => {
@@ -567,7 +567,7 @@ const vn = (e) => {
567
567
  continue: !t.abort
568
568
  });
569
569
  };
570
- }), Sn = /* @__PURE__ */ a("$ZodCheckMaxLength", (e, t) => {
570
+ }), Sn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
571
571
  var n;
572
572
  E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
573
573
  const o = r.value;
@@ -590,7 +590,7 @@ const vn = (e) => {
590
590
  continue: !t.abort
591
591
  });
592
592
  };
593
- }), On = /* @__PURE__ */ a("$ZodCheckMinLength", (e, t) => {
593
+ }), On = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
594
594
  var n;
595
595
  E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
596
596
  const o = r.value;
@@ -613,7 +613,7 @@ const vn = (e) => {
613
613
  continue: !t.abort
614
614
  });
615
615
  };
616
- }), En = /* @__PURE__ */ a("$ZodCheckLengthEquals", (e, t) => {
616
+ }), En = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
617
617
  var n;
618
618
  E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
619
619
  const o = r.value;
@@ -636,7 +636,7 @@ const vn = (e) => {
636
636
  continue: !t.abort
637
637
  });
638
638
  };
639
- }), ie = /* @__PURE__ */ a("$ZodCheckStringFormat", (e, t) => {
639
+ }), ie = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
640
640
  var n, r;
641
641
  E.init(e, t), e._zod.onattach.push((o) => {
642
642
  const s = o._zod.bag;
@@ -653,7 +653,7 @@ const vn = (e) => {
653
653
  });
654
654
  }) : (r = e._zod).check ?? (r.check = () => {
655
655
  });
656
- }), Tn = /* @__PURE__ */ a("$ZodCheckRegex", (e, t) => {
656
+ }), Tn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
657
657
  ie.init(e, t), e._zod.check = (n) => {
658
658
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
659
659
  origin: "string",
@@ -665,11 +665,11 @@ const vn = (e) => {
665
665
  continue: !t.abort
666
666
  });
667
667
  };
668
- }), In = /* @__PURE__ */ a("$ZodCheckLowerCase", (e, t) => {
668
+ }), In = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
669
669
  t.pattern ?? (t.pattern = wn), ie.init(e, t);
670
- }), Nn = /* @__PURE__ */ a("$ZodCheckUpperCase", (e, t) => {
670
+ }), Nn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
671
671
  t.pattern ?? (t.pattern = $n), ie.init(e, t);
672
- }), Pn = /* @__PURE__ */ a("$ZodCheckIncludes", (e, t) => {
672
+ }), Pn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
673
673
  E.init(e, t);
674
674
  const n = U(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
675
675
  t.pattern = r, e._zod.onattach.push((o) => {
@@ -686,7 +686,7 @@ const vn = (e) => {
686
686
  continue: !t.abort
687
687
  });
688
688
  };
689
- }), An = /* @__PURE__ */ a("$ZodCheckStartsWith", (e, t) => {
689
+ }), An = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
690
690
  E.init(e, t);
691
691
  const n = new RegExp(`^${U(t.prefix)}.*`);
692
692
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -703,7 +703,7 @@ const vn = (e) => {
703
703
  continue: !t.abort
704
704
  });
705
705
  };
706
- }), jn = /* @__PURE__ */ a("$ZodCheckEndsWith", (e, t) => {
706
+ }), jn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
707
707
  E.init(e, t);
708
708
  const n = new RegExp(`.*${U(t.suffix)}$`);
709
709
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -720,12 +720,12 @@ const vn = (e) => {
720
720
  continue: !t.abort
721
721
  });
722
722
  };
723
- }), Cn = /* @__PURE__ */ a("$ZodCheckOverwrite", (e, t) => {
723
+ }), xn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
724
724
  E.init(e, t), e._zod.check = (n) => {
725
725
  n.value = t.tx(n.value);
726
726
  };
727
727
  });
728
- class xn {
728
+ class Cn {
729
729
  constructor(t = []) {
730
730
  this.content = [], this.indent = 0, this && (this.args = t);
731
731
  }
@@ -752,7 +752,7 @@ const Rn = {
752
752
  major: 4,
753
753
  minor: 3,
754
754
  patch: 6
755
- }, y = /* @__PURE__ */ a("$ZodType", (e, t) => {
755
+ }, y = /* @__PURE__ */ u("$ZodType", (e, t) => {
756
756
  var n;
757
757
  e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Rn;
758
758
  const r = [...e._zod.def.checks ?? []];
@@ -765,7 +765,7 @@ const Rn = {
765
765
  e._zod.run = e._zod.parse;
766
766
  });
767
767
  else {
768
- const o = (i, c, u) => {
768
+ const o = (i, c, a) => {
769
769
  let l = D(i), f;
770
770
  for (const m of c) {
771
771
  if (m._zod.def.when) {
@@ -774,7 +774,7 @@ const Rn = {
774
774
  } else if (l)
775
775
  continue;
776
776
  const d = i.issues.length, h = m._zod.check(i);
777
- if (h instanceof Promise && u?.async === !1)
777
+ if (h instanceof Promise && a?.async === !1)
778
778
  throw new F();
779
779
  if (f || h instanceof Promise)
780
780
  f = (f ?? Promise.resolve()).then(async () => {
@@ -787,16 +787,16 @@ const Rn = {
787
787
  }
788
788
  }
789
789
  return f ? f.then(() => i) : i;
790
- }, s = (i, c, u) => {
790
+ }, s = (i, c, a) => {
791
791
  if (D(i))
792
792
  return i.aborted = !0, i;
793
- const l = o(c, r, u);
793
+ const l = o(c, r, a);
794
794
  if (l instanceof Promise) {
795
- if (u.async === !1)
795
+ if (a.async === !1)
796
796
  throw new F();
797
- return l.then((f) => e._zod.parse(f, u));
797
+ return l.then((f) => e._zod.parse(f, a));
798
798
  }
799
- return e._zod.parse(l, u);
799
+ return e._zod.parse(l, a);
800
800
  };
801
801
  e._zod.run = (i, c) => {
802
802
  if (c.skipChecks)
@@ -805,13 +805,13 @@ const Rn = {
805
805
  const l = e._zod.parse({ value: i.value, issues: [] }, { ...c, skipChecks: !0 });
806
806
  return l instanceof Promise ? l.then((f) => s(f, i, c)) : s(l, i, c);
807
807
  }
808
- const u = e._zod.parse(i, c);
809
- if (u instanceof Promise) {
808
+ const a = e._zod.parse(i, c);
809
+ if (a instanceof Promise) {
810
810
  if (c.async === !1)
811
811
  throw new F();
812
- return u.then((l) => o(l, r, c));
812
+ return a.then((l) => o(l, r, c));
813
813
  }
814
- return o(u, r, c);
814
+ return o(a, r, c);
815
815
  };
816
816
  }
817
817
  _(e, "~standard", () => ({
@@ -826,7 +826,7 @@ const Rn = {
826
826
  vendor: "zod",
827
827
  version: 1
828
828
  }));
829
- }), ve = /* @__PURE__ */ a("$ZodString", (e, t) => {
829
+ }), ve = /* @__PURE__ */ u("$ZodString", (e, t) => {
830
830
  y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? vn(e._zod.bag), e._zod.parse = (n, r) => {
831
831
  if (t.coerce)
832
832
  try {
@@ -840,11 +840,11 @@ const Rn = {
840
840
  inst: e
841
841
  }), n;
842
842
  };
843
- }), v = /* @__PURE__ */ a("$ZodStringFormat", (e, t) => {
843
+ }), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
844
844
  ie.init(e, t), ve.init(e, t);
845
- }), Dn = /* @__PURE__ */ a("$ZodGUID", (e, t) => {
845
+ }), Dn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
846
846
  t.pattern ?? (t.pattern = on), v.init(e, t);
847
- }), Fn = /* @__PURE__ */ a("$ZodUUID", (e, t) => {
847
+ }), Fn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
848
848
  if (t.version) {
849
849
  const r = {
850
850
  v1: 1,
@@ -862,9 +862,9 @@ const Rn = {
862
862
  } else
863
863
  t.pattern ?? (t.pattern = we());
864
864
  v.init(e, t);
865
- }), Mn = /* @__PURE__ */ a("$ZodEmail", (e, t) => {
865
+ }), Mn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
866
866
  t.pattern ?? (t.pattern = sn), v.init(e, t);
867
- }), Un = /* @__PURE__ */ a("$ZodURL", (e, t) => {
867
+ }), Un = /* @__PURE__ */ u("$ZodURL", (e, t) => {
868
868
  v.init(e, t), e._zod.check = (n) => {
869
869
  try {
870
870
  const r = n.value.trim(), o = new URL(r);
@@ -896,31 +896,31 @@ const Rn = {
896
896
  });
897
897
  }
898
898
  };
899
- }), Ln = /* @__PURE__ */ a("$ZodEmoji", (e, t) => {
899
+ }), Ln = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
900
900
  t.pattern ?? (t.pattern = an()), v.init(e, t);
901
- }), Jn = /* @__PURE__ */ a("$ZodNanoID", (e, t) => {
901
+ }), Jn = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
902
902
  t.pattern ?? (t.pattern = nn), v.init(e, t);
903
- }), Vn = /* @__PURE__ */ a("$ZodCUID", (e, t) => {
903
+ }), Vn = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
904
904
  t.pattern ?? (t.pattern = qt), v.init(e, t);
905
- }), Bn = /* @__PURE__ */ a("$ZodCUID2", (e, t) => {
905
+ }), Bn = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
906
906
  t.pattern ?? (t.pattern = Xt), v.init(e, t);
907
- }), Wn = /* @__PURE__ */ a("$ZodULID", (e, t) => {
907
+ }), Wn = /* @__PURE__ */ u("$ZodULID", (e, t) => {
908
908
  t.pattern ?? (t.pattern = Qt), v.init(e, t);
909
- }), Yn = /* @__PURE__ */ a("$ZodXID", (e, t) => {
909
+ }), Yn = /* @__PURE__ */ u("$ZodXID", (e, t) => {
910
910
  t.pattern ?? (t.pattern = en), v.init(e, t);
911
- }), Kn = /* @__PURE__ */ a("$ZodKSUID", (e, t) => {
911
+ }), Kn = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
912
912
  t.pattern ?? (t.pattern = tn), v.init(e, t);
913
- }), Gn = /* @__PURE__ */ a("$ZodISODateTime", (e, t) => {
913
+ }), Gn = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
914
914
  t.pattern ?? (t.pattern = gn(t)), v.init(e, t);
915
- }), Hn = /* @__PURE__ */ a("$ZodISODate", (e, t) => {
915
+ }), Hn = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
916
916
  t.pattern ?? (t.pattern = mn), v.init(e, t);
917
- }), qn = /* @__PURE__ */ a("$ZodISOTime", (e, t) => {
917
+ }), qn = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
918
918
  t.pattern ?? (t.pattern = _n(t)), v.init(e, t);
919
- }), Xn = /* @__PURE__ */ a("$ZodISODuration", (e, t) => {
919
+ }), Xn = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
920
920
  t.pattern ?? (t.pattern = rn), v.init(e, t);
921
- }), Qn = /* @__PURE__ */ a("$ZodIPv4", (e, t) => {
921
+ }), Qn = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
922
922
  t.pattern ?? (t.pattern = un), v.init(e, t), e._zod.bag.format = "ipv4";
923
- }), er = /* @__PURE__ */ a("$ZodIPv6", (e, t) => {
923
+ }), er = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
924
924
  t.pattern ?? (t.pattern = ln), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
925
925
  try {
926
926
  new URL(`http://[${n.value}]`);
@@ -934,9 +934,9 @@ const Rn = {
934
934
  });
935
935
  }
936
936
  };
937
- }), tr = /* @__PURE__ */ a("$ZodCIDRv4", (e, t) => {
937
+ }), tr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
938
938
  t.pattern ?? (t.pattern = fn), v.init(e, t);
939
- }), nr = /* @__PURE__ */ a("$ZodCIDRv6", (e, t) => {
939
+ }), nr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
940
940
  t.pattern ?? (t.pattern = pn), v.init(e, t), e._zod.check = (n) => {
941
941
  const r = n.value.split("/");
942
942
  try {
@@ -973,7 +973,7 @@ function rt(e) {
973
973
  return !1;
974
974
  }
975
975
  }
976
- const rr = /* @__PURE__ */ a("$ZodBase64", (e, t) => {
976
+ const rr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
977
977
  t.pattern ?? (t.pattern = dn), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
978
978
  rt(n.value) || n.issues.push({
979
979
  code: "invalid_format",
@@ -990,7 +990,7 @@ function or(e) {
990
990
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
991
991
  return rt(n);
992
992
  }
993
- const ir = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
993
+ const ir = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
994
994
  t.pattern ?? (t.pattern = qe), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
995
995
  or(n.value) || n.issues.push({
996
996
  code: "invalid_format",
@@ -1000,7 +1000,7 @@ const ir = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
1000
1000
  continue: !t.abort
1001
1001
  });
1002
1002
  };
1003
- }), sr = /* @__PURE__ */ a("$ZodE164", (e, t) => {
1003
+ }), sr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1004
1004
  t.pattern ?? (t.pattern = hn), v.init(e, t);
1005
1005
  });
1006
1006
  function cr(e, t = null) {
@@ -1017,7 +1017,7 @@ function cr(e, t = null) {
1017
1017
  return !1;
1018
1018
  }
1019
1019
  }
1020
- const ar = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1020
+ const ar = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1021
1021
  v.init(e, t), e._zod.check = (n) => {
1022
1022
  cr(n.value, t.alg) || n.issues.push({
1023
1023
  code: "invalid_format",
@@ -1027,7 +1027,7 @@ const ar = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1027
1027
  continue: !t.abort
1028
1028
  });
1029
1029
  };
1030
- }), ot = /* @__PURE__ */ a("$ZodNumber", (e, t) => {
1030
+ }), ot = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
1031
1031
  y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? yn, e._zod.parse = (n, r) => {
1032
1032
  if (t.coerce)
1033
1033
  try {
@@ -1046,9 +1046,9 @@ const ar = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1046
1046
  ...s ? { received: s } : {}
1047
1047
  }), n;
1048
1048
  };
1049
- }), ur = /* @__PURE__ */ a("$ZodNumberFormat", (e, t) => {
1049
+ }), ur = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1050
1050
  Zn.init(e, t), ot.init(e, t);
1051
- }), lr = /* @__PURE__ */ a("$ZodBoolean", (e, t) => {
1051
+ }), lr = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
1052
1052
  y.init(e, t), e._zod.pattern = zn, e._zod.parse = (n, r) => {
1053
1053
  if (t.coerce)
1054
1054
  try {
@@ -1063,9 +1063,9 @@ const ar = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1063
1063
  inst: e
1064
1064
  }), n;
1065
1065
  };
1066
- }), fr = /* @__PURE__ */ a("$ZodUnknown", (e, t) => {
1066
+ }), fr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1067
1067
  y.init(e, t), e._zod.parse = (n) => n;
1068
- }), pr = /* @__PURE__ */ a("$ZodNever", (e, t) => {
1068
+ }), pr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1069
1069
  y.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1070
1070
  expected: "never",
1071
1071
  code: "invalid_type",
@@ -1076,7 +1076,7 @@ const ar = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1076
1076
  function $e(e, t, n) {
1077
1077
  e.issues.length && t.issues.push(...Ye(n, e.issues)), t.value[n] = e.value;
1078
1078
  }
1079
- const dr = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1079
+ const dr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1080
1080
  y.init(e, t), e._zod.parse = (n, r) => {
1081
1081
  const o = n.value;
1082
1082
  if (!Array.isArray(o))
@@ -1089,11 +1089,11 @@ const dr = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1089
1089
  n.value = Array(o.length);
1090
1090
  const s = [];
1091
1091
  for (let i = 0; i < o.length; i++) {
1092
- const c = o[i], u = t.element._zod.run({
1092
+ const c = o[i], a = t.element._zod.run({
1093
1093
  value: c,
1094
1094
  issues: []
1095
1095
  }, r);
1096
- u instanceof Promise ? s.push(u.then((l) => $e(l, n, i))) : $e(u, n, i);
1096
+ a instanceof Promise ? s.push(a.then((l) => $e(l, n, i))) : $e(a, n, i);
1097
1097
  }
1098
1098
  return s.length ? Promise.all(s).then(() => n) : n;
1099
1099
  };
@@ -1121,7 +1121,7 @@ function it(e) {
1121
1121
  };
1122
1122
  }
1123
1123
  function st(e, t, n, r, o, s) {
1124
- const i = [], c = o.keySet, u = o.catchall._zod, l = u.def.type, f = u.optout === "optional";
1124
+ const i = [], c = o.keySet, a = o.catchall._zod, l = a.def.type, f = a.optout === "optional";
1125
1125
  for (const m in t) {
1126
1126
  if (c.has(m))
1127
1127
  continue;
@@ -1129,7 +1129,7 @@ function st(e, t, n, r, o, s) {
1129
1129
  i.push(m);
1130
1130
  continue;
1131
1131
  }
1132
- const d = u.run({ value: t[m], issues: [] }, r);
1132
+ const d = a.run({ value: t[m], issues: [] }, r);
1133
1133
  d instanceof Promise ? e.push(d.then((h) => X(h, n, m, t, f))) : X(d, n, m, t, f);
1134
1134
  }
1135
1135
  return i.length && n.issues.push({
@@ -1139,34 +1139,34 @@ function st(e, t, n, r, o, s) {
1139
1139
  inst: s
1140
1140
  }), e.length ? Promise.all(e).then(() => n) : n;
1141
1141
  }
1142
- const hr = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1142
+ const hr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1143
1143
  if (y.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1144
1144
  const c = t.shape;
1145
1145
  Object.defineProperty(t, "shape", {
1146
1146
  get: () => {
1147
- const u = { ...c };
1147
+ const a = { ...c };
1148
1148
  return Object.defineProperty(t, "shape", {
1149
- value: u
1150
- }), u;
1149
+ value: a
1150
+ }), a;
1151
1151
  }
1152
1152
  });
1153
1153
  }
1154
1154
  const r = ne(() => it(t));
1155
1155
  _(e._zod, "propValues", () => {
1156
- const c = t.shape, u = {};
1156
+ const c = t.shape, a = {};
1157
1157
  for (const l in c) {
1158
1158
  const f = c[l]._zod;
1159
1159
  if (f.values) {
1160
- u[l] ?? (u[l] = /* @__PURE__ */ new Set());
1160
+ a[l] ?? (a[l] = /* @__PURE__ */ new Set());
1161
1161
  for (const m of f.values)
1162
- u[l].add(m);
1162
+ a[l].add(m);
1163
1163
  }
1164
1164
  }
1165
- return u;
1165
+ return a;
1166
1166
  });
1167
1167
  const o = B, s = t.catchall;
1168
1168
  let i;
1169
- e._zod.parse = (c, u) => {
1169
+ e._zod.parse = (c, a) => {
1170
1170
  i ?? (i = r.value);
1171
1171
  const l = c.value;
1172
1172
  if (!o(l))
@@ -1179,15 +1179,15 @@ const hr = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1179
1179
  c.value = {};
1180
1180
  const f = [], m = i.shape;
1181
1181
  for (const d of i.keys) {
1182
- const h = m[d], Z = h._zod.optout === "optional", w = h._zod.run({ value: l[d], issues: [] }, u);
1182
+ const h = m[d], Z = h._zod.optout === "optional", w = h._zod.run({ value: l[d], issues: [] }, a);
1183
1183
  w instanceof Promise ? f.push(w.then((K) => X(K, c, d, l, Z))) : X(w, c, d, l, Z);
1184
1184
  }
1185
- return s ? st(f, l, c, u, r.value, e) : f.length ? Promise.all(f).then(() => c) : c;
1185
+ return s ? st(f, l, c, a, r.value, e) : f.length ? Promise.all(f).then(() => c) : c;
1186
1186
  };
1187
- }), mr = /* @__PURE__ */ a("$ZodObjectJIT", (e, t) => {
1187
+ }), mr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1188
1188
  hr.init(e, t);
1189
1189
  const n = e._zod.parse, r = ne(() => it(t)), o = (d) => {
1190
- const h = new xn(["shape", "payload", "ctx"]), Z = r.value, w = (N) => {
1190
+ const h = new Cn(["shape", "payload", "ctx"]), Z = r.value, w = (N) => {
1191
1191
  const O = ze(N);
1192
1192
  return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
1193
1193
  };
@@ -1262,10 +1262,10 @@ function ke(e, t, n, r) {
1262
1262
  code: "invalid_union",
1263
1263
  input: t.value,
1264
1264
  inst: n,
1265
- errors: e.map((s) => s.issues.map((i) => x(i, r, C())))
1265
+ errors: e.map((s) => s.issues.map((i) => C(i, r, x())))
1266
1266
  }), t);
1267
1267
  }
1268
- const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1268
+ const ct = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1269
1269
  y.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
1270
1270
  if (t.options.every((o) => o._zod.values))
1271
1271
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
@@ -1281,8 +1281,8 @@ const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1281
1281
  return r(o, s);
1282
1282
  let i = !1;
1283
1283
  const c = [];
1284
- for (const u of t.options) {
1285
- const l = u._zod.run({
1284
+ for (const a of t.options) {
1285
+ const l = a._zod.run({
1286
1286
  value: o.value,
1287
1287
  issues: []
1288
1288
  }, s);
@@ -1294,9 +1294,9 @@ const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1294
1294
  c.push(l);
1295
1295
  }
1296
1296
  }
1297
- return i ? Promise.all(c).then((u) => ke(u, o, e, s)) : ke(c, o, e, s);
1297
+ return i ? Promise.all(c).then((a) => ke(a, o, e, s)) : ke(c, o, e, s);
1298
1298
  };
1299
- }), _r = /* @__PURE__ */ a("$ZodDiscriminatedUnion", (e, t) => {
1299
+ }), _r = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (e, t) => {
1300
1300
  t.inclusive = !1, ct.init(e, t);
1301
1301
  const n = e._zod.parse;
1302
1302
  _(e._zod, "propValues", () => {
@@ -1305,9 +1305,9 @@ const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1305
1305
  const i = s._zod.propValues;
1306
1306
  if (!i || Object.keys(i).length === 0)
1307
1307
  throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);
1308
- for (const [c, u] of Object.entries(i)) {
1308
+ for (const [c, a] of Object.entries(i)) {
1309
1309
  o[c] || (o[c] = /* @__PURE__ */ new Set());
1310
- for (const l of u)
1310
+ for (const l of a)
1311
1311
  o[c].add(l);
1312
1312
  }
1313
1313
  }
@@ -1319,10 +1319,10 @@ const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1319
1319
  const c = i._zod.propValues?.[t.discriminator];
1320
1320
  if (!c || c.size === 0)
1321
1321
  throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);
1322
- for (const u of c) {
1323
- if (s.has(u))
1324
- throw new Error(`Duplicate discriminator value "${String(u)}"`);
1325
- s.set(u, i);
1322
+ for (const a of c) {
1323
+ if (s.has(a))
1324
+ throw new Error(`Duplicate discriminator value "${String(a)}"`);
1325
+ s.set(a, i);
1326
1326
  }
1327
1327
  }
1328
1328
  return s;
@@ -1347,10 +1347,10 @@ const ct = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1347
1347
  inst: e
1348
1348
  }), o);
1349
1349
  };
1350
- }), gr = /* @__PURE__ */ a("$ZodIntersection", (e, t) => {
1350
+ }), gr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1351
1351
  y.init(e, t), e._zod.parse = (n, r) => {
1352
1352
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1353
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, l]) => Ze(n, u, l)) : Ze(n, s, i);
1353
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) => Ze(n, a, l)) : Ze(n, s, i);
1354
1354
  };
1355
1355
  });
1356
1356
  function fe(e, t) {
@@ -1394,14 +1394,14 @@ function Ze(e, t, n) {
1394
1394
  for (const c of t.issues)
1395
1395
  if (c.code === "unrecognized_keys") {
1396
1396
  o ?? (o = c);
1397
- for (const u of c.keys)
1398
- r.has(u) || r.set(u, {}), r.get(u).l = !0;
1397
+ for (const a of c.keys)
1398
+ r.has(a) || r.set(a, {}), r.get(a).l = !0;
1399
1399
  } else
1400
1400
  e.issues.push(c);
1401
1401
  for (const c of n.issues)
1402
1402
  if (c.code === "unrecognized_keys")
1403
- for (const u of c.keys)
1404
- r.has(u) || r.set(u, {}), r.get(u).r = !0;
1403
+ for (const a of c.keys)
1404
+ r.has(a) || r.set(a, {}), r.get(a).r = !0;
1405
1405
  else
1406
1406
  e.issues.push(c);
1407
1407
  const s = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
@@ -1412,7 +1412,7 @@ function Ze(e, t, n) {
1412
1412
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1413
1413
  return e.value = i.data, e;
1414
1414
  }
1415
- const vr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1415
+ const vr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1416
1416
  y.init(e, t);
1417
1417
  const n = Ve(t.entries), r = new Set(n);
1418
1418
  e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Tt.has(typeof o)).map((o) => typeof o == "string" ? U(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
@@ -1424,7 +1424,7 @@ const vr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1424
1424
  inst: e
1425
1425
  }), o;
1426
1426
  };
1427
- }), br = /* @__PURE__ */ a("$ZodLiteral", (e, t) => {
1427
+ }), br = /* @__PURE__ */ u("$ZodLiteral", (e, t) => {
1428
1428
  if (y.init(e, t), t.values.length === 0)
1429
1429
  throw new Error("Cannot create literal schema with no valid values");
1430
1430
  const n = new Set(t.values);
@@ -1437,7 +1437,7 @@ const vr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1437
1437
  inst: e
1438
1438
  }), r;
1439
1439
  };
1440
- }), yr = /* @__PURE__ */ a("$ZodTransform", (e, t) => {
1440
+ }), yr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1441
1441
  y.init(e, t), e._zod.parse = (n, r) => {
1442
1442
  if (r.direction === "backward")
1443
1443
  throw new Le(e.constructor.name);
@@ -1452,7 +1452,7 @@ const vr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1452
1452
  function Se(e, t) {
1453
1453
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1454
1454
  }
1455
- const at = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1455
+ const at = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1456
1456
  y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
1457
1457
  const n = t.innerType._zod.pattern;
1458
1458
  return n ? new RegExp(`^(${he(n.source)})?$`) : void 0;
@@ -1463,14 +1463,14 @@ const at = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1463
1463
  }
1464
1464
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1465
1465
  };
1466
- }), zr = /* @__PURE__ */ a("$ZodExactOptional", (e, t) => {
1466
+ }), zr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1467
1467
  at.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1468
- }), wr = /* @__PURE__ */ a("$ZodNullable", (e, t) => {
1468
+ }), wr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1469
1469
  y.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
1470
1470
  const n = t.innerType._zod.pattern;
1471
1471
  return n ? new RegExp(`^(${he(n.source)}|null)$`) : void 0;
1472
1472
  }), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1473
- }), $r = /* @__PURE__ */ a("$ZodDefault", (e, t) => {
1473
+ }), $r = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1474
1474
  y.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1475
1475
  if (r.direction === "backward")
1476
1476
  return t.innerType._zod.run(n, r);
@@ -1483,9 +1483,9 @@ const at = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1483
1483
  function Oe(e, t) {
1484
1484
  return e.value === void 0 && (e.value = t.defaultValue), e;
1485
1485
  }
1486
- const kr = /* @__PURE__ */ a("$ZodPrefault", (e, t) => {
1486
+ const kr = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1487
1487
  y.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1488
- }), Zr = /* @__PURE__ */ a("$ZodNonOptional", (e, t) => {
1488
+ }), Zr = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1489
1489
  y.init(e, t), _(e._zod, "values", () => {
1490
1490
  const n = t.innerType._zod.values;
1491
1491
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
@@ -1502,7 +1502,7 @@ function Ee(e, t) {
1502
1502
  inst: t
1503
1503
  }), e;
1504
1504
  }
1505
- const Sr = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
1505
+ const Sr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1506
1506
  y.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1507
1507
  if (r.direction === "backward")
1508
1508
  return t.innerType._zod.run(n, r);
@@ -1510,18 +1510,18 @@ const Sr = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
1510
1510
  return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1511
1511
  ...n,
1512
1512
  error: {
1513
- issues: s.issues.map((i) => x(i, r, C()))
1513
+ issues: s.issues.map((i) => C(i, r, x()))
1514
1514
  },
1515
1515
  input: n.value
1516
1516
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1517
1517
  ...n,
1518
1518
  error: {
1519
- issues: o.issues.map((s) => x(s, r, C()))
1519
+ issues: o.issues.map((s) => C(s, r, x()))
1520
1520
  },
1521
1521
  input: n.value
1522
1522
  }), n.issues = []), n);
1523
1523
  };
1524
- }), Or = /* @__PURE__ */ a("$ZodPipe", (e, t) => {
1524
+ }), Or = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1525
1525
  y.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1526
1526
  if (r.direction === "backward") {
1527
1527
  const s = t.out._zod.run(n, r);
@@ -1534,7 +1534,7 @@ const Sr = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
1534
1534
  function H(e, t, n) {
1535
1535
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1536
1536
  }
1537
- const Er = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
1537
+ const Er = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1538
1538
  y.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1539
1539
  if (r.direction === "backward")
1540
1540
  return t.innerType._zod.run(n, r);
@@ -1545,7 +1545,7 @@ const Er = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
1545
1545
  function Te(e) {
1546
1546
  return e.value = Object.freeze(e.value), e;
1547
1547
  }
1548
- const Tr = /* @__PURE__ */ a("$ZodCustom", (e, t) => {
1548
+ const Tr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1549
1549
  E.init(e, t), y.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1550
1550
  const r = n.value, o = t.fn(r);
1551
1551
  if (o instanceof Promise)
@@ -1641,7 +1641,7 @@ function jr(e, t) {
1641
1641
  });
1642
1642
  }
1643
1643
  // @__NO_SIDE_EFFECTS__
1644
- function Cr(e, t) {
1644
+ function xr(e, t) {
1645
1645
  return new e({
1646
1646
  type: "string",
1647
1647
  format: "uuid",
@@ -1652,7 +1652,7 @@ function Cr(e, t) {
1652
1652
  });
1653
1653
  }
1654
1654
  // @__NO_SIDE_EFFECTS__
1655
- function xr(e, t) {
1655
+ function Cr(e, t) {
1656
1656
  return new e({
1657
1657
  type: "string",
1658
1658
  format: "uuid",
@@ -1948,7 +1948,7 @@ function ae(e, t) {
1948
1948
  });
1949
1949
  }
1950
1950
  // @__NO_SIDE_EFFECTS__
1951
- function Ce(e, t) {
1951
+ function xe(e, t) {
1952
1952
  return new kn({
1953
1953
  check: "multiple_of",
1954
1954
  ...p(t),
@@ -2033,7 +2033,7 @@ function mo(e, t) {
2033
2033
  }
2034
2034
  // @__NO_SIDE_EFFECTS__
2035
2035
  function L(e) {
2036
- return new Cn({
2036
+ return new xn({
2037
2037
  check: "overwrite",
2038
2038
  tx: e
2039
2039
  });
@@ -2142,8 +2142,8 @@ function $(e, t, n = { path: [], schemaPath: [] }) {
2142
2142
  const m = e._zod.parent;
2143
2143
  m && (i.ref || (i.ref = m), $(m, t, f), t.seen.get(m).isParent = !0);
2144
2144
  }
2145
- const u = t.metadataRegistry.get(e);
2146
- return u && Object.assign(i.schema, u), t.io === "input" && S(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2145
+ const a = t.metadataRegistry.get(e);
2146
+ return a && Object.assign(i.schema, a), t.io === "input" && S(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2147
2147
  }
2148
2148
  function pt(e, t) {
2149
2149
  const n = e.seen.get(t);
@@ -2153,8 +2153,8 @@ function pt(e, t) {
2153
2153
  for (const i of e.seen.entries()) {
2154
2154
  const c = e.metadataRegistry.get(i[0])?.id;
2155
2155
  if (c) {
2156
- const u = r.get(c);
2157
- if (u && u !== i[0])
2156
+ const a = r.get(c);
2157
+ if (a && a !== i[0])
2158
2158
  throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2159
2159
  r.set(c, i[0]);
2160
2160
  }
@@ -2175,12 +2175,12 @@ function pt(e, t) {
2175
2175
  }, s = (i) => {
2176
2176
  if (i[1].schema.$ref)
2177
2177
  return;
2178
- const c = i[1], { ref: u, defId: l } = o(i);
2178
+ const c = i[1], { ref: a, defId: l } = o(i);
2179
2179
  c.def = { ...c.schema }, l && (c.defId = l);
2180
2180
  const f = c.schema;
2181
2181
  for (const m in f)
2182
2182
  delete f[m];
2183
- f.$ref = u;
2183
+ f.$ref = a;
2184
2184
  };
2185
2185
  if (e.cycles === "throw")
2186
2186
  for (const i of e.seen.entries()) {
@@ -2225,28 +2225,28 @@ function dt(e, t) {
2225
2225
  const c = e.seen.get(i);
2226
2226
  if (c.ref === null)
2227
2227
  return;
2228
- const u = c.def ?? c.schema, l = { ...u }, f = c.ref;
2228
+ const a = c.def ?? c.schema, l = { ...a }, f = c.ref;
2229
2229
  if (c.ref = null, f) {
2230
2230
  r(f);
2231
2231
  const d = e.seen.get(f), h = d.schema;
2232
- if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (u.allOf = u.allOf ?? [], u.allOf.push(h)) : Object.assign(u, h), Object.assign(u, l), i._zod.parent === f)
2233
- for (const w in u)
2234
- w === "$ref" || w === "allOf" || w in l || delete u[w];
2232
+ if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(h)) : Object.assign(a, h), Object.assign(a, l), i._zod.parent === f)
2233
+ for (const w in a)
2234
+ w === "$ref" || w === "allOf" || w in l || delete a[w];
2235
2235
  if (h.$ref && d.def)
2236
- for (const w in u)
2237
- w === "$ref" || w === "allOf" || w in d.def && JSON.stringify(u[w]) === JSON.stringify(d.def[w]) && delete u[w];
2236
+ for (const w in a)
2237
+ w === "$ref" || w === "allOf" || w in d.def && JSON.stringify(a[w]) === JSON.stringify(d.def[w]) && delete a[w];
2238
2238
  }
2239
2239
  const m = i._zod.parent;
2240
2240
  if (m && m !== f) {
2241
2241
  r(m);
2242
2242
  const d = e.seen.get(m);
2243
- if (d?.schema.$ref && (u.$ref = d.schema.$ref, d.def))
2244
- for (const h in u)
2245
- h === "$ref" || h === "allOf" || h in d.def && JSON.stringify(u[h]) === JSON.stringify(d.def[h]) && delete u[h];
2243
+ if (d?.schema.$ref && (a.$ref = d.schema.$ref, d.def))
2244
+ for (const h in a)
2245
+ h === "$ref" || h === "allOf" || h in d.def && JSON.stringify(a[h]) === JSON.stringify(d.def[h]) && delete a[h];
2246
2246
  }
2247
2247
  e.override({
2248
2248
  zodSchema: i,
2249
- jsonSchema: u,
2249
+ jsonSchema: a,
2250
2250
  path: c.path ?? []
2251
2251
  });
2252
2252
  };
@@ -2341,9 +2341,9 @@ const Zo = (e, t = {}) => (n) => {
2341
2341
  }, Oo = (e, t, n, r) => {
2342
2342
  const o = n;
2343
2343
  o.type = "string";
2344
- const { minimum: s, maximum: i, format: c, patterns: u, contentEncoding: l } = e._zod.bag;
2345
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = So[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), u && u.size > 0) {
2346
- const f = [...u];
2344
+ const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: l } = e._zod.bag;
2345
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = So[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), a && a.size > 0) {
2346
+ const f = [...a];
2347
2347
  f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
2348
2348
  ...f.map((m) => ({
2349
2349
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
@@ -2352,8 +2352,8 @@ const Zo = (e, t = {}) => (n) => {
2352
2352
  ]);
2353
2353
  }
2354
2354
  }, Eo = (e, t, n, r) => {
2355
- const o = n, { minimum: s, maximum: i, format: c, multipleOf: u, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
2356
- typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof s == "number" && (o.minimum = s, typeof f == "number" && t.target !== "draft-04" && (f >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof i == "number" && (o.maximum = i, typeof l == "number" && t.target !== "draft-04" && (l <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof u == "number" && (o.multipleOf = u);
2355
+ const o = n, { minimum: s, maximum: i, format: c, multipleOf: a, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
2356
+ typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof s == "number" && (o.minimum = s, typeof f == "number" && t.target !== "draft-04" && (f >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof i == "number" && (o.maximum = i, typeof l == "number" && t.target !== "draft-04" && (l <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
2357
2357
  }, To = (e, t, n, r) => {
2358
2358
  n.type = "boolean";
2359
2359
  }, Io = (e, t, n, r) => {
@@ -2382,10 +2382,10 @@ const Zo = (e, t = {}) => (n) => {
2382
2382
  }, jo = (e, t, n, r) => {
2383
2383
  if (t.unrepresentable === "throw")
2384
2384
  throw new Error("Custom types cannot be represented in JSON Schema");
2385
- }, Co = (e, t, n, r) => {
2385
+ }, xo = (e, t, n, r) => {
2386
2386
  if (t.unrepresentable === "throw")
2387
2387
  throw new Error("Transforms cannot be represented in JSON Schema");
2388
- }, xo = (e, t, n, r) => {
2388
+ }, Co = (e, t, n, r) => {
2389
2389
  const o = n, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
2390
2390
  typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = $(s.element, t, { ...r, path: [...r.path, "items"] });
2391
2391
  }, Ro = (e, t, n, r) => {
@@ -2397,18 +2397,18 @@ const Zo = (e, t = {}) => (n) => {
2397
2397
  ...r,
2398
2398
  path: [...r.path, "properties", l]
2399
2399
  });
2400
- const c = new Set(Object.keys(i)), u = new Set([...c].filter((l) => {
2400
+ const c = new Set(Object.keys(i)), a = new Set([...c].filter((l) => {
2401
2401
  const f = s.shape[l]._zod;
2402
2402
  return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
2403
2403
  }));
2404
- u.size > 0 && (o.required = Array.from(u)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = $(s.catchall, t, {
2404
+ a.size > 0 && (o.required = Array.from(a)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = $(s.catchall, t, {
2405
2405
  ...r,
2406
2406
  path: [...r.path, "additionalProperties"]
2407
2407
  })) : t.io === "output" && (o.additionalProperties = !1);
2408
2408
  }, Do = (e, t, n, r) => {
2409
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, u) => $(c, t, {
2409
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, a) => $(c, t, {
2410
2410
  ...r,
2411
- path: [...r.path, s ? "oneOf" : "anyOf", u]
2411
+ path: [...r.path, s ? "oneOf" : "anyOf", a]
2412
2412
  }));
2413
2413
  s ? n.oneOf = i : n.anyOf = i;
2414
2414
  }, Fo = (e, t, n, r) => {
@@ -2418,11 +2418,11 @@ const Zo = (e, t = {}) => (n) => {
2418
2418
  }), i = $(o.right, t, {
2419
2419
  ...r,
2420
2420
  path: [...r.path, "allOf", 1]
2421
- }), c = (l) => "allOf" in l && Object.keys(l).length === 1, u = [
2421
+ }), c = (l) => "allOf" in l && Object.keys(l).length === 1, a = [
2422
2422
  ...c(s) ? s.allOf : [s],
2423
2423
  ...c(i) ? i.allOf : [i]
2424
2424
  ];
2425
- n.allOf = u;
2425
+ n.allOf = a;
2426
2426
  }, Mo = (e, t, n, r) => {
2427
2427
  const o = e._zod.def, s = $(o.innerType, t, r), i = t.seen.get(e);
2428
2428
  t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
@@ -2468,25 +2468,25 @@ const Zo = (e, t = {}) => (n) => {
2468
2468
  $(o.innerType, t, r);
2469
2469
  const s = t.seen.get(e);
2470
2470
  s.ref = o.innerType;
2471
- }, Yo = /* @__PURE__ */ a("ZodISODateTime", (e, t) => {
2471
+ }, Yo = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2472
2472
  Gn.init(e, t), b.init(e, t);
2473
2473
  });
2474
2474
  function Ko(e) {
2475
2475
  return /* @__PURE__ */ eo(Yo, e);
2476
2476
  }
2477
- const Go = /* @__PURE__ */ a("ZodISODate", (e, t) => {
2477
+ const Go = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2478
2478
  Hn.init(e, t), b.init(e, t);
2479
2479
  });
2480
2480
  function Ho(e) {
2481
2481
  return /* @__PURE__ */ to(Go, e);
2482
2482
  }
2483
- const qo = /* @__PURE__ */ a("ZodISOTime", (e, t) => {
2483
+ const qo = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2484
2484
  qn.init(e, t), b.init(e, t);
2485
2485
  });
2486
2486
  function Xo(e) {
2487
2487
  return /* @__PURE__ */ no(qo, e);
2488
2488
  }
2489
- const Qo = /* @__PURE__ */ a("ZodISODuration", (e, t) => {
2489
+ const Qo = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2490
2490
  Xn.init(e, t), b.init(e, t);
2491
2491
  });
2492
2492
  function ei(e) {
@@ -2521,9 +2521,9 @@ const ti = (e, t) => {
2521
2521
  // enumerable: false,
2522
2522
  }
2523
2523
  });
2524
- }, T = a("ZodError", ti, {
2524
+ }, T = u("ZodError", ti, {
2525
2525
  Parent: Error
2526
- }), ni = /* @__PURE__ */ _e(T), ri = /* @__PURE__ */ ge(T), oi = /* @__PURE__ */ re(T), ii = /* @__PURE__ */ oe(T), si = /* @__PURE__ */ Jt(T), ci = /* @__PURE__ */ Vt(T), ai = /* @__PURE__ */ Bt(T), ui = /* @__PURE__ */ Wt(T), li = /* @__PURE__ */ Yt(T), fi = /* @__PURE__ */ Kt(T), pi = /* @__PURE__ */ Gt(T), di = /* @__PURE__ */ Ht(T), z = /* @__PURE__ */ a("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2526
+ }), ni = /* @__PURE__ */ _e(T), ri = /* @__PURE__ */ ge(T), oi = /* @__PURE__ */ re(T), ii = /* @__PURE__ */ oe(T), si = /* @__PURE__ */ Jt(T), ci = /* @__PURE__ */ Vt(T), ai = /* @__PURE__ */ Bt(T), ui = /* @__PURE__ */ Wt(T), li = /* @__PURE__ */ Yt(T), fi = /* @__PURE__ */ Kt(T), pi = /* @__PURE__ */ Gt(T), di = /* @__PURE__ */ Ht(T), z = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
2527
2527
  jsonSchema: {
2528
2528
  input: ee(e, "input"),
2529
2529
  output: ee(e, "output")
@@ -2548,96 +2548,96 @@ const ti = (e, t) => {
2548
2548
  return J.get(e);
2549
2549
  const r = e.clone();
2550
2550
  return J.add(r, n[0]), r;
2551
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), mt = /* @__PURE__ */ a("_ZodString", (e, t) => {
2551
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), mt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2552
2552
  ve.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, s) => Oo(e, r, o);
2553
2553
  const n = e._zod.bag;
2554
2554
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ uo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ po(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ ho(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ mo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Q(...r)), e.max = (...r) => e.check(/* @__PURE__ */ ut(...r)), e.length = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Q(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ lo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ fo(r)), e.trim = () => e.check(/* @__PURE__ */ go()), e.normalize = (...r) => e.check(/* @__PURE__ */ _o(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ vo()), e.toUpperCase = () => e.check(/* @__PURE__ */ bo()), e.slugify = () => e.check(/* @__PURE__ */ yo());
2555
- }), hi = /* @__PURE__ */ a("ZodString", (e, t) => {
2556
- ve.init(e, t), mt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ar(mi, n)), e.url = (n) => e.check(/* @__PURE__ */ Dr(_i, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Qr(Ni, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Fr(gi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(xe, n)), e.uuid = (n) => e.check(/* @__PURE__ */ jr(q, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Cr(q, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ xr(q, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Rr(q, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Mr(vi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(xe, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ur(bi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Lr(yi, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Jr(zi, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Hr(Ei, n)), e.base64url = (n) => e.check(/* @__PURE__ */ qr(Ti, n)), e.xid = (n) => e.check(/* @__PURE__ */ Vr(wi, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Br($i, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Wr(ki, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Yr(Zi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Kr(Si, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Gr(Oi, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Xr(Ii, n)), e.datetime = (n) => e.check(Ko(n)), e.date = (n) => e.check(Ho(n)), e.time = (n) => e.check(Xo(n)), e.duration = (n) => e.check(ei(n));
2555
+ }), hi = /* @__PURE__ */ u("ZodString", (e, t) => {
2556
+ ve.init(e, t), mt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ar(mi, n)), e.url = (n) => e.check(/* @__PURE__ */ Dr(_i, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Qr(Ni, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Fr(gi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Ce, n)), e.uuid = (n) => e.check(/* @__PURE__ */ jr(q, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ xr(q, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Cr(q, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Rr(q, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Mr(vi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Pe(Ce, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ur(bi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Lr(yi, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Jr(zi, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Hr(Ei, n)), e.base64url = (n) => e.check(/* @__PURE__ */ qr(Ti, n)), e.xid = (n) => e.check(/* @__PURE__ */ Vr(wi, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Br($i, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Wr(ki, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Yr(Zi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Kr(Si, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Gr(Oi, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Xr(Ii, n)), e.datetime = (n) => e.check(Ko(n)), e.date = (n) => e.check(Ho(n)), e.time = (n) => e.check(Xo(n)), e.duration = (n) => e.check(ei(n));
2557
2557
  });
2558
2558
  function j(e) {
2559
2559
  return /* @__PURE__ */ Pr(hi, e);
2560
2560
  }
2561
- const b = /* @__PURE__ */ a("ZodStringFormat", (e, t) => {
2561
+ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2562
2562
  v.init(e, t), mt.init(e, t);
2563
- }), mi = /* @__PURE__ */ a("ZodEmail", (e, t) => {
2563
+ }), mi = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2564
2564
  Mn.init(e, t), b.init(e, t);
2565
- }), xe = /* @__PURE__ */ a("ZodGUID", (e, t) => {
2565
+ }), Ce = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2566
2566
  Dn.init(e, t), b.init(e, t);
2567
- }), q = /* @__PURE__ */ a("ZodUUID", (e, t) => {
2567
+ }), q = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2568
2568
  Fn.init(e, t), b.init(e, t);
2569
- }), _i = /* @__PURE__ */ a("ZodURL", (e, t) => {
2569
+ }), _i = /* @__PURE__ */ u("ZodURL", (e, t) => {
2570
2570
  Un.init(e, t), b.init(e, t);
2571
- }), gi = /* @__PURE__ */ a("ZodEmoji", (e, t) => {
2571
+ }), gi = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2572
2572
  Ln.init(e, t), b.init(e, t);
2573
- }), vi = /* @__PURE__ */ a("ZodNanoID", (e, t) => {
2573
+ }), vi = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2574
2574
  Jn.init(e, t), b.init(e, t);
2575
- }), bi = /* @__PURE__ */ a("ZodCUID", (e, t) => {
2575
+ }), bi = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2576
2576
  Vn.init(e, t), b.init(e, t);
2577
- }), yi = /* @__PURE__ */ a("ZodCUID2", (e, t) => {
2577
+ }), yi = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2578
2578
  Bn.init(e, t), b.init(e, t);
2579
- }), zi = /* @__PURE__ */ a("ZodULID", (e, t) => {
2579
+ }), zi = /* @__PURE__ */ u("ZodULID", (e, t) => {
2580
2580
  Wn.init(e, t), b.init(e, t);
2581
- }), wi = /* @__PURE__ */ a("ZodXID", (e, t) => {
2581
+ }), wi = /* @__PURE__ */ u("ZodXID", (e, t) => {
2582
2582
  Yn.init(e, t), b.init(e, t);
2583
- }), $i = /* @__PURE__ */ a("ZodKSUID", (e, t) => {
2583
+ }), $i = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2584
2584
  Kn.init(e, t), b.init(e, t);
2585
- }), ki = /* @__PURE__ */ a("ZodIPv4", (e, t) => {
2585
+ }), ki = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2586
2586
  Qn.init(e, t), b.init(e, t);
2587
- }), Zi = /* @__PURE__ */ a("ZodIPv6", (e, t) => {
2587
+ }), Zi = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2588
2588
  er.init(e, t), b.init(e, t);
2589
- }), Si = /* @__PURE__ */ a("ZodCIDRv4", (e, t) => {
2589
+ }), Si = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2590
2590
  tr.init(e, t), b.init(e, t);
2591
- }), Oi = /* @__PURE__ */ a("ZodCIDRv6", (e, t) => {
2591
+ }), Oi = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2592
2592
  nr.init(e, t), b.init(e, t);
2593
- }), Ei = /* @__PURE__ */ a("ZodBase64", (e, t) => {
2593
+ }), Ei = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2594
2594
  rr.init(e, t), b.init(e, t);
2595
- }), Ti = /* @__PURE__ */ a("ZodBase64URL", (e, t) => {
2595
+ }), Ti = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2596
2596
  ir.init(e, t), b.init(e, t);
2597
- }), Ii = /* @__PURE__ */ a("ZodE164", (e, t) => {
2597
+ }), Ii = /* @__PURE__ */ u("ZodE164", (e, t) => {
2598
2598
  sr.init(e, t), b.init(e, t);
2599
- }), Ni = /* @__PURE__ */ a("ZodJWT", (e, t) => {
2599
+ }), Ni = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2600
2600
  ar.init(e, t), b.init(e, t);
2601
- }), _t = /* @__PURE__ */ a("ZodNumber", (e, t) => {
2602
- ot.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, s) => Eo(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ je(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ ae(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ ae(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ ce(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ ce(r, o)), e.int = (r) => e.check(Re(r)), e.safe = (r) => e.check(Re(r)), e.positive = (r) => e.check(/* @__PURE__ */ je(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ae(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ae(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ ce(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Ce(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Ce(r, o)), e.finite = () => e;
2601
+ }), _t = /* @__PURE__ */ u("ZodNumber", (e, t) => {
2602
+ ot.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, s) => Eo(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ je(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ ae(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ ae(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ ce(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ ce(r, o)), e.int = (r) => e.check(Re(r)), e.safe = (r) => e.check(Re(r)), e.positive = (r) => e.check(/* @__PURE__ */ je(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ae(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ae(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ ce(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ xe(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ xe(r, o)), e.finite = () => e;
2603
2603
  const n = e._zod.bag;
2604
2604
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2605
2605
  });
2606
2606
  function g(e) {
2607
2607
  return /* @__PURE__ */ oo(_t, e);
2608
2608
  }
2609
- const Pi = /* @__PURE__ */ a("ZodNumberFormat", (e, t) => {
2609
+ const Pi = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
2610
2610
  ur.init(e, t), _t.init(e, t);
2611
2611
  });
2612
2612
  function Re(e) {
2613
2613
  return /* @__PURE__ */ io(Pi, e);
2614
2614
  }
2615
- const Ai = /* @__PURE__ */ a("ZodBoolean", (e, t) => {
2615
+ const Ai = /* @__PURE__ */ u("ZodBoolean", (e, t) => {
2616
2616
  lr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => To(e, n, r);
2617
2617
  });
2618
2618
  function ji(e) {
2619
2619
  return /* @__PURE__ */ so(Ai, e);
2620
2620
  }
2621
- const Ci = /* @__PURE__ */ a("ZodUnknown", (e, t) => {
2621
+ const xi = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2622
2622
  fr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => No();
2623
2623
  });
2624
2624
  function De() {
2625
- return /* @__PURE__ */ co(Ci);
2625
+ return /* @__PURE__ */ co(xi);
2626
2626
  }
2627
- const xi = /* @__PURE__ */ a("ZodNever", (e, t) => {
2627
+ const Ci = /* @__PURE__ */ u("ZodNever", (e, t) => {
2628
2628
  pr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Io(e, n, r);
2629
2629
  });
2630
2630
  function Ri(e) {
2631
- return /* @__PURE__ */ ao(xi, e);
2631
+ return /* @__PURE__ */ ao(Ci, e);
2632
2632
  }
2633
- const Di = /* @__PURE__ */ a("ZodArray", (e, t) => {
2634
- dr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => xo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Q(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Q(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ ut(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.unwrap = () => e.element;
2633
+ const Di = /* @__PURE__ */ u("ZodArray", (e, t) => {
2634
+ dr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Co(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Q(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Q(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ ut(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.unwrap = () => e.element;
2635
2635
  });
2636
2636
  function pe(e, t) {
2637
2637
  return /* @__PURE__ */ zo(Di, e, t);
2638
2638
  }
2639
- const Fi = /* @__PURE__ */ a("ZodObject", (e, t) => {
2640
- mr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: De() }), e.loose = () => e.clone({ ...e._zod.def, catchall: De() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ri() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => jt(e, n), e.safeExtend = (n) => Ct(e, n), e.merge = (n) => xt(e, n), e.pick = (n) => Pt(e, n), e.omit = (n) => At(e, n), e.partial = (...n) => Rt(vt, e, n[0]), e.required = (...n) => Dt(bt, e, n[0]);
2639
+ const Fi = /* @__PURE__ */ u("ZodObject", (e, t) => {
2640
+ mr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: De() }), e.loose = () => e.clone({ ...e._zod.def, catchall: De() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ri() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => jt(e, n), e.safeExtend = (n) => xt(e, n), e.merge = (n) => Ct(e, n), e.pick = (n) => Pt(e, n), e.omit = (n) => At(e, n), e.partial = (...n) => Rt(vt, e, n[0]), e.required = (...n) => Dt(bt, e, n[0]);
2641
2641
  });
2642
2642
  function se(e, t) {
2643
2643
  const n = {
@@ -2647,7 +2647,7 @@ function se(e, t) {
2647
2647
  };
2648
2648
  return new Fi(n);
2649
2649
  }
2650
- const gt = /* @__PURE__ */ a("ZodUnion", (e, t) => {
2650
+ const gt = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2651
2651
  ct.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Do(e, n, r, o), e.options = t.options;
2652
2652
  });
2653
2653
  function Mi(e, t) {
@@ -2657,7 +2657,7 @@ function Mi(e, t) {
2657
2657
  ...p(t)
2658
2658
  });
2659
2659
  }
2660
- const Ui = /* @__PURE__ */ a("ZodDiscriminatedUnion", (e, t) => {
2660
+ const Ui = /* @__PURE__ */ u("ZodDiscriminatedUnion", (e, t) => {
2661
2661
  gt.init(e, t), _r.init(e, t);
2662
2662
  });
2663
2663
  function Li(e, t, n) {
@@ -2668,7 +2668,7 @@ function Li(e, t, n) {
2668
2668
  ...p(n)
2669
2669
  });
2670
2670
  }
2671
- const Ji = /* @__PURE__ */ a("ZodIntersection", (e, t) => {
2671
+ const Ji = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2672
2672
  gr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n, r, o);
2673
2673
  });
2674
2674
  function Vi(e, t) {
@@ -2678,7 +2678,7 @@ function Vi(e, t) {
2678
2678
  right: t
2679
2679
  });
2680
2680
  }
2681
- const te = /* @__PURE__ */ a("ZodEnum", (e, t) => {
2681
+ const te = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2682
2682
  vr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, s) => Po(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2683
2683
  const n = new Set(Object.keys(t.entries));
2684
2684
  e.extract = (r, o) => {
@@ -2724,7 +2724,7 @@ function k(e, t) {
2724
2724
  ...p(t)
2725
2725
  });
2726
2726
  }
2727
- const Wi = /* @__PURE__ */ a("ZodLiteral", (e, t) => {
2727
+ const Wi = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
2728
2728
  br.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ao(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
2729
2729
  get() {
2730
2730
  if (t.values.length > 1)
@@ -2740,8 +2740,8 @@ function M(e, t) {
2740
2740
  ...p(t)
2741
2741
  });
2742
2742
  }
2743
- const Yi = /* @__PURE__ */ a("ZodTransform", (e, t) => {
2744
- yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Co(e, n), e._zod.parse = (n, r) => {
2743
+ const Yi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2744
+ yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => xo(e, n), e._zod.parse = (n, r) => {
2745
2745
  if (r.direction === "backward")
2746
2746
  throw new Le(e.constructor.name);
2747
2747
  n.addIssue = (s) => {
@@ -2762,7 +2762,7 @@ function Ki(e) {
2762
2762
  transform: e
2763
2763
  });
2764
2764
  }
2765
- const vt = /* @__PURE__ */ a("ZodOptional", (e, t) => {
2765
+ const vt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2766
2766
  at.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ht(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2767
2767
  });
2768
2768
  function Fe(e) {
@@ -2771,7 +2771,7 @@ function Fe(e) {
2771
2771
  innerType: e
2772
2772
  });
2773
2773
  }
2774
- const Gi = /* @__PURE__ */ a("ZodExactOptional", (e, t) => {
2774
+ const Gi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2775
2775
  zr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ht(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2776
2776
  });
2777
2777
  function Hi(e) {
@@ -2780,7 +2780,7 @@ function Hi(e) {
2780
2780
  innerType: e
2781
2781
  });
2782
2782
  }
2783
- const qi = /* @__PURE__ */ a("ZodNullable", (e, t) => {
2783
+ const qi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2784
2784
  wr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2785
2785
  });
2786
2786
  function Me(e) {
@@ -2789,7 +2789,7 @@ function Me(e) {
2789
2789
  innerType: e
2790
2790
  });
2791
2791
  }
2792
- const Xi = /* @__PURE__ */ a("ZodDefault", (e, t) => {
2792
+ const Xi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2793
2793
  $r.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2794
2794
  });
2795
2795
  function Qi(e, t) {
@@ -2801,7 +2801,7 @@ function Qi(e, t) {
2801
2801
  }
2802
2802
  });
2803
2803
  }
2804
- const es = /* @__PURE__ */ a("ZodPrefault", (e, t) => {
2804
+ const es = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2805
2805
  kr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2806
2806
  });
2807
2807
  function ts(e, t) {
@@ -2813,7 +2813,7 @@ function ts(e, t) {
2813
2813
  }
2814
2814
  });
2815
2815
  }
2816
- const bt = /* @__PURE__ */ a("ZodNonOptional", (e, t) => {
2816
+ const bt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2817
2817
  Zr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2818
2818
  });
2819
2819
  function ns(e, t) {
@@ -2823,7 +2823,7 @@ function ns(e, t) {
2823
2823
  ...p(t)
2824
2824
  });
2825
2825
  }
2826
- const rs = /* @__PURE__ */ a("ZodCatch", (e, t) => {
2826
+ const rs = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2827
2827
  Sr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2828
2828
  });
2829
2829
  function os(e, t) {
@@ -2833,7 +2833,7 @@ function os(e, t) {
2833
2833
  catchValue: typeof t == "function" ? t : () => t
2834
2834
  });
2835
2835
  }
2836
- const is = /* @__PURE__ */ a("ZodPipe", (e, t) => {
2836
+ const is = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2837
2837
  Or.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), e.in = t.in, e.out = t.out;
2838
2838
  });
2839
2839
  function Ue(e, t) {
@@ -2844,7 +2844,7 @@ function Ue(e, t) {
2844
2844
  // ...util.normalizeParams(params),
2845
2845
  });
2846
2846
  }
2847
- const ss = /* @__PURE__ */ a("ZodReadonly", (e, t) => {
2847
+ const ss = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2848
2848
  Er.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2849
2849
  });
2850
2850
  function cs(e) {
@@ -2853,7 +2853,7 @@ function cs(e) {
2853
2853
  innerType: e
2854
2854
  });
2855
2855
  }
2856
- const as = /* @__PURE__ */ a("ZodCustom", (e, t) => {
2856
+ const as = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2857
2857
  Tr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => jo(e, n);
2858
2858
  });
2859
2859
  function us(e, t = {}) {
@@ -2930,10 +2930,10 @@ const fs = {
2930
2930
  High: "Q",
2931
2931
  Medium: "M",
2932
2932
  Lower: "L"
2933
- }, Cs = k(js), xs = {
2933
+ }, xs = k(js), Cs = {
2934
2934
  Yes: "Y",
2935
2935
  No: "N"
2936
- }, ue = k(xs), zt = {
2936
+ }, ue = k(Cs), zt = {
2937
2937
  Start: "start",
2938
2938
  End: "end"
2939
2939
  }, Rs = k(zt), Ds = {
@@ -2976,7 +2976,8 @@ const fs = {
2976
2976
  // CUSTOM
2977
2977
  charsPerLine: g().int().min(1).max(100),
2978
2978
  transformation: Ms,
2979
- maxCharacters: g().int().min(1).max(100)
2979
+ maxCharacters: g().int().min(1).max(100),
2980
+ measuredWidth: g().min(0).optional()
2980
2981
  }), Ls = be.extend({
2981
2982
  type: M("barcode"),
2982
2983
  // ^BY barWidth
@@ -2993,7 +2994,7 @@ const fs = {
2993
2994
  orientation: M("N"),
2994
2995
  model: M("2"),
2995
2996
  magnification: g().int().min(1).max(100),
2996
- errorCorrection: Cs,
2997
+ errorCorrection: xs,
2997
2998
  mask: g().int().min(0).max(7)
2998
2999
  }), Vs = Li("type", [
2999
3000
  Us,
@@ -3105,48 +3106,45 @@ function Gs(e, t) {
3105
3106
  if (!t) return e.defaultValue ?? "";
3106
3107
  let n = [];
3107
3108
  const r = e.sourceLookup.split(",");
3108
- for (const o of r)
3109
+ for (const o of r) {
3110
+ const s = o.match(/^(.+)\[(\d+)\]$/), i = s ? s[1] : o, c = s ? parseInt(s[2], 10) : void 0;
3111
+ let a;
3109
3112
  switch (e.sourceType) {
3110
- case "account": {
3111
- const s = t.account[o];
3112
- s && n.push(s);
3113
+ case "account":
3114
+ a = t.account[i];
3113
3115
  break;
3114
- }
3115
- case "accountAttributes": {
3116
- const s = t.accountAttributes.find(
3117
- (i) => i.id === o
3116
+ case "accountAttributes":
3117
+ a = t.accountAttributes.find(
3118
+ (l) => l.id === i
3118
3119
  )?.value;
3119
- s && n.push(s);
3120
3120
  break;
3121
- }
3122
- case "accountTiers": {
3123
- const s = t.accountTier?.name;
3124
- s && n.push(s);
3121
+ case "accountTiers":
3122
+ a = t.accountTier?.name;
3125
3123
  break;
3126
- }
3127
- case "pass": {
3128
- const s = t.pass[o];
3129
- s && n.push(s);
3124
+ case "pass":
3125
+ a = t.pass[i];
3130
3126
  break;
3131
- }
3132
- case "passResponses": {
3133
- const s = t.passResponses.find(
3134
- (i) => i.name === o
3127
+ case "passResponses":
3128
+ a = t.passResponses.find(
3129
+ (l) => l.name === i
3135
3130
  )?.value;
3136
- s && n.push(s);
3137
3131
  break;
3138
- }
3139
- case "passAttributes": {
3140
- const s = t.passAttributes.find(
3141
- (i) => i.name === o
3132
+ case "passAttributes":
3133
+ a = t.passAttributes.find(
3134
+ (l) => l.name === i
3142
3135
  )?.value;
3143
- s && n.push(s);
3144
3136
  break;
3145
- }
3146
3137
  default:
3147
- n.push("");
3138
+ a = "";
3148
3139
  break;
3149
3140
  }
3141
+ if (a != null)
3142
+ if (a && c !== void 0) {
3143
+ const f = a.split(",")[c];
3144
+ f !== void 0 && n.push(f.trim());
3145
+ } else
3146
+ n.push(a);
3147
+ }
3150
3148
  return n.length === 0 ? e.hideEmpty ? void 0 : (e.defaultValue ?? "").trim() : n.join(" ").trim();
3151
3149
  }
3152
3150
  function Hs(e, t) {
@@ -3176,6 +3174,8 @@ function qs(e, t) {
3176
3174
  return `^FT${e.x},${e.y}${r}${s}^FD${t}^FS`;
3177
3175
  }
3178
3176
  function Xs(e, t) {
3177
+ if (e.measuredWidth !== void 0 && e.maxWidth > 0)
3178
+ return Math.max(1, Math.ceil(e.measuredWidth / e.maxWidth));
3179
3179
  const n = t.split("\\&"), r = e.charsPerLine ?? 0;
3180
3180
  return Qs(n, r);
3181
3181
  }
@@ -3212,7 +3212,7 @@ export {
3212
3212
  V as TextTransformation,
3213
3213
  ms as ThermalMediaType,
3214
3214
  zt as VerticalAlignment,
3215
- xs as YesNo,
3215
+ Cs as YesNo,
3216
3216
  Is as allMediaModeSchema,
3217
3217
  ps as backfeedActionSchema,
3218
3218
  wt as badgeSchema,
@@ -3229,7 +3229,7 @@ export {
3229
3229
  Es as prepeelModeSchema,
3230
3230
  ws as printDensityAdjustmentSchema,
3231
3231
  vs as printOrientationSchema,
3232
- Cs as qrCodeErrorCorrectionSchema,
3232
+ xs as qrCodeErrorCorrectionSchema,
3233
3233
  Js as qrcodeFieldSchema,
3234
3234
  ks as reverseModeSchema,
3235
3235
  Fs as sourceTypeSchema,